/* ═══════════════════════════════════════════════════════════════════════════════
   Podmamart Shop — Complete Design System
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ────────────────────────────────────────────────────────── */
:root {
  --accent: #009f7f;
  --accent-hover: #019267;
  --accent-light: rgba(0, 159, 127, 0.1);
  --accent-rgb: 0, 159, 127;

  /* Dynamic color scheme — overridden by JS from admin settings */
  --secondary: #FF8800;
  --price-color: #121212;
  --discount-badge: #ef4444;
  --heading: #1F2937;
  --body-color: #4B5563;
  --subheading-color: #374151;
  --muted: #9CA3AF;
  --light-bg: #F9FAFB;
  --white: #FFFFFF;
  --card-bg: #FFFFFF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --navbar-bg: #232F3E;
  --nav-text: #ffffff;
  --link-color: #009f7f;
  --link-hover: #0f5a9a;

  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --heading-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --heading-weight: 700;
  --body-weight: 400;
  --line-height: 1.6;
  --letter-spacing: 0em;
  --header-h: 72px;
  --sidebar-w: 280px;
  --container-max: 1340px;

  --z-header: 100;
  --z-cart: 200;
  --z-modal: 300;
  --z-toast: 400;
  --z-mobile-menu: 250;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--body-color);
  background: var(--light-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.3;
}

/* ─── Utilities ────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--muted);
}

.text-danger {
  color: var(--danger);
}

/* ─── App Loading ──────────────────────────────────────────────────────────── */
.app-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}

.app-loading p {
  color: var(--muted);
  font-size: 14px;
}

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

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

/* ═══════════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════════ */
.shop-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
}

/* Dual pre-compiled headers: show only the correct one per breakpoint */
.shop-header-desktop {
  display: block;
}

.shop-header-mobile {
  display: none;
}

@media (max-width: 768px) {
  .shop-header-desktop {
    display: none;
  }

  .shop-header-mobile {
    display: block;
  }
}

/* Dynamic header row system — matches reference Next.js app layout */
.shop-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 12px 20px;
}

.shop-header-row.header-top-bar {
  padding: 6px 20px;
  font-size: 13px;
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-light);
}

.shop-header-row.header-main {
  padding: 8px 20px;
}

.shop-header-row.header-bottom {
  padding: 6px 20px;
  border-top: 1px solid var(--border-light);
}

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

.header-row-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.header-row-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* Mobile header row adjustments */
@media (max-width: 768px) {
  .shop-header-row {
    padding: 6px 16px;
    gap: 8px;
  }

  .shop-header-row.header-main {
    padding: 8px 12px;
  }

  .shop-header-row.header-bottom {
    padding: 4px 2px 8px;
  }

  .header-row-left {
    gap: 8px;
  }

  .header-row-right {
    gap: 6px;
  }
}

.shop-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  height: 88px;
}

.shop-header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.shop-header-logo img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.shop-header-logo-text {
  font-size: 28px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.5px;
}

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

/* Search Bar — Desktop: Rectangular with button. Mobile: Rokomari pill style matching reference */
.shop-search-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: var(--search-height, 48px);
}

.shop-search-bar input {
  flex: 1;
  height: 100%;
  border: 1px solid var(--search-border, var(--border));
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 0 20px;
  font-size: 15px;
  color: var(--search-text, var(--heading));
  background: var(--search-bg, var(--white));
  transition: border-color 0.2s, box-shadow 0.2s;
}

.shop-search-bar input:focus {
  border-color: var(--search-border, var(--border));
  box-shadow: none;
}

.shop-search-bar input::placeholder {
  color: #9ca3af;
}

.shop-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  background: var(--search-btn-bg, #F28B00);
  color: var(--search-btn-color, white);
  border: 1px solid var(--search-btn-bg, #F28B00);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s;
}

.shop-search-btn:hover {
  filter: brightness(0.9);
}

.shop-search-btn svg {
  width: 18px;
  height: 18px;
}

.shop-search-btn span {
  display: inline;
}

.shop-search-btn.icon-only {
  padding: 0 16px;
  background: transparent;
  color: var(--search-btn-color, var(--heading));
  border: 1px solid var(--search-border, var(--border));
  border-left: none;
}

.shop-search-btn.icon-only:hover {
  background: var(--light-bg);
}

/* Mobile: Rokomari pill search — uses dynamic admin settings via CSS variables */
@media (max-width: 768px) {
  .shop-search-bar {
    max-width: 100%;
    height: 44px;
    border: 2px solid var(--search-border, #F28B00);
    border-radius: 9999px;
    overflow: hidden;
    background: var(--search-bg, white);
  }

  .shop-search-bar input {
    border: none;
    border-radius: 0;
    padding: 0 4px 0 16px;
    font-size: 14px;
    background: transparent;
    color: var(--search-text, var(--heading));
  }

  .shop-search-bar input:focus {
    border-color: transparent;
    box-shadow: none;
  }

  .shop-search-btn {
    background: transparent;
    border: none;
    padding: 0 14px;
    color: var(--search-btn-color, var(--search-border, #F28B00));
  }

  .shop-search-btn:hover {
    filter: none;
    background: transparent;
  }

  .shop-search-btn span {
    display: none;
  }
}

/* ── Search Auto-Suggest Dropdown ───────────────────────────────────────────── */
.shop-search-wrapper {
  position: relative;
  /* flex and width are set dynamically via inline style from admin header builder */
}

.shop-search-wrapper .shop-search-bar {
  width: 100%;
  max-width: 100%;
}

.search-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  z-index: 999;
  max-height: 420px;
  overflow-y: auto;
  animation: suggestSlideIn 0.15s ease-out;
}

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

@keyframes suggestSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-suggestions::-webkit-scrollbar {
  width: 5px;
}

.search-suggestions::-webkit-scrollbar-track {
  background: transparent;
}

.search-suggestions::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.search-suggest-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.search-suggest-empty {
  text-align: center;
  padding: 28px 16px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.search-suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

.search-suggest-item:last-of-type {
  border-bottom: none;
}

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

.search-suggest-img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--light-bg);
  border: 1px solid var(--border-light);
}

.search-suggest-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.search-suggest-img-ph {
  width: 100%;
  height: 100%;
  background: var(--border-light);
}

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

.search-suggest-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-suggest-author {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggest-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.search-suggest-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.search-suggest-original {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
}

.search-suggest-current {
  font-size: 14px;
  font-weight: 700;
  color: var(--heading);
}

.search-suggest-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}

.search-suggest-add:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.search-suggest-add:active {
  transform: scale(0.95);
}

.search-suggest-more {
  text-align: center;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  border-top: 1px solid var(--border-light);
  transition: background 0.15s;
}

.search-suggest-more:hover {
  background: var(--accent-light);
}

@media (max-width: 768px) {
  .shop-search-wrapper {
    max-width: 100%;
  }

  .search-suggestions {
    max-height: 50vh;
    border-radius: var(--radius);
  }

  .search-suggest-item {
    padding: 8px 12px;
    gap: 10px;
  }

  .search-suggest-img {
    width: 40px;
    height: 40px;
  }

  .search-suggest-add {
    padding: 4px 10px;
    font-size: 11px;
  }
}

/* Header Actions — Clean icon circles */
.shop-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--body-color);
  background: var(--white);
  transition: all 0.15s;
}

.header-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.header-icon-btn svg {
  width: 20px;
  height: 20px;
}

/* Account button with icon + text (e.g. "Hello, Sign in") */
.header-account-btn-styled {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 8px 14px;
  border-radius: 50px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.header-account-btn-styled:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
  transform: translateY(-1px);
}

.header-account-btn-styled svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.header-account-text {
  font-size: 13px;
  font-weight: 600;
}

/* Desktop: show long text, hide short text */
.header-account-text-short {
  display: none;
}

.header-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--white);
}

/* Mobile hamburger - visible whenever rendered by dynamic header builder */
.shop-hamburger {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.shop-hamburger svg {
  width: 24px;
  height: 24px;
  color: var(--heading);
}

/* User Dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  min-width: 200px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s;
  z-index: 10;
}

.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a,
.user-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--body-color);
  border-radius: var(--radius);
  transition: background 0.15s;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--light-bg);
  color: var(--heading);
}

.user-dropdown svg {
  width: 16px;
  height: 16px;
}

.user-dropdown hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 4px 0;
}

/* ── Account Dropdown (logged-in user icon menu) ─────────────────────────── */
.account-dropdown {
  position: fixed;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-light);
  min-width: 240px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 9999;
}

.account-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.account-dd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.account-dd-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

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

.account-dd-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-dd-email {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-dd-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.account-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--body-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.account-dd-item:hover {
  background: var(--light-bg);
  color: var(--heading);
}

.account-dd-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.account-dd-item:hover svg {
  opacity: 1;
}

.account-dd-logout {
  color: var(--danger);
}

.account-dd-logout:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
}

/* Dynamic Header Rows */
.shop-header-row {
  display: flex;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  gap: 24px;
}

/* (header-row-left/center/right defined above — no duplicate) */

/* Top bar row */
.shop-header-row.header-top-bar {
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-light);
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 13px;
  max-width: 100%;
}

.shop-header-row.header-top-bar .header-row-left,
.shop-header-row.header-top-bar .header-row-center,
.shop-header-row.header-top-bar .header-row-right {
  max-width: var(--container-max);
}

/* Main header row — tall, matching reference */
.shop-header-row.header-main {
  height: 88px;
  position: relative;
  z-index: 10;
}

.shop-header-row.header-main .header-row-center {
  flex: 1;
  justify-content: center;
}

/* search bar/wrapper sizing handled by .shop-search-wrapper rules + inline admin width */

/* Header bottom row */
.shop-header-row.header-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
  padding-bottom: 10px;
  background: var(--white);
  position: relative;
  z-index: 2;
}

/* Header Nav (main-menu element) */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--body-color);
  border-radius: var(--radius);
  transition: all 0.15s;
}

.header-nav a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CATEGORY NAV BAR — Circular icons above hero (matching reference)
   ═══════════════════════════════════════════════════════════════════════════════ */
.category-nav {
  overflow-x: auto;
  scrollbar-width: none;
  padding: 16px 0 8px;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-nav-inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.category-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: var(--body-color);
  transition: all 0.2s;
  min-width: 72px;
  text-align: center;
}

.category-nav-item:hover {
  color: var(--accent);
}

.category-nav-item:hover .category-nav-img {
  border-color: var(--accent);
}

.category-nav-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-light);
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

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

.category-nav-img--placeholder {
  color: var(--muted);
}

.category-nav-item span {
  font-size: 12px;
  font-weight: 500;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PROMOTIONAL BANNERS — Full-width banner strip below hero
   ═══════════════════════════════════════════════════════════════════════════════ */
.promo-banners-section {
  margin: 0 auto 20px;
  padding: 0;
}

.promo-banners-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}

.promo-banners-track::-webkit-scrollbar {
  display: none;
}

.promo-banner-item {
  flex: 1 1 0;
  min-width: 200px;
  overflow: hidden;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  scroll-snap-align: start;
  aspect-ratio: 855 / 220;
  min-height: 80px;
  position: relative;
}

.promo-banner-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.promo-banner-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   HERO SLIDER — matches reference hero-slider.tsx exactly
   ═══════════════════════════════════════════════════════════════════════════════ */
.hero-section {
  padding: 0;
  margin: 20px auto 20px;
}

/* ── Grid ── */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  /* Default mobile: 1 column */
  gap: 20px;
  align-items: stretch;
}

.hero-layout__slider {
  min-width: 0;
  min-height: 0;
  /* Protect against vertical blowout */
}

/* Hide banners on mobile to match reference hidden lg:block */
.hero-layout__banner {
  display: none;
}

@media (min-width: 1024px) {
  .hero-layout--two-col {
    grid-template-columns: 3fr 1fr;
  }

  .hero-layout--three-col {
    grid-template-columns: 3fr 1fr 1fr;
  }

  .hero-layout__banner {
    display: block;
    /* Show on desktop */
    min-width: 0;
    min-height: 0;
    height: 100%;
  }
}

/* ── Hero slider wrapper ── */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
  width: 100%;
  aspect-ratio: 855 / 220;
  /* STRICTLY LOCK the aspect ratio on the outermost slider container */
}

/* Override for Side Banners so they match the height of the main slider */
.hero-layout__banner .hero-slider {
  aspect-ratio: unset;
  height: 100%;
}

/* ── Slides track ── */
.hero-slides-track {
  display: flex;
  height: 100%;
  /* Fills strict slider height */
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Single slide ── */
.hero-slide {
  min-width: 100%;
  flex-shrink: 0;
  position: relative;
  height: 100%;
}

/* ── Slide link ── */
.hero-slide-link {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Slide image wrapper ── */
.hero-slide-img {
  position: relative;
  width: 100%;
  height: 100%;
  /* perfectly matches aspect-ratio height of parent */
}

.hero-slide-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback when no images */
.hero-slide-fallback {
  width: 100%;
  aspect-ratio: 855 / 220;
  background: linear-gradient(135deg, #009f7f 0%, #00b894 50%, #55efc4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide-fallback-content {
  text-align: center;
  color: white;
  padding: 40px;
}

.hero-slide-fallback-content h1 {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 12px;
  color: white;
}

.hero-slide-fallback-content p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 24px;
}

/* ── Nav arrows ── */
.hero-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--heading);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
  z-index: 2;
  opacity: 0;
}

.hero-slider:hover .hero-nav-btn {
  opacity: 1;
}

.hero-nav-btn:hover {
  background: white;
  box-shadow: var(--shadow-lg);
}

.hero-nav-btn.prev {
  left: 10px;
}

.hero-nav-btn.next {
  right: 10px;
}

.hero-nav-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Dots ── */
.hero-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  padding: 0;
}

.hero-dot.active {
  background: white;
  width: 20px;
  border-radius: 4px;
}

/* ── Banner
   MUST be position: relative and use absolutely positioned image inside.
   This prevents the banner image's intrinsic size from blowing out the grid row height. */
.hero-banner-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  /* fills grid column */
  background: var(--light-bg);
  overflow: hidden;
}

.hero-banner-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.hero-banner-link:hover img {
  transform: scale(1.03);
}

/* ── Banner placeholder ── */
.hero-banner-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner-placeholder-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  height: 100%;
}

.hero-banner-brand {
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════════════════════ */
.section {
  padding: 0;
  margin-bottom: 20px;
}


.section:last-child {
  margin-bottom: 20px;
}

.hero-section+.section {
  padding-top: 0;
}

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

.section-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--heading);
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.section-link:hover {
  opacity: 0.8;
}

.section-link svg {
  width: 16px;
  height: 16px;
}

/* ── Rokomari-style Product Section Wrapper ── */
.ps-wrapper {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 20px 0 24px;
  position: relative;
  overflow: hidden;
}

.ps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  margin-bottom: 16px;
}

.ps-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--heading);
  margin: 0;
  line-height: 1.3;
}

.ps-view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.ps-view-all:hover {
  background: var(--accent);
  color: #fff;
}

.ps-view-all svg {
  width: 14px;
  height: 14px;
}

.ps-scroll-area {
  position: relative;
}

.ps-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 40px;
  scrollbar-width: none;
}

.ps-track::-webkit-scrollbar {
  display: none;
}

.ps-track .product-card {
  flex-shrink: 0;
  scroll-snap-align: start;
  /* JS sets exact pixel width via initProductSectionSizing(); 200px is safe fallback */
  min-width: 200px;
  max-width: 200px;
}

/* ── Scroll Arrows ── */
.ps-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.15s;
}

.ps-scroll-area:hover .ps-arrow {
  opacity: 1;
}

.ps-arrow:hover {
  background: #f0f0f0;
}

.ps-arrow svg {
  width: 20px;
  height: 20px;
  color: #333;
}

.ps-arrow-prev {
  left: 8px;
}

.ps-arrow-next {
  right: 8px;
}

/* ── Grid & List display modes inside ps-wrapper ── */
.ps-grid-area {
  padding: 0 40px;
}

.ps-grid-area .product-grid {
  grid-template-columns: repeat(5, 1fr);
}

.ps-list-area {
  padding: 0 40px;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-list .product-card {
  flex-direction: row;
  align-items: center;
}

.product-list .product-card-img {
  width: 120px;
  min-width: 120px;
  padding-top: 0;
  height: 120px;
}

.product-list .product-card-body {
  text-align: left;
  padding: 12px 16px;
}

.product-list .product-card-price {
  justify-content: flex-start;
}

@media screen and (max-width: 767px) {
  .ps-grid-area {
    padding: 0 14px;
  }

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

  .ps-list-area {
    padding: 0 14px;
  }

  .product-list .product-card-img {
    width: 90px;
    min-width: 90px;
    height: 90px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PRODUCT CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.product-card-img {
  position: relative;
  padding-top: 100%;
  background: #f1f2f4;
  overflow: hidden;
}

.product-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s;
}

.product-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  background: var(--discount-badge);
  color: white;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.product-card-badge .badge-val {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.product-card-badge .badge-lbl {
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  margin-top: 2px;
}

/* Overlay style */
.product-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 5;
  pointer-events: none;
}

@media (min-width: 640px) {
  .product-card:hover .product-card-overlay {
    opacity: 1;
  }

  .product-card:hover .product-card-overlay .overlay-btn {
    pointer-events: auto;
  }
}

.product-card-overlay .overlay-btn {
  pointer-events: none;
}

.overlay-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(10px);
}

.overlay-cart svg {
  width: 16px;
  height: 16px;
}

.overlay-view {
  background: white;
  color: var(--body-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0.05s;
  opacity: 0;
  transform: translateY(10px);
}

.product-card:hover .overlay-cart,
.product-card:hover .overlay-view {
  opacity: 1;
  transform: translateY(0);
}

.overlay-cart:hover {
  background: var(--accent-hover);
}

.overlay-view:hover {
  color: var(--accent);
}

.product-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 10px;
  text-align: center;
}

.product-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--heading);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  min-height: 39px;
  transition: color 0.2s;
}

body:not(.no-hover-colors) .product-card:hover .product-card-name {
  color: var(--accent);
}

.product-card-price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.product-card-price .current {
  font-size: 15px;
  font-weight: 700;
  color: var(--price-color);
}

.product-card-price .original {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CART SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════════ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: var(--z-cart);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100vw;
  background: var(--white);
  z-index: calc(var(--z-cart) + 1);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.open {
  transform: translateX(0);
}

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

.cart-sidebar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-sidebar-count {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.cart-sidebar-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--muted);
  transition: all 0.15s;
}

.cart-sidebar-close:hover {
  background: var(--light-bg);
  color: var(--danger);
}

.cart-sidebar-close svg {
  width: 20px;
  height: 20px;
}

.cart-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

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

.cart-sidebar-empty svg {
  width: 64px;
  height: 64px;
  color: var(--border);
}

.cart-sidebar-empty p {
  font-size: 15px;
  font-weight: 500;
}

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

.cart-item-img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-bg);
}

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

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

.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--heading);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--price-color);
}

.cart-item-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

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

.cart-qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--body-color);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.15s;
}

.cart-qty-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cart-qty-value {
  width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
}

.cart-item-remove {
  margin-left: auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: all 0.15s;
}

.cart-item-remove:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

.cart-item-remove svg {
  width: 16px;
  height: 16px;
}

.cart-sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--light-bg);
}

.cart-sidebar-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-sidebar-total span {
  font-size: 15px;
  font-weight: 500;
  color: var(--body-color);
}

.cart-sidebar-total strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading);
}

.cart-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s;
}

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

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

/* ═══════════════════════════════════════════════════════════════════════════════
   FLOATING CART BUTTON
   ═══════════════════════════════════════════════════════════════════════════════ */
.cart-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: calc(var(--z-header) - 1);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.35);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s;
  transform: translateY(80px);
}

.cart-float-btn.show {
  transform: translateY(0);
}

.cart-float-btn:hover {
  box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.45);
  transform: translateY(-2px);
}

.cart-float-btn.show:hover {
  transform: translateY(-2px);
}

.cart-float-btn svg {
  width: 22px;
  height: 22px;
}

.cart-float-count {
  background: white;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.cart-float-total {
  opacity: 0.9;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PRODUCT LISTING / FILTER
   ═══════════════════════════════════════════════════════════════════════════════ */
.products-page {
  padding: 24px 0;
  min-height: calc(100vh - var(--header-h) - 100px);
}

.products-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

/* ── Sidebar Container ───────────────────────────────────────────────────── */
.products-filter {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: fit-content;
  position: sticky;
  top: calc(var(--header-h) + 20px);
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

/* ── Filter Card — each section within the sidebar ───────────────────────── */
.filter-card {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
}

.filter-card:last-child {
  border-bottom: none;
}

/* ── Group Title ─────────────────────────────────────────────────────────── */
.filter-group-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 14px;
}

/* ── Sort Radio Buttons (matching reference site) ────────────────────────── */
.filter-radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  cursor: pointer;
  transition: color 0.15s;
}

.filter-radio-option:hover {
  color: var(--accent);
}

.filter-radio-option:hover .filter-radio-label {
  color: var(--accent);
}

.filter-radio-option input[type="radio"] {
  display: none;
}

.filter-radio-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  background: var(--white);
}

.filter-radio-mark::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s;
}

.filter-radio-option input[type="radio"]:checked+.filter-radio-mark {
  border-color: var(--accent);
}

.filter-radio-option input[type="radio"]:checked+.filter-radio-mark::after {
  background: var(--accent);
}

.filter-radio-label {
  font-size: 14px;
  color: var(--body-color);
  font-weight: 500;
  transition: color 0.15s;
  flex: 1;
}

.filter-radio-option input[type="radio"]:checked~.filter-radio-label {
  color: var(--accent);
  font-weight: 600;
}

/* Child category indent */
.filter-radio-child {
  padding-left: 16px;
}

/* Product count badge */
.filter-radio-option .count,
.filter-option .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  background: var(--light-bg);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* ── Search Input in Sidebar ─────────────────────────────────────────────── */
.filter-search-wrapper {
  position: relative;
}

.filter-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.filter-search-input {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px 0 36px;
  font-size: 13px;
  color: var(--heading);
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}

.filter-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.08);
  outline: none;
}

.filter-search-input::placeholder {
  color: var(--muted);
}

/* ── Checkbox/Radio Options (In Stock, Categories, etc.) ──────────────────── */
.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--body-color);
  cursor: pointer;
  transition: color 0.15s;
}

.filter-option:hover {
  color: var(--accent);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Price Range ─────────────────────────────────────────────────────────── */
.filter-price-range {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow: hidden;
}

.filter-price-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  font-size: 13px;
  color: var(--heading);
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.filter-price-input:focus {
  border-color: var(--accent);
  outline: none;
}

.filter-price-range span {
  color: var(--muted);
  font-size: 14px;
}

.filter-apply-btn {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.filter-apply-btn:hover {
  background: var(--accent-hover);
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.products-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.products-count {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.products-sort select {
  height: 42px;
  padding: 0 36px 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--heading);
  background: var(--white);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 16px;
  transition: border-color 0.2s;
}

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

/* ── Active Filter Chips ─────────────────────────────────────────────────── */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.active-filters:empty {
  margin-bottom: 0;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 14px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  animation: chipIn 0.2s ease-out;
}

@keyframes chipIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.active-filter-chip button {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--accent);
  font-size: 14px;
  transition: all 0.15s;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.active-filter-chip button:hover {
  background: rgba(var(--accent-rgb), 0.2);
}

/* ── Load More ───────────────────────────────────────────────────────────── */
.load-more-btn {
  display: block;
  margin: 32px auto 0;
  padding: 12px 40px;
  background: var(--white);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.load-more-btn:hover {
  background: var(--accent);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CATEGORY DESCRIPTION
   ═══════════════════════════════════════════════════════════════════════════════ */
.category-description {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  margin-top: 48px;
  margin-bottom: 24px;
  color: var(--body-color);
  font-size: 15px;
  line-height: 1.6;
}

.category-description h1,
.category-description h2,
.category-description h3,
.category-description h4,
.category-description h5,
.category-description h6 {
  color: var(--heading);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.category-description h1:first-child,
.category-description h2:first-child,
.category-description h3:first-child,
.category-description h4:first-child,
.category-description h5:first-child,
.category-description h6:first-child {
  margin-top: 0;
}

.category-description p {
  margin-bottom: 1em;
}

.category-description p:last-child {
  margin-bottom: 0;
}

.category-description ul,
.category-description ol {
  margin-bottom: 1em;
  padding-left: 20px;
}

.category-description li {
  margin-bottom: 0.25em;
}

@media (max-width: 768px) {
  .category-description {
    padding: 16px;
    font-size: 14px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PRODUCT DETAIL
   ═══════════════════════════════════════════════════════════════════════════════ */
.product-detail-page {
  padding: 24px 0 48px;
}

@media (max-width: 768px) {
  .product-detail-page {
    padding: 6px 0 32px;
  }
}

.product-detail-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 5fr 4fr 3fr;
  gap: 0;
}

.product-detail-grid.no-sidebar {
  grid-template-columns: 5fr 7fr;
}

.product-gallery {
  padding: 24px;
  border-right: 1px solid var(--border-light);
  position: relative;
}

.product-gallery-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--light-bg);
  margin-bottom: 12px;
}

.product-gallery-main img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

.product-gallery-thumbs {
  display: flex;
  gap: 8px;
}

.product-gallery-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
  background: var(--light-bg);
}

.product-gallery-thumb.active,
.product-gallery-thumb:hover {
  border-color: var(--accent);
}

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-discount-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  background: var(--discount-badge);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.magnifier-preview {
  display: none;
  position: fixed;
  border: 2px solid var(--border-light, #e5e7eb);
  border-radius: 4px;
  background-color: #fff;
  background-repeat: no-repeat;
  z-index: 9999;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  pointer-events: none;
}

.product-info {
  padding: 32px;
}

.product-info-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.3;
  margin-bottom: 12px;
}

.product-info-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.product-info-price .current {
  font-size: 28px;
  font-weight: 800;
  color: var(--price-color);
}

.product-info-price .original {
  font-size: 18px;
  color: var(--muted);
  text-decoration: line-through;
}

.product-info-price .discount-pct {
  font-size: 13px;
  font-weight: 700;
  background: color-mix(in srgb, var(--discount-badge) 10%, transparent);
  color: var(--discount-badge);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.product-info-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.product-info-stock.in-stock {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.product-info-stock.out-of-stock {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.product-qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.product-qty-selector {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.product-qty-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
  transition: background 0.15s;
}

.product-qty-btn:hover {
  background: var(--light-bg);
}

.product-qty-val {
  width: 48px;
  height: 42px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
}

.product-action-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-add-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.btn-add-cart:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
}

.btn-add-cart:active {
  transform: scale(0.98);
}

.btn-add-cart svg {
  width: 20px;
  height: 20px;
}

.btn-place-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: transparent;
  color: var(--heading);
  border: 2px solid var(--heading);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.btn-place-order:hover {
  background: var(--heading);
  color: white;
}

.product-detail-meta {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.product-detail-meta-row {
  display: flex;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 6px;
}

.product-detail-meta-row span:first-child {
  color: var(--muted);
  min-width: 80px;
}

.product-detail-meta-row span:last-child {
  color: var(--heading);
  font-weight: 500;
}

/* ── Category Row (reference style) ── */
.product-category-row {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.product-category-label {
  font-weight: 600;
  color: var(--heading);
}

.product-category-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.product-category-link:hover {
  color: var(--accent-hover, #007a63);
  text-decoration: underline;
}

.product-description-section {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.5rem 2rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .product-description-section {
    padding: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
  }
}

.product-description-section h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.product-description-section .content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--body-color);
}

.product-description-section .content p {
  margin-bottom: 12px;
}

.product-description-section .content img {
  border-radius: var(--radius);
  margin: 16px 0;
}

.product-description-section .content ul,
.product-description-section .content ol {
  margin-left: 20px;
  margin-bottom: 12px;
}

.product-description-section .content li {
  margin-bottom: 4px;
  list-style: disc;
}

/* ── Amazon-style Magnifier Zoom ── */
.gallery-zoom-enabled .product-gallery-main {
  cursor: crosshair;
  position: relative;
}

.magnifier-lens {
  display: none;
  position: absolute;
  width: 160px;
  height: 160px;
  border: 2px solid rgba(0, 120, 255, 0.5);
  background: rgba(0, 120, 255, 0.08);
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.1);
}


/* ── Lightbox Modal ── */
.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(8px);
}

.product-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  animation: lightboxZoomIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes lightboxZoomIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 16px;
  border-radius: 999px;
}

/* ── Gallery Layout Position (gallery-right flips grid order) ── */
.product-detail-grid.gallery-right .product-gallery {
  order: 2;
  border-right: none;
  border-left: 1px solid var(--border-light);
}

.product-detail-grid.gallery-right .product-info {
  order: 1;
}

.product-detail-grid.gallery-right .product-related-sidebar {
  order: 3;
}

/* ── Thumbnail Position: left (vertical strip beside main image) ── */
.product-detail-grid.thumbs-left .product-gallery {
  display: flex;
  flex-direction: row-reverse;
  gap: 12px;
}

.product-detail-grid.thumbs-left .product-gallery-thumbs {
  flex-direction: column;
  width: 72px;
  flex-shrink: 0;
}

.product-detail-grid.thumbs-left .product-gallery-main {
  flex: 1;
  margin-bottom: 0;
}

/* ── Promotional Banner ── */
.product-promo-banner {
  width: 100%;
  overflow: hidden;
  margin-top: 1.5rem;
}

.promo-banner-ratio {
  position: relative;
  width: 100%;
}

.promo-banner-ratio-desktop {
  aspect-ratio: 12 / 1;
  min-height: 100px;
}

.promo-banner-ratio-mobile {
  aspect-ratio: 6 / 1;
  min-height: 60px;
}

.product-promo-banner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.product-promo-banner img.loaded {
  opacity: 1;
}

.promo-banner-mobile {
  display: none;
}

.promo-banner-desktop {
  display: block;
}

@media (max-width: 768px) {
  .promo-banner-desktop {
    display: none;
  }

  .promo-banner-mobile {
    display: block;
    padding: 0.75rem 1rem;
    margin: 0;
  }

  .promo-banner-mobile .product-promo-banner {
    margin-top: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
  }
}

/* ── Product Rating / Stars ── */
.product-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.product-stars {
  display: inline-flex;
  gap: 2px;
}

.product-stars .star {
  font-size: 16px;
  line-height: 1;
}

.product-stars .star.filled {
  color: #f59e0b;
}

.product-stars .star.half {
  color: #f59e0b;
  position: relative;
}

.product-stars .star.empty {
  color: #d1d5db;
}

.product-review-count {
  font-size: 13px;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════════════════════════════════════════ */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumbs a {
  color: var(--muted);
  transition: color 0.15s;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs .sep {
  color: var(--border);
}

.breadcrumbs .current {
  color: var(--heading);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CHECKOUT
   ═══════════════════════════════════════════════════════════════════════════════ */
.checkout-page {
  padding: 24px 0 48px;
}

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

/* (Checkout styles moved to ck-* section below) */
.form-group {
  margin-bottom: 18px;
}

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

.form-label sup {
  color: var(--danger);
}

.form-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 14px;
  font-size: 14px;
  color: var(--heading);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.form-textarea {
  width: 100%;
  min-height: 80px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--heading);
  resize: vertical;
  transition: border-color 0.2s;
}

.form-textarea:focus {
  border-color: var(--accent);
}

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

/* ═══════════════════════════════════════════════════════════════════════════════
   AUTH PAGES — Dedicated layout (own header + footer, no shop shell)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Full-page wrapper: header top, form centered, footer bottom */
.auth-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--light-bg);
}

/* ── Dedicated Auth Header ──────────────────────────────────────────────────── */
.auth-header {
  flex-shrink: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
}

.auth-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.auth-header-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.auth-header-logo:hover {
  opacity: 0.8;
}

.auth-header-logo img {
  height: 34px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .auth-header-logo img {
    height: 32px;
  }
}

.auth-header-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--body-color);
  text-decoration: none;
  transition: color 0.2s;
}

.auth-header-link svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.auth-header-link span {
  white-space: nowrap;
}

.auth-header-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Back to Shop Link ──────────────────────────────────────────────────────── */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.auth-back-link svg {
  transition: transform 0.2s;
}

.auth-back-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.auth-back-link:hover svg {
  transform: translateX(-3px);
}

/* ── Auth Form Area ─────────────────────────────────────────────────────────── */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  padding: 32px 20px;
}

/* ── Dedicated Auth Footer ──────────────────────────────────────────────────── */
.auth-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  background: var(--white);
  border-top: 1px solid var(--border-light);
}

.auth-footer span {
  font-size: 13px;
  color: var(--muted);
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-card-logo {
  text-align: center;
  margin-bottom: 12px;
}

.auth-card-logo img {
  height: 45px;
  margin: 0 auto;
  display: block;
}

.auth-card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--heading);
  text-align: center;
  margin-bottom: 8px;
}

.auth-card-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-light);
}

.auth-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.auth-tab.active {
  color: var(--accent);
  border-color: var(--accent);
}

.auth-tab:hover {
  color: var(--heading);
}

.auth-error {
  padding: 12px 14px;
  background: rgba(var(--danger-rgb, 239, 68, 68), 0.08);
  color: var(--danger);
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid rgba(var(--danger-rgb, 239, 68, 68), 0.15);
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s;
  margin-top: 8px;
}

.auth-submit-btn:hover {
  background: var(--accent-hover);
}

.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

.auth-switch a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.auth-switch a:hover {
  text-decoration: none;
}

/* Forgot password link */
.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.form-label-row .form-label {
  margin-bottom: 0;
}

.auth-forgot-link {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.auth-forgot-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Password toggle eye button */
.password-input-wrapper {
  position: relative;
}

.password-input-wrapper .form-input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--heading);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* Or divider */
.auth-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.auth-divider span {
  padding: 0 16px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Social login buttons */
.auth-social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  color: white;
}

.auth-social-btn svg {
  flex-shrink: 0;
}

.auth-social-btn.google {
  background: #4285F4;
}

.auth-social-btn.google:hover {
  background: #3367d6;
}

.auth-social-btn.mobile {
  background: var(--body-color);
}

.auth-social-btn.mobile:hover {
  background: var(--heading);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ACCOUNT PAGE
   ═══════════════════════════════════════════════════════════════════════════════ */
.account-page {
  padding: 24px 0 48px;
}

.account-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 24px;
}

.account-sidebar {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.account-user-info {
  text-align: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.account-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

.account-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
}

.account-email {
  font-size: 13px;
  color: var(--muted);
}

.account-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--body-color);
  transition: all 0.15s;
  margin-bottom: 2px;
}

.account-nav-item:hover {
  background: var(--light-bg);
  color: var(--heading);
}

.account-nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.account-nav-item svg {
  width: 18px;
  height: 18px;
}

.account-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow);
}

.account-content-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

/* Order cards */
.order-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.order-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(78, 205, 196, 0.08);
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 8px;
}

.order-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--heading);
}

.order-date {
  font-size: 11px;
  color: var(--muted);
  margin-left: 6px;
}

.order-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.order-status-badge.pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.order-status-badge.processing {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.order-status-badge.shipped {
  background: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
}

.order-status-badge.delivered,
.order-status-badge.completed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.order-status-badge.cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.order-card-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}

.order-card-items {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-item-thumbs {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.order-item-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  background: var(--light-bg);
  flex-shrink: 0;
}

.order-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item-thumb.extra-count {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.order-item-details {
  flex: 1;
  min-width: 0;
}

.order-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-item-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.order-card-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.order-card-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
}

.order-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.order-view-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  color: white;
}

.order-view-btn svg {
  width: 12px;
  height: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════════ */
.shop-footer {
  background: var(--white);
  border-top: 1px solid var(--border-light);
  padding: 48px 0 24px;
  margin-top: 48px;
}

.shop-footer.dynamic-footer {
  padding: 0;
  border-top: none;
  margin-top: 0;
}

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

.footer-brand p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.7;
}

.footer-col-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: var(--body-color);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.footer-copyright {
  text-align: center;
  width: 100%;
  white-space: nowrap;
}

/* ── Dynamic Footer Row Layout ─────────────────────────────────────────────── 
   Matches the header row structure: left/right shrink, center expands.
   Uses !important to override inline styles from pre-compiled HTML.
   ─────────────────────────────────────────────────────────────────────────── */
.shop-footer-row .row-container {
  max-width: var(--container-max) !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5rem 20px !important;
  min-height: 64px;
  gap: 24px;
}

.shop-footer-row .row-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 0 0 auto !important;
  justify-content: flex-start !important;
}

.shop-footer-row .row-center {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 1 auto !important;
  justify-content: center !important;
}

.shop-footer-row .row-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  justify-content: flex-end !important;
}

/* Newsletter widget — center everything */
.footer-widget-newsletter {
  text-align: center;
}

.footer-widget-newsletter form {
  justify-content: center;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--light-bg);
  color: var(--body-color);
  transition: all 0.2s;
}

.footer-social a:hover {
  background: var(--accent);
  color: white;
}

.footer-social a svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--accent);
  min-width: 280px;
  animation: toast-in 0.3s ease-out;
}

.shop-toast.success {
  border-left-color: var(--success);
}

.shop-toast.error {
  border-left-color: var(--danger);
}

.shop-toast.warning {
  border-left-color: var(--warning);
}

.shop-toast-msg {
  font-size: 14px;
  font-weight: 500;
  color: var(--heading);
  flex: 1;
}

.shop-toast-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 18px;
  border-radius: var(--radius-sm);
}

.shop-toast-close:hover {
  background: var(--light-bg);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SMOOTH LOADING ANIMATIONS (replaces skeleton loaders)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Page content fade-in */
#page-content {
  animation: pageIn 0.35s ease-out both;
  min-height: calc(100vh - var(--header-h) - 100px);
  overflow-anchor: none;
  /* Prevent scroll jumps when hero slider is injected */
}

@keyframes pageIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Page transition (triggered by dispatch before new content) */
#page-content.page-exit {
  animation: pageOut 0.15s ease-in both;
}

@keyframes pageOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* Section entrance — slide up + fade in */
.section,
.hero-section,
.hero-layout--one-col,
.hero-layout--two-col,
.hero-layout--three-col,
.category-strip,
.products-page {
  animation: sectionIn 0.45s ease-out both;
}

@keyframes sectionIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered product card reveal */
.product-card {
  animation: cardIn 0.4s ease-out both;
}

.product-card:nth-child(1) {
  animation-delay: 0.03s;
}

.product-card:nth-child(2) {
  animation-delay: 0.06s;
}

.product-card:nth-child(3) {
  animation-delay: 0.09s;
}

.product-card:nth-child(4) {
  animation-delay: 0.12s;
}

.product-card:nth-child(5) {
  animation-delay: 0.15s;
}

.product-card:nth-child(6) {
  animation-delay: 0.18s;
}

.product-card:nth-child(7) {
  animation-delay: 0.21s;
}

.product-card:nth-child(8) {
  animation-delay: 0.24s;
}

.product-card:nth-child(9) {
  animation-delay: 0.27s;
}

.product-card:nth-child(10) {
  animation-delay: 0.30s;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Smooth image reveal — images fade in when they load */
.product-card-img img,
.hero-slider img,
.hero-layout__banner img,
.swiper-slide img,
.product-gallery-main img,
.product-gallery-thumb img,
.sidebar-item img {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.product-card-img img.loaded,
.hero-slider img.loaded,
.hero-layout__banner img.loaded,
.swiper-slide img.loaded,
.product-gallery-main img.loaded,
.product-gallery-thumb img.loaded,
.sidebar-item img.loaded,
.product-card-img img[data-loaded],
.hero-slider img[data-loaded],
.hero-layout__banner img[data-loaded],
.swiper-slide img[data-loaded] {
  opacity: 1;
}

/* Image placeholder background (shown while image loads) */
.product-card-img {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  transition: background 0.3s ease;
}

.product-card-img:has(img.loaded),
.product-card-img:has(img[data-loaded]) {
  background: transparent;
}

/* Category strip entrance */
.category-strip .category-item {
  animation: cardIn 0.35s ease-out both;
}

.category-strip .category-item:nth-child(1) {
  animation-delay: 0.02s;
}

.category-strip .category-item:nth-child(2) {
  animation-delay: 0.04s;
}

.category-strip .category-item:nth-child(3) {
  animation-delay: 0.06s;
}

.category-strip .category-item:nth-child(4) {
  animation-delay: 0.08s;
}

.category-strip .category-item:nth-child(5) {
  animation-delay: 0.10s;
}

.category-strip .category-item:nth-child(6) {
  animation-delay: 0.12s;
}

/* Section header entrance */
.section-header {
  animation: sectionIn 0.4s ease-out both;
}

/* Smooth hover lift for product cards */
.product-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

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

/* Legacy skeleton support (keep for any remaining references) */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--white) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

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

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

.skeleton-card {
  height: 320px;
  border-radius: var(--radius-lg);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

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

.skeleton-text.title {
  height: 20px;
  width: 80%;
}

.skeleton-hero {
  height: 380px;
  border-radius: var(--radius-xl);
}

.skeleton-box,
.skeleton-line {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 37%, #f0f0f0 63%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
  display: block;
}

.skeleton-line {
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MOBILE MENU
   ═══════════════════════════════════════════════════════════════════════════════ */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: var(--z-mobile-menu);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  background: var(--white);
  z-index: calc(var(--z-mobile-menu) + 1);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-menu.open {
  transform: translateX(0);
}

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

.mobile-menu-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--muted);
}

.mobile-menu-close:hover {
  background: var(--light-bg);
}

.mobile-menu-nav {
  padding: 12px;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  color: var(--heading);
  transition: background 0.15s;
}

.mobile-menu-item:hover {
  background: var(--light-bg);
}

.mobile-menu-item svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

/* Mobile sidebar search — simple clean input matching reference */
.mobile-sidebar-search {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-sidebar-search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 40px 0 14px;
  font-size: 14px;
  color: var(--heading);
  background: var(--white);
  transition: border-color 0.2s;
}

.mobile-sidebar-search input:focus {
  border-color: var(--accent);
  outline: none;
}

.mobile-sidebar-search input::placeholder {
  color: #9ca3af;
}

.mobile-sidebar-search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  pointer-events: none;
}

.mobile-sidebar-search-icon svg {
  width: 18px;
  height: 18px;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state svg {
  width: 80px;
  height: 80px;
  color: var(--border);
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--muted);
  max-width: 300px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PAGE SPINNER
   ═══════════════════════════════════════════════════════════════════════════════ */
.page-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  min-height: 60vh;
}

.page-spinner .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MODAL OVERLAY
   ═══════════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

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

.pagination-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--body-color);
  transition: all 0.15s;
}

.pagination-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ORDER SUCCESS
   ═══════════════════════════════════════════════════════════════════════════════ */
.order-success-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - 100px);
  padding: 40px 20px;
}

.order-success-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.order-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-success-icon svg {
  width: 36px;
  height: 36px;
  color: var(--success);
}

.order-success-card h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.order-success-card p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.order-success-number {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 12px 24px;
  border-radius: var(--radius);
  display: inline-block;
  margin-bottom: 24px;
}

.order-success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.order-success-actions .btn-primary {
  padding: 12px 24px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background 0.2s;
}

.order-success-actions .btn-primary:hover {
  background: var(--accent-hover);
}

.order-success-actions .btn-outline {
  padding: 12px 24px;
  border: 2px solid var(--border);
  color: var(--heading);
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.2s;
}

.order-success-actions .btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CHECKOUT PAGE — Reference-style layout
   ═══════════════════════════════════════════════════════════════════════════════ */
.checkout-page {
  padding-bottom: 60px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
}

/* Cards */
.ck-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid #f0f0f0;
  margin-bottom: 24px;
}

.ck-card-header {
  background: #f8f9fa;
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.ck-card-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  text-align: center;
}

.ck-card-body {
  padding: 24px;
}

/* Form container with accent border */
.ck-form-container {
  border: 2px solid rgba(var(--accent-rgb, 22, 163, 74), 0.15);
  border-radius: 12px;
  padding: 24px;
  background: rgba(var(--accent-rgb, 22, 163, 74), 0.02);
}

.ck-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

/* Form elements */
.ck-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.ck-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.ck-label sup {
  color: #ef4444;
}

.ck-input,
.ck-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
}

.ck-input:focus,
.ck-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 22, 163, 74), 0.1);
}

.ck-input::placeholder {
  color: #9ca3af;
}

.ck-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%236b7280' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.ck-select:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.ck-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: #fff;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
}

.ck-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 22, 163, 74), 0.1);
}

.ck-textarea-sm {
  min-height: 50px;
}

/* Payment Methods */
.ck-payment-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ck-payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}

.ck-payment-option:hover {
  border-color: #d1d5db;
  background: #fafafa;
}

.ck-payment-option.selected {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb, 22, 163, 74), 0.04);
}

.ck-payment-option input[type="radio"] {
  display: none;
}

.ck-payment-radio {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.ck-payment-option.selected .ck-payment-radio {
  border-color: var(--accent);
}

.ck-payment-option.selected .ck-payment-radio::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.ck-payment-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

/* ── Order Summary (Right Column) ─────────────────────────────────────────── */
.ck-summary-sticky {
  position: sticky;
  top: calc(var(--header-h, 70px) + 16px);
}

.ck-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.ck-item-row {
  border-bottom: 1px solid #f3f4f6;
}

.ck-item-row:last-child {
  border-bottom: none;
}

.ck-item-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
}

.ck-item-thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.ck-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.ck-item-name {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

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

.ck-qty-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
}

.ck-qty-btn:hover {
  border-color: #9ca3af;
  background: #f3f4f6;
}

.ck-qty-val {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  min-width: 14px;
  text-align: center;
}

.ck-remove-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #ef4444;
  font-size: 11px;
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.15s;
}

.ck-remove-btn:hover {
  background: #fef2f2;
  color: #dc2626;
}

.ck-item-price {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
  vertical-align: top;
  padding-top: 14px;
}

/* Totals */
.ck-totals {
  border-top: 1px dashed #e5e7eb;
  margin-top: 8px;
  padding-top: 12px;
}

.ck-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
}

.ck-total-grand {
  border-top: 2px solid #e5e7eb;
  margin-top: 4px;
  padding-top: 14px;
  font-size: 17px;
  font-weight: 800;
  color: #111827;
}

.ck-shipping-pending {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
  font-weight: 400;
}

.ck-free-label {
  color: #059669;
}

.ck-discount {
  color: var(--discount-badge);
}

/* Free Shipping Banner */
.ck-free-banner {
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 16px;
}

.ck-free-banner--success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ck-free-banner--progress {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.ck-free-banner-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ck-free-banner-top p {
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  margin: 0;
}

.ck-free-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: #065f46;
  margin: 0;
}

.ck-free-banner-sub {
  font-size: 11px;
  color: #047857;
  margin: 2px 0 0;
}

.ck-free-banner--progress .ck-free-banner-sub {
  font-size: 11px;
  color: #b45309;
  margin: 0 0 8px;
}

.ck-progress-bar {
  width: 100%;
  height: 5px;
  background: #fde68a;
  border-radius: 3px;
  overflow: hidden;
}

.ck-progress-fill {
  height: 100%;
  background: #f59e0b;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.ck-progress-label {
  font-size: 10px;
  color: #d97706;
  text-align: right;
  margin: 4px 0 0;
}

/* Coupon */
.ck-coupon-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}

.ck-coupon-row {
  display: flex;
  gap: 8px;
}

.ck-coupon-input {
  flex: 1;
  height: 40px;
  font-size: 13px;
}

.ck-coupon-btn {
  padding: 0 18px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}

.ck-coupon-btn:hover {
  filter: brightness(0.95);
}

.ck-coupon-btn:active {
  transform: scale(0.96);
}

.ck-coupon-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error */
.ck-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 500;
}

/* Place Order Button */
.ck-place-btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb, 22, 163, 74), 0.3);
}

.ck-place-btn:hover {
  filter: brightness(0.95);
}

.ck-place-btn:active {
  transform: scale(0.97);
}

.ck-place-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .products-layout {
    grid-template-columns: 1fr;
  }

  .products-filter {
    display: none;
  }

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

  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .ck-summary-sticky {
    position: static;
  }

  .account-layout {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0;
    margin: 0;
    background: transparent;
  }

  .account-user-info {
    display: none;
  }

  .account-sidebar .account-nav-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    font-size: 13px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin: 0;
    background: var(--white);
    white-space: nowrap;
    width: 100%;
  }

  .account-sidebar .account-nav-item.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
  }

  .account-sidebar .account-nav-item svg {
    width: 14px;
    height: 14px;
  }

  .account-content {
    padding: 16px;
  }

  .account-content-title {
    font-size: 17px;
    margin-bottom: 16px;
    padding-bottom: 10px;
  }

  .order-card-header {
    padding: 8px 12px;
    gap: 6px;
  }

  .order-number {
    font-size: 12px;
  }

  .order-date {
    font-size: 10px;
    margin-left: 4px;
  }

  .order-status-badge {
    padding: 2px 8px;
    font-size: 10px;
  }

  .order-card-body {
    padding: 8px 12px;
    gap: 8px;
  }

  .order-item-thumb {
    width: 36px;
    height: 36px;
  }

  .order-item-thumbs {
    gap: 4px;
  }

  .order-item-name {
    font-size: 12px;
  }

  .order-item-meta {
    font-size: 10px;
  }

  .order-card-total {
    font-size: 13px;
  }

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

  .product-gallery {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  /* Collapse hero side banners on tablet */
  .hero-layout--two-col,
  .hero-layout--three-col {
    grid-template-columns: 1fr;
  }

  .hero-layout__banner {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }

  .shop-header-inner {
    gap: 12px;
    height: 60px;
  }

  .header-icon-btn {
    width: 36px;
    height: 36px;
  }

  /* Mobile: text-only account button (no icon, no 'Hello') */
  .header-account-btn-styled {
    padding: 6px 14px;
    gap: 0;
    border-radius: 50px;
    font-size: 13px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .header-account-btn-styled svg {
    display: none;
  }

  .header-account-text-long {
    display: none;
  }

  .header-account-text-short {
    display: inline;
    font-size: 13px;
  }

  /* Mobile account dropdown */
  .account-dropdown {
    left: 12px !important;
    right: 12px !important;
    min-width: unset;
    max-width: calc(100vw - 24px);
  }

  .hero-slide-fallback-content h1 {
    font-size: 28px;
  }

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

  .product-card-body {
    padding: 10px;
  }

  .product-card-name {
    font-size: 13px;
    min-height: auto;
  }

  .product-card-price .current {
    font-size: 14px;
  }

  .product-card-add {
    padding: 7px 0;
    font-size: 12px;
  }

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

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

  .section-title {
    font-size: 18px;
  }

  .product-info {
    padding: 20px;
  }

  .product-info-name {
    font-size: 20px;
  }

  .product-info-price .current {
    font-size: 22px;
  }

  .product-gallery-main img {
    height: 300px;
  }

  /* Hide magnifier zoom on mobile (touch devices can't hover) */
  .magnifier-lens,
  .magnifier-preview {
    display: none !important;
  }

  .gallery-zoom-enabled .product-gallery-main {
    cursor: default;
  }

  /* Mobile lightbox adjustments */
  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  /* Disable gallery-right layout on mobile */
  .product-detail-grid.gallery-right .product-gallery,
  .product-detail-grid.gallery-right .product-info {
    order: unset;
    border-left: none;
  }

  /* Disable thumbs-left on mobile */
  .product-detail-grid.thumbs-left .product-gallery {
    flex-direction: column;
  }

  .product-detail-grid.thumbs-left .product-gallery-thumbs {
    flex-direction: row;
    width: auto;
  }

  .ck-card-body {
    padding: 16px;
  }

  .ck-form-container {
    padding: 16px;
  }

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

  .auth-card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 14px;
  }

  .shop-header-logo-text {
    font-size: 18px;
  }

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

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

/* Appended for Product Page Modernization */
.product-qty-row {
  display: flex;
  margin-bottom: 24px;
}

.modern-qty {
  margin-right: 0;
  width: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.modern-qty .product-qty-val {
  border: none;
  font-weight: 600;
}

.product-action-btns.stacked {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.dynamic-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  text-align: center;
}

.dynamic-btn:hover {
  transform: scale(1.02);
}

.dynamic-btn:active {
  transform: scale(0.98);
}

.dynamic-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.product-contact-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.btn-contact {
  flex: 1;
  text-align: center;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-phone {
  background: #111827;
  color: #fff;
}

.btn-phone:hover {
  background: #1f2937;
  color: #fff;
}

.btn-chat {
  background: #fff;
  border: 2px solid #e5e7eb;
  color: #374151;
}

.btn-chat:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #374151;
  text-decoration: none;
}

.contact-helper-text {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #383a3d;
  margin: 0;
}

.product-related-sidebar {
  padding: 24px;
  background: #f9fafb;
  border-left: 1px solid var(--border-light);
}

@media (max-width: 768px) {
  .product-related-sidebar {
    display: none;
  }
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--heading);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--heading);
  transition: opacity 0.2s;
}

.sidebar-item:hover {
  opacity: 0.8;
}

.sidebar-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border-light);
}

.sidebar-item-name {
  font-size: 13px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  line-height: 1.4;
  color: var(--heading);
}

.sidebar-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--price-color);
}

.prose {
  font-size: 14px;
  line-height: 1.8;
  color: var(--body-color);
  margin-top: 16px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 13px;
}

.prose th,
.prose td {
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  text-align: left;
}

.prose th {
  background: #f9fafb;
  font-weight: 600;
  width: 30%;
}

.prose p {
  margin-bottom: 16px;
}

.prose ul,
.prose ol {
  margin-left: 20px;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SHIMMER SKELETON — Premium loading placeholders (like Facebook/Amazon)
   ═══════════════════════════════════════════════════════════════════════════════ */
@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }

  100% {
    background-position: 400px 0;
  }
}

.shimmer-line,
.shimmer-block {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 37%, #f0f0f0 63%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}

.shimmer-line {
  height: 16px;
  display: block;
}

.shimmer-block {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PAGE TRANSITIONS — Smooth fade-in/out for SPA navigation
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Page content fade-in on load/navigation */
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#page-content {
  animation: pageFadeIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  min-height: calc(100vh - var(--header-h) - 100px);
}

/* Page exit — triggered by dispatch() before clearing content */
#page-content.page-exit {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Section entrance — staggered slide-up for each content block */
@keyframes sectionEnter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section,
.hero-slider-container,
.product-detail-wrapper,
.breadcrumbs,
.checkout-page,
.auth-shell,
.auth-page,
.account-page {
  animation: sectionEnter 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Staggered product card reveal — wave-like animation */
.product-card {
  animation: sectionEnter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.product-card:nth-child(1) {
  animation-delay: 0.03s;
}

.product-card:nth-child(2) {
  animation-delay: 0.06s;
}

.product-card:nth-child(3) {
  animation-delay: 0.09s;
}

.product-card:nth-child(4) {
  animation-delay: 0.12s;
}

.product-card:nth-child(5) {
  animation-delay: 0.15s;
}

.product-card:nth-child(6) {
  animation-delay: 0.18s;
}

.product-card:nth-child(7) {
  animation-delay: 0.21s;
}

.product-card:nth-child(8) {
  animation-delay: 0.24s;
}

.product-card:nth-child(9) {
  animation-delay: 0.27s;
}

.product-card:nth-child(10) {
  animation-delay: 0.30s;
}

/* Product card hover lift */
.product-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

/* Image reveal — fade in on load */
.product-card-img img {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.product-card-img img.loaded {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CATEGORY SHOWCASE — Rokomari-style horizontal scrollable cards
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Showcase Grid: Horizontal scroll container ── */
.category-showcase-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 16px;
  scrollbar-width: none;
}

.category-showcase-grid::-webkit-scrollbar {
  display: none;
}

/* ── Each showcase card — square aspect ── */
.category-showcase-card {
  flex: 0 0 calc(25% - 12px);
  min-width: 240px;
  background: #fff;
  border-radius: var(--radius, 8px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light, #f3f4f6);
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
  transition: box-shadow 0.25s, transform 0.25s;
}

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

.cs-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--heading);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-card-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
}

.cs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--body-color);
  font-size: 12px;
  text-align: center;
  gap: 6px;
  transition: color 0.2s;
}

.cs-item:hover {
  color: var(--accent);
}

.cs-item-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #F0F0F0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.cs-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.4s ease;
}

.cs-item-img img.loaded {
  opacity: 1;
}

.cs-item span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
  line-height: 1.3;
}

.cs-card-footer {
  margin-top: 14px;
}

.cs-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.cs-link:hover {
  gap: 8px;
  text-decoration: none;
}

.cs-link svg {
  width: 14px;
  height: 14px;
}

/* ── Scroll navigation arrows ── */
.cs-scroll-wrapper {
  position: relative;
}

.cs-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white, #fff);
  border: 1px solid var(--border, #e5e7eb);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--heading);
}

.cs-scroll-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.cs-scroll-btn.cs-prev {
  left: -16px;
}

.cs-scroll-btn.cs-next {
  right: -16px;
}

.cs-scroll-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .category-showcase-card {
    flex: 0 0 calc(33.333% - 11px);
    min-width: 220px;
  }
}

@media (max-width: 768px) {
  .category-showcase-card {
    flex: 0 0 200px;
    min-width: 200px;
    padding: 14px;
  }

  .cs-card-title {
    font-size: 0.9375rem;
  }

  .cs-card-items {
    gap: 8px;
  }

  .cs-scroll-btn {
    display: none;
  }
}

/* ── Fallback: Flat category grid (no subcategories) ── */
.category-flat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  padding: 8px 0 16px;
}

.category-flat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 20px 12px;
  background: var(--card-bg, #fff);
  border-radius: var(--radius-lg, 12px);
  border: 1px solid var(--border-light, #f3f4f6);
  transition: all 0.25s;
  box-shadow: var(--shadow-sm);
}

.category-flat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.category-flat-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--light-bg, #f9fafb);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-light, #f3f4f6);
  transition: border-color 0.25s;
}

.category-flat-item:hover .category-flat-img {
  border-color: var(--accent);
}

.category-flat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.category-flat-img svg {
  color: var(--muted);
  width: 28px;
  height: 28px;
}

.category-flat-name {
  font-weight: 600;
  color: var(--heading);
  font-size: 0.8125rem;
  text-align: center;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Rokomari-style Product Section Mobile ── */
@media screen and (max-width: 767px) {
  .ps-wrapper {
    border-radius: 8px;
    padding: 14px 0 18px;
  }

  .ps-header {
    padding: 0 14px;
    margin-bottom: 12px;
  }

  .ps-title {
    font-size: 16px;
  }

  .ps-view-all {
    font-size: 12px;
    padding: 4px 10px;
  }

  .ps-track {
    gap: 10px;
    padding: 0 14px;
  }

  .ps-track .product-card {
    /* Exactly 2 cards visible on mobile: (track width - 1 gap) / 2 */
    min-width: calc((100% - 10px) / 2);
    max-width: calc((100% - 10px) / 2);
  }

  .ps-arrow {
    width: 32px;
    height: 32px;
    opacity: 0.8;
  }

  .ps-arrow svg {
    width: 16px;
    height: 16px;
  }
}