/* components.css – all component styles (header, hero, products, modals, footer, etc.) */

/* ===== SITE HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 1.1rem;
}
.brand-logo svg,
.menu-toggle-btn svg,
.menu-close-btn svg,
.cart-trigger-btn svg,
.floating-cart-btn svg {
  width: 20px;
  height: 20px;
}

.menu-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--s-4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-24);
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-dropdown {
  position: relative;
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.dropdown-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  color: inherit;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  min-width: 220px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  z-index: 100;
  border-radius: var(--radius-sm);
  max-height: 380px;
  overflow-y: auto;
}

.dropdown-content a {
  display: block;
  padding: var(--s-8) var(--s-16);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--color-border);
}
.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-group {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}
.dropdown-group-title {
  padding: var(--s-8) var(--s-16) var(--s-4) var(--s-16);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  background-color: #fafafa;
  border-bottom: 1px solid var(--color-border);
}
.dropdown-parent {
  font-weight: 600;
  padding: 6px 12px;
  color: var(--color-dark);
  text-decoration: none;
}
.dropdown-children {
  display: flex;
  flex-direction: column;
  padding-left: 12px;
}
.dropdown-child {
  font-size: 0.85rem;
  padding: 4px 12px;
  color: var(--color-muted);
  text-decoration: none;
}
.dropdown-child:hover,
.dropdown-parent:hover {
  background-color: var(--color-card-bg);
}

/* Nested dropdown groups (multi-level) */
.dropdown-subgroup {
  margin: 0;
  padding: 0;
}
.dropdown-subgroup .dropdown-parent {
  font-weight: 500;
  padding: 4px 12px 4px 12px;
  display: block;
  color: var(--color-dark);
  text-decoration: none;
}
.dropdown-subgroup .dropdown-children {
  padding-left: 16px;
}
.dropdown-subgroup .dropdown-child {
  padding: 4px 12px 4px 16px;
  display: block;
  font-size: 0.85rem;
  color: var(--color-muted);
  text-decoration: none;
}
.dropdown-subgroup .dropdown-child:hover {
  background-color: var(--color-card-bg);
}

.cart-trigger-btn {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  padding: var(--s-8) var(--s-12);
  border: 1px solid var(--color-dark);
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.cart-count-badge {
  background-color: var(--color-dark);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 2px var(--s-8);
  border-radius: var(--radius-sm);
}

.floating-cart-btn {
  display: none;
}

/* DESKTOP NAV */
@media (min-width: 769px) {
  .nav-menu {
    display: block;
  }
  .nav-modal-card {
    display: flex;
    align-items: center;
  }
  .nav-modal-header {
    display: none;
  }
  .nav-dropdown:hover .dropdown-content {
    display: block;
  }
  .nav-dropdown:hover .chevron-icon {
    transform: rotate(180deg);
  }
}

/* MOBILE NAV */
@media (max-width: 768px) {
  .menu-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav-menu {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: var(--s-16);
    align-items: flex-start;
    justify-content: center;
  }
  .nav-menu.is-active {
    display: flex !important;
  }
  .nav-modal-card {
    background: var(--color-surface);
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border-radius: var(--radius-md);
    padding: var(--s-20);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: var(--s-12);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--s-16);
  }
  .menu-close-btn {
    display: block;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-dark);
    cursor: pointer;
    padding: var(--s-4);
  }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-16);
    width: 100%;
  }
  .nav-dropdown {
    width: 100%;
  }
  .nav-dropdown.is-open .dropdown-content {
    display: block;
  }
  .nav-dropdown.is-open .chevron-icon {
    transform: rotate(180deg);
  }
  .nav-dropdown .dropdown-content {
    position: static;
    border: none;
    box-shadow: none;
    padding-left: var(--s-12);
    margin-top: var(--s-8);
    max-height: none;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    gap: var(--s-8);
  }
  .floating-cart-btn {
    display: flex;
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 1500;
    width: 48px;
    height: 48px;
    background-color: var(--color-dark);
    color: #ffffff;
    border-radius: var(--radius-round);
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  }
  .floating-cart-btn .cart-count-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #e53935;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-round);
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--color-surface);
  }
}

/* ===== HERO ===== */
.hero-card {
  position: relative;
  width: 100%;
  height: 320px;
  background-color: #1a1a1a;
  background-image: linear-gradient(135deg, rgba(30, 30, 30, 0.4), rgba(10, 10, 10, 0.55)), url('../assets/hero-bg.avif');
  background-position: top center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--s-24) 0 var(--s-48) 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  padding: var(--s-32);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-tagline {
  font-family: var(--font-hero);
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  max-width: 360px;
  line-height: 1.4;
  margin: auto 0;
  padding: 0 var(--s-12);
}

.hero-btn {
  align-self: flex-end;
  background: #ffffff;
  color: #000000;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ===== SECTIONS ===== */
.category-section,
.featured-section,
.about-section,
.suggestions-section {
  margin-bottom: var(--s-48);
}

.about-section {
  margin-bottom: var(--s-8);
}

.about-card {
  background: var(--color-card-bg);
  padding: var(--s-20);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
  font-size: 0.9rem;
}

.about-details {
  border-top: 1px solid var(--color-border);
  padding-top: var(--s-12);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s-20);
}

.section-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

.view-all {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ===== CATEGORY BELT ===== */
.category-belt-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--s-12);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--s-12);
  -webkit-overflow-scrolling: touch;
}
.category-belt-scroll::-webkit-scrollbar {
  height: 4px;
}
.category-belt-scroll::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-sm);
}

.category-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  background: var(--color-card-bg);
  padding: var(--s-16);
  border-radius: var(--radius-md);
  color: var(--color-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}
.category-card:hover {
  background: #e8e8ed;
}

/* ===== CATALOG FILTER TAGS ===== */
.filter-pills-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--s-16);
  margin-bottom: var(--s-16);
}

.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  gap: var(--s-8);
  max-height: 84px;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.filter-pills-wrapper.is-expanded .filter-pills-row {
  max-height: 1000px;
}

.pills-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  margin-top: var(--s-8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  transition: transform 0.3s ease, color 0.2s ease;
}
.pills-toggle-btn:hover {
  color: var(--color-dark);
}
.pills-toggle-btn svg {
  transition: transform 0.3s ease;
}
.filter-pills-wrapper.is-expanded .pills-toggle-btn svg {
  transform: rotate(180deg);
}

.filter-pill {
  border: 1px solid var(--color-border);
  background: transparent;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.filter-pill.is-active,
.filter-pill:hover {
  background: var(--color-dark);
  color: #ffffff;
  border-color: var(--color-dark);
}

/* ===== CATALOG CONTROLS ===== */
.catalog-controls {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  margin: var(--s-24) 0;
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
}

.search-btn {
  background: transparent;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-btn:hover {
  color: var(--color-dark);
}
.search-btn svg {
  width: 18px;
  height: 18px;
}

.catalog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.catalog-header-title {
  font-size: 1.4rem;
  font-weight: 600;
}

.catalog-item-count {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.sort-select {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--font-main);
  font-size: 0.85rem;
}

/* ===== PRODUCT GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-12);
}
@media (min-width: 600px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--s-20);
  }
}

.product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.product-card.is-sold-out {
  opacity: 0.7;
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background-color: #eeeeee;
  display: block;
}

.sold-out-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.quick-add-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #111111;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.quick-add-btn:hover {
  background: #333333;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.quick-add-btn:active {
  transform: scale(0.95);
  background: #000000;
}

.product-info {
  padding: var(--s-12);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.product-title {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== FOOTER ===== */
.site-footer {
  background-color: var(--color-footer);
  color: #ffffff;
  padding: var(--s-48) var(--s-40) var(--s-32) var(--s-40);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-32);
}

.footer-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--s-16);
  color: #888888;
}

.footer-links li {
  margin-bottom: var(--s-8);
}
.footer-links a {
  color: #cccccc;
  font-size: 0.85rem;
}

.footer-address-line {
  display: flex;
  align-items: flex-start;
  gap: var(--s-8);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cccccc;
  margin-bottom: var(--s-8);
}
.footer-address-line a {
  display: flex;
  align-items: flex-start;
  gap: var(--s-8);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cccccc;
}
.footer-address-line .footer-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 0.2em;
}
.footer-address-line span {
  flex: 1;
}

.footer-note {
  font-size: 0.8rem;
  color: #aaaaaa;
}

.social-icons-row {
  display: flex;
  gap: var(--s-16);
  margin-top: var(--s-12);
}
.social-icons-row svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  margin-top: var(--s-40);
  padding-top: var(--s-20);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: left;
  font-size: 0.75rem;
  color: #888888;
  flex-wrap: wrap;
  gap: var(--s-12);
}

/* ===== MODALS & OVERLAYS ===== */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: var(--s-16);
}
.modal-backdrop.is-active {
  display: flex !important;
}

.cart-modal-card {
  background: #f9f9f9;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-16) var(--s-20);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-dark);
}
.modal-close-btn.light {
  color: #ffffff;
}

.modal-body {
  padding: var(--s-16);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}

.modal-footer {
  background: var(--color-surface);
  padding: var(--s-16) var(--s-20) var(--s-20);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}

/* ===== CART ITEM STYLES ===== */
.cart-item-card {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: var(--s-12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  margin-bottom: var(--s-6);
}
.cart-item-card .cart-checkbox-label {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.cart-item-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #eeeeee;
  flex-shrink: 0;
}
.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.cart-item-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.cart-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.cart-item-remove {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-muted);
  padding: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
  border-radius: var(--radius-sm);
}
.cart-item-remove:hover {
  color: #d32f2f;
  background: rgba(211, 47, 47, 0.08);
}
.cart-item-meta {
  font-size: 0.75rem;
  color: var(--color-muted);
}
.cart-item-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  margin-top: 0.1rem;
}
.cart-item-price {
  font-family: var(--font-price);
  font-weight: 600;
  font-size: 1rem;
}

/* ===== QUANTITY PILL (shared) ===== */
.qty-control-inline {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  font-size: 0.85rem;
  background: #f4f4f4;
  border-radius: 24px;
  padding: 0.05rem;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1;
}
.qty-btn:hover {
  background: #e6e6e6;
}
.qty-btn:active {
  background: #d6d6d6;
}
.qty-control-inline span {
  min-width: 20px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-dark);
  user-select: none;
}

/* ===== CART SUMMARY ===== */
.cart-summary {
  margin-top: var(--s-12);
  border-top: 1px solid var(--color-border);
  padding-top: var(--s-12);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--color-muted);
}
.summary-line.bold {
  font-weight: 700;
  color: var(--color-dark);
  font-size: 1rem;
}

.logistics-disclaimer {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin: var(--s-4) 0 var(--s-8);
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--color-dark);
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: var(--s-16);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  margin-top: var(--s-4);
  text-align: center;
  transition: background 0.2s ease, transform 0.1s ease;
}
.btn-primary:hover {
  background: #2d2d2d;
}
.btn-primary:active {
  transform: scale(0.97);
  background: #111;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-edit-picks {
  background: #e0e0e0;
  color: var(--color-dark);
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.78rem;
  cursor: pointer;
  width: fit-content;
  max-width: 80%;
  margin-top: 16px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: center;
}
.btn-edit-picks:hover {
  background: #d4d4d4;
}

.platform-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  width: 100%;
}
.whatsapp-btn {
  background: #25d366;
  color: #ffffff;
}
.insta-btn {
  background: #e1306c;
  color: #ffffff;
}

/* ===== CHECKOUT RECEIPT MODAL ===== */
.checkout-modal-card {
  position: relative;
  background: transparent;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  padding: var(--s-16);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}
.checkout-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: var(--s-16);
  color: #ffffff;
}
.checkout-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}
.receipt-box {
  background: #ffffff;
  width: 100%;
  border-radius: var(--radius-sm);
  padding: var(--s-20);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 0.85rem;
}
.receipt-ref {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}
.receipt-table-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 6px;
  margin-bottom: var(--s-8);
}
.receipt-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  margin-bottom: var(--s-12);
  max-height: 180px;
  overflow-y: auto;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: var(--s-8);
}
.receipt-summary {
  border-top: 1px solid var(--color-border);
  padding-top: var(--s-8);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.platform-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  align-items: center;
  margin-top: var(--s-12);
}

/* ===== PRODUCT DETAIL ===== */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-24);
  margin-top: var(--s-24);
}
@media (min-width: 768px) {
  .product-detail-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-40);
  }
}

.detail-img-frame {
  width: 100%;
  max-height: 500px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: #f0f0f0;
}
@media (min-width: 768px) {
  .detail-img-frame {
    max-height: 480px;
  }
}

.detail-info-col {
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
  overflow: hidden;
  word-wrap: break-word;
}
.detail-title {
  font-size: 1.6rem;
  font-weight: 700;
}
.detail-price {
  font-size: 1.3rem;
  font-weight: 600;
}

/* ===== BADGES – FIXED NO HORIZONTAL SCROLL ===== */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 4px 0 12px 0;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
}
.badge {
  display: inline-block;
  background: var(--color-card-bg);
  padding: 3px 12px;
  border-radius: 16px;
  font-size: 0.7rem;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1.6;
  flex-shrink: 0;
  max-width: 100%;
}
.badge:hover {
  background: var(--color-border);
}

.variant-group {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.variant-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}
.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
}
.variant-btn {
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.85rem;
  cursor: pointer;
}
.variant-btn.is-selected {
  border-color: var(--color-dark);
  background: var(--color-dark);
  color: #ffffff;
}

.error-alert {
  color: #d32f2f;
  font-size: 0.8rem;
}

/* ===== TABS ===== */
.product-tabs-section {
  margin-top: var(--s-16);
  padding-top: var(--s-16);
}
.tabs {
  margin: 0;
}
.tab-headers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-16);
  margin-bottom: var(--s-12);
  padding-bottom: var(--s-16);
}
.tab-btn {
  background: transparent;
  border: none;
  padding: 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  text-align: center;
  justify-self: center;
  width: 60%;
}
.tab-btn.active {
  color: var(--color-dark);
  border-bottom-color: var(--color-dark);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ===== SIZE GUIDE TABLE – FULL WIDTH FIX ===== */
#size-guide-content {
  width: 100%;
}
.size-guide-table {
  width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.size-guide-table th,
.size-guide-table td {
  border: 1px solid var(--color-border);
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
}
.size-guide-table th {
  background: var(--color-card-bg);
  font-weight: 600;
}

/* Highlight available sizes */
.size-available td {
  background: #e8f5e9;
  font-weight: 600;
}
.size-available td:first-child {
  border-left: 3px solid #2e7d32;
}

/* ===== GALLERY ===== */
.gallery-container {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #f0f0f0;
  max-height: 500px;
}
@media (min-width: 768px) {
  .gallery-main {
    max-height: 480px;
  }
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: var(--radius-round);
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.gallery-btn.prev {
  left: 8px;
}
.gallery-btn.next {
  right: 8px;
}
.gallery-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.gallery-indicators .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-round);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}
.gallery-indicators .dot.active {
  background: #fff;
}
.gallery-thumbs {
  display: flex;
  gap: var(--s-8);
  overflow-x: auto;
  padding-bottom: 4px;
}
.gallery-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
}
.gallery-thumb.active {
  border-color: var(--color-dark);
}

/* ===== SUGGESTIONS SECTION ===== */
.suggestions-section {
  margin-top: var(--s-48);
  padding-top: var(--s-24);
  border-top: 1px solid var(--color-border);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  z-index: 9999;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.toast-success {
  background: #2e7d32;
}
.toast-error {
  background: #c62828;
}

/* ===== INFINITE SCROLL LOADER ===== */
.load-more-trigger {
  text-align: center;
  padding: 20px 0;
  color: var(--color-muted);
  font-size: 0.85rem;
  grid-column: 1 / -1;
}
.load-more-trigger .spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--color-border);
  border-radius: 50%;
  border-top-color: var(--color-dark);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 480px) {
  .badge {
    font-size: 0.6rem;
    padding: 2px 10px;
  }
  .variant-btn {
    font-size: 0.75rem;
    padding: 4px 10px;
  }
  .detail-title {
    font-size: 1.2rem;
  }
  .detail-price {
    font-size: 1.1rem;
  }
  .size-guide-table {
    font-size: 0.65rem;
  }
  .size-guide-table th,
  .size-guide-table td {
    padding: 3px 4px;
  }
}