/* ===========================
   PCPLANET - ESTILOS GLOBALES
   =========================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #ff5900;
  --primary-dark: #d94a00;
  --accent: #ff5900;
  --accent-dark: #d94a00;
  --gold: #ffb800;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --header-bg: #0d0d0d;
  --header-nav: #161616;
  --text: #1a1a2e;
  --text-muted: #6c757d;
  --border: #e9ecef;
  --success: #28a745;
  --danger: #dc3545;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-sm: 6px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===========================
   ANNOUNCEMENT BAR
   =========================== */
.announcement-bar {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  font-size: 13px;
  letter-spacing: 0.2px;
}
.announcement-bar strong { color: #ffd700; }

/* ===========================
   HEADER
   =========================== */
.site-header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 40px;
  max-width: 1280px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-icon { font-size: 26px; }
.logo-text {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}
.logo-accent { color: var(--accent); }

.search-bar {
  flex: 1;
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--primary); }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
}
.search-btn {
  background: var(--primary);
  border: none;
  padding: 10px 18px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}
.search-btn:hover { background: var(--primary-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #ccc;
  font-size: 11px;
  transition: color 0.2s;
  cursor: pointer;
  background: none;
  border: none;
}
.action-btn:hover { color: #fff; }

.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
  position: relative;
}
.cart-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.cart-label { display: none; }
@media (min-width: 768px) { .cart-label { display: inline; } }

.cart-badge {
  background: #ffd700;
  color: #111;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

/* CATEGORY NAV */
.category-nav {
  background: var(--header-nav);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.category-nav ul {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav ul::-webkit-scrollbar { display: none; }

.cat-link {
  display: block;
  padding: 12px 18px;
  color: #adb5bd;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.cat-link:hover, .cat-link.active {
  color: #fff;
  border-bottom-color: var(--accent);
}
.cat-deals { color: var(--accent) !important; }

/* ===========================
   HERO BANNER
   =========================== */
.hero-banner {
  background: linear-gradient(135deg, #0d1117 0%, #1a1a2e 40%, #1a3a5c 100%);
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,89,0,0.18) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text { flex: 1; }

.hero-badge {
  display: inline-block;
  background: rgba(255,89,0,0.18);
  color: var(--accent);
  border: 1px solid rgba(255,89,0,0.35);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-text h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-highlight {
  background: linear-gradient(135deg, #ff5900, #ffb800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text p {
  color: #adb5bd;
  font-size: 15px;
  max-width: 480px;
  margin-bottom: 28px;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}
.stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px 24px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.stat-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
}
.stat-label {
  display: block;
  font-size: 12px;
  color: #adb5bd;
  margin-top: 4px;
}

/* ===========================
   BUTTONS
   =========================== */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

/* ===========================
   FEATURED CATEGORIES
   =========================== */
.featured-categories {
  padding: 40px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.cat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.deals-card:hover { border-color: var(--accent); }
.cat-emoji { font-size: 36px; display: block; margin-bottom: 10px; }
.cat-card h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.cat-card p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===========================
   PRODUCTS SECTION
   =========================== */
.products-section {
  padding: 40px 0 60px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-header h2 {
  font-size: 22px;
  font-weight: 800;
  position: relative;
  padding-bottom: 8px;
}
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.sort-bar select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  background: var(--surface);
  cursor: pointer;
  outline: none;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* PRODUCT CARD */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: #d0d8e4;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 1;
}
.badge-new { background: var(--success); }
.badge-featured { background: var(--primary); }

.product-img {
  height: 180px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  padding: 16px;
}

.product-info { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-brand {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.product-rating .stars {
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 1px;
}
.product-rating .rating-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.product-rating .rating-count {
  font-size: 11px;
  color: var(--text-muted);
}

.product-stock {
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
  margin-bottom: 10px;
}
.product-stock.low { color: var(--accent); }
.product-stock.out { color: var(--danger); }

.product-pricing { margin-top: auto; }
.price-original {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  display: block;
}
.price-final {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.price-discount {
  display: inline-block;
  background: rgba(220,53,69,0.1);
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}
.price-transfer {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.add-to-cart {
  margin: 12px 14px 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  width: calc(100% - 28px);
}
.add-to-cart:hover { background: var(--primary-dark); }
.add-to-cart:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* NO RESULTS */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.no-results span { font-size: 48px; display: block; margin-bottom: 16px; }
.no-results p { font-size: 16px; margin-bottom: 20px; }
.no-results button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}

/* ===========================
   SHIPPING SECTION
   =========================== */
.shipping-section {
  background: linear-gradient(135deg, #0d1117 0%, #1a1a2e 100%);
  padding: 60px 0;
}
.shipping-calc {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.shipping-info h2 { font-size: 26px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.shipping-info p { color: #adb5bd; font-size: 14px; }
.shipping-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.shipping-form select {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  min-width: 240px;
}
.shipping-form select option { background: #1a1a2e; color: #fff; }
.shipping-result {
  background: rgba(40,167,69,0.15);
  border: 1px solid rgba(40,167,69,0.3);
  border-radius: 8px;
  padding: 12px 20px;
  color: #fff;
  font-size: 14px;
  min-width: 260px;
}
.shipping-result.free { background: rgba(40,167,69,0.2); border-color: #28a745; }
.shipping-result strong { color: #28a745; }

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background: var(--header-bg);
  padding: 60px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.footer-logo span { color: var(--accent); }
.footer-col > p {
  color: #6c757d;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.social-links { display: flex; gap: 12px; }
.social-links a {
  font-size: 20px;
  transition: transform 0.2s;
  display: inline-block;
}
.social-links a:hover { transform: scale(1.2); }

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: #6c757d; font-size: 13px; transition: color 0.2s; }
.footer-col ul a:hover { color: #fff; }

.payment-methods { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.payment-badge {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ccc;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
}
.security-badge {
  background: rgba(40,167,69,0.1);
  border: 1px solid rgba(40,167,69,0.2);
  border-radius: 8px;
  padding: 12px;
  color: #28a745;
  font-size: 13px;
  font-weight: 600;
}
.security-badge small { display: block; color: #6c757d; font-size: 11px; font-weight: 400; margin-top: 2px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { color: #6c757d; font-size: 13px; }
.footer-bottom div { display: flex; gap: 20px; }
.footer-bottom a { color: #6c757d; font-size: 13px; }
.footer-bottom a:hover { color: #fff; }

/* ===========================
   CART SIDEBAR
   =========================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.cart-overlay.active { opacity: 1; pointer-events: all; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 95vw;
  height: 100vh;
  background: var(--surface);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -4px 0 30px rgba(0,0,0,0.15);
}
.cart-sidebar.active { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  color: #fff;
}
.cart-header h3 { font-size: 16px; font-weight: 700; }
.cart-close {
  background: none;
  border: none;
  color: #adb5bd;
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.cart-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.cart-empty span { font-size: 48px; display: block; margin-bottom: 16px; }
.cart-empty p { font-size: 15px; font-weight: 600; }
.cart-empty small { font-size: 13px; }

/* CART ITEM */
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-img {
  width: 56px;
  height: 56px;
  background: var(--bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.cart-item-price { font-size: 14px; font-weight: 700; color: var(--primary); }
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.qty-btn:hover { background: var(--border); }
.qty-display { font-size: 13px; font-weight: 700; min-width: 20px; text-align: center; }
.remove-item {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
  font-family: inherit;
}
.remove-item:hover { background: rgba(220,53,69,0.1); }

.cart-footer {
  border-top: 1px solid var(--border);
  padding: 16px;
  background: #fafafa;
}

.cart-shipping-mini {
  margin-bottom: 12px;
}
.cart-shipping-mini label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.cart-shipping-mini select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
}

.cart-totals { margin-bottom: 12px; }
.total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--border);
}
.total-row:last-child { border-bottom: none; }
.total-final {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  padding-top: 10px;
}

.btn-checkout {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 8px;
  font-family: inherit;
}
.btn-checkout:hover { background: var(--accent-dark); }

.btn-clear {
  width: 100%;
  background: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-clear:hover { color: var(--danger); border-color: var(--danger); }

/* ===========================
   TOAST
   =========================== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #1a1a2e;
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 3000;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-lg);
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #155724; border-left: 4px solid #28a745; }
.toast.error { background: #721c24; border-left: 4px solid #dc3545; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { display: none; }
}

@media (max-width: 768px) {
  .header-top { padding: 12px 16px; gap: 10px; }
  .search-bar input { font-size: 13px; }
  .action-btn span { display: none; }
  .category-nav ul { padding: 0 10px; }
  .hero-banner { padding: 40px 20px; }
  .cat-cards { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .shipping-calc { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-img { height: 140px; font-size: 48px; }
}
