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

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg-secondary: #f1f5f9;
  --danger: #ef4444;
  --success: #22c55e;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --max-width: 1200px;
  --transition: 200ms ease;
  --color-set-one-1: #425A8B;
  --color-set-one-bor-1: #D5DFE4;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 1232px) {
  .container {
    padding: 0;
  }
}

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  position: relative;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 1232px) {
  .header-inner {
    padding: 0;
  }
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.logo span {
  color: var(--text);
}

.search-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: 480px;
  width: 100%;
}

@media (max-width: 1024px) {
  .search-bar {
    position: relative;
    left: auto;
    transform: none;
    flex: 1;
  }
}



.search-bar input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  background: var(--bg);
  transition: border-color var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 300;
  max-height: 360px;
  overflow-y: auto;
  margin-top: 4px;
}

.search-results.visible {
  display: block;
}

.search-result-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}

.search-result-item:last-child {
  border-bottom: none;
}

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

.sri-img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.sri-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.sri-img svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  opacity: 0.3;
}

.sri-info {
  flex: 1;
  min-width: 0;
}

.sri-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sri-price {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
  margin-top: 2px;
}

.search-result-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-bar .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

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

.header-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text);
  position: relative;
  transition: background var(--transition);
}

.header-actions button:hover {
  background: var(--bg);
}

.header-actions svg {
  width: 22px;
  height: 22px;
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

.cart-badge.visible {
  display: flex;
}

/* Nav */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 99;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 44px;
}

.nav-inner a {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-inner a:hover,
.nav-inner a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Banner */
.banner {
  margin: 24px auto;
  max-width: var(--max-width);
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
  display: flex;
  align-items: center;
  padding: 48px;
}

.banner-content {
  color: #fff;
  max-width: 500px;
  position: relative;
  z-index: 1;
}

.banner-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}

.banner-content p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
}

.banner-content .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  transition: background var(--transition);
}

.banner-content .btn:hover {
  background: var(--primary-hover);
}

.banner-image {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  height: 260px;
  opacity: 0.9;
}

/* Dual Banner Row */
.dual-banner-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.dual-banner-item {
  height: 228px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  padding: 24px 32px;
  cursor: pointer;
  transition: transform var(--transition);
}

.dual-banner-item:hover {
  transform: translateY(-2px);
}

.dual-banner-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.dual-banner-item p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}

/* Slider dots */
.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 1;
}
.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.2s;
}
.slider-dot.active {
  background: #fff;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section */
.section {
  margin: 40px 0;
}

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

.section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.section-header a {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
  transition: color var(--transition);
}

.section-header a:hover {
  color: var(--primary-hover);
}

/* Categories Carousel */
.categories-wrapper {
  position: relative;
}

.categories-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 40px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.categories-carousel::-webkit-scrollbar {
  display: none;
}

.cat-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background var(--transition), box-shadow var(--transition);
  color: var(--text);
}

.cat-arrow:hover {
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.cat-arrow-left {
  left: 4px;
}

.cat-arrow-right {
  right: 4px;
}

@media (max-width: 640px) {
  .cat-arrow {
    display: none;
  }
}

/* Mobile Menu & Search Toggle */
.mb-menu-btn,
.mb-search-btn {
  display: none;
}

.mb-menu-panel,
.mb-menu-overlay,
.mb-search-panel {
  display: none;
}

@media (max-width: 640px) {
  .mb-menu-btn,
  .mb-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text);
    flex-shrink: 0;
  }

  .mb-menu-btn:hover,
  .mb-search-btn:hover {
    background: var(--bg);
  }

  .search-bar {
    display: none;
  }

  .mb-search-panel {
    display: none;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    position: relative;
    z-index: 99;
  }

  .mb-search-panel.open {
    display: block;
  }

  .mb-search-panel input {
    width: 100%;
    height: 40px;
    padding: 0 14px;
  border: 1px solid #173495;
    border-radius: 999px;
    font-size: 0.9rem;
    background: var(--bg);
  }

  .mb-search-panel input:focus {
    outline: none;
    border-color: var(--primary);
  }

  .mb-menu-panel {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 60px;
    background: var(--surface);
    z-index: 150;
    padding: 12px 0;
    overflow-y: auto;
  }

  .mb-menu-panel.open {
    display: block;
  }

  .mb-menu-panel .container {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mb-menu-panel a {
    display: block;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    border-radius: 8px;
    transition: background var(--transition);
  }

  .mb-menu-panel a:hover,
  .mb-menu-panel a.active {
    background: var(--bg);
    color: var(--primary);
  }

  .mb-menu-overlay {
    display: none;
  }

  .mb-menu-btn.active .mb-menu-close {
    display: block !important;
  }

  .mb-menu-btn.active svg:first-child {
    display: none;
  }
}

.category-card {
  flex: 0 0 auto;
  width: 105px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  background: var(--surface);
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.category-card .cat-image {
  width: 105px;
  height: 92px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.category-card .cat-image svg,
.category-card .cat-image img {
  width: 100%;
  height: 100%;
  color: var(--primary);
}

.category-card .cat-image img {
  object-fit: cover;
  border-radius: 4px;
  color: transparent;
}

.category-card .cat-name {
  width: 105px;
  height: 35px;
  margin: 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0 4px;
  line-height: 1.2;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 21px;
}

/* Product Card */
.product-card {
  width: 100%;
  height: 385px;
  margin: 6px 0 30px;
  border: 1px solid #D5DFE4;
  border-radius: var(--radius);
  padding: 13px;
  background: var(--surface);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.badge-discount {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.pc-image {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.pc-image svg {
  width: 80px;
  height: 80px;
  color: var(--text-muted);
  opacity: 0.4;
}

.pc-wishlist-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all var(--transition);
}

.pc-wishlist-btn svg {
  width: 16px;
  height: 16px;
  color: #94a3b8;
  opacity: 1;
  transition: color var(--transition);
}

.pc-wishlist-btn:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pc-wishlist-btn:hover svg {
  color: #ef4444;
}

.pc-wishlist-btn.active {
  background: transparent;
}

.pc-wishlist-btn.active svg {
  color: #ef4444;
}

.detail-main-image .pc-wishlist-btn {
  animation: heartPulse 1.5s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.pc-name {
  width: 100%;
  height: 50px;
  margin-top: 5px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pc-rating {
  width: 100%;
  height: 27px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
}

.pc-rating .stars {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.pc-rating .count {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.pc-price {
  width: 100%;
  height: 27px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pc-price .current {
  font-size: 1.05rem;
  font-weight: 700;
  color: #425a8b;
}

.pc-price .original {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.pc-actions {
  margin-top: auto;
  display: flex;
  gap: 6px;
  align-items: center;
}

.pc-actions .btn-buy {
  flex: 1;
  height: 35px;
  padding: 4px 8px;
  background: var(--color-set-one-1);
  color: #fff;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background var(--transition);
  white-space: nowrap;
}

.pc-actions .btn-buy:hover {
  background: var(--primary-hover);
}

.pc-actions .btn-cart {
  width: 35px;
  height: 35px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
}

.pc-actions .btn-cart:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

.pc-actions .btn-cart svg {
  width: 18px;
  height: 18px;
}

/* Cart Sidebar */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

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

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100%;
  background: var(--surface);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 300ms ease;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

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

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

.cart-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

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

.cart-close:hover {
  background: var(--bg);
}

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

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  gap: 12px;
}

.cart-empty svg {
  width: 64px;
  height: 64px;
  opacity: 0.3;
}

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

.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.cart-item-img svg {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  opacity: 0.3;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-info .price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
}

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

.cart-item-qty button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--transition);
}

.cart-item-qty button:hover {
  background: var(--bg);
}

.cart-item-qty span {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  align-self: flex-start;
  color: var(--text-muted);
  padding: 4px;
  transition: color var(--transition);
}

.cart-item-remove:hover {
  color: var(--danger);
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cart-total .amount {
  color: var(--primary);
}

.btn-checkout {
  width: 100%;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background var(--transition);
}

.btn-checkout:hover {
  background: var(--primary-hover);
}

/* Wishlist Sidebar */
.wishlist-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.wishlist-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.wishlist-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100%;
  background: var(--surface);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 300ms ease;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.wishlist-sidebar.open {
  right: 0;
}

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

.wishlist-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.wishlist-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.wishlist-close:hover {
  background: var(--bg);
}

.wishlist-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

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

.wishlist-item-img {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.wishlist-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.wishlist-item-img svg {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  opacity: 0.3;
}

.wishlist-item-info {
  flex: 1;
  min-width: 0;
}

.wishlist-item-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wishlist-item-info .price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.wishlist-item-actions {
  display: flex;
  gap: 8px;
}

.wishlist-item-actions .btn-add-cart {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition);
}

.wishlist-item-actions .btn-add-cart:hover {
  background: var(--primary-hover);
}

.wishlist-item-remove {
  align-self: flex-start;
  color: var(--text-muted);
  padding: 4px;
  transition: color var(--transition);
}

.wishlist-item-remove:hover {
  color: var(--danger);
}

.wishlist-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}

/* Product Detail */
.product-detail {
  display: none;
  padding: 32px 0;
}

.product-detail.active {
  display: block;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #425a8b;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  transition: color var(--transition);
}

.detail-back:hover {
  color: var(--primary-hover);
}

/* === Product Detail === */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* Gallery */
.detail-gallery {
  display: flex;
  gap: 12px;
}

.detail-thumbs-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.detail-thumbs-col img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition);
}

.detail-thumbs-col img:hover,
.detail-thumbs-col img.active {
  border-color: var(--primary);
}

.detail-main-image {
  flex: 1;
  height: 420px;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.detail-main-image svg {
  width: 140px;
  height: 140px;
  color: var(--text-muted);
  opacity: 0.3;
}

.detail-main-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.detail-discount-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ef4444;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}

/* Info */
.detail-info {
  display: flex;
  flex-direction: column;
}

.detail-category {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.detail-info h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.25;
}

.detail-info .detail-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-info .detail-rating .stars {
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 2px;
}

.detail-info .detail-rating .count {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.detail-info .detail-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail-info .detail-price .current {
  font-size: 1.8rem;
  font-weight: 800;
  color: #425a8b;
}

.detail-info .detail-price .original {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.detail-info .detail-price .badge {
  font-size: 0.75rem;
  background: var(--danger);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.detail-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Quantity */
.detail-qty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-qty-total {
  font-size: 16px;
  font-weight: 700;
  color: #7d7f83;
  margin-left: 4px;
}

.qty-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.qty-control button {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background var(--transition);
}

.qty-control button:hover {
  background: var(--border);
}

.qty-control span {
  width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Actions */
.detail-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-actions .btn-primary {
  flex: 1;
  height: 50px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.detail-actions .btn-primary:hover {
  background: var(--primary-hover);
}

.detail-actions .btn-secondary {
  flex: 1;
  height: 50px;
  padding: 0 20px;
  border: 1px solid #173495;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: all var(--transition);
}

.detail-actions .btn-secondary:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* Meta */
.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.meta-item svg {
  flex-shrink: 0;
  color: var(--success);
}

/* Sections */
.detail-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.detail-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Specs grid */
.detail-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  background: var(--surface);
}

.spec-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

/* Related */
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.related-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  background: var(--surface);
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.related-img {
  width: 100%;
  height: 120px;
  background: var(--bg);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
}

.related-img svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.3;
}

.related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-name {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

/* Detail responsive */
@media (max-width: 1024px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-main-image {
    height: 320px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-specs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .detail-gallery {
    flex-direction: column-reverse;
  }

  .detail-thumbs-col {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .detail-thumbs-col img {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
  }

  .detail-main-image {
    height: 260px;
  }

  .detail-info h1 {
    font-size: 1.3rem;
  }

  .detail-info .detail-price .current {
    font-size: 1.4rem;
  }

  .detail-actions .btn-secondary {
    justify-content: center;
  }

  .detail-meta {
    margin-top: 0;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .detail-section {
    margin-top: 24px;
    padding-top: 20px;
  }
}

/* Checkout */
.checkout-section {
  display: none;
  padding: 32px 0;
}

.checkout-section.active {
  display: block;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.checkout-form h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}
.modal {
  background: var(--bg);
  border-radius: var(--radius);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}
.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-secondary);
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.btn-full {
  width: 100%;
  justify-content: center;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--color-set-one-1);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-secondary:hover {
  background: var(--border);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Account Panel */
.account-layout {
  display: flex;
  gap: 28px;
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 16px;
  align-items: flex-start;
}
.account-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  position: sticky;
  top: 88px;
}
.account-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.account-dashboard-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background var(--transition);
}

.account-dashboard-link:hover {
  background: var(--bg-secondary);
}

.account-dashboard-link.active {
  background: var(--primary);
  color: #fff;
}
.account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-set-one-1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.account-nav {
  display: flex;
  flex-direction: column;
}
.account-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
}
.account-nav a:hover {
  background: var(--bg-secondary);
}
.account-nav a.active {
  background: var(--bg-secondary);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}
.account-content {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px;
}
.account-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
}
.account-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.account-stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: all var(--transition);
}
.account-stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.account-stat-card .stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}
.account-stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
@media (max-width: 768px) {
  .account-layout {
    flex-direction: column;
    padding: 0 8px;
    margin: 12px 0;
  }
  .account-sidebar {
    width: 100%;
    position: static;
  }
  .account-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-bottom: 1px solid var(--border);
  }
  .account-nav a[data-account-nav="dashboard"] {
    display: none;
  }
  .account-dashboard-mobile {
    display: flex !important;
  }

  .account-dashboard-mobile.active {
    color: var(--primary) !important;
  }
  .account-nav a {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 10px 4px;
    font-size: 0.65rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    line-height: 1.2;
  }
  .account-nav a svg {
    flex-shrink: 0;
  }
  .account-nav a.active {
    border-left-color: transparent;
    border-bottom-color: var(--primary);
  }
  .account-content {
    padding: 20px;
  }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkout-summary {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid #94a3b8;
  padding: 20px;
  position: sticky;
  top: 88px;
}

.checkout-summary h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.checkout-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
}

.checkout-summary-item[data-id] {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  margin: 0 -12px;
}

.checkout-summary-item[data-id]:nth-child(odd) {
  background: #e2e8f0;
}

.checkout-summary-item[data-id]:nth-child(even) {
  background: #cfd8e1;
}

.cs-item-img {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.cs-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.cs-item-img svg {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  opacity: 0.3;
}

.cs-item-info {
  flex: 1;
  min-width: 0;
}

.cs-item-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

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

.cs-item-qty button {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition);
}

.cs-item-qty button:hover {
  background: var(--bg);
}

.cs-qty-value {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}

.cs-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.cs-item-total {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.cs-item-remove {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #94a3b8;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.cs-item-remove:hover {
  color: #ef4444;
  background: #fef2f2;
}

.checkout-summary-sub {
  padding: 12px;
  margin: 12px -12px 0;
}

.checkout-summary-sub .checkout-summary-item {
  padding: 10px 0;
}

.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  padding: 16px 0 0;
  margin-top: 12px;
  font-size: 1.1rem;
  font-weight: 700;
}

.checkout-summary-total .amount {
  color: var(--primary);
}

.btn-place-order {
  width: 100%;
  height: 48px;
  background: var(--success);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 20px;
  transition: background var(--transition);
}

.btn-place-order:hover {
  background: #16a34a;
}

/* Loading / Empty / Error states */
.state-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
}

.state-message svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

.state-message h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.state-message p {
  font-size: 0.9rem;
  max-width: 360px;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #f1f5f9 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

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

  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  width: 100%;
  height: 385px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-image {
  width: 100%;
  height: 200px;
}

.skeleton-line {
  height: 14px;
  width: 100%;
}

.skeleton-line.short {
  width: 60%;
}

/* Footer */
.footer {
  background: #1e293b;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 60px;
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand h3 span {
  color: var(--primary);
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 300ms ease, opacity 300ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

.mobile-bottom-nav ul {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  align-items: center;
  list-style: none;
}

.mobile-bottom-nav ul li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
}

.mobile-bottom-nav ul li a:hover {
  color: var(--primary);
}

.mobile-bottom-nav ul li a span {
  font-size: 0.65rem;
  font-weight: 500;
}

.mobile-bottom-nav ul li:nth-child(1) a {
  color: #425a8b;
}

.mobile-bottom-nav ul li:nth-child(1) a:hover {
  color: #425a8b;
}

.mb-home {
  margin-top: -20px;
}

.mb-home a {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #425a8b;
  color: #fff !important;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(66,90,139,0.3);
}

.mb-home a:hover {
  background: var(--primary-hover);
}

.mb-cart-wrap {
  position: relative;
  display: flex;
}

.mb-cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Tablet */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.checkout-steps {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.checkout-step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}

.csi-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.csi-item.active { color: var(--primary); }
.csi-item.done { color: var(--success); }

.csi-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.csi-item.active .csi-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.csi-item.done .csi-num {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.csi-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 12px;
  min-width: 20px;
}

.csi-line.active { background: var(--primary); }

.csi-label { white-space: nowrap; }

.addr-radio:hover {
  border-color: var(--primary) !important;
}

.btn-next {
  min-width: 140px;
  padding: 10px 24px;
  font-size: 0.95rem;
}

.checkout-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.checkout-form-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checkout-summary-col {
  position: sticky;
  top: 88px;
}

.cs-summary-section .checkout-summary-item {
  padding: 8px 0;
}

.cs-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 20px;
}

.cs-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

@media (max-width: 768px) {
  .checkout-page {
    grid-template-columns: 1fr;
  }
  .checkout-summary-col {
    position: static;
  }
  .cs-section {
    padding: 18px;
  }
  .cs-section-header h2 {
    font-size: 1.05rem;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .container {
    padding: 0 10px;
  }

  .header-actions button[title="Mi cuenta"] {
    display: none;
  }

  .header-inner {
    height: 56px;
    gap: 8px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .search-bar input {
    font-size: 0.85rem;
  }

  .nav-inner {
    overflow-x: auto;
    gap: 0;
  }

  .nav {
    display: none;
  }

  .banner {
    height: 280px;
    padding: 24px;
    margin: 16px auto;
  }

  .banner-content h1 {
    font-size: 1.5rem;
  }

  .banner-content p {
    font-size: 0.9rem;
  }

  .banner-image {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card {
    width: 160px;
    height: 278px;
    margin: 4px 0 16px;
    padding: 8px;
  }

  .pc-image {
    width: 142px;
    height: 142px;
  }

  .pc-name {
    font-size: 0.75rem;
    height: 36px;
    margin-top: 4px;
  }

  .pc-rating {
    height: 20px;
    margin-top: 3px;
    font-size: 0.65rem;
  }

  .pc-price {
    height: 22px;
    margin-top: 3px;
  }

  .pc-price .current {
    font-size: 0.85rem;
  }

  .pc-price .original {
    font-size: 0.65rem;
  }

  .pc-actions {
    gap: 4px;
    justify-content: space-between;
    margin-top: 6px;
  }

  .pc-actions .btn-buy {
    width: 102px;
    height: 30px;
    padding: 2px 6px;
    font-size: 12px;
    flex: none;
  }

  .pc-actions .btn-cart {
    width: 30px;
    height: 30px;
    flex: none;
  }

  .pc-actions .btn-cart svg {
    width: 15px;
    height: 15px;
  }

  .pc-wishlist-btn {
    width: 30px;
    height: 30px;
  }

  .pc-wishlist-btn svg {
    width: 16px;
    height: 16px;
  }

  .categories-carousel {
    padding: 0 0 8px;
  }

  .dual-banner-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dual-banner-item {
    height: 140px;
    padding: 20px 24px;
  }

  .dual-banner-item h3 {
    font-size: 1rem;
  }

  .dual-banner-item p {
    font-size: 0.8rem;
  }

  .category-card {
    width: calc((100vw - 32px - 24px) / 3);
  }

  .category-card .cat-image {
    width: 100%;
    height: auto;
    aspect-ratio: 105 / 92;
  }

  .category-card .cat-name {
    width: 100%;
  }

  .badge-discount {
    width: 32px;
    height: 32px;
    font-size: 0.6rem;
    top: 4px;
    right: 4px;
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .wishlist-sidebar {
    width: 100%;
    right: -100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .mobile-bottom-nav {
    display: block;
  }

  body {
    padding-bottom: 60px;
  }

  .footer {
    margin-bottom: 56px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Checkout mobile */
  .cs-section {
    padding: 16px;
    margin-bottom: 14px;
  }
  .cs-section h2 {
    font-size: 1rem;
    margin-bottom: 14px;
    padding-bottom: 8px;
  }
  .form-group label {
    font-size: 0.8rem;
  }
  .form-group input, .form-group select, .form-group textarea {
    font-size: 0.9rem;
    padding: 10px 12px;
  }
  .checkout-summary-item[data-id] {
    padding: 8px;
    margin: 0 -8px;
    gap: 8px;
  }
  .cs-item-img {
    width: 40px;
    height: 40px;
  }
  .cs-item-img svg {
    width: 20px;
    height: 20px;
  }
  .cs-item-name {
    font-size: 0.78rem;
  }
  .cs-item-total {
    font-size: 0.8rem;
  }
  .cs-item-remove svg {
    width: 12px;
    height: 12px;
  }
  .cs-item-qty button {
    width: 24px;
    height: 24px;
  }
  .cs-item-qty .cs-qty-value {
    font-size: 0.8rem;
    min-width: 20px;
  }
  .cs-summary-section .checkout-summary-item {
    padding: 6px 0;
    font-size: 0.8rem;
  }
  .cs-summary-section h2 {
    font-size: 1rem;
  }
  .btn-place-order {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
  }
  .detail-back {
    margin-bottom: 12px;
    font-size: 0.85rem;
  }
  .addr-radio {
    padding: 10px !important;
    font-size: 0.85rem;
  }
  .checkout-summary {
    padding: 14px;
    position: static;
  }
  .checkout-summary h3 {
    font-size: 1rem;
  }

  /* Checkout responsive overrides for inline styles */
  .cs-back-btn {
    margin-bottom: 16px !important;
    font-size: 0.85rem !important;
  }

  .cs-section-header {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .cs-section-header h2 {
    font-size: 0.95rem !important;
  }

  .cs-card-grid {
    grid-template-columns: 1fr !important;
  }

  .cs-payment-label {
    padding: 14px 12px !important;
    flex-wrap: wrap !important;
  }

  .cs-payment-label strong {
    font-size: 0.9rem !important;
  }

  .cs-payment-label div {
    font-size: 0.6rem !important;
  }

  .cs-payment-desc {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .cs-payment-desc svg {
    margin-top: 0 !important;
  }

  .cs-summary-items {
    gap: 16px !important;
  }

  .checkout-summary-item[data-id] {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .cs-item-img-wrap {
    width: 48px !important;
    height: 48px !important;
  }

  .cs-item-actions {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .cs-item-actions > span {
    font-size: 0.8rem !important;
  }

  .cs-item-actions > div {
    gap: 4px !important;
  }

  .cs-totals {
    margin-top: 16px !important;
    padding-top: 16px !important;
    gap: 12px !important;
  }

  .cs-totals > div:first-child span:last-child,
  .cs-totals > div:nth-child(2) span:last-child {
    font-size: 0.9rem !important;
  }

  .cs-totals > div:last-child span:last-child {
    font-size: 1.3rem !important;
  }

  .cs-security-badge {
    padding: 12px !important;
    gap: 10px !important;
    margin-top: 16px !important;
  }

  .cs-security-badge svg {
    width: 20px !important;
    height: 20px !important;
  }

  .cs-security-badge > div {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
  }

  .checkout-summary-col .cs-section {
    padding: 16px !important;
  }

  .checkout-summary-col .cs-section h2 {
    font-size: 1rem !important;
    margin-bottom: 16px !important;
  }

  #orderDetailModal {
    padding: 12px !important;
  }

  .btn.btn-sm.btn-primary {
    width: 80px;
  }

  .account-content .btn-secondary {
    width: auto;
  }
}

/* Small mobile */
@media (max-width: 400px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .product-card {
    width: 160px;
    height: 278px;
    padding: 8px;
  }

  .pc-image {
    width: 142px;
    height: 142px;
  }

  /* Checkout small mobile */
  .cs-section {
    padding: 14px !important;
    margin-bottom: 12px !important;
  }

  .cs-section h2 {
    font-size: 0.9rem !important;
    margin-bottom: 12px !important;
    padding-bottom: 6px !important;
  }

  .cs-item-img-wrap {
    width: 40px !important;
    height: 40px !important;
  }

  .cs-totals > div:last-child span:last-child {
    font-size: 1.15rem !important;
  }

  .btn-place-order {
    padding: 12px !important;
    font-size: 0.95rem !important;
  }
}