/* =============================================
   DGH Tech Store - Main Stylesheet
   Colors: White #FFFFFF, Blue #1565C0 / #2196F3
   ============================================= */

:root {
  --primary:       #1565C0;
  --primary-light: #1976D2;
  --primary-dark:  #0D47A1;
  --accent:        #42A5F5;
  --accent2:       #00C6FF;
  --white:         #FFFFFF;
  --bg:            #F5F7FA;
  --bg2:           #EEF2FF;
  --text:          #1A1A2E;
  --text2:         #4A5568;
  --border:        #E2E8F0;
  --shadow:        0 2px 12px rgba(21,101,192,.10);
  --shadow-md:     0 8px 32px rgba(21,101,192,.15);
  --radius:        12px;
  --radius-sm:     8px;
  --transition:    all .22s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===================== HEADER / NAV ===================== */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-top {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  padding: 6px 0;
  font-size: 12px;
  color: rgba(255,255,255,.85);
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-main {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 0;
}

.site-logo img { height: 54px; object-fit: contain; }

.header-search {
  flex: 1;
  max-width: 560px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 11px 50px 11px 18px;
  border: 2px solid var(--border);
  border-radius: 30px;
  font-size: 14px;
  transition: var(--transition);
  background: var(--bg);
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(21,101,192,.08);
}

.header-search button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.header-search button:hover { transform: scale(1.05); }

.search-dropdown {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  max-height: 400px;
  overflow-y: auto;
  z-index: 999;
  display: none;
}

.search-dropdown.open { display: block; }

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  transition: var(--transition);
  cursor: pointer;
}

.search-item:hover { background: var(--bg2); }

.search-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.search-item .info .name { font-size: 13px; font-weight: 600; }
.search-item .info .price { font-size: 12px; color: var(--primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text2);
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}

.header-btn:hover { background: var(--bg2); color: var(--primary); }
.header-btn i { font-size: 20px; }

.badge {
  position: absolute;
  top: 4px;
  right: 8px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ===================== NAVBAR ===================== */
.main-nav {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
  overflow-x: auto;
}

.main-nav::-webkit-scrollbar { height: 0; }

.nav-list {
  display: flex;
  list-style: none;
  padding: 0 16px;
}

.nav-list a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  color: rgba(255,255,255,.88);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--white);
  border-color: var(--accent2);
  background: rgba(255,255,255,.08);
}

/* ===================== CONTAINER ===================== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ===================== HERO BANNER ===================== */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: #0D47A1;
  user-select: none;
  font-size: 0;
  line-height: 0;
}

/* Slide */
.hero-slide {
  display: none;
  position: relative;
  width: 100%;
  opacity: 0;
}

.hero-slide.active {
  display: block;
  opacity: 1;
  animation: heroFadeIn .45s ease both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Anchor эсвэл div — бүтэн зургийн wrapper */
.hero-slide-link {
  display: block;
  width: 100%;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  text-decoration: none;
}

a.hero-slide-link:hover { opacity: .95; }

/* Зураг — бүтэн өргөн, хадгалагдсан харьцаатай */
.hero-slide-link img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  object-position: center center;
  vertical-align: bottom;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
}

.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }

.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: var(--white); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(21,101,192,.3); }

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

/* Prev / Next arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.hero-arrow:hover {
  background: rgba(255,255,255,.32);
  transform: translateY(-50%) scale(1.08);
}

.hero-prev { left: 18px; }
.hero-next { right: 18px; }

/* Dots */
.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: var(--transition);
}

.hero-dot.active { background: var(--white); width: 24px; border-radius: 4px; }

/* ===================== SECTIONS ===================== */
.section { padding: 40px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: block;
  width: 5px;
  height: 28px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 3px;
}

.see-all {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.see-all:hover { color: var(--primary-dark); gap: 8px; }

/* ===================== CATEGORY CARDS ===================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.cat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.cat-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cat-card i {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
}

.cat-card span { font-size: 13px; font-weight: 600; color: var(--text2); }

/* ===================== PRODUCT CARDS ===================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-card:hover .product-actions { opacity: 1; transform: translateY(0); }

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge-sale {
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-new {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.product-img-wrap {
  position: relative;
  padding-top: 78%;
  overflow: hidden;
  background: var(--bg);
}

.product-img-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform .4s ease;
}

.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.product-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0, rgba(21,101,192,.9), transparent);
  padding: 12px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
}

.action-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--transition);
}

.action-btn-cart { background: var(--white); color: var(--primary); }
.action-btn-cart:hover { background: var(--primary); color: var(--white); }

.action-btn-wish { 
  background: rgba(255,255,255,.2); 
  color: var(--white); 
  flex: 0;
  padding: 8px 10px;
}
.action-btn-wish:hover { background: #e53935; }

.product-info { padding: 14px; flex: 1; display: flex; flex-direction: column; }

.product-brand {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.stars { color: #FFC107; font-size: 12px; }
.review-count { font-size: 11px; color: var(--text2); }

.product-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.price-current { font-size: 16px; font-weight: 800; color: var(--primary); }
.price-old { font-size: 12px; color: #999; text-decoration: line-through; }
.price-discount { font-size: 11px; background: #ffebee; color: #e53935; padding: 2px 6px; border-radius: 4px; font-weight: 700; }

/* ===================== PRODUCT ROW (Horizontal) ===================== */
.products-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.products-row::-webkit-scrollbar { height: 4px; }
.products-row .product-card { min-width: 200px; max-width: 200px; }

/* ===================== PROMO BANNERS ===================== */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.promo-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 160px;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  transition: var(--transition);
}

.promo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.promo-card img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.promo-info {
  position: relative;
  z-index: 1;
  padding: 16px;
  background: linear-gradient(0, rgba(13,71,161,.85), transparent);
  width: 100%;
  color: var(--white);
}

.promo-info h3 { font-size: 16px; font-weight: 700; }
.promo-info p  { font-size: 12px; opacity: .85; }

/* ===================== FLASH SALE ===================== */
.flash-sale-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.flash-title {
  font-size: 22px;
  font-weight: 800;
  color: #e53935;
  display: flex;
  align-items: center;
  gap: 8px;
}

.countdown {
  display: flex;
  gap: 6px;
  align-items: center;
}

.countdown-block {
  background: var(--primary);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.countdown-block small { font-size: 8px; font-weight: 400; opacity: .8; }
.countdown-sep { font-size: 18px; font-weight: 800; color: #e53935; }

/* ===================== SIDEBAR FILTERS ===================== */
.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.sidebar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1.5px solid var(--border);
  position: sticky;
  top: 80px;
}

.sidebar h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
}

.filter-group { margin-bottom: 20px; }
.filter-group label { font-size: 13px; font-weight: 600; color: var(--text2); display: block; margin-bottom: 10px; }

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
}

.filter-check input { accent-color: var(--primary); }

.price-range { width: 100%; accent-color: var(--primary); }

/* ===================== SHOP TOOLBAR ===================== */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1.5px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar-left { font-size: 13px; color: var(--text2); }
.toolbar-left strong { color: var(--text); }

.sort-select {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.sort-select:focus { outline: none; border-color: var(--primary); }

/* ===================== PAGINATION ===================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.page-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
  color: var(--text);
}

.page-btn:hover, .page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ===================== PRODUCT DETAIL ===================== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

.product-gallery { position: sticky; top: 80px; }

.main-img {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  border: 2px solid var(--border);
  margin-bottom: 12px;
  padding-top: 100%;
  position: relative;
}

.main-img img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 20px;
}

.thumb-row { display: flex; gap: 8px; overflow-x: auto; }

.thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  background: var(--bg);
}

.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.thumb.active, .thumb:hover { border-color: var(--primary); }

.product-detail-info h1 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }

.detail-price { margin: 16px 0; }
.detail-price .current { font-size: 32px; font-weight: 800; color: var(--primary); }
.detail-price .old { font-size: 16px; color: #999; text-decoration: line-through; margin-left: 8px; }

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.in-stock { background: #e8f5e9; color: #2e7d32; }
.out-stock { background: #ffebee; color: #c62828; }

.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
  margin-bottom: 20px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  transition: var(--transition);
  cursor: pointer;
}

.qty-btn:hover { background: var(--primary); color: var(--white); }

.qty-input {
  width: 56px;
  text-align: center;
  border: none;
  border-left: 2px solid var(--border);
  border-right: 2px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  height: 40px;
  padding: 0;
  -moz-appearance: textfield;
}

.qty-input:focus { outline: none; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-add-cart {
  flex: 1;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-add-cart:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-buy-now {
  flex: 1;
  padding: 14px 24px;
  background: linear-gradient(135deg, #e53935, #ef9a9a);
  color: var(--white);
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-buy-now:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(229,57,53,.3); }

/* ===================== SPECS TABLE ===================== */
.specs-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.specs-table tr:nth-child(even) { background: var(--bg); }
.specs-table td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
.specs-table td:first-child { color: var(--text2); width: 40%; font-weight: 600; }

/* ===================== CART SIDEBAR ===================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  max-width: 95vw;
  height: 100vh;
  background: var(--white);
  z-index: 2001;
  transition: right .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(0,0,0,.15);
}

.cart-drawer.open { right: 0; }

.cart-header {
  padding: 20px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h2 { font-size: 18px; font-weight: 700; }

.cart-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}

.cart-close:hover { background: var(--primary); color: var(--white); }

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

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item img { width: 72px; height: 72px; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); padding: 4px; flex-shrink: 0; }

.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.cart-item-price { font-size: 14px; font-weight: 800; color: var(--primary); }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.qty-sm-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.qty-sm-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

.qty-num { font-size: 14px; font-weight: 700; width: 30px; text-align: center; }

.remove-item { color: #999; font-size: 16px; cursor: pointer; transition: var(--transition); }
.remove-item:hover { color: #e53935; }

.cart-footer {
  padding: 16px 20px;
  border-top: 2px solid var(--border);
  background: var(--bg);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 14px;
}

.cart-total-row.final {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  padding-top: 8px;
  border-top: 2px solid var(--border);
  margin-top: 8px;
}

.btn-checkout {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-checkout:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  padding: 20px;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.95);
  transition: transform .3s;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
}

.modal-overlay.open .modal { transform: scale(1); }

.modal-head {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 20px 24px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-head h2 { font-size: 18px; font-weight: 700; }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
}

.modal-close:hover { background: rgba(255,255,255,.4); }

.modal-body { padding: 24px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
  background: var(--bg);
}

.form-input:focus { outline: none; border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(21,101,192,.08); }

.tab-btns {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 9px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text2);
}

.tab-btn.active { background: var(--white); color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.google-btn {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  margin-bottom: 16px;
}

.google-btn:hover { border-color: var(--primary); background: var(--bg2); }

.divider {
  text-align: center;
  position: relative;
  margin: 16px 0;
  font-size: 12px;
  color: var(--text2);
}

.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.divider::before { left: 0; }
.divider::after  { right: 0; }

/* ===================== QPAY MODAL ===================== */
.qpay-modal-body { text-align: center; padding: 28px; }

.qpay-logo { font-size: 40px; color: var(--primary); margin-bottom: 12px; }

.qpay-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.qpay-qr-wrap {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 20px auto;
  max-width: 240px;
}

.qpay-qr-wrap img { width: 100%; }

.qpay-banks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.bank-btn {
  padding: 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.bank-btn:hover { border-color: var(--primary); background: var(--bg2); }

.payment-checking {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text2);
  font-size: 13px;
  margin-top: 12px;
}

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== TOAST ===================== */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}

.toast {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn .3s ease;
  border-left: 4px solid var(--primary);
  font-size: 13px;
}

.toast.success { border-color: #2e7d32; }
.toast.error   { border-color: #e53935; }
.toast.info    { border-color: var(--primary); }

.toast i { font-size: 18px; }
.toast.success i { color: #2e7d32; }
.toast.error   i { color: #e53935; }
.toast.info    i { color: var(--primary); }

@keyframes slideIn { from { opacity:0; transform:translateX(100%); } to { opacity:1; transform:translateX(0); } }

/* ===================== FOOTER ===================== */
.site-footer {
  background: linear-gradient(135deg, #0D1B2A, #1565C0);
  color: rgba(255,255,255,.85);
  margin-top: 60px;
}

.footer-main { padding: 48px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }

.footer-brand img { height: 50px; margin-bottom: 14px; filter: brightness(10); }
.footer-brand p { font-size: 13px; line-height: 1.8; opacity: .75; }

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(255,255,255,.1);
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: 13px; opacity: .75; transition: var(--transition); }
.footer-col ul a:hover { opacity: 1; color: var(--accent2); }

.footer-social { display: flex; gap: 10px; margin-top: 16px; }

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
  color: var(--white);
}

.social-btn:hover { background: var(--accent); transform: translateY(-2px); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  opacity: .65;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===================== LOADING ===================== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text2);
}

.empty-state i { font-size: 56px; color: var(--border); margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.empty-state p  { font-size: 14px; }

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

@media (max-width: 768px) {
  .header-top { display: none; }
  .header-main { flex-wrap: wrap; gap: 12px; }
  .header-search { order: 3; flex-basis: 100%; max-width: 100%; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .promo-grid { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .product-detail { grid-template-columns: 1fr; }
  .hero-content { padding: 32px 24px; }
  .hero-content h1 { font-size: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cart-drawer { width: 100%; max-width: 100%; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .container { padding: 0 12px; }
  .promo-grid { grid-template-columns: 1fr; }
}
