/* ==========================================================================
   Project: Etmaad Store — Unified Theme Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design System & CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --theme-navy: #112a52;
  --theme-primary: #ff6b1a;
  --theme-primary-hover: #e0550b;
  --theme-light-bg: #f8fafc;
  --theme-primary-light: #fff0e6;
  --theme-primary-border: #ffe3d1;

  --save-badge-bg: #e53e3e;
  --danger-color: #dc3545;
  --text-primary: #1f2937;
  --text-secondary: #222222;
  --text-muted: #6b7280;
  --text-subtle: #94a3b8;
  --text-dark-gray: #495057;
  --text-medium-gray: #555555;

  --card-bg: #ffffff;
  --card-bg-subtle: #fcfcfc;
  --card-bg-accent: #fff8f5;
  --card-border: #e2e8f0;
  --border-light: #f0f0f0;
  --border-muted: #cbd5e1;
  --border-input-readonly: #e9ecef;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #f8f9fa;
  --icon-close-gray: #a0a0a0;

  /* Less-rounded, more modern/retail look. Pills & circles stay round
     on purpose (badges, avatars) - everything boxy (cards, inputs,
     buttons, modals) is now much subtler. */
  --border-radius-xs: 3px;
  --border-radius-sm: 6px;
  --border-radius-md: 8px;
  --border-radius-lg: 10px;
  --border-radius-pill: 18px;
  --border-radius-full: 50%;

  --shadow-sm: 0 1px 3px rgba(17, 42, 82, 0.05);
  --shadow-md: 0 4px 12px rgba(17, 42, 82, 0.08);
  --shadow-hover: 0 10px 20px rgba(17, 42, 82, 0.12);
  --shadow-primary-sm: 0 2px 6px rgba(255, 107, 26, 0.12);
  --shadow-primary-md: 0 3px 8px rgba(255, 107, 26, 0.3);
  --shadow-primary-lg: 0 10px 25px rgba(255, 107, 26, 0.15);
  --focus-ring-primary: 0 0 0 3px rgba(255, 107, 26, 0.15);
  --focus-ring-step: 0 0 0 3px rgba(255, 107, 26, 0.2);
  --backdrop-blur: rgba(255, 255, 255, 0.92);

  --container-max-desktop: 1240px;
}

/* --------------------------------------------------------------------------
   2. Global Document Resets & Base Typography
   -------------------------------------------------------------------------- */
body {
  height: auto;
  background-color: var(--theme-light-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}


/* --------------------------------------------------------------------------
   Random fixing bulk
   -------------------------------------------------------------------------- */
.color-swatch {
  margin-right: 10px;
}
.color-swatch:last-child {
  margin-right: 0;
}
.text-primary {
  color: var(--theme-primary) !important;
}
#btn-load-more-rails {
  color: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  background: transparent !important;
  border-radius: var(--border-radius-pill) !important;
}
#btn-load-more-rails:hover {
  background: var(--theme-primary) !important;
  color: #fff !important;
}


/* --------------------------------------------------------------------------
   3. Header Navigation & Announcement Bar
   -------------------------------------------------------------------------- */
.top-announcement-bar {
  background: var(--theme-primary);
  color: var(--card-bg);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 0;
  text-align: center;
  letter-spacing: 0.2px;
}

.hc-header {
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.hc-logo img,
.brand-logo-img {
  max-height: 38px;
  width: auto;
  object-fit: contain;
}

.hc-nav-icons a {
  color: var(--theme-navy);
  font-size: 18px;
  margin-left: 18px;
  position: relative;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.hc-nav-icons a:hover {
  color: var(--theme-primary);
  transform: translateY(-1px);
}

.hc-cart-icon-wrap {
  position: relative;
  display: inline-block;
}

.hc-cart-badge {
  height: 18px;
  width: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--theme-primary);
  color: var(--card-bg);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--border-radius-full);
  padding: 2px;
}

@keyframes cartShake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-15deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(5deg); }
}
.hc-cart-icon-wrap.shake { animation: cartShake 0.5s ease; }

header.hc-header button[data-target="#navbarSupportedContent"],
header.hc-header button[data-target="#navbarSupportedContent"]:focus,
header.hc-header button[data-target="#navbarSupportedContent"]:active,
header.hc-header button[data-target="#navbarSupportedContent"]:hover {
  display: inline-block !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 4px !important;
}

header.hc-header button[data-target="#navbarSupportedContent"] .ti-menu {
  display: inline-block !important;
  font-size: 22px !important;
  color: var(--theme-navy) !important;
  cursor: pointer;
  transition: color 0.2s ease;
}

header.hc-header button[data-target="#navbarSupportedContent"]:hover .ti-menu {
  color: var(--theme-primary) !important;
}

#navbarSupportedContent.collapse.show {
  display: block !important;
  width: 100%;
}

.hc-search-wrapper {
  position: relative;
}

.hc-search-input {
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  padding: 8px 14px;
  width: 100%;
  background: var(--card-bg);
  transition: all 0.2s ease;
}

.hc-search-input:focus {
  border-color: var(--theme-primary);
  outline: none;
  box-shadow: var(--focus-ring-primary);
}

.hc-search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 1050;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}

/* --------------------------------------------------------------------------
   4. Section Titles & Scrollable Track Layouts
   -------------------------------------------------------------------------- */
.section-title-hc {
  font-size: 18px;
  font-weight: 700;
  color: var(--theme-navy);
  margin-bottom: 14px;
}

.category-scroll-wrapper,
.product-scroll-wrapper {
  display: flex;
  overflow-x: auto;
  gap: 14px;
  padding-bottom: 12px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

/* Fix: a rail with only one product (before the catalog fills out) no
   longer sits awkwardly flush-left with dead space beside it - it
   centers itself instead. Needs no JS: modern browsers support :has(). */
.product-scroll-wrapper:has(.product-rail-card:only-child) {
  justify-content: center;
}

.category-scroll-wrapper::-webkit-scrollbar,
.product-scroll-wrapper::-webkit-scrollbar {
  height: 4px;
}

.category-scroll-wrapper::-webkit-scrollbar-thumb,
.product-scroll-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-muted);
  border-radius: var(--border-radius-xs);
}

.category-tile-clean {
  flex: 0 0 auto;
  width: 150px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 14px 10px;
  text-align: center;
  color: var(--theme-navy);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.category-tile-clean:hover {
  border-color: var(--theme-primary);
  color: var(--theme-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-rail-card {
  flex: 0 0 165px;
  width: 165px;
}

@media (min-width: 768px) {
  .product-rail-card {
    flex: 0 0 220px;
    width: 220px;
  }
}

/* --------------------------------------------------------------------------
   5. Product Card Components
   -------------------------------------------------------------------------- */
.hc-product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hc-product-card:hover {
  border-color: var(--border-muted);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.save-pill-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--save-badge-bg);
  color: var(--card-bg);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-bottom-right-radius: var(--border-radius-sm);
  z-index: 2;
  text-transform: uppercase;
}

.hc-product-img-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-tertiary);
  padding: 16px;
}

.hc-product-img-wrap img {
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius-xs);
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.hc-product-img-wrap:hover img,
.hc-product-card:hover .hc-product-img-wrap img {
  transform: scale(1.05);
}

.hc-product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.hc-brand-name {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.hc-product-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-navy);
  margin-bottom: 8px;
  line-height: 1.35;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.hc-product-card:hover .hc-product-title {
  color: var(--theme-primary);
}

.hc-price-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hc-current-price {
  color: var(--save-badge-bg);
  font-size: 15px;
  font-weight: 800;
}

.hc-old-price {
  color: var(--text-subtle);
  font-size: 12px;
  text-decoration: line-through;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   6. Checkout & Form System Components
   -------------------------------------------------------------------------- */
.checkout-step-header {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
  border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

.checkout-step-header:hover {
  background-color: var(--theme-light-bg);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-full);
  background-color: var(--card-border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all 0.25s ease;
}

.step-active .step-number {
  background-color: var(--theme-primary);
  color: var(--card-bg);
  box-shadow: var(--focus-ring-step);
}

.payment-option-card {
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--card-bg);
}

.payment-option-card:hover,
.payment-option-card.active {
  border-color: var(--theme-primary);
  background-color: var(--card-bg-accent);
}

.payment-option-card.active {
  box-shadow: var(--shadow-primary-sm);
}

.form-control {
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--card-border);
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--theme-primary);
  box-shadow: var(--focus-ring-primary);
}

.order-summary-card {
  position: sticky;
  top: 24px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md) !important;
  border: 1px solid var(--card-border);
}

#checkout-cart-items {
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-muted) var(--bg-secondary);
}

#checkout-cart-items::-webkit-scrollbar {
  width: 6px;
}

#checkout-cart-items::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-xs);
}

#checkout-cart-items::-webkit-scrollbar-thumb {
  background: var(--border-muted);
  border-radius: var(--border-radius-xs);
}

.product-img-preview {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: var(--border-radius-xs);
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
}

.checkout-submit-btn {
  background-color: var(--theme-primary);
  border: none;
  border-radius: var(--border-radius-sm);
  color: var(--card-bg);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 12px;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.checkout-submit-btn:hover {
  background-color: var(--theme-primary-hover);
  box-shadow: 0 4px 12px rgba(255, 107, 26, 0.25);
}

.checkout-submit-btn:active {
  transform: translateY(1px);
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--backdrop-blur);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   7. UI Notification Toasts
   -------------------------------------------------------------------------- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.cart-toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 360px;
  background: var(--card-bg);
  border-left: 4px solid var(--theme-primary);
  box-shadow: var(--shadow-hover);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  opacity: 0;
}

.cart-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: var(--border-radius-xs);
  background: var(--theme-light-bg);
  padding: 2px;
}

.toast-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--theme-navy);
  margin: 0;
  line-height: 1.2;
}

.toast-msg {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

.toast-close {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.toast-close:hover {
  color: var(--theme-navy);
}

/* --------------------------------------------------------------------------
   8. Footer & Accordion Navigation
   -------------------------------------------------------------------------- */
.hc-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  padding: 30px 0 20px;
  margin-top: 40px;
}

.hc-accordion-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--theme-navy);
  text-transform: uppercase;
  padding: 12px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
}

.hc-accordion-header .icon-toggle::after {
  content: "+";
  font-size: 16px;
  font-weight: bold;
}

.hc-accordion-header[aria-expanded="true"] .icon-toggle::after {
  content: "-";
}

@media (min-width: 768px) {
  .hc-accordion-header {
    border-bottom: none;
    cursor: default;
    padding: 0 0 12px 0;
  }
  .hc-accordion-header .icon-toggle {
    display: none;
  }
  .hc-accordion-collapse {
    display: block !important;
  }
}

/* --------------------------------------------------------------------------
   9. Banner Carousel
   -------------------------------------------------------------------------- */
.banner-carousel {
  width: 100%;
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.banner-carousel .item {
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--theme-light-bg);
}

.banner-carousel .item img {
  width: 100%;
  height: 400px;
  object-fit: contain;
  object-position: center;
  display: block;
}

@media (max-width: 576px) {
  .banner-carousel .item {
    height: 180px;
  }
}

.owl-carousel,
.owl-carousel .owl-stage,
.owl-carousel .owl-item {
  touch-action: pan-y;
}

#filter-category optgroup {
  font-weight: 700;
  color: var(--text-dark-gray);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  background-color: var(--bg-tertiary);
}

#filter-category option {
  font-weight: 400;
  color: var(--text-primary);
  padding-left: 10px;
  background-color: var(--card-bg);
}

/* --------------------------------------------------------------------------
   10. Contact Page
   -------------------------------------------------------------------------- */
.contact-info-card,
.contact-form-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
}

.contact-icon-box {
  color: var(--theme-primary);
  font-size: 1.25rem;
}

.hc-map-container {
  width: 100%;
  overflow: hidden;
  background-color: var(--card-border);
  display: block;
}

.hc-map-container iframe {
  width: 100%;
  display: block;
  filter: grayscale(10%) contrast(100%);
}

/* --------------------------------------------------------------------------
   11. Profile Page
   -------------------------------------------------------------------------- */
#user-avatar-initials,
#user-avatar {
  background-color: var(--theme-navy) !important;
  border: 2px solid var(--theme-primary) !important;
  color: var(--card-bg) !important;
  font-weight: 700;
}

#auth-provider-badge {
  background-color: var(--theme-primary-light) !important;
  color: var(--theme-primary) !important;
  border: 1px solid var(--theme-primary-border) !important;
  font-weight: 600 !important;
}

.profile-nav .nav-link,
#profileTab .nav-link {
  color: var(--text-dark-gray) !important;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease-in-out;
}

.profile-nav .nav-link i,
#profileTab .nav-link i {
  width: 24px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.profile-nav .nav-link:hover,
#profileTab .nav-link:hover {
  color: var(--theme-primary) !important;
  background-color: var(--theme-primary-light) !important;
}

.profile-nav .nav-link:hover i,
#profileTab .nav-link:hover i {
  color: var(--theme-primary);
}

.profile-nav .nav-link.active,
#profileTab .nav-link.active {
  background-color: var(--theme-primary) !important;
  color: var(--card-bg) !important;
  font-weight: 600;
  box-shadow: var(--shadow-primary-sm);
}

.profile-nav .nav-link.active i,
#profileTab .nav-link.active i {
  color: var(--card-bg) !important;
}

.order-card {
  border: 1px solid var(--card-border) !important;
  border-radius: var(--border-radius-md);
  transition: all 0.2s ease-in-out;
}

.order-card:hover {
  box-shadow: var(--shadow-hover) !important;
  border-color: var(--theme-primary-border) !important;
}

.status-badge {
  font-size: 0.75rem;
  padding: 0.4em 0.75em;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: var(--border-radius-pill);
}

.status-badge.badge-warning { background-color: #fffbe6 !important; color: #d48806 !important; border: 1px solid #ffe58f; }
.status-badge.badge-info { background-color: #e6f7ff !important; color: #096dd9 !important; border: 1px solid #91d5ff; }
.status-badge.badge-primary { background-color: var(--theme-primary-light) !important; color: var(--theme-primary) !important; border: 1px solid var(--theme-primary-border); }
.status-badge.badge-success { background-color: #f6ffed !important; color: #389e0d !important; border: 1px solid #b7eb8f; }
.status-badge.badge-secondary { background-color: var(--bg-secondary) !important; color: var(--text-muted) !important; border: 1px solid var(--border-muted); }

.btn-theme-primary,
#profile-content .btn-style-primary,
#profile-content #orders .btn,
#profile-content a[href="category.html"].btn {
  background-color: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  color: var(--card-bg) !important;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.btn-theme-primary:hover,
#profile-content .btn-style-primary:hover,
#profile-content #orders .btn:hover,
#profile-content a[href="category.html"].btn:hover {
  background-color: var(--theme-primary-hover) !important;
  border-color: var(--theme-primary-hover) !important;
  color: var(--card-bg) !important;
  box-shadow: var(--shadow-primary-md);
}

#logout-btn,
.cancel-btn {
  color: var(--danger-color) !important;
  border-color: var(--danger-color) !important;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  transition: all 0.2s ease;
}

#logout-btn:hover,
.cancel-btn:hover {
  background-color: var(--danger-color) !important;
  color: var(--card-bg) !important;
}

#vouchers .card { border-left-color: var(--theme-primary) !important; border-left-width: 4px !important; }
#vouchers .badge-warning { background-color: var(--theme-primary-light) !important; color: var(--theme-primary) !important; border: 1px dashed var(--theme-primary); font-weight: 700; }
#orders .fa-shopping-bag { color: var(--theme-primary) !important; opacity: 0.25 !important; }
#profile-loading .fa-spinner { color: var(--theme-primary) !important; }

.form-control:focus { border-color: var(--theme-primary); box-shadow: var(--focus-ring-primary); }
.form-control[readonly],
#settings .form-control[readonly] {
  background-color: var(--card-bg-subtle);
  border-color: var(--border-input-readonly);
  color: var(--text-dark-gray);
}

/* --------------------------------------------------------------------------
   12. PWA Install Banner
   -------------------------------------------------------------------------- */
.pwa-install-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  width: calc(100% - 32px);
  max-width: 420px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--theme-primary-border, #e0e0e0);
  border-left: 5px solid var(--theme-primary, #ff6b1a);
  border-radius: var(--border-radius-md, 8px);
  box-shadow: var(--shadow-primary-lg, 0 10px 25px rgba(0, 0, 0, 0.15));
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: transform;
}

.pwa-install-banner.show { transform: translateX(-50%) translateY(0); }

@supports (padding: env(safe-area-inset-top)) {
  .pwa-install-banner { top: calc(16px + env(safe-area-inset-top)); }
}

.pwa-banner-info { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.pwa-banner-logo { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; border-radius: var(--border-radius-xs); }
.pwa-banner-text { display: flex; flex-direction: column; min-width: 0; }
.pwa-banner-title { font-size: 13px; font-weight: 700; color: var(--text-secondary, #212529); margin: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-banner-sub { font-size: 11px; color: var(--theme-primary, #ff6b1a); font-weight: 500; margin: 2px 0 0 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn-pwa-install {
  display: inline-flex; align-items: center; justify-content: center;
  background-color: var(--theme-primary, #ff6b1a); color: var(--card-bg, #ffffff);
  border: none; border-radius: var(--border-radius-sm); padding: 8px 14px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-primary-md, 0 2px 4px rgba(0,0,0,0.1));
  transition: background-color 0.2s ease, transform 0.1s ease; white-space: nowrap;
}
.btn-pwa-install:hover { background-color: var(--theme-primary-hover, #e05a10); }
.btn-pwa-install:active { transform: scale(0.96); }

.btn-pwa-close {
  background: transparent; border: none; color: var(--icon-close-gray, #6c757d);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 4px; border-radius: var(--border-radius-full);
  transition: color 0.2s ease, background-color 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}
.btn-pwa-close:hover { color: var(--theme-primary, #ff6b1a); background-color: rgba(0, 0, 0, 0.05); }

@media (max-width: 480px) {
  .pwa-install-banner { width: calc(100% - 16px) !important; max-width: none !important; padding: 10px 12px !important; }
  .pwa-banner-logo { width: 32px !important; height: 32px !important; }
  .pwa-banner-title { font-size: 13px !important; margin-bottom: 0 !important; }
  .pwa-banner-sub { font-size: 11px !important; }
}
@media (max-width: 360px) { .pwa-banner-sub { display: none; } }

/* --------------------------------------------------------------------------
   13. Global Loader
   -------------------------------------------------------------------------- */
#global-glass-loader {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 99999; opacity: 0; pointer-events: none; transition: opacity 0.2s ease-in-out;
}
#global-glass-loader.active { opacity: 1; pointer-events: auto; }

.glass-spinner {
  width: 42px; height: 42px;
  border: 4px solid rgba(255, 111, 0, 0.15);
  border-top: 4px solid #FF6F00;
  border-radius: var(--border-radius-full);
  animation: glassSpin 0.7s linear infinite;
}
@keyframes glassSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   14. Horizontal Icon Navbar
   -------------------------------------------------------------------------- */

.hc-icon-navbar {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-bottom: 1px solid var(--card-border);
  padding: 0 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hc-icon-navbar::-webkit-scrollbar { display: none; }

.hc-icon-nav-item {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none !important;
  transition: color .15s ease;
}
.hc-icon-nav-item i { font-size: 14px; width: 16px; text-align: center; }
.hc-icon-nav-item::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 2px; border-radius: 2px;
  background: var(--theme-primary);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.hc-icon-nav-item:hover { color: var(--theme-primary); }
.hc-icon-nav-item.active { color: var(--theme-primary); }
.hc-icon-nav-item.active::after { transform: scaleX(1); }


/* --------------------------------------------------------------------------
   15. Floating Action Buttons (WhatsApp + AI Assistant)
   -------------------------------------------------------------------------- */
.hc-fab {
  position: fixed;
  bottom: 20px;
  width: 43px;
  height: 43px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  z-index: 1200;
  text-decoration: none;
}

/* FABs floating on top of an open modal looked broken - hide them while
   any Bootstrap modal is open (Bootstrap adds this class to <body>). */
body.modal-open .hc-fab {
  display: none;
}

.hc-fab-whatsapp { left: 16px; background: #25D366; }
.hc-fab-whatsapp:hover { color: #fff; opacity: 0.92; }

.hc-fab-ai { right: 16px; background: var(--theme-primary, #f36f21); }
.hc-fab-ai:hover { opacity: 0.92; }

.hc-ai-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  max-width: 380px;
  height: 70vh;
  max-height: 560px;
  background: #fff;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.2);
  z-index: 1300;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.hc-ai-panel.open { transform: translateY(0); }

.hc-ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--theme-primary, #f36f21);
  color: #fff;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  font-weight: 700;
  font-size: 14px;
}
.hc-ai-panel-header button { background: none; border: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
#hc-ai-panel-frame { flex: 1; border: none; width: 100%; }

@media (max-width: 480px) {
  .hc-ai-panel { max-width: 100%; }
}

/* --------------------------------------------------------------------------
   16. Wishlist Heart Button
   -------------------------------------------------------------------------- */
.hc-wishlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-full);
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--card-border, #eee);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 15px;
  z-index: 5;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.1s ease;
}
.hc-wishlist-btn:hover { transform: scale(1.08); }
.hc-wishlist-btn.active { color: #e0245e; }
.hc-wishlist-btn.active i { font-weight: 900; }

.hc-wishlist-btn-inline {
  position: static;
  display: inline-flex;
  vertical-align: middle;
  margin-left: 8px;
}

/* ==========================================================================
   17. DESKTOP PASS (≥992px)
   ========================================================================== */
@media (min-width: 992px) {
  .container {
    max-width: var(--container-max-desktop);
  }
  @media (min-width: 992px) {
  .hc-icon-navbar { justify-content: center; overflow-x: visible; }
  .hc-icon-nav-item { padding: 0 18px; font-size: 13px; }
  .hc-icon-nav-item::after { left: 18px; right: 18px; }
}


  /* The icon navbar was built mobile-first (scrolling, left-aligned).
     On a wide screen with room to spare, center it like a real secondary nav. */
  .hc-icon-navbar {
    justify-content: center;
    overflow-x: visible;
    gap: 8px;
    padding: 8px 16px;
  }
  .hc-icon-nav-item {
    min-width: 72px;
    padding: 8px 16px;
  }
  .hc-icon-nav-item i { font-size: 20px; }
  .hc-icon-nav-item span { font-size: 12px; }

  /* Give the header more breathing room and a slightly larger search bar. */
  .hc-header { padding: 16px 0; }
  .hc-search-input { padding: 10px 16px; font-size: 14px; }
  .hc-logo img, .brand-logo-img { max-height: 44px; }
  .hc-nav-icons a { font-size: 20px; }

  /* Taller banner on desktop so it doesn't look like a stretched mobile asset. */
  .banner-carousel .item { height: 360px; }
  .banner-carousel .item img { height: 100%; object-fit: cover; }

  /* Product cards get more image height and slightly larger type on desktop. */
  .hc-product-img-wrap { height: 240px; }
  .hc-product-title { font-size: 14px; }
  .hc-current-price { font-size: 16px; }

  .category-tile-clean { width: 170px; }

  /* FABs sit a bit further from the edge so they don't crowd a wide viewport. */
  .hc-fab { bottom: 28px; }
  .hc-fab-whatsapp { left: 28px; }
  .hc-fab-ai { right: 28px; }
}

@media (min-width: 1200px) {
  .hc-product-img-wrap { height: 260px; }
}


/* ==========================================================================
   18. HOME / CARD POLISH  (replace the previous section 18 at the END of css/hc-modern.css)
   
   ========================================================================== */

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes hcShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.hc-skel {
  background: linear-gradient(90deg, #eceff3 25%, #f6f8fa 37%, #eceff3 63%);
  background-size: 400% 100%;
  animation: hcShimmer 1.4s ease infinite;
  border-radius: var(--border-radius-xs);
}
.hc-skel-card { pointer-events: none; }

/* Speed + smooth swipe */
.subcat-rail-section { content-visibility: auto; contain-intrinsic-size: auto 380px; }
.product-scroll-wrapper { scroll-snap-type: x proximity; }
.product-rail-card { scroll-snap-align: start; display: flex; }
.product-rail-card > .hc-product-card { width: 100%; }

/* Compact, consistent info area */
.hc-product-info { padding: 10px; }
.hc-product-card.is-oos .hc-product-img-wrap img { opacity: .5; }

.hc-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; margin: 0 0 6px; font-size: 11px; line-height: 1.2;
}
.hc-rating { color: var(--theme-primary); font-weight: 700; white-space: nowrap; }
.hc-rating i { font-size: 11px; }
.hc-rating em { font-style: normal; font-weight: 500; color: var(--text-muted); }
.hc-meta-low { color: #d9480f; font-weight: 700; white-space: nowrap; }
.hc-meta-sold { color: var(--text-muted); white-space: nowrap; }

/* Two buttons: Add to Cart (outline) + Buy Now (solid) */
.hc-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.hc-card-actions.single { grid-template-columns: 1fr; }
.hc-btn {
  height: 34px; padding: 0 4px;
  border-radius: var(--border-radius-sm);
  font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer;
  border: 1.5px solid var(--theme-primary);
  background: transparent; color: var(--theme-primary);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .1s ease;
}
.hc-btn:active { transform: scale(.97); }
.hc-cart-btn:hover { background: var(--theme-primary-light); }
.hc-cart-btn.added {   }
.hc-buy-btn { background: var(--theme-primary-light); }
.hc-buy-btn:hover { background: var(--theme-primary-hover); border-color: var(--theme-primary-hover); color: white; }
.hc-btn:disabled {
  background: var(--bg-tertiary); border-color: var(--border-muted);
  color: var(--text-subtle); cursor: not-allowed; transform: none;
}
@media (min-width: 768px) { .hc-btn { font-size: 12px; } }

.hc-featured-rail .section-title-hc i { color: var(--theme-primary); }
.hc-view-all { font-size: 13px; font-weight: 700; color: var(--theme-primary); text-decoration: none !important; }
.hc-view-all:hover { color: var(--theme-primary-hover); }

/* Mobile toasts clear of the sticky header */
@media (max-width: 576px) {
  #toast-container { top: 12px; left: 12px; right: 12px; }
  .cart-toast { min-width: 0; max-width: none; width: 100%; }
}




/* ==========================================================================
   19. CATEGORY PAGE  (append to the END of css/hc-modern.css, after section 18)
   ========================================================================== */

/* Heading: title/count on the left, quick filter chips on the right */
.hc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hc-cat-head-text { flex: 0 0 auto; min-width: 0; }
.hc-chip-rail {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  overflow-x: auto; padding: 4px 2px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hc-chip-rail::-webkit-scrollbar { display: none; }

.hc-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  border: 1px solid var(--card-border); border-radius: var(--border-radius-pill);
  background: #fff; color: var(--theme-navy);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .1s ease;
}
.hc-chip:hover { border-color: var(--theme-primary); color: var(--theme-primary); }
.hc-chip:active { transform: scale(.97); }
.hc-chip.active { background: var(--theme-primary); border-color: var(--theme-primary); color: #fff; }
.hc-chip.active i { font-size: 11px; opacity: .9; }

.hc-chip-clear {
  flex: 0 0 auto; height: 32px; padding: 0 6px;
  border: none; background: transparent;
  color: var(--text-muted); font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.hc-chip-clear:hover { color: var(--danger-color); }

@media (max-width: 767px) {
  .hc-cat-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .hc-chip-rail { justify-content: flex-start; margin: 0 -15px; padding: 4px 15px; }
}

/* Sub-category row (sits under the parent chips, shown only when a parent is active) */
.hc-chip-rail-sub { flex: none; justify-content: flex-start; margin-top: 8px; }
.hc-chip-rail-sub:empty { display: none; }
.hc-chip-rail-sub .hc-chip { height: 30px; font-size: 12px; background: var(--bg-tertiary); }
.hc-chip-rail-sub .hc-chip:hover { border-color: var(--theme-primary); color: var(--theme-primary); }
.hc-chip-rail-sub .hc-chip.active { background: var(--theme-primary); border-color: var(--theme-primary); color: #fff; }
@media (max-width: 767px) {
  .hc-chip-rail-sub { margin: 8px -15px 0; padding: 4px 15px; }
}

/* Filter button badge */
.hc-filter-badge {
  align-items: center; justify-content: center;
  min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px;
  border-radius: 9px; background: var(--theme-primary); color: #fff;
  font-size: 10px; font-weight: 700;
}

/* Grid entrance + load more */
#shop-products-grid > div { animation: hcFadeUp .3s ease both; }
@keyframes hcFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hc-load-more {
  height: 40px; padding: 0 28px;
  border: 1.5px solid var(--theme-primary); border-radius: var(--border-radius-pill);
  background: transparent; color: var(--theme-primary);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.hc-load-more:hover { background: var(--theme-primary); color: #fff; }

/* Empty state */
.hc-empty { text-align: center; padding: 56px 16px; color: var(--text-muted); }
.hc-empty i { font-size: 38px; color: var(--border-muted); margin-bottom: 12px; }
.hc-empty h5 { font-weight: 700; color: var(--theme-navy); margin-bottom: 4px; }
.hc-empty p { font-size: 13px; margin-bottom: 16px; }

/* ==========================================================================
   20. SINGLE PRODUCT PAGE  (append to the END of css/hc-modern.css, after section 19)
   ========================================================================== */

/* Gallery: one square box, every image fitted the same way */
.hc-gallery-main {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--card-border); border-radius: 8px;
  overflow: hidden; cursor: zoom-in;
}
.hc-gallery-main #main-product-img {
  width: 100%; height: 100%; object-fit: contain; padding: 14px; border-radius: 8px;
}
.hc-gallery-main .hc-wishlist-btn { top: 10px; right: 10px; }
.hc-gallery-count {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(17, 42, 82, .72); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 10px;
}
.hc-thumbs {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 2px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hc-thumbs::-webkit-scrollbar { display: none; }
.hc-thumb {
  flex: 0 0 64px; width: 64px; height: 64px; padding: 4px;
  object-fit: contain; background: #fff; cursor: pointer;
  border: 1.5px solid var(--card-border); border-radius: 6px; opacity: .75;
  transition: border-color .2s ease, opacity .2s ease;
}
.hc-thumb:hover { opacity: 1; }
.hc-thumb.active { border-color: var(--theme-primary); opacity: 1; }

.hc-lightbox {
  position: fixed; inset: 0; z-index: 10001; padding: 16px; cursor: zoom-out;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .88);
}
.hc-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 8px; }

/* Info column */
.hc-highlights { list-style: none; padding: 0; margin: 0 0 14px; }
.hc-highlights li { font-size: 13px; color: var(--text-secondary); padding: 3px 0; }
.hc-highlights i { color: var(--theme-primary); margin-right: 6px; font-size: 12px; }
.hc-info-box {
  border: 1px solid var(--card-border); border-radius: 8px; background: var(--theme-light-bg);
  padding: 10px 12px; font-size: 13px; color: var(--text-muted);
}
.hc-info-box div { padding: 3px 0; }
.hc-info-box i { width: 20px; color: var(--theme-primary); }

.hc-qty { display: inline-flex; align-items: center; border: 1px solid var(--card-border); border-radius: 8px; overflow: hidden; background: #fff; }
.hc-qty button { width: 38px; height: 38px; border: none; background: transparent; font-size: 18px; font-weight: 700; color: var(--theme-navy); cursor: pointer; }
.hc-qty button:hover { background: var(--theme-primary-light); color: var(--theme-primary); }
.hc-qty input { width: 44px; height: 38px; border: none; text-align: center; font-weight: 700; background: transparent; }

/* Fixed bottom bar */
.hc-buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
  background: #fff; border-top: 1px solid var(--card-border);
  box-shadow: 0 -4px 16px rgba(17, 42, 82, .08);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
}
.hc-buybar-inner {
  max-width: 560px; margin: 0 auto; padding: 0 15px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.hc-buybar-inner.single { grid-template-columns: 1fr; }
.hc-bar-btn {
  height: 46px; border-radius: var(--border-radius-sm);
  border: 1.5px solid var(--theme-primary); background: #fff; color: var(--theme-primary);
  font-size: 14.5px; font-weight: 700; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .1s ease;
}
.hc-bar-btn:active { transform: scale(.98); }
.hc-bar-cart:hover { background: var(--theme-primary-light); }
.hc-bar-cart.added { background: #2f9e44; border-color: #2f9e44; color: #fff; }
.hc-bar-buy { background: var(--theme-primary); color: #fff; }
.hc-bar-buy:hover { background: var(--theme-primary-hover); border-color: var(--theme-primary-hover); }
.hc-bar-btn:disabled { background: var(--bg-tertiary); border-color: var(--border-muted); color: var(--text-subtle); cursor: not-allowed; }

/* Make room so the bar never covers content or the floating buttons */
body.has-buybar { padding-bottom: 78px; }
body.has-buybar .hc-fab { bottom: 88px; }

/* ==========================================================================
   21. CART PAGE  (append to the END of css/hc-modern.css, after section 20)
   Uses .hc-qty from section 20.
   ========================================================================== */

.hc-cart-row { display: flex; gap: 14px; padding: 16px; border-bottom: 1px solid var(--border-light); }
.hc-cart-row:last-child { border-bottom: none; }
.hc-cart-img {
  flex: 0 0 76px; width: 76px; height: 76px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--card-border); border-radius: 8px;
}
.hc-cart-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.hc-cart-main { flex: 1; min-width: 0; }
.hc-cart-name {
  font-size: 13.5px; font-weight: 700; color: var(--theme-navy); line-height: 1.35; text-decoration: none !important;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hc-cart-name:hover { color: var(--theme-primary); }
.hc-cart-remove {
  flex: 0 0 auto; margin-left: 8px; padding: 2px 6px;
  border: none; background: transparent; color: var(--text-subtle); cursor: pointer; transition: color .2s ease;
}
.hc-cart-remove:hover { color: var(--danger-color); }
.hc-cart-unit { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.hc-cart-note { font-size: 11.5px; font-weight: 600; margin-top: 2px; }
.hc-cart-note.warn { color: #d9480f; }
.hc-cart-note.bad { color: var(--danger-color); }
.hc-cart-note.info { color: var(--theme-primary); }
.hc-cart-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; min-height: 30px; }
.hc-cart-line { margin-left: auto; font-size: 15px; font-weight: 800; color: var(--save-badge-bg); }
.hc-cart-row.is-unavailable .hc-cart-img img,
.hc-cart-row.is-unavailable .hc-cart-name { opacity: .5; }

.hc-qty-sm button { width: 30px; height: 30px; font-size: 16px; }
.hc-qty-sm input { width: 34px; height: 30px; font-size: 13px; }
.hc-qty button:disabled { opacity: .35; cursor: not-allowed; background: transparent; color: var(--theme-navy); }

/* Free shipping progress */
.hc-ship-progress { margin-bottom: 14px; }
.hc-ship-text { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.hc-ship-text b { color: var(--theme-navy); }
.hc-ship-bar { height: 6px; border-radius: 3px; background: var(--bg-secondary); overflow: hidden; }
.hc-ship-bar span { display: block; height: 100%; border-radius: 3px; background: var(--theme-primary); transition: width .35s ease; }

#checkout-btn.is-blocked { opacity: .55; }

/* Undo button inside toasts */
.toast-undo {
  border: none; background: transparent; color: var(--theme-primary);
  font-size: 12.5px; font-weight: 700; padding: 0 8px; cursor: pointer;
}
.toast-undo:hover { color: var(--theme-primary-hover); }


/* ==========================================================================
   22. CHECKOUT PAGE  (append to the END of css/hc-modern.css, after section 21)
   Uses .hc-buybar / .hc-bar-btn from section 20.
   ========================================================================== */

.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }

/* Form polish (replaces the old red inline styles) */
.input-group-text {
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}
.input-group > .form-control:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group.has-invalid ~ .invalid-feedback { display: block; }

/* Collapsible steps that still show a summary */
.checkout-step-header { padding: 14px 16px; }
.step-title-wrap { min-width: 0; }
.step-summary {
  margin-top: 2px; font-size: 12.5px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.step-summary.warn { color: #d9480f; font-weight: 600; }
.step-done .step-number { background: #2f9e44; color: #fff; box-shadow: none; }
.step-chevron { color: var(--text-subtle); transition: transform .2s ease; }
[aria-expanded="true"] > div > .step-chevron,
[aria-expanded="true"] .step-chevron { transform: rotate(180deg); }

.payment-option-card.is-disabled { opacity: .6; cursor: not-allowed; background: var(--bg-tertiary); }
.payment-option-card.is-disabled:hover { border-color: var(--card-border); background: var(--bg-tertiary); }

.hc-co-issue { opacity: .85; }

/* Fixed bottom bar variant: total on the left, button on the right */
.hc-buybar-inner.checkout { grid-template-columns: auto 1fr; align-items: center; gap: 16px; }
.hc-bar-total { display: flex; flex-direction: column; line-height: 1.15; }
.hc-bar-total small { font-size: 11px; color: var(--text-muted); }
.hc-bar-total strong { font-size: 17px; font-weight: 800; color: var(--save-badge-bg); white-space: nowrap; }

/* ==========================================================================
   23. PROFILE PAGE  (append to the END of css/hc-modern.css, after section 22)
   Uses .hc-chip (19), .hc-btn / .hc-buy-btn / .hc-cart-btn (18), .hc-skel (18).
   ========================================================================== */

/* Header card */
.hc-profile-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  background: #fff; border: 1px solid var(--card-border); border-radius: 10px;
  padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.hc-avatar {
  flex: 0 0 56px; width: 56px; height: 56px; margin-right: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--theme-navy); border: 2px solid var(--theme-primary);
  color: #fff; font-size: 22px; font-weight: 700;
}
.hc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hc-stats { display: flex; gap: 14px; margin-top: 4px; font-size: 12.5px; color: var(--text-muted); }
.hc-stats b { color: var(--theme-primary); font-size: 14px; }

/* Tabs: sidebar on desktop, swipe row on mobile */
.hc-profile-nav {
  display: flex; gap: 6px; background: #fff; border: 1px solid var(--card-border);
  border-radius: 10px; padding: 8px; box-shadow: var(--shadow-sm);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hc-profile-nav::-webkit-scrollbar { display: none; }
.hc-profile-nav .nav-link {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 14px; border-radius: var(--border-radius-sm);
  color: var(--text-dark-gray); font-weight: 600; font-size: 14px; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.hc-profile-nav .nav-link i { width: 18px; text-align: center; color: var(--text-muted); }
.hc-profile-nav .nav-link:hover { background: var(--theme-primary-light); color: var(--theme-primary); }
.hc-profile-nav .nav-link.active { background: var(--theme-primary); color: #fff; }
.hc-profile-nav .nav-link.active i { color: #fff; }
@media (min-width: 992px) {
  .hc-profile-nav { flex-direction: column; overflow: visible; }
  .hc-profile-nav .nav-link { width: 100%; }
}

/* Panels + buttons */
.hc-panel {
  background: #fff; border: 1px solid var(--card-border); border-radius: 10px;
  padding: 16px; box-shadow: var(--shadow-sm);
}
.hc-btn-auto { width: auto; height: 36px; padding: 0 18px; font-size: 13px; }
.hc-btn-danger { border-color: var(--danger-color); color: var(--danger-color); background: transparent; }
.hc-btn-danger:hover { background: var(--danger-color); color: #fff; }
.hc-chip-rail-left { justify-content: flex-start; }
.hc-profile-head .hc-btn-danger { height: 34px; }

/* Orders */
.hc-order {
  background: #fff; border: 1px solid var(--card-border); border-radius: 10px;
  margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.hc-order-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: var(--bg-tertiary); border-bottom: 1px solid var(--card-border);
}
.hc-status {
  padding: 4px 12px; border-radius: var(--border-radius-pill); border: 1px solid;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap;
}
.hc-status.pending { background: #fffbe6; color: #b26a00; border-color: #ffe58f; }
.hc-status.processing { background: var(--theme-primary-light); color: #e65100; border-color: var(--theme-primary-border); }
.hc-status.shipped { background: #e6f4ff; color: #1565c0; border-color: #bbdefb; }
.hc-status.delivered { background: #f0faf0; color: #2e7d32; border-color: #c8e6c9; }
.hc-status.cancelled { background: #ffebee; color: #c62828; border-color: #ffcdd2; }

/* Progress tracker */
.hc-track { display: flex; padding: 14px 16px 4px; }
.hc-track-step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hc-track-step::before {
  content: ""; position: absolute; top: 6px; right: 50%; width: 100%; height: 2px; background: var(--card-border);
}
.hc-track-step:first-child::before { display: none; }
.hc-track-step .dot { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--card-border); }
.hc-track-step .lbl { margin-top: 6px; font-size: 11px; color: var(--text-subtle); font-weight: 600; }
.hc-track-step.done::before { background: var(--theme-primary); }
.hc-track-step.done .dot { background: var(--theme-primary); border-color: var(--theme-primary); }
.hc-track-step.done .lbl { color: var(--theme-navy); }
.hc-track-step.current .dot { box-shadow: 0 0 0 4px var(--theme-primary-light); }

.hc-order-body { padding: 8px 16px; }
.hc-order-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.hc-order-item:last-child { border-bottom: none; }
.hc-order-img {
  flex: 0 0 52px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--card-border); border-radius: 8px; overflow: hidden;
}
.hc-order-img img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.hc-order-name {
  display: block; font-size: 13px; font-weight: 700; color: var(--theme-navy); text-decoration: none !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hc-order-name:hover { color: var(--theme-primary); }
.hc-order-extra { padding: 8px 16px; font-size: 12.5px; color: var(--text-muted); border-top: 1px dashed var(--card-border); }
.hc-order-extra i { width: 18px; color: var(--theme-primary); }
.hc-order-extra .text-danger i { color: var(--danger-color); }
.hc-order-addr { display: flex; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border-light); }
.hc-order-addr > i { margin-top: 3px; color: var(--theme-primary); }
.hc-order-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 12px 16px; background: var(--bg-tertiary); border-top: 1px solid var(--card-border);
}
.hc-order-total { font-size: 18px; font-weight: 800; color: var(--theme-navy); }
.hc-order-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Empty states */
.hc-empty { text-align: center; padding: 44px 16px; background: #fff; border: 1px solid var(--card-border); border-radius: 10px; color: var(--text-muted); }
.hc-empty i { font-size: 38px; color: var(--border-muted); margin-bottom: 10px; }
.hc-empty h5 { font-weight: 700; color: var(--theme-navy); margin-bottom: 4px; }
.hc-empty p { font-size: 13px; margin-bottom: 14px; }

/* Wishlist cards: buttons inherit the card look */
.wl-col .hc-card-actions { margin-top: 8px; }
