@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:wght@600;700&display=swap');

:root {
  --blue: #0046be;
  --blue-dark: #003087;
  --blue-deeper: #001f5b;
  --red: #e31837;
  --red-dark: #b5122c;
  --yellow: #ffe000;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --gray: #e0e0e0;
  --gray-mid: #999;
  --gray-dark: #555;
  --black: #1a1a1a;
  --font: 'Barlow', sans-serif;
  --font-cond: 'Barlow Condensed', sans-serif;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
  --radius: 6px;
  --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--black); background: var(--gray-light); font-size: 15px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; }

/* ===== TOPBAR ===== */
.topbar {
  background: var(--blue-deeper);
  padding: 6px 0;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-links { display: flex; gap: 20px; }
.topbar-links a {
  color: #aac4ff;
  font-size: 12px;
  transition: color var(--transition);
}
.topbar-links a:hover { color: var(--white); }
.topbar-right { display: flex; gap: 16px; align-items: center; }
.topbar-right a {
  color: #aac4ff;
  font-size: 12px;
  transition: color var(--transition);
}
.topbar-right a:hover { color: var(--white); }

/* ===== HEADER ===== */
.header {
  background: var(--blue);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo {
  font-family: var(--font-cond);
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  letter-spacing: 1px;
}
.logo span { color: var(--yellow); }

.search-bar {
  flex: 1;
  display: flex;
  max-width: 640px;
}
.search-bar input {
  flex: 1;
  padding: 11px 16px;
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  background: #fff;
  color: var(--black);
}
.search-bar input::placeholder { color: #999; }
.search-btn {
  background: var(--yellow);
  border: none;
  padding: 0 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--blue-deeper);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.search-btn:hover { background: #ffd000; }
.search-btn svg { width: 16px; height: 16px; }

.header-actions { display: flex; gap: 20px; margin-left: auto; }
.header-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  gap: 3px;
  transition: opacity var(--transition);
  cursor: pointer;
  position: relative;
}
.header-action:hover { opacity: 0.85; }
.header-action svg { width: 22px; height: 22px; }
.header-action span { font-size: 11px; }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== NAV ===== */
.nav {
  background: var(--blue-dark);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-item {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 16px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}
.nav-item:hover, .nav-item.active {
  color: var(--white);
  border-bottom-color: var(--yellow);
}
.nav-item.deals { color: var(--yellow); font-weight: 600; }

/* ===== PROMO BANNER ===== */
.promo-banner {
  background: var(--red);
  padding: 10px 20px;
  text-align: center;
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
}
.promo-banner strong { font-weight: 700; }
.promo-banner a { color: var(--yellow); text-decoration: underline; margin-left: 8px; }

/* ===== HERO ===== */
.hero {
  background: var(--blue-deeper);
  padding: 24px 0;
}
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.hero-main {
  background: linear-gradient(135deg, #001f5b 0%, #0046be 100%);
  border-radius: 8px;
  padding: 36px;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-main::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 240px;
  height: 240px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.hero-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 3px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-cond);
  font-size: 38px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 10px;
}
.hero-sub { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 20px; }
.hero-price { font-size: 36px; font-weight: 700; color: var(--yellow); margin-bottom: 20px; }
.hero-price small { font-size: 16px; color: rgba(255,255,255,0.4); text-decoration: line-through; margin-left: 10px; font-weight: 400; }
.btn-primary {
  display: inline-block;
  background: var(--yellow);
  color: var(--blue-deeper);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: none;
  transition: all var(--transition);
  align-self: flex-start;
}
.btn-primary:hover { background: #ffd000; transform: translateY(-1px); }
.hero-emoji {
  position: absolute;
  right: 30px;
  bottom: 20px;
  font-size: 100px;
  opacity: 0.15;
  line-height: 1;
}

.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.hero-card {
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: transform var(--transition);
}
.hero-card:hover { transform: translateY(-2px); }
.hero-card-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.hero-card-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.hero-card-price { font-size: 22px; font-weight: 700; }
.hero-card-save { font-size: 12px; font-weight: 600; margin-top: 4px; }
.hero-card-icon { font-size: 56px; }
.hero-card.tv { background: #fff8e1; }
.hero-card.tv .hero-card-label { color: #f57f17; }
.hero-card.tv .hero-card-title { color: #1a1a1a; }
.hero-card.tv .hero-card-price { color: var(--blue); }
.hero-card.tv .hero-card-save { color: var(--red); }
.hero-card.gaming { background: #e8f5e9; }
.hero-card.gaming .hero-card-label { color: #2e7d32; }
.hero-card.gaming .hero-card-title { color: #1a1a1a; }
.hero-card.gaming .hero-card-price { color: var(--blue); }
.hero-card.gaming .hero-card-save { color: var(--red); }

/* ===== SECTION ===== */
.section { padding: 28px 0; background: var(--white); margin-top: 8px; }
.section-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title {
  font-family: var(--font-cond);
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-deeper);
  padding-left: 12px;
  border-left: 4px solid var(--red);
}
.section-link { font-size: 13px; color: var(--blue); font-weight: 600; transition: color var(--transition); }
.section-link:hover { color: var(--red); }

/* ===== CATEGORIES ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.cat-item {
  background: var(--gray-light);
  border: 1px solid var(--gray);
  border-radius: 8px;
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.cat-item:hover {
  border-color: var(--blue);
  background: #e8f0ff;
  transform: translateY(-2px);
}
.cat-icon { font-size: 32px; display: block; margin-bottom: 10px; }
.cat-name { font-size: 12px; font-weight: 600; color: var(--black); }

/* ===== PRODUCTS ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--gray);
  border-radius: 8px;
  padding: 14px;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.product-img {
  width: 100%;
  height: 140px;
  background: var(--gray-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  margin-bottom: 12px;
  position: relative;
}
.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
}
.badge-sale { background: var(--red); color: #fff; }
.badge-new { background: var(--blue); color: #fff; }
.badge-hot { background: #ff6d00; color: #fff; }
.product-brand { font-size: 11px; color: var(--gray-mid); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.product-name { font-size: 13px; color: var(--black); font-weight: 500; line-height: 1.4; margin-bottom: 8px; flex: 1; }
.product-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.stars { color: #f5a623; font-size: 12px; letter-spacing: 1px; }
.rating-count { font-size: 11px; color: var(--gray-mid); }
.product-pricing { margin-bottom: 10px; }
.product-price { font-size: 20px; font-weight: 700; color: var(--blue-deeper); }
.product-old { font-size: 12px; color: var(--gray-mid); text-decoration: line-through; margin-left: 6px; }
.product-save { font-size: 11px; color: var(--red); font-weight: 600; margin-top: 2px; }
.add-btn {
  width: 100%;
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--transition);
}
.add-btn:hover { background: var(--blue-dark); }
.add-btn.added { background: #2e7d32; }

/* ===== PROMO GRID ===== */
.promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.promo-card {
  border-radius: 8px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  cursor: pointer;
  transition: transform var(--transition);
  position: relative;
  overflow: hidden;
}
.promo-card:hover { transform: translateY(-2px); }
.promo-card-icon { position: absolute; right: 16px; bottom: 12px; font-size: 72px; opacity: 0.2; }
.promo-card h3 { font-family: var(--font-cond); font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.promo-card p { font-size: 13px; opacity: 0.8; margin-bottom: 16px; }
.btn-outline {
  display: inline-block;
  border: 2px solid currentColor;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  align-self: flex-start;
  transition: all var(--transition);
}
.promo-card.blue { background: var(--blue); color: #fff; }
.promo-card.red { background: var(--red); color: #fff; }
.promo-card.dark { background: var(--blue-deeper); color: #fff; }
.promo-card .btn-outline:hover { background: rgba(255,255,255,0.15); }

/* ===== FEATURES STRIP ===== */
.features-strip {
  background: var(--blue-dark);
  padding: 20px 0;
  margin-top: 8px;
}
.features-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.feature-item { text-align: center; color: #fff; }
.feature-icon { font-size: 26px; display: block; margin-bottom: 8px; }
.feature-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.feature-sub { font-size: 11px; color: rgba(255,255,255,0.6); }

/* ===== TABS ===== */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray); margin-bottom: 20px; }
.tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-dark);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tab:hover { color: var(--blue); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }

/* ===== FOOTER ===== */
.footer { background: var(--blue-deeper); padding: 40px 0 20px; margin-top: 8px; }
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand .logo { font-size: 32px; margin-bottom: 14px; display: block; }
.footer-brand p { color: rgba(255,255,255,0.5); font-size: 13px; line-height: 1.7; margin-bottom: 16px; }
.social-links { display: flex; gap: 10px; }
.social-link {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  transition: background var(--transition);
  cursor: pointer;
}
.social-link:hover { background: var(--blue); }
.footer-col h4 { color: var(--yellow); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }
.footer-col a { display: block; color: rgba(255,255,255,0.55); font-size: 13px; margin-bottom: 8px; transition: color var(--transition); cursor: pointer; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p { color: rgba(255,255,255,0.35); font-size: 12px; }
.footer-payment { display: flex; gap: 8px; align-items: center; }
.payment-badge {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ===== CART SIDEBAR ===== */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9998;
}
.cart-overlay.open { display: block; }
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 400px;
  max-width: 100vw;
  height: 100%;
  background: #fff;
  z-index: 9999;
  transition: right 0.3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(0,0,0,0.18);
}
.cart-sidebar.open { right: 0; }
.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--blue);
  color: #fff;
}
.cart-header h3 { font-size: 18px; font-weight: 700; }
.cart-close { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--gray-mid); }
.cart-empty span { font-size: 48px; display: block; margin-bottom: 12px; }
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray);
}
.cart-item-img { width: 60px; height: 60px; background: var(--gray-light); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.cart-item-price { font-size: 15px; font-weight: 700; color: var(--blue); }
.cart-item-remove { background: none; border: none; color: var(--red); font-size: 18px; cursor: pointer; }
.cart-footer { padding: 16px; border-top: 1px solid var(--gray); }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.checkout-btn {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.checkout-btn:hover { background: var(--red-dark); }

/* ===== MOBILE MENU ===== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}
.mobile-menu-btn svg { width: 24px; height: 24px; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #2e7d32;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 3000;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .topbar { display: none; }
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .logo { font-size: 24px; }
  .search-bar { order: 3; flex: 100%; max-width: 100%; }
  .header-actions { margin-left: auto; }
  .mobile-menu-btn { display: block; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { grid-template-columns: 1fr; }
  .features-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-side { grid-template-rows: auto; grid-template-columns: 1fr 1fr; }
  .hero-main { min-height: 220px; }
  .hero-title { font-size: 28px; }
  .cart-sidebar { width: 100%; right: -100%; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .features-inner { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .hero-title { font-size: 24px; }
  .hero-price { font-size: 28px; }
}
