    /* ================================================================
   CSS VARIABLES  — Edit colors / fonts in one place
================================================================ */
    :root {
      --blue: #1a56db;
      /* Primary blue  */
      --blue-dark: #1e3a8a;
      /* Dark blue for footer/hover */
      --blue-light: #dbeafe;
      /* Light blue backgrounds */
      --orange: #e86c1a;
      /* Accent orange */
      --orange-hover: #c2500e;
      /* Darker orange on hover */
      --white: #ffffff;
      --bg: #f3f6fb;
      /* Page background */
      --card: #ffffff;
      /* Card background */
      --text: #111827;
      /* Primary text */
      --text-muted: #6b7280;
      /* Muted / secondary text */
      --border: #e5e7eb;
      /* Border color */
      --success: #16a34a;
      /* Green for success */
      --danger: #dc2626;
      /* Red for errors */
      --shadow: 0 2px 16px rgba(0, 0, 0, 0.09);
      --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.14);
      --radius: 10px;
      --radius-lg: 16px;
      --font: 'Outfit', sans-serif;
    }

    /* ================================================================
   RESET & BASE STYLES
================================================================ */
    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      scroll-behavior: smooth;
      overflow-x: hidden;
    }

    body {
      font-family: var(--font);
      font-size: 15px;
      color: var(--text);
      background: var(--bg);
      line-height: 1.6;
      overflow-x: hidden;
      width: 100%;
    }

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

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

    ul {
      list-style: none;
    }

    button {
      cursor: pointer;
      font-family: var(--font);
    }

    input,
    select,
    textarea {
      font-family: var(--font);
      width: 100%;
      box-sizing: border-box;
    }

    .hidden {
      display: none !important;
    }

    /* ================================================================
   UTILITY CLASSES
================================================================ */
    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 20px;
    }

    .btn-blue {
      background: var(--blue);
      color: #fff;
      border: none;
      padding: 11px 26px;
      border-radius: var(--radius);
      font-size: 14px;
      font-weight: 600;
      transition: background .2s, transform .15s;
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .btn-blue:hover {
      background: var(--blue-dark);
      transform: translateY(-1px);
    }

    .btn-orange {
      background: var(--orange);
      color: #fff;
      border: none;
      padding: 11px 26px;
      border-radius: var(--radius);
      font-size: 14px;
      font-weight: 600;
      transition: background .2s, transform .15s;
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .btn-orange:hover {
      background: var(--orange-hover);
      transform: translateY(-1px);
    }

    .btn-outline {
      background: transparent;
      color: var(--blue);
      border: 2px solid var(--blue);
      padding: 9px 24px;
      border-radius: var(--radius);
      font-size: 14px;
      font-weight: 600;
      transition: all .2s;
    }

    .btn-outline:hover {
      background: var(--blue);
      color: #fff;
    }

    .section-title {
      font-size: 26px;
      font-weight: 800;
      text-align: center;
      margin-bottom: 30px;
      color: var(--text);
    }

    .badge-sale {
      background: var(--danger);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 20px;
    }

    .badge-new {
      background: var(--success);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 20px;
    }

    .badge-hot {
      background: var(--orange);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 20px;
    }

    /* ================================================================
   PAGE SWITCHER  (show/hide pages)
================================================================ */
    .page {
      display: none;
    }

    .page.active {
      display: block;
    }

    /* ================================================================
   TOAST NOTIFICATION
================================================================ */
    #toast {
      position: fixed;
      bottom: 28px;
      right: 28px;
      background: var(--text);
      color: #fff;
      padding: 13px 22px;
      border-radius: var(--radius);
      font-size: 14px;
      font-weight: 500;
      z-index: 9999;
      opacity: 0;
      pointer-events: none;
      transition: opacity .3s;
      max-width: 300px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    #toast.show {
      opacity: 1;
    }

    #toast.success {
      background: var(--success);
    }

    #toast.error {
      background: var(--danger);
    }

    /* ================================================================
   WHATSAPP FLOATING BUTTON
   — Poori website par neeche right corner mein dikhega
================================================================ */

    /* ---- Main WhatsApp Button ---- */
    .whatsapp-fab {
      position: fixed;
      bottom: 28px;
      right: 28px;
      z-index: 8888;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 10px;
    }

    /* ---- Green Circle Button ---- */
    .whatsapp-btn {
      width: 58px;
      height: 58px;
      background: #25d366;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
      cursor: pointer;
      border: none;
      transition: transform .22s, box-shadow .22s, background .2s;
      text-decoration: none;
    }

    .whatsapp-btn:hover {
      background: #1ebe5d;
      transform: scale(1.1) translateY(-2px);
      box-shadow: 0 10px 32px rgba(37, 211, 102, 0.55);
    }

    .whatsapp-btn i {
      font-size: 30px;
      color: #fff;
      line-height: 1;
    }

    /* ---- Pulse Ring Animation ---- */
    .whatsapp-btn::before {
      content: '';
      position: absolute;
      width: 58px;
      height: 58px;
      border-radius: 50%;
      background: rgba(37, 211, 102, 0.35);
      animation: wa-pulse 2s ease-out infinite;
    }

    @keyframes wa-pulse {
      0% {
        transform: scale(1);
        opacity: 1;
      }

      70% {
        transform: scale(1.6);
        opacity: 0;
      }

      100% {
        transform: scale(1.6);
        opacity: 0;
      }
    }

    /* ---- Tooltip Label ---- */
    .whatsapp-tooltip {
      background: #111827;
      color: #fff;
      font-size: 13px;
      font-weight: 600;
      padding: 7px 13px;
      border-radius: 8px;
      white-space: nowrap;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
      opacity: 0;
      transform: translateX(10px);
      transition: opacity .25s, transform .25s;
      pointer-events: none;
      position: relative;
    }

    .whatsapp-tooltip::after {
      content: '';
      position: absolute;
      right: -7px;
      top: 50%;
      transform: translateY(-50%);
      border: 5px solid transparent;
      border-left-color: #111827;
      border-right: 0;
    }

    .whatsapp-fab:hover .whatsapp-tooltip {
      opacity: 1;
      transform: translateX(0);
    }

    /* ---- Mobile: button thoda chota ---- */
    @media (max-width: 480px) {
      .whatsapp-fab {
        bottom: 18px;
        right: 16px;
      }

      .whatsapp-btn {
        width: 50px;
        height: 50px;
      }

      .whatsapp-btn i {
        font-size: 26px;
      }

      .whatsapp-btn::before {
        width: 50px;
        height: 50px;
      }

      .whatsapp-tooltip {
        font-size: 12px;
        padding: 6px 11px;
      }
    }

    /* ================================================================
   NAVBAR
================================================================ */
    .navbar {
      background: var(--white);
      box-shadow: 0 1px 8px rgba(0, 0, 0, 0.10);
      position: sticky;
      top: 0;
      z-index: 1000;
      padding: 0;
    }

    .navbar-inner {
      display: flex;
      align-items: center;
      gap: 30px;
      padding: 14px 20px;
      max-width: 1200px;
      margin: 0 auto;
    }

    /* ---- Logo ---- */
    .navbar-logo {
      font-size: 22px;
      font-weight: 900;
      color: var(--blue);
      cursor: pointer;
      white-space: nowrap;
      letter-spacing: -0.5px;
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .navbar-logo i {
      font-size: 19px;
      color: var(--orange);
    }

    /* ---- Nav Links ---- */
    .navbar-links {
      display: flex;
      align-items: center;
      gap: 24px;
      flex: 1;
      justify-content: center;
    }

    .navbar-links a {
      font-size: 14.5px;
      font-weight: 500;
      color: var(--text);
      padding: 5px 2px;
      border-bottom: 2px solid transparent;
      transition: color .2s, border-color .2s;
      white-space: nowrap;
    }

    .navbar-links a:hover,
    .navbar-links a.active {
      color: var(--blue);
      border-bottom-color: var(--blue);
    }

    /* ---- Navbar Icons ---- */
    .navbar-icons {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .navbar-icon-btn {
      background: none;
      border: none;
      font-size: 18px;
      color: var(--text);
      position: relative;
      padding: 5px;
      transition: color .2s;
    }

    .navbar-icon-btn:hover {
      color: var(--blue);
    }

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

    /* ---- Mobile Hamburger ---- */
    /* .hamburger styles moved to animation block below */
    .mobile-menu {
      display: none;
      flex-direction: column;
      gap: 0;
      background: var(--white);
      border-top: 1px solid var(--border);
      padding: 6px 0 10px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .mobile-menu a {
      display: flex;
      align-items: center;
      padding: 13px 18px;
      font-size: 15px;
      font-weight: 500;
      border-bottom: 1px solid var(--border);
      color: var(--text);
      transition: background .15s;
    }

    .mobile-menu a:hover {
      background: var(--bg);
      color: var(--blue);
    }

    .mobile-menu a:last-child {
      border-bottom: none;
    }

    .mobile-menu.open {
      display: flex;
      animation: menuSlideDown 0.3s cubic-bezier(.23, 1, .32, 1) both;
    }

    @keyframes menuSlideDown {
      from {
        opacity: 0;
        transform: translateY(-12px);
      }

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

    /* ================================================================
   HERO SECTION
================================================================ */
    .hero {
      background: linear-gradient(120deg, #e8f0fe 0%, #f3f6fb 55%, #dbeafe 100%);
      padding: 60px 0 0;
      overflow: hidden;
    }

    .hero-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 20px;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 30px;
    }

    .hero-text {
      flex: 1;
      padding-bottom: 60px;
    }

    .hero-text h1 {
      font-size: clamp(30px, 4vw, 52px);
      font-weight: 900;
      line-height: 1.15;
      color: var(--text);
      margin-bottom: 16px;
    }

    .hero-text p {
      font-size: 16px;
      color: var(--text-muted);
      margin-bottom: 28px;
      max-width: 380px;
    }

    .hero-img {
      flex: 1;
      text-align: right;
      max-width: 480px;
    }

    /* ============================================================
   HERO IMAGE — Change the src URL below to your hero image
============================================================ */
    .hero-img img {
      max-height: 360px;
      object-fit: contain;
      margin-left: auto;
      filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.18));
    }

    /* ================================================================
   CATEGORY SECTION
================================================================ */
    .section {
      padding: 56px 0;
    }

    .categories-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 20px;
    }

    .category-card {
      background: var(--card);
      border: 1.5px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px 16px 18px;
      text-align: center;
      cursor: pointer;
      transition: box-shadow .2s, transform .2s, border-color .2s;
    }

    .category-card:hover {
      box-shadow: var(--shadow);
      transform: translateY(-4px);
      border-color: var(--blue);
    }

    /* ============================================================
   CATEGORY IMAGES — Change src URLs inside each card below
============================================================ */
    .category-card img {
      width: 100%;
      height: 110px;
      object-fit: contain;
      margin-bottom: 12px;
      border-radius: 8px;
    }

    .category-card span {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
    }

    /* ================================================================
   FLASH SALE BANNER
================================================================ */
    .flash-banner {
      background: linear-gradient(90deg, var(--blue-dark), var(--blue));
      color: #fff;
      padding: 14px 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 20px;
      flex-wrap: wrap;
    }

    .flash-banner.flash-hidden {
      display: none !important;
    }

    .flash-banner .flash-text {
      font-size: 15px;
      font-weight: 600;
    }

    .flash-timer {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .timer-block {
      background: rgba(255, 255, 255, 0.18);
      padding: 5px 10px;
      border-radius: 6px;
      font-weight: 800;
      font-size: 16px;
      min-width: 36px;
      text-align: center;
    }

    .timer-sep {
      font-weight: 900;
      font-size: 18px;
    }

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

    .product-card {
      background: var(--card);
      border: 1.5px solid var(--border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      transition: box-shadow .22s, transform .22s;
      position: relative;
    }

    .product-card:hover {
      box-shadow: var(--shadow-lg);
      transform: translateY(-5px);
    }

    /* Product image area */
    .product-img-wrap {
      background: #f9fafb;
      padding: 18px;
      height: 180px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

    /* ============================================================
   PRODUCT IMAGES — Change src URLs in the JS products array
   (look for "image:" in the script section below)
============================================================ */
    .product-img-wrap img {
      max-height: 145px;
      width: auto;
      object-fit: contain;
      transition: transform .3s;
    }

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

    .product-badge {
      position: absolute;
      top: 10px;
      left: 10px;
    }

    .out-of-stock-overlay {
      position: absolute;
      inset: 0;
      background: rgba(255, 255, 255, 0.7);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 13px;
      color: var(--danger);
      letter-spacing: 0.5px;
    }

    .product-info {
      padding: 14px 16px 16px;
    }

    .product-info h3 {
      font-size: 14.5px;
      font-weight: 700;
      margin-bottom: 6px;
      color: var(--text);
    }

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

    .price-current {
      font-size: 17px;
      font-weight: 800;
      color: var(--blue);
    }

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

    .price-discount-badge {
      font-size: 11px;
      font-weight: 800;
      color: #fff;
      background: var(--success);
      padding: 2px 7px;
      border-radius: 20px;
      white-space: nowrap;
    }

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

    .btn-cart,
    .btn-buy {
      flex: 1;
      padding: 9px 6px;
      border: none;
      border-radius: 7px;
      font-size: 13px;
      font-weight: 600;
      transition: all .18s;
      white-space: nowrap;
    }

    .btn-cart {
      background: var(--blue);
      color: #fff;
    }

    .btn-cart:hover {
      background: var(--blue-dark);
    }

    .btn-buy {
      background: var(--orange);
      color: #fff;
    }

    .btn-buy:hover {
      background: var(--orange-hover);
    }

    .btn-disabled {
      background: #e5e7eb !important;
      color: #9ca3af !important;
      cursor: not-allowed;
    }

    /* ================================================================
   ACCESSORIES BANNER
================================================================ */
    .accessories-banner {
      background: linear-gradient(130deg, var(--blue-dark) 0%, var(--blue) 100%);
      padding: 56px 20px;
      text-align: center;
      color: #fff;
      position: relative;
      overflow: hidden;
    }

    .accessories-banner::before {
      content: '';
      position: absolute;
      inset: 0;
      background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    }

    .accessories-banner h2 {
      font-size: clamp(22px, 3vw, 36px);
      font-weight: 900;
      margin-bottom: 18px;
      position: relative;
    }

    /* ================================================================
   WHY CHOOSE US SECTION
================================================================ */
    .features-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 20px;
    }

    .feature-card {
      background: var(--card);
      border: 1.5px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 28px 20px;
      text-align: center;
      transition: box-shadow .22s, transform .22s, border-color .22s;
      cursor: default;
    }

    .feature-card:hover {
      box-shadow: var(--shadow-lg);
      transform: translateY(-6px);
      border-color: var(--blue);
    }

    .feature-card:hover .feature-icon {
      background: var(--blue);
      color: #fff;
      transform: scale(1.1);
    }

    .feature-icon {
      transition: background .22s, color .22s, transform .22s;
    }

    .feature-icon {
      width: 56px;
      height: 56px;
      background: var(--blue-light);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 14px;
      font-size: 22px;
      color: var(--blue);
    }

    .feature-card h4 {
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 6px;
    }

    .feature-card p {
      font-size: 13px;
      color: var(--text-muted);
    }

    /* ================================================================
   FOOTER
================================================================ */
    footer {
      background: #0f1a2e;
      color: #c9d6e3;
      padding: 48px 0 0;
    }

    .footer-grid {
      display: grid;
      grid-template-columns: 2fr 1fr 1fr 1.5fr;
      gap: 36px;
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 20px 40px;
    }

    .footer-brand h2 {
      font-size: 22px;
      font-weight: 900;
      color: #fff;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .footer-brand h2 i {
      color: var(--orange);
    }

    .footer-brand p {
      font-size: 13.5px;
      line-height: 1.7;
      color: #8aa0b5;
    }

    .footer-col h4 {
      font-size: 15px;
      font-weight: 700;
      color: #fff;
      margin-bottom: 14px;
    }

    .footer-col a {
      display: block;
      font-size: 13.5px;
      color: #8aa0b5;
      margin-bottom: 9px;
      transition: color .2s;
    }

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

    .social-icons {
      display: flex;
      gap: 10px;
      margin-top: 8px;
    }

    .social-icon {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      transition: opacity .2s;
      cursor: pointer;
    }

    .social-icon:hover {
      opacity: 0.8;
    }

    .si-fb {
      background: #1877f2;
      color: #fff;
    }

    .si-tw {
      background: #1da1f2;
      color: #fff;
    }

    .si-ig {
      background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
      color: #fff;
    }

    .si-yt {
      background: #ff0000;
      color: #fff;
    }

    .si-wa {
      background: #25d366;
      color: #fff;
    }

    .footer-bottom {
      border-top: 1px solid #1e2e42;
      padding: 16px 20px;
      text-align: center;
      font-size: 13px;
      color: #4a6a80;
      max-width: 1200px;
      margin: 0 auto;
    }

    /* ================================================================
   AUTH PAGES  (Login / Sign Up)
================================================================ */
    .auth-page {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #e8f0fe, #f3f6fb);
      padding: 30px 20px;
    }

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

    .auth-logo {
      text-align: center;
      margin-bottom: 28px;
      font-size: 24px;
      font-weight: 900;
      color: var(--blue);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .auth-logo i {
      color: var(--orange);
    }

    .auth-card h2 {
      font-size: 22px;
      font-weight: 800;
      text-align: center;
      margin-bottom: 6px;
    }

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

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

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

    .form-input {
      width: 100%;
      padding: 11px 14px;
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      font-size: 14.5px;
      transition: border-color .2s;
      color: var(--text);
      background: var(--white);
    }

    .form-input:focus {
      outline: none;
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
    }

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

    .input-icon-wrap {
      position: relative;
    }

    .input-icon-wrap .form-input {
      padding-right: 42px;
    }

    .input-icon-wrap .toggle-pw {
      position: absolute;
      right: 13px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 16px;
      cursor: pointer;
    }

    .btn-full {
      width: 100%;
      padding: 13px;
      font-size: 15px;
    }

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

    .auth-switch a {
      color: var(--blue);
      font-weight: 600;
      cursor: pointer;
    }

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

    .form-error {
      color: var(--danger);
      font-size: 12.5px;
      margin-top: 4px;
    }

    .auth-form-message {
      border: 1px solid #fecaca;
      background: #fef2f2;
      color: #991b1b;
      border-radius: var(--radius);
      padding: 10px 12px;
      margin: 0 0 14px;
      font-size: 13px;
      line-height: 1.45;
    }

    .auth-form-message.is-warning {
      border-color: #fde68a;
      background: #fffbeb;
      color: #92400e;
    }

    .auth-form-message.is-success {
      border-color: #bbf7d0;
      background: #f0fdf4;
      color: #166534;
    }

    /* ================================================================
   ADMIN LOGIN PAGE
================================================================ */
    .admin-login-page {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #0f1a2e, #1a3a6b);
      padding: 30px 20px;
    }

    .admin-login-card {
      background: var(--white);
      border-radius: var(--radius-lg);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
      padding: 44px 38px;
      width: 100%;
      max-width: 400px;
    }

    .admin-login-card .auth-logo {
      color: #fff;
    }

    .admin-badge {
      display: inline-block;
      background: var(--orange);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 20px;
      margin: 0 auto 20px;
      letter-spacing: 1px;
      text-transform: uppercase;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      width: fit-content;
      margin: 0 auto 22px;
    }

    /* ================================================================
   ADMIN DASHBOARD
================================================================ */
    .admin-page {
      min-height: 100vh;
      background: #f0f4f8;
    }

    .admin-topbar {
      background: #0f1a2e;
      color: #fff;
      padding: 14px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .admin-topbar h1 {
      font-size: 18px;
      font-weight: 800;
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .admin-topbar h1 i {
      color: var(--orange);
    }

    .admin-topbar-right {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .admin-user-info {
      font-size: 13px;
      color: #8aa0b5;
    }

    .btn-logout {
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.2);
      padding: 7px 14px;
      border-radius: 7px;
      font-size: 13px;
      font-weight: 600;
      transition: background .2s;
    }

    .btn-logout:hover {
      background: rgba(255, 255, 255, 0.2);
    }

    .admin-layout {
      display: flex;
      min-height: calc(100vh - 56px);
    }

    .admin-sidebar {
      width: 220px;
      background: #fff;
      border-right: 1px solid var(--border);
      padding: 20px 0;
      flex-shrink: 0;
    }

    .admin-nav-item {
      display: flex;
      align-items: center;
      gap: 11px;
      padding: 13px 22px;
      font-size: 14px;
      font-weight: 500;
      color: var(--text-muted);
      cursor: pointer;
      transition: all .18s;
      border-left: 3px solid transparent;
    }

    .admin-nav-item:hover {
      background: var(--blue-light);
      color: var(--blue);
    }

    .admin-nav-item.active {
      background: var(--blue-light);
      color: var(--blue);
      border-left-color: var(--blue);
      font-weight: 700;
    }

    .admin-nav-item i {
      width: 18px;
      text-align: center;
      font-size: 16px;
    }

    .admin-content {
      flex: 1;
      padding: 28px 28px;
      overflow-y: auto;
    }

    .admin-section {
      display: none;
    }

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

    /* Admin Stats Cards */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 18px;
      margin-bottom: 28px;
    }

    .stat-card {
      background: var(--white);
      border-radius: var(--radius);
      padding: 20px 22px;
      box-shadow: var(--shadow);
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .stat-icon {
      width: 50px;
      height: 50px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
    }

    .stat-icon.blue {
      background: var(--blue-light);
      color: var(--blue);
    }

    .stat-icon.orange {
      background: #fef3e2;
      color: var(--orange);
    }

    .stat-icon.green {
      background: #dcfce7;
      color: var(--success);
    }

    .stat-icon.red {
      background: #fee2e2;
      color: var(--danger);
    }

    .stat-info h3 {
      font-size: 24px;
      font-weight: 900;
      line-height: 1;
      margin-bottom: 4px;
    }

    .stat-info p {
      font-size: 12.5px;
      color: var(--text-muted);
      font-weight: 500;
    }

    /* Admin Table */
    .admin-table-wrap {
      background: var(--white);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .admin-table-wrap>div[style*="overflow"] {
      -webkit-overflow-scrolling: touch;
    }

    .admin-table-header {
      padding: 18px 22px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
    }

    .admin-table-header h3 {
      font-size: 16px;
      font-weight: 700;
    }

    table {
      width: 100%;
      border-collapse: collapse;
    }

    table th {
      padding: 12px 16px;
      text-align: left;
      font-size: 12.5px;
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      background: #f9fafb;
      border-bottom: 1px solid var(--border);
    }

    table td {
      padding: 13px 16px;
      border-bottom: 1px solid var(--border);
      font-size: 13.5px;
      vertical-align: middle;
    }

    table tr:last-child td {
      border-bottom: none;
    }

    table tr:hover td {
      background: #f9fafb;
    }

    .status-badge {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 20px;
      font-size: 11.5px;
      font-weight: 700;
    }

    .s-pending {
      background: #fef9c3;
      color: #a16207;
    }

    .s-processing {
      background: #dbeafe;
      color: #1d4ed8;
    }

    .s-shipped {
      background: #e0f2fe;
      color: #0369a1;
    }

    .s-delivered {
      background: #dcfce7;
      color: #15803d;
    }

    .s-cancelled {
      background: #fee2e2;
      color: #dc2626;
    }

    .status-select {
      padding: 5px 10px;
      border: 1.5px solid var(--border);
      border-radius: 7px;
      font-size: 12.5px;
      font-family: var(--font);
      background: var(--white);
      cursor: pointer;
    }

    .status-select:focus {
      outline: none;
      border-color: var(--blue);
    }

    .stock-toggle {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
    }

    .toggle-switch {
      width: 42px;
      height: 22px;
      background: #e5e7eb;
      border-radius: 11px;
      position: relative;
      transition: background .2s;
    }

    .toggle-switch.on {
      background: var(--success);
    }

    .toggle-switch::after {
      content: '';
      position: absolute;
      top: 2px;
      left: 2px;
      width: 18px;
      height: 18px;
      background: #fff;
      border-radius: 50%;
      transition: transform .2s;
    }

    .toggle-switch.on::after {
      transform: translateX(20px);
    }

    /* Product admin table img */
    .admin-product-img {
      width: 44px;
      height: 44px;
      object-fit: contain;
      background: #f3f4f6;
      border-radius: 7px;
      padding: 4px;
    }

    .admin-search {
      padding: 8px 14px;
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      font-size: 13.5px;
      font-family: var(--font);
      width: 220px;
    }

    .admin-search:focus {
      outline: none;
      border-color: var(--blue);
    }

    /* ================================================================
   CART PAGE
================================================================ */
    .cart-page {
      padding: 36px 0 60px;
      min-height: 70vh;
    }

    .cart-header {
      margin-bottom: 24px;
    }

    .cart-header h1 {
      font-size: 26px;
      font-weight: 800;
    }

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

    .cart-items-wrap {
      background: var(--white);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .cart-item {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 18px 20px;
      border-bottom: 1px solid var(--border);
    }

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

    .cart-item-img {
      width: 80px;
      height: 80px;
      object-fit: contain;
      background: #f9fafb;
      border-radius: 8px;
      padding: 6px;
      flex-shrink: 0;
    }

    .cart-item-info {
      flex: 1;
    }

    .cart-item-info h4 {
      font-size: 14.5px;
      font-weight: 700;
      margin-bottom: 4px;
    }

    .cart-item-info p {
      font-size: 13px;
      color: var(--text-muted);
    }

    .qty-control {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 10px;
    }

    .qty-btn {
      width: 28px;
      height: 28px;
      border: 1.5px solid var(--border);
      border-radius: 6px;
      background: var(--white);
      font-size: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      transition: all .18s;
    }

    .qty-btn:hover {
      background: var(--blue);
      color: #fff;
      border-color: var(--blue);
    }

    .qty-val {
      font-size: 15px;
      font-weight: 700;
      min-width: 22px;
      text-align: center;
    }

    .cart-item-price {
      font-size: 16px;
      font-weight: 800;
      color: var(--blue);
      text-align: right;
      flex-shrink: 0;
    }

    .btn-remove {
      display: block;
      font-size: 11px;
      color: var(--danger);
      margin-top: 6px;
      cursor: pointer;
      text-align: right;
      font-weight: 600;
    }

    .btn-remove:hover {
      text-decoration: underline;
    }

    .cart-summary {
      background: var(--white);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      padding: 24px;
    }

    .cart-summary h3 {
      font-size: 17px;
      font-weight: 800;
      margin-bottom: 18px;
    }

    .summary-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 13px;
      font-size: 14px;
      color: var(--text-muted);
    }

    .summary-row.total {
      font-size: 17px;
      font-weight: 800;
      color: var(--text);
      border-top: 1px solid var(--border);
      padding-top: 14px;
      margin-top: 4px;
    }

    .empty-cart {
      text-align: center;
      padding: 60px 20px;
      color: var(--text-muted);
    }

    .empty-cart i {
      font-size: 56px;
      margin-bottom: 16px;
      color: var(--border);
    }

    .empty-cart p {
      font-size: 16px;
      margin-bottom: 20px;
    }


    /* Homepage product repository states */
    .catalogue-state {
      min-height: 150px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 24px 16px;
      border: 1.5px dashed var(--border);
      border-radius: var(--radius-lg);
      color: var(--text-muted);
      background: var(--card);
      font-size: 14px;
      font-weight: 700;
      text-align: center;
    }

    .catalogue-error {
      color: #b91c1c;
      background: #fef2f2;
      border-color: #fecaca;
    }

    .catalogue-spinner {
      width: 20px;
      height: 20px;
      border: 3px solid var(--border);
      border-top-color: var(--blue);
      border-radius: 50%;
      animation: catalogue-spin .8s linear infinite;
      flex: 0 0 auto;
    }

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

    /* ================================================================
   CHECKOUT PAGE
================================================================ */
    .checkout-page {
      padding: 36px 0 60px;
    }

    .checkout-header {
      margin-bottom: 24px;
    }

    .checkout-header h1 {
      font-size: 26px;
      font-weight: 800;
    }

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

    .checkout-card {
      background: var(--white);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      padding: 26px;
    }

    .checkout-card h3 {
      font-size: 16px;
      font-weight: 800;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .checkout-card h3 .step-num {
      width: 26px;
      height: 26px;
      background: var(--blue);
      color: #fff;
      border-radius: 50%;
      font-size: 12px;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .form-grid-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    /* Payment Method Cards */
    .payment-methods {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-top: 4px;
    }

    .payment-option {
      border: 2px solid var(--border);
      border-radius: var(--radius);
      padding: 14px 18px;
      cursor: pointer;
      transition: all .18s;
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .payment-option:hover {
      border-color: var(--blue);
      background: #f0f7ff;
    }

    .payment-option.selected {
      border-color: var(--blue);
      background: #eff6ff;
    }

    .payment-option input[type=radio] {
      accent-color: var(--blue);
      width: 17px;
      height: 17px;
      flex-shrink: 0;
    }

    .payment-logo {
      width: 46px;
      height: 30px;
      object-fit: contain;
      border-radius: 5px;
    }

    .payment-info h4 {
      font-size: 14px;
      font-weight: 700;
    }

    .payment-info p {
      font-size: 12px;
      color: var(--text-muted);
    }

    .payment-detail-box {
      background: #f9fafb;
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      padding: 14px 16px;
      margin-top: 14px;
      font-size: 13.5px;
      color: var(--text-muted);
      line-height: 1.8;
    }

    .payment-detail-box strong {
      color: var(--text);
    }

    /* Order Summary in checkout */
    .order-item {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }

    .order-item img {
      width: 52px;
      height: 52px;
      object-fit: contain;
      background: #f3f4f6;
      border-radius: 7px;
      padding: 4px;
    }

    .order-item-info {
      flex: 1;
    }

    .order-item-info h5 {
      font-size: 13.5px;
      font-weight: 700;
    }

    .order-item-info p {
      font-size: 12px;
      color: var(--text-muted);
    }

    .order-item-price {
      font-size: 14px;
      font-weight: 800;
      color: var(--blue);
    }

    /* ================================================================
   ORDER SUCCESS MODAL
================================================================ */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.65);
      z-index: 2000;
      align-items: center;
      justify-content: center;
      padding: 16px;
      overflow-y: auto;
    }

    .modal-overlay.open {
      display: flex;
    }

    .modal-box {
      background: var(--white);
      border-radius: var(--radius-lg);
      padding: 32px 28px;
      max-width: 420px;
      width: 100%;
      text-align: center;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
      max-height: 90vh;
      overflow-y: auto;
      margin: auto;
    }

    /* payment-info-modal removed — now full page */
    .modal-icon {
      font-size: 56px;
      margin-bottom: 16px;
    }

    .modal-box h2 {
      font-size: 22px;
      font-weight: 800;
      margin-bottom: 10px;
    }

    .modal-box p {
      font-size: 14.5px;
      color: var(--text-muted);
      margin-bottom: 24px;
    }

    .order-id-box {
      background: var(--blue-light);
      border-radius: var(--radius);
      padding: 12px 20px;
      margin-bottom: 24px;
      font-size: 14px;
      color: var(--blue);
      font-weight: 700;
    }

    /* ================================================================
   QUICK VIEW MODAL
================================================================ */
    .qv-modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.55);
      z-index: 2000;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .qv-modal-overlay.open {
      display: flex;
    }

    .qv-modal {
      background: var(--white);
      border-radius: var(--radius-lg);
      padding: 30px;
      max-width: 620px;
      width: 100%;
      box-shadow: var(--shadow-lg);
      position: relative;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
      align-items: center;
    }

    .qv-close {
      position: absolute;
      top: 14px;
      right: 16px;
      background: none;
      border: none;
      font-size: 22px;
      color: var(--text-muted);
      cursor: pointer;
    }

    .qv-img-wrap {
      background: #f9fafb;
      border-radius: var(--radius);
      padding: 20px;
      text-align: center;
    }

    .qv-img-wrap img {
      max-height: 200px;
      object-fit: contain;
      margin: 0 auto;
    }

    .qv-info h2 {
      font-size: 18px;
      font-weight: 800;
      margin-bottom: 8px;
    }

    .qv-info .qv-price {
      font-size: 22px;
      font-weight: 900;
      color: var(--blue);
      margin-bottom: 12px;
    }

    .qv-info p {
      font-size: 13.5px;
      color: var(--text-muted);
      margin-bottom: 16px;
    }

    .qv-actions {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    /* ================================================================
   USER PROFILE MODAL
================================================================ */
    .profile-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.50);
      z-index: 3000;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      overflow: hidden;
      padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
      animation: fadeIn .2s ease;
    }

    .profile-overlay.open {
      display: flex;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    .profile-modal {
      background: var(--white);
      border-radius: var(--radius-lg);
      width: 100%;
      max-width: 400px;
      max-height: calc(100dvh - 40px);
      min-height: 0;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
      overflow: hidden;
      animation: slideUp .25s ease;
    }

    .profile-modal > :not(.hidden) {
      min-height: 0;
    }

    #profile-loggedin:not(.hidden),
    #profile-guest:not(.hidden) {
      display: flex;
      flex-direction: column;
      min-height: 0;
    }

    .profile-modal .profile-header {
      flex: 0 0 auto;
    }

    .profile-modal .profile-body {
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }

    .account-info-modal {
      max-width: 440px;
    }

    .account-info-body {
      padding: 18px 24px 24px;
      box-sizing: border-box;
    }

    .account-details-content,
    .account-details-list,
    .account-detail-card,
    .account-detail-value {
      min-width: 0;
      max-width: 100%;
      box-sizing: border-box;
    }

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

    .account-detail-card {
      background: var(--bg);
      border-radius: var(--radius);
      padding: 12px 14px;
    }

    .account-detail-label {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 5px;
    }

    .account-detail-value {
      font-size: 15px;
      font-weight: 700;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .account-order-summary {
      background: var(--blue-light);
      border-radius: var(--radius);
      padding: 12px 14px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    @keyframes slideUp {
      from {
        transform: translateY(30px);
        opacity: 0;
      }

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

    /* Profile Header / Avatar area */
    .profile-header {
      background: linear-gradient(135deg, var(--blue-dark), var(--blue));
      padding: 32px 28px 24px;
      text-align: center;
      position: relative;
    }

    .profile-close-btn {
      position: absolute;
      top: 14px;
      right: 16px;
      background: rgba(255, 255, 255, 0.15);
      border: none;
      color: #fff;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      font-size: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .2s;
    }

    .profile-close-btn:hover {
      background: rgba(255, 255, 255, 0.30);
    }

    .profile-avatar {
      width: 72px;
      height: 72px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.20);
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 14px;
      font-size: 30px;
      font-weight: 800;
      color: #fff;
      border: 3px solid rgba(255, 255, 255, 0.40);
      letter-spacing: -1px;
    }

    .profile-header h3 {
      color: #fff;
      font-size: 19px;
      font-weight: 800;
      margin-bottom: 4px;
    }

    .profile-header p {
      color: rgba(255, 255, 255, 0.75);
      font-size: 13.5px;
    }

    /* Profile body menu items */
    .profile-body {
      padding: 10px 0 6px;
    }

    .profile-menu-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px 24px;
      font-size: 14.5px;
      font-weight: 500;
      color: var(--text);
      cursor: pointer;
      transition: background .15s;
      border: none;
      background: none;
      width: 100%;
      text-align: left;
    }

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

    .profile-menu-item .pm-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      flex-shrink: 0;
    }

    .pm-blue {
      background: var(--blue-light);
      color: var(--blue);
    }

    .pm-orange {
      background: #fef3e2;
      color: var(--orange);
    }

    .pm-green {
      background: #dcfce7;
      color: var(--success);
    }

    .pm-red {
      background: #fee2e2;
      color: var(--danger);
    }

    .profile-menu-item span {
      flex: 1;
    }

    .profile-menu-item i.fa-chevron-right {
      font-size: 11px;
      color: var(--text-muted);
    }

    .profile-divider {
      height: 1px;
      background: var(--border);
      margin: 6px 0;
    }

    .profile-footer {
      padding: 14px 24px 20px;
    }

    /* Guest (not logged in) profile */
    .profile-guest {
      padding: 28px 24px 24px;
      text-align: center;
    }

    .profile-guest-icon {
      width: 70px;
      height: 70px;
      border-radius: 50%;
      background: var(--blue-light);
      color: var(--blue);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      margin: 0 auto 16px;
    }

    .profile-guest h3 {
      font-size: 18px;
      font-weight: 800;
      margin-bottom: 6px;
    }

    .profile-guest p {
      font-size: 14px;
      color: var(--text-muted);
      margin-bottom: 22px;
    }

    .profile-guest-btns {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    /* ================================================================
   FULLY RESPONSIVE — EVERY SCREEN SIZE
   Breakpoints:
   1280px  Large Laptop
   1024px  Small Laptop / Large Tablet
   900px   Tablet Landscape
   768px   Tablet Portrait
   600px   Large Phone
   480px   Small Phone
   380px   Very Small Phone
================================================================ */

    /* ------ 1280px and below ------ */
    @media (max-width: 1280px) {
      .container {
        max-width: 100%;
        padding: 0 24px;
      }

      .hero-inner {
        padding: 0 24px;
      }

      .footer-grid {
        padding: 0 24px 40px;
      }
    }

    /* ------ 1024px and below ------ */
    @media (max-width: 1024px) {

      /* Container */
      .container {
        padding: 0 18px;
      }

      /* Navbar */
      .navbar-inner {
        padding: 13px 18px;
        gap: 16px;
      }

      .navbar-links {
        gap: 18px;
      }

      .navbar-links a {
        font-size: 13.5px;
      }

      /* Hero */
      .hero {
        padding: 40px 0 0;
      }

      .hero-inner {
        padding: 0 18px;
        gap: 24px;
      }

      .hero-text h1 {
        font-size: 36px;
      }

      .hero-img img {
        max-height: 290px;
      }

      /* Grids */
      .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
      }

      .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
      }

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

      /* Section */
      .section {
        padding: 46px 0;
      }

      /* Footer */
      .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 24px;
        padding: 0 18px 36px;
      }

      /* Admin */
      .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
      }

      .admin-sidebar {
        width: 190px;
      }

      .admin-content {
        padding: 22px 18px;
      }

      /* Cart / Checkout */
      .cart-layout {
        grid-template-columns: 1fr 290px;
        gap: 18px;
      }

      .checkout-layout {
        grid-template-columns: 1fr 310px;
        gap: 18px;
      }
    }

    /* ------ 900px and below (Tablet Landscape) ------ */
    @media (max-width: 900px) {

      /* Navbar */
      .navbar-links {
        gap: 14px;
      }

      .navbar-links a {
        font-size: 13px;
      }

      /* Hero */
      .hero-text h1 {
        font-size: 30px;
      }

      .hero-img img {
        max-height: 240px;
      }

      /* Products */
      .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
      }

      /* Footer */
      .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
      }

      /* Cart / Checkout */
      .cart-layout {
        grid-template-columns: 1fr;
      }

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

    /* ------ 768px and below (Tablet Portrait) ------ */
    @media (max-width: 768px) {

      /* Container */
      .container {
        padding: 0 15px;
      }

      /* ---- NAVBAR ---- */
      .navbar-inner {
        padding: 12px 15px;
        gap: 8px;
      }

      .navbar-links {
        display: none;
      }

      .hamburger {
        display: block;
        order: 3;
      }

      .navbar-logo {
        font-size: 18px;
        flex: 1;
      }

      .navbar-icons {
        gap: 8px;
      }

      .navbar-icon-btn {
        font-size: 17px;
        padding: 5px;
      }

      .cart-badge {
        width: 17px;
        height: 17px;
        font-size: 9.5px;
        top: -3px;
        right: -5px;
      }

      /* ---- MOBILE MENU ---- */
      .mobile-menu a {
        padding: 13px 15px;
        font-size: 14.5px;
      }

      /* ---- HERO ---- */
      .hero {
        padding: 30px 0 0;
      }

      .hero-inner {
        flex-direction: column;
        padding: 0 15px 30px;
        gap: 0;
      }

      .hero-text {
        padding-bottom: 0;
        width: 100%;
      }

      .hero-text h1 {
        font-size: 26px;
        margin-bottom: 12px;
        line-height: 1.2;
      }

      .hero-text p {
        font-size: 14px;
        margin-bottom: 20px;
        max-width: 100%;
      }

      .hero-img {
        display: none;
      }

      /* Hero buttons */
      .hero-text>div {
        flex-wrap: wrap;
        gap: 10px;
      }

      /* ---- FLASH BANNER ---- */
      .flash-banner {
        padding: 10px 15px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
      }

      .flash-banner .flash-text {
        font-size: 13px;
        text-align: center;
        width: 100%;
      }

      .flash-timer {
        justify-content: center;
      }

      .timer-block {
        font-size: 14px;
        padding: 4px 9px;
        min-width: 32px;
      }

      .timer-sep {
        font-size: 16px;
      }

      /* ---- SECTION ---- */
      .section {
        padding: 36px 0;
      }

      .section-title {
        font-size: 20px;
        margin-bottom: 20px;
      }

      /* ---- CATEGORIES ---- */
      .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
      }

      .category-card {
        padding: 14px 8px 12px;
        border-radius: 10px;
      }

      .category-card img {
        height: 70px;
      }

      .category-card span {
        font-size: 12px;
      }

      /* ---- PRODUCTS ---- */
      .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
      }

      .product-img-wrap {
        height: 145px;
        padding: 12px;
      }

      .product-img-wrap img {
        max-height: 118px;
      }

      .product-info {
        padding: 11px 12px 13px;
      }

      .product-info h3 {
        font-size: 13px;
        margin-bottom: 5px;
      }

      .product-price {
        margin-bottom: 10px;
      }

      .price-current {
        font-size: 14.5px;
      }

      .price-original {
        font-size: 12px;
      }

      .product-actions {
        gap: 6px;
      }

      .btn-cart,
      .btn-buy {
        font-size: 12px;
        padding: 8px 5px;
        border-radius: 7px;
      }

      /* ---- FEATURES ---- */
      .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
      }

      .feature-card {
        padding: 20px 14px;
      }

      .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 19px;
        margin-bottom: 12px;
      }

      .feature-card h4 {
        font-size: 14px;
      }

      .feature-card p {
        font-size: 12.5px;
      }

      /* ---- ACCESSORIES BANNER ---- */
      .accessories-banner {
        padding: 36px 15px;
      }

      .accessories-banner h2 {
        font-size: 21px;
      }

      .accessories-banner p {
        font-size: 14px;
      }

      /* ---- FOOTER ---- */
      .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 22px;
        padding: 0 15px 30px;
      }

      footer {
        padding: 36px 0 0;
      }

      .footer-brand h2 {
        font-size: 19px;
      }

      .footer-brand p {
        font-size: 13px;
      }

      .footer-col h4 {
        font-size: 14px;
        margin-bottom: 11px;
      }

      .footer-col a {
        font-size: 13px;
        margin-bottom: 8px;
      }

      .social-icon {
        width: 33px;
        height: 33px;
        font-size: 14px;
      }

      .footer-bottom {
        font-size: 12.5px;
        padding: 14px 15px;
      }

      /* ---- CART PAGE ---- */
      .cart-page {
        padding: 22px 0 40px;
      }

      .cart-header h1 {
        font-size: 20px;
      }

      .cart-layout {
        grid-template-columns: 1fr;
        gap: 16px;
      }

      .cart-items-wrap {
        border-radius: 12px;
      }

      .cart-item {
        padding: 14px 14px;
        gap: 12px;
      }

      .cart-item-img {
        width: 68px;
        height: 68px;
      }

      .cart-item-info h4 {
        font-size: 13.5px;
      }

      .cart-item-price {
        font-size: 15px;
      }

      .cart-summary {
        padding: 18px 16px;
      }

      .cart-summary h3 {
        font-size: 16px;
      }

      /* ---- CHECKOUT PAGE ---- */
      .checkout-page {
        padding: 22px 0 40px;
      }

      .checkout-header h1 {
        font-size: 20px;
      }

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

      .checkout-card {
        padding: 20px 16px;
      }

      .checkout-card h3 {
        font-size: 15px;
      }

      .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
      }

      .form-input {
        padding: 11px 13px;
        font-size: 14px;
      }

      .payment-option {
        padding: 12px 13px;
        gap: 10px;
      }

      .payment-info h4 {
        font-size: 13.5px;
      }

      .payment-info p {
        font-size: 12px;
      }

      .payment-detail-box {
        font-size: 13px;
        padding: 12px 14px;
      }

      /* ---- MODALS ---- */
      .modal-overlay {
        padding: 15px;
      }

      .modal-box {
        padding: 30px 22px;
        max-width: 100%;
      }

      .modal-box h2 {
        font-size: 20px;
      }

      .modal-icon {
        font-size: 48px;
      }

      .qv-modal-overlay {
        padding: 15px;
      }

      .qv-modal {
        grid-template-columns: 1fr;
        padding: 20px;
        max-width: 100%;
        gap: 16px;
      }

      .qv-img-wrap img {
        max-height: 170px;
      }

      .qv-info h2 {
        font-size: 17px;
      }

      .qv-info .qv-price {
        font-size: 20px;
      }

      /* ---- AUTH PAGES ---- */
      .auth-page {
        padding: 24px 15px;
      }

      .auth-card {
        padding: 30px 22px;
        max-width: 100%;
      }

      .auth-logo {
        font-size: 20px;
      }

      .auth-card h2 {
        font-size: 20px;
      }

      .admin-login-page {
        padding: 24px 15px;
      }

      .admin-login-card {
        padding: 32px 22px;
        max-width: 100%;
      }

      /* ---- PROFILE MODAL ---- */
      .profile-overlay {
        padding: 15px;
      }

      .profile-modal {
        max-width: 100%;
      }

      .profile-header {
        padding: 26px 20px 20px;
      }

      .profile-avatar {
        width: 62px;
        height: 62px;
        font-size: 26px;
      }

      .profile-header h3 {
        font-size: 17px;
      }

      .profile-menu-item {
        padding: 13px 18px;
      }

      /* ---- ADMIN PANEL ---- */
      .admin-topbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 15px;
      }

      .admin-topbar h1 {
        font-size: 16px;
      }

      .admin-topbar-right {
        flex-wrap: wrap;
        gap: 8px;
      }

      .admin-user-info {
        font-size: 12px;
      }

      .admin-layout {
        flex-direction: column;
      }

      .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0;
        -webkit-overflow-scrolling: touch;
      }

      .admin-nav-item {
        flex: 0 0 auto;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 3px;
        padding: 10px 14px;
        font-size: 11.5px;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
      }

      .admin-nav-item.active {
        border-left: none;
        border-bottom-color: var(--blue);
      }

      .admin-nav-item i {
        font-size: 18px;
        width: auto;
      }

      .admin-content {
        padding: 16px 14px;
      }

      .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
      }

      .stat-card {
        padding: 15px 14px;
        gap: 11px;
      }

      .stat-icon {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        font-size: 19px;
      }

      .stat-info h3 {
        font-size: 21px;
      }

      .stat-info p {
        font-size: 12px;
      }

      .admin-table-wrap {
        border-radius: 10px;
      }

      .admin-table-header {
        padding: 14px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
      }

      .admin-table-header h3 {
        font-size: 15px;
      }

      .admin-search {
        width: 100%;
      }

      .admin-table-wrap>div {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }

      table {
        min-width: 600px;
        font-size: 12px;
      }

      table th,
      table td {
        padding: 9px 10px;
        white-space: nowrap;
      }

      .status-select {
        font-size: 11.5px;
      }

      .admin-product-img {
        width: 38px;
        height: 38px;
      }
    }

    /* ------ 600px and below (Large Phone) ------ */
    @media (max-width: 600px) {
      .container {
        padding: 0 12px;
      }

      /* ---- NAVBAR ---- */
      .navbar-inner {
        padding: 11px 12px;
      }

      .navbar-logo {
        font-size: 17px;
      }

      .navbar-icons {
        gap: 6px;
      }

      .navbar-icon-btn {
        font-size: 16px;
      }

      /* ---- HERO ---- */
      .hero {
        padding: 26px 0 0;
      }

      .hero-inner {
        padding: 0 12px 26px;
      }

      .hero-text h1 {
        font-size: 23px;
      }

      .hero-text p {
        font-size: 13.5px;
      }

      /* ---- SECTION ---- */
      .section {
        padding: 30px 0;
      }

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

      /* ---- CATEGORIES — 2x4 grid ---- */
      .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
      }

      .category-card {
        padding: 14px 10px 12px;
      }

      .category-card img {
        height: 72px;
      }

      .category-card span {
        font-size: 12px;
      }

      /* ---- PRODUCTS ---- */
      .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
      }

      .product-img-wrap {
        height: 130px;
        padding: 10px;
      }

      .product-img-wrap img {
        max-height: 105px;
      }

      .product-info {
        padding: 10px 10px 12px;
      }

      .product-info h3 {
        font-size: 12.5px;
      }

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

      .btn-cart,
      .btn-buy {
        font-size: 11.5px;
        padding: 8px 4px;
      }

      /* ---- FEATURES — row layout ---- */
      .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
      }

      .feature-card {
        padding: 18px 12px;
      }

      .feature-icon {
        width: 44px;
        height: 44px;
        font-size: 17px;
        margin-bottom: 10px;
      }

      .feature-card h4 {
        font-size: 13px;
      }

      .feature-card p {
        font-size: 12px;
      }

      /* ---- FLASH BANNER ---- */
      .flash-banner {
        flex-direction: column;
        gap: 6px;
      }

      /* ---- FOOTER — single column ---- */
      .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 12px 26px;
      }

      footer {
        padding: 28px 0 0;
      }

      .footer-brand {
        text-align: center;
      }

      .footer-brand h2 {
        justify-content: center;
        font-size: 18px;
      }

      .footer-brand p {
        font-size: 13px;
        max-width: 280px;
        margin: 0 auto;
      }

      .social-icons {
        justify-content: center;
        margin-top: 14px;
      }

      .footer-col {
        text-align: center;
      }

      .footer-col a {
        justify-content: center;
        display: block;
      }

      .footer-bottom {
        padding: 13px 12px;
      }

      /* ---- ACCESSORIES BANNER ---- */
      .accessories-banner {
        padding: 30px 12px;
      }

      .accessories-banner h2 {
        font-size: 19px;
      }

      /* ---- CART ---- */
      .cart-item {
        padding: 12px 12px;
        gap: 10px;
      }

      .cart-item-img {
        width: 60px;
        height: 60px;
      }

      .qty-btn {
        width: 26px;
        height: 26px;
        font-size: 13px;
      }

      /* ---- ADMIN ---- */
      .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
      }

      .stat-card {
        padding: 13px 12px;
        gap: 10px;
      }

      table {
        min-width: 540px;
      }
    }

    /* ------ 480px and below (Small Phone) ------ */
    @media (max-width: 480px) {
      .container {
        padding: 0 10px;
      }

      /* ---- NAVBAR ---- */
      .navbar-inner {
        padding: 10px 10px;
      }

      .navbar-logo {
        font-size: 15.5px;
      }

      .navbar-logo i {
        font-size: 14px;
      }

      .navbar-icons {
        gap: 4px;
      }

      .navbar-icon-btn {
        font-size: 15px;
        padding: 4px;
      }

      .cart-badge {
        width: 15px;
        height: 15px;
        font-size: 8.5px;
      }

      /* ---- HERO ---- */
      .hero {
        padding: 22px 0 0;
      }

      .hero-inner {
        padding: 0 10px 22px;
      }

      .hero-text h1 {
        font-size: 21px;
      }

      .hero-text p {
        font-size: 13px;
        margin-bottom: 16px;
      }

      /* ---- SECTION ---- */
      .section {
        padding: 26px 0;
      }

      .section-title {
        font-size: 17px;
        margin-bottom: 16px;
      }

      /* ---- CATEGORIES ---- */
      .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }

      .category-card {
        padding: 12px 8px 10px;
        border-radius: 9px;
      }

      .category-card img {
        height: 62px;
      }

      .category-card span {
        font-size: 11px;
      }

      /* ---- PRODUCTS ---- */
      .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }

      .product-img-wrap {
        height: 118px;
        padding: 9px;
      }

      .product-img-wrap img {
        max-height: 95px;
      }

      .product-info {
        padding: 9px 9px 11px;
      }

      .product-info h3 {
        font-size: 12px;
        margin-bottom: 4px;
      }

      .price-current {
        font-size: 13.5px;
      }

      .price-original {
        font-size: 11px;
      }

      .product-actions {
        gap: 5px;
      }

      .btn-cart,
      .btn-buy {
        font-size: 11px;
        padding: 7px 3px;
        border-radius: 6px;
      }

      /* ---- FEATURES — single column row ---- */
      .features-grid {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .feature-card {
        padding: 16px 16px;
        display: flex;
        align-items: center;
        gap: 14px;
        text-align: left;
      }

      .feature-icon {
        margin: 0 !important;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
      }

      .feature-card h4 {
        font-size: 14px;
      }

      .feature-card p {
        font-size: 12.5px;
      }

      /* ---- FLASH BANNER ---- */
      .flash-banner {
        flex-direction: column;
        gap: 6px;
        padding: 12px 10px;
      }

      .flash-banner .flash-text {
        font-size: 12.5px;
      }

      .timer-block {
        font-size: 13px;
        padding: 4px 8px;
      }

      /* ---- ACCESSORIES BANNER ---- */
      .accessories-banner {
        padding: 26px 10px;
      }

      .accessories-banner h2 {
        font-size: 17px;
      }

      .accessories-banner p {
        font-size: 13px;
        margin-bottom: 16px;
      }

      /* ---- FOOTER ---- */
      .footer-grid {
        padding: 0 10px 22px;
        gap: 18px;
      }

      .footer-col h4 {
        font-size: 13.5px;
        margin-bottom: 9px;
      }

      .footer-col a {
        font-size: 12.5px;
        margin-bottom: 7px;
      }

      .social-icon {
        width: 31px;
        height: 31px;
        font-size: 13px;
      }

      .footer-bottom {
        font-size: 11.5px;
      }

      /* ---- CART PAGE ---- */
      .cart-page {
        padding: 18px 0 32px;
      }

      .cart-header h1 {
        font-size: 18px;
      }

      .cart-item {
        padding: 11px 10px;
        gap: 9px;
        flex-wrap: wrap;
      }

      .cart-item-img {
        width: 54px;
        height: 54px;
      }

      .cart-item-info h4 {
        font-size: 12.5px;
      }

      .cart-item-info p {
        font-size: 11.5px;
      }

      .cart-item-price {
        font-size: 14px;
      }

      .qty-btn {
        width: 24px;
        height: 24px;
        font-size: 13px;
        border-radius: 5px;
      }

      .qty-val {
        font-size: 13.5px;
      }

      .cart-summary {
        padding: 16px 14px;
      }

      .cart-summary h3 {
        font-size: 15px;
      }

      .summary-row {
        font-size: 13px;
      }

      .summary-row.total {
        font-size: 15px;
      }

      /* ---- CHECKOUT ---- */
      .checkout-page {
        padding: 18px 0 32px;
      }

      .checkout-header h1 {
        font-size: 18px;
      }

      .checkout-card {
        padding: 16px 12px;
      }

      .checkout-card h3 {
        font-size: 14px;
      }

      .step-num {
        width: 22px !important;
        height: 22px !important;
        font-size: 11px !important;
      }

      .form-input {
        padding: 10px 11px;
        font-size: 13.5px;
      }

      .form-group label {
        font-size: 12.5px;
      }

      .payment-option {
        padding: 11px 12px;
        gap: 9px;
      }

      .payment-logo {
        width: 36px;
        height: 24px;
      }

      .payment-info h4 {
        font-size: 13px;
      }

      .payment-info p {
        font-size: 11.5px;
      }

      .payment-detail-box {
        font-size: 12.5px;
        padding: 11px 12px;
      }

      /* ---- MODALS ---- */
      .modal-box {
        padding: 26px 18px;
      }

      .modal-box h2 {
        font-size: 18px;
      }

      .modal-box p {
        font-size: 13px;
      }

      .modal-icon {
        font-size: 42px;
      }

      .order-id-box {
        font-size: 13px;
        padding: 10px 14px;
      }

      .qv-modal {
        padding: 16px;
      }

      .qv-info h2 {
        font-size: 16px;
      }

      .qv-info .qv-price {
        font-size: 18px;
      }

      .qv-info p {
        font-size: 13px;
      }

      /* ---- AUTH PAGES ---- */
      .auth-page {
        padding: 18px 10px;
      }

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

      .auth-logo {
        font-size: 17px;
      }

      .auth-card h2 {
        font-size: 18px;
      }

      .auth-card .auth-sub {
        font-size: 13px;
      }

      .admin-login-page {
        padding: 18px 10px;
      }

      .admin-login-card {
        padding: 26px 16px;
      }

      .admin-badge {
        font-size: 10px;
      }

      /* ---- PROFILE MODAL ---- */
      .profile-overlay {
        padding: 12px;
      }

      .profile-modal {
        max-width: 100%;
        border-radius: 14px;
      }

      .profile-header {
        padding: 22px 16px 18px;
      }

      .profile-avatar {
        width: 56px;
        height: 56px;
        font-size: 22px;
        margin-bottom: 10px;
      }

      .profile-header h3 {
        font-size: 16px;
      }

      .profile-header p {
        font-size: 12.5px;
      }

      .profile-menu-item {
        padding: 12px 16px;
        font-size: 13.5px;
        gap: 11px;
      }

      .pm-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
        border-radius: 8px;
      }

      .profile-guest {
        padding: 22px 16px 20px;
      }

      .profile-guest h3 {
        font-size: 16px;
      }

      .profile-guest p {
        font-size: 13px;
      }

      /* ---- ADMIN ---- */
      .admin-topbar {
        padding: 10px 10px;
      }

      .admin-topbar h1 {
        font-size: 14.5px;
        gap: 7px;
      }

      .admin-user-info {
        font-size: 11px;
      }

      .btn-logout {
        padding: 6px 11px;
        font-size: 12px;
      }

      .admin-nav-item {
        padding: 9px 12px;
        font-size: 11px;
      }

      .admin-content {
        padding: 13px 10px;
      }

      .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
      }

      .stat-card {
        padding: 12px 10px;
        gap: 9px;
      }

      .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
        border-radius: 9px;
      }

      .stat-info h3 {
        font-size: 19px;
      }

      .stat-info p {
        font-size: 11px;
      }

      .admin-table-header {
        padding: 12px 12px;
      }

      .admin-table-header h3 {
        font-size: 14px;
      }

      table {
        min-width: 480px;
        font-size: 11.5px;
      }

      table th,
      table td {
        padding: 8px 8px;
      }

      .admin-product-img {
        width: 34px;
        height: 34px;
      }
    }

    /* ------ 380px and below (Very Small Phone) ------ */
    @media (max-width: 380px) {
      .container {
        padding: 0 8px;
      }

      /* Navbar */
      .navbar-inner {
        padding: 9px 8px;
      }

      .navbar-logo {
        font-size: 14px;
      }

      .navbar-logo i {
        font-size: 13px;
      }

      /* Hero */
      .hero-text h1 {
        font-size: 19px;
      }

      .hero-text p {
        font-size: 12.5px;
      }

      /* Section */
      .section-title {
        font-size: 16px;
      }

      /* Categories */
      .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
      }

      .category-card img {
        height: 56px;
      }

      .category-card span {
        font-size: 10.5px;
      }

      /* Products */
      .products-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
      }

      .product-img-wrap {
        height: 108px;
        padding: 8px;
      }

      .product-img-wrap img {
        max-height: 88px;
      }

      .product-info h3 {
        font-size: 11.5px;
      }

      .price-current {
        font-size: 12.5px;
      }

      .btn-cart,
      .btn-buy {
        font-size: 10px;
        padding: 6px 2px;
      }

      /* Features */
      .feature-card {
        padding: 13px 13px;
        gap: 11px;
      }

      .feature-icon {
        width: 38px;
        height: 38px;
        font-size: 15px;
      }

      .feature-card h4 {
        font-size: 13px;
      }

      .feature-card p {
        font-size: 12px;
      }

      /* Auth */
      .auth-card,
      .admin-login-card {
        padding: 20px 12px;
      }

      /* Admin */
      .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
      }

      .stat-card {
        padding: 10px 9px;
      }

      .stat-info h3 {
        font-size: 17px;
      }

      table {
        min-width: 420px;
        font-size: 11px;
      }

      table th,
      table td {
        padding: 7px 7px;
      }
    }

    /* ================================================================
   PRODUCT DETAIL PAGE
================================================================ */
    .product-detail-page {
      padding: 30px 0 60px;
      background: var(--bg);
      min-height: 80vh;
    }

    /* ---- Breadcrumb ---- */
    .detail-breadcrumb {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 22px;
      flex-wrap: wrap;
    }

    .detail-breadcrumb a {
      color: var(--blue);
      cursor: pointer;
    }

    .detail-breadcrumb a:hover {
      text-decoration: underline;
    }

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

    /* ---- Top Section: Image + Info ---- */
    .detail-top {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 30px;
      margin-bottom: 28px;
      align-items: start;
    }

    .detail-img-gallery {
      background: var(--white);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      padding: 24px;
      text-align: center;
    }

    .detail-main-img {
      width: 100%;
      max-height: 340px;
      object-fit: contain;
      margin-bottom: 16px;
      transition: transform .3s, opacity .22s ease;
    }

    .detail-main-img.img-switching {
      opacity: 0;
      transform: scale(0.97);
    }

    .detail-main-img:hover {
      transform: scale(1.04);
    }

    .detail-info {
      background: var(--white);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      padding: 26px;
    }

    .detail-category-badge {
      display: inline-block;
      background: var(--blue-light);
      color: var(--blue);
      font-size: 11.5px;
      font-weight: 700;
      padding: 3px 11px;
      border-radius: 20px;
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 10px;
    }

    .detail-name {
      font-size: 22px;
      font-weight: 900;
      margin-bottom: 14px;
      color: var(--text);
      line-height: 1.3;
    }

    .detail-price-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 18px;
      flex-wrap: wrap;
    }

    .detail-price {
      font-size: 28px;
      font-weight: 900;
      color: var(--blue);
    }

    .detail-original {
      font-size: 16px;
      color: var(--text-muted);
      text-decoration: line-through;
    }

    .detail-discount {
      background: var(--success);
      color: #fff;
      font-size: 12px;
      font-weight: 800;
      padding: 3px 9px;
      border-radius: 20px;
    }

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

    .in-stock {
      background: #dcfce7;
      color: #166534;
    }

    .out-stock {
      background: #fee2e2;
      color: #dc2626;
    }

    .detail-stock-qty-msg {
      font-size: 12.5px;
      font-weight: 600;
      color: var(--text-muted);
      margin-top: -10px;
      margin-bottom: 16px;
    }

    .detail-stock-qty-msg.low {
      color: #b45309;
    }

    .detail-stock-qty-msg:empty {
      display: none;
      margin: 0;
    }

    .detail-desc {
      font-size: 14px;
      color: var(--text-muted);
      line-height: 1.75;
      margin-bottom: 20px;
    }

    /* ---- Variant Selectors ---- */
    .variant-section {
      margin-bottom: 18px;
    }

    .variant-label {
      font-size: 12px;
      font-weight: 800;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: .6px;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .variant-label span.variant-selected-name {
      color: var(--blue);
      font-weight: 700;
      text-transform: none;
      letter-spacing: 0;
      font-size: 13px;
    }

    .color-swatches {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    /* ── Legacy dot swatch (kept for non-card uses) ── */
    .color-swatch {
      cursor: pointer;
      position: relative;
      transition: all .18s;
    }

    /* ── Card-style image swatch ── */
    .color-swatch-card {
      width: 84px;
      border-radius: 14px;
      border: 2px solid var(--border);
      background: var(--white);
      padding: 8px 6px 7px;
      text-align: center;
      user-select: none;
      transition: border-color .18s, box-shadow .18s, transform .15s;
    }

    .color-swatch-card:hover {
      border-color: var(--blue);
      box-shadow: 0 3px 12px rgba(26,86,219,.15);
      transform: translateY(-2px);
    }

    .color-swatch-card.active {
      border-color: var(--blue);
      background: #eff6ff;
      box-shadow: 0 0 0 3px rgba(26,86,219,.18);
    }

    .color-swatch-card.oos {
      opacity: .45;
      cursor: not-allowed;
    }

    .color-swatch-img-wrap {
      width: 62px;
      height: 62px;
      margin: 0 auto 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      overflow: hidden;
      background: #f8f9fa;
    }

    .color-swatch-img {
      width: 62px;
      height: 62px;
      object-fit: contain;
      display: block;
      border-radius: 6px;
    }

    .color-swatch-dot-fallback {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 9px auto;
      box-shadow: 0 1px 4px rgba(0,0,0,.18);
    }

    .color-swatch-label {
      font-size: 11px;
      font-weight: 600;
      color: var(--text);
      line-height: 1.3;
      word-break: break-word;
    }

    .color-swatch-oos-badge {
      font-size: 9px;
      color: var(--danger);
      font-weight: 700;
      margin-top: 3px;
      letter-spacing: .3px;
    }

    /* Legacy dot swatch styles (fallback) */
    .color-swatch:not(.color-swatch-card) {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: 3px solid transparent;
      outline: 2px solid transparent;
      outline-offset: 2px;
      box-shadow: 0 1px 4px rgba(0,0,0,.18);
    }

    .color-swatch:not(.color-swatch-card):hover {
      transform: scale(1.13);
      box-shadow: 0 3px 10px rgba(0,0,0,.22);
    }

    .color-swatch:not(.color-swatch-card).active {
      border-color: #fff;
      outline-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(26,86,219,.25);
    }

    .color-swatch:not(.color-swatch-card).oos {
      opacity: .38;
      cursor: not-allowed;
    }

    .color-swatch:not(.color-swatch-card).oos::after {
      content: '';
      position: absolute;
      inset: 3px;
      border-radius: 50%;
      background: repeating-linear-gradient(45deg, rgba(0,0,0,.25) 0px, rgba(0,0,0,.25) 2px, transparent 2px, transparent 5px);
    }

    .storage-pills {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .storage-pill {
      padding: 7px 16px;
      border-radius: 30px;
      border: 2px solid var(--border);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      background: var(--white);
      color: var(--text);
      transition: all .18s;
      white-space: nowrap;
    }

    .storage-pill:hover {
      border-color: var(--blue);
      color: var(--blue);
      background: var(--blue-light);
    }

    .storage-pill.active {
      border-color: var(--blue);
      background: var(--blue);
      color: #fff;
      box-shadow: 0 2px 8px rgba(26, 86, 219, .25);
    }

    .storage-pill.oos {
      opacity: .45;
      cursor: not-allowed;
      text-decoration: line-through;
      background: #f3f4f6;
      border-color: #e5e7eb;
      color: var(--text-muted);
    }

    .storage-pill.oos:hover {
      border-color: #e5e7eb;
      color: var(--text-muted);
      background: #f3f4f6;
      transform: none;
    }

    .variant-error {
      color: var(--danger);
      font-size: 13px;
      font-weight: 700;
      padding: 8px 12px;
      background: #fef2f2;
      border-radius: 8px;
      border: 1px solid #fca5a5;
      display: none;
      margin-bottom: 10px;
    }

    /* Admin variant manager */
    .variant-row {
      display: grid;
      grid-template-columns: 1.5fr 110px 90px 130px auto;
      gap: 8px;
      align-items: center;
      background: #f9fafb;
      border-radius: 10px;
      padding: 10px 12px;
      margin-bottom: 8px;
    }

    .variant-row input,
    .variant-row select {
      font-size: 12px;
      padding: 5px 8px;
      border: 1.5px solid var(--border);
      border-radius: 7px;
      font-family: var(--font);
      width: 100%;
    }

    /* Mobile: stack Shipping & Compliance fields (Condition, Warranty
       Type/Duration, Free Delivery) instead of squeezing a 2-column grid. */
    @media (max-width: 560px) {
      .ep-shipping-grid {
        grid-template-columns: 1fr !important;
      }
      .ep-inventory-grid {
        grid-template-columns: 1fr !important;
      }
    }

    /* Mobile: stack the variant row fields instead of squeezing a
       multi-column grid into a narrow viewport (Color/Storage/RAM/
       Price/Stock/Delete). Overrides the inline grid-template-columns
       set in JS since media queries can't otherwise beat inline styles. */
    @media (max-width: 560px) {
      .vr-grid {
        grid-template-columns: 1fr 1fr !important;
      }
      .vr-grid .vr-color {
        grid-column: 1 / -1 !important;
      }
      .vr-header {
        display: none !important;
      }
    }
    @media (max-width: 400px) {
      .vr-grid {
        grid-template-columns: 1fr !important;
      }
      .vr-grid .vr-color,
      .vr-grid .vr-storage,
      .vr-grid .vr-ram,
      .vr-grid .vr-price {
        grid-column: 1 / -1 !important;
      }
    }

    .variant-row .del-variant-btn {
      background: #fee2e2;
      color: #dc2626;
      border: none;
      border-radius: 7px;
      padding: 5px 9px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 700;
    }

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

    .detail-actions .btn-cart-lg {
      flex: 1;
      min-width: 140px;
      padding: 13px 20px;
      background: var(--blue);
      color: #fff;
      border: none;
      border-radius: var(--radius);
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      transition: all .2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .detail-actions .btn-cart-lg:hover {
      background: var(--blue-dark);
      transform: translateY(-2px);
    }

    .detail-actions .btn-buy-lg {
      flex: 1;
      min-width: 140px;
      padding: 13px 20px;
      background: var(--orange);
      color: #fff;
      border: none;
      border-radius: var(--radius);
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      transition: all .2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .detail-actions .btn-buy-lg:hover {
      background: var(--orange-hover);
      transform: translateY(-2px);
    }

    /* ---- Trust Badges ---- */
    .trust-badges {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin-bottom: 28px;
    }

    .trust-badge {
      background: var(--white);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 16px 12px;
      text-align: center;
      border: 1.5px solid var(--border);
      transition: border-color .2s, transform .2s;
    }

    .trust-badge:hover {
      border-color: var(--blue);
      transform: translateY(-2px);
    }

    .trust-badge-icon {
      font-size: 28px;
      margin-bottom: 8px;
    }

    .trust-badge h5 {
      font-size: 13px;
      font-weight: 800;
      margin-bottom: 3px;
      color: var(--text);
    }

    .trust-badge p {
      font-size: 11.5px;
      color: var(--text-muted);
    }

    /* ---- Quick Specs Icons Row ---- */
    .quick-specs {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      margin-bottom: 28px;
      background: var(--white);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      padding: 22px;
    }

    .quick-spec-item {
      text-align: center;
    }

    .quick-spec-icon {
      width: 64px;
      height: 64px;
      margin: 0 auto 10px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .quick-spec-icon img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .quick-spec-icon i {
      font-size: 32px;
      color: var(--blue);
    }

    .quick-spec-val {
      font-size: 13.5px;
      font-weight: 800;
      color: var(--blue);
      margin-bottom: 3px;
    }

    .quick-spec-label {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 500;
    }

    /* ---- Specs Table ---- */
    .specs-section {
      background: var(--white);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      overflow: hidden;
      margin-bottom: 28px;
    }

    .specs-header {
      padding: 18px 22px;
      border-bottom: 1px solid var(--border);
      font-size: 18px;
      font-weight: 800;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .specs-header i {
      color: var(--blue);
    }

    .specs-group {
      margin-bottom: 0;
    }

    .specs-group-title {
      background: #f8fafc;
      padding: 11px 22px;
      font-size: 13px;
      font-weight: 800;
      color: var(--text);
      border-bottom: 1px solid var(--border);
      border-top: 1px solid var(--border);
      text-transform: uppercase;
      letter-spacing: .5px;
    }

    .specs-row {
      display: flex;
      padding: 11px 22px;
      border-bottom: 1px solid #f3f4f6;
      font-size: 13.5px;
      transition: background .15s;
    }

    .specs-row:hover {
      background: #f9fafb;
    }

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

    .specs-key {
      width: 200px;
      flex-shrink: 0;
      color: var(--text-muted);
      font-weight: 500;
    }

    .specs-val {
      flex: 1;
      color: var(--text);
      font-weight: 600;
    }

    .specs-yes {
      color: var(--success);
      font-weight: 700;
    }

    .specs-no {
      color: var(--danger);
      font-weight: 700;
    }

    /* Show More/Less Button */
    .specs-toggle-wrap {
      text-align: center;
      padding: 14px;
      border-top: 1px solid var(--border);
    }

    .btn-specs-toggle {
      background: none;
      border: 1.5px solid var(--blue);
      color: var(--blue);
      padding: 8px 24px;
      border-radius: var(--radius);
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      transition: all .18s;
      font-family: var(--font);
    }

    .btn-specs-toggle:hover {
      background: var(--blue);
      color: #fff;
    }

    /* ---- Responsive Detail Page ---- */
    @media (max-width: 768px) {
      .detail-top {
        grid-template-columns: 1fr;
        gap: 16px;
      }

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

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

      .specs-key {
        width: 140px;
      }

      .detail-name {
        font-size: 18px;
      }

      .detail-price {
        font-size: 22px;
      }
    }

    @media (max-width: 480px) {
      .trust-badges {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }

      .quick-specs {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 16px;
      }

      .detail-info {
        padding: 18px 14px;
      }

      .detail-img-gallery {
        padding: 16px;
      }

      .specs-key {
        width: 120px;
        font-size: 12.5px;
      }

      .specs-val {
        font-size: 12.5px;
      }

      .specs-row {
        padding: 10px 14px;
      }

      .specs-group-title {
        padding: 9px 14px;
      }

      .specs-header {
        padding: 14px 14px;
        font-size: 16px;
      }

      .detail-actions {
        flex-direction: column;
      }
    }


    /* ---- Brand Filter Buttons ---- */
    .brand-btn {
      padding: 7px 16px;
      border: 1.5px solid var(--border);
      border-radius: 20px;
      font-size: 13px;
      font-weight: 600;
      background: var(--white);
      color: var(--text-muted);
      cursor: pointer;
      transition: all .18s;
      font-family: var(--font);
      white-space: nowrap;
    }

    .brand-btn:hover {
      border-color: var(--blue);
      color: var(--blue);
      background: var(--blue-light);
    }

    .brand-btn.active {
      background: var(--blue);
      color: #fff;
      border-color: var(--blue);
    }

    /* ================================================================
   SMART SEARCH BAR STYLES
================================================================ */
    #search-bar {
      border-top: 1px solid var(--border);
      background: var(--white);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
      animation: slideDown .22s ease;
    }

    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }

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

    .search-chip {
      padding: 5px 13px;
      background: var(--bg);
      border: 1.5px solid var(--border);
      border-radius: 20px;
      font-size: 12.5px;
      font-weight: 600;
      color: var(--text-muted);
      cursor: pointer;
      transition: all .15s;
      font-family: var(--font);
      white-space: nowrap;
    }

    .search-chip:hover {
      background: var(--blue);
      color: #fff;
      border-color: var(--blue);
      transform: translateY(-1px);
    }

    #search-info-bar {
      display: none;
    }

    #search-info-bar.visible {
      display: block;
    }

    /* ---- Search Results Toast ---- */
    .search-results-count {
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 16px;
      text-align: center;
      padding: 8px 16px;
      background: var(--bg);
      border-radius: 8px;
      border: 1px solid var(--border);
    }

    .search-results-count strong {
      color: var(--blue);
    }

    .search-results-count .search-badge {
      display: inline-block;
      background: var(--blue-light);
      color: var(--blue);
      font-weight: 700;
      padding: 2px 9px;
      border-radius: 12px;
      margin-left: 6px;
    }

    /* Highlight matched text in product cards */
    .search-highlight {
      background: #fef08a;
      border-radius: 3px;
      padding: 0 2px;
    }

    @media (max-width: 600px) {
      #search-bar>div {
        padding: 10px 12px;
      }

      #search-suggestions {
        gap: 5px;
      }

      .search-chip {
        font-size: 11.5px;
        padding: 4px 10px;
      }
    }


    /* ================================================================
   RATINGS & REVIEWS
================================================================ */
    .star-pick {
      user-select: none;
    }

    .star-pick:hover {
      color: #facc15 !important;
    }

    .star-pick.selected {
      color: #facc15 !important;
    }

    .review-card {
      background: var(--bg);
      border-radius: var(--radius);
      padding: 18px 20px;
      margin-bottom: 14px;
      border: 1.5px solid var(--border);
      transition: border-color .2s;
    }

    .review-card:hover {
      border-color: var(--blue-light);
    }

    .review-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
      flex-wrap: wrap;
      gap: 8px;
    }

    .review-name {
      font-size: 14.5px;
      font-weight: 800;
      color: var(--text);
    }

    .review-city {
      font-size: 12.5px;
      color: var(--text-muted);
    }

    .review-stars {
      font-size: 16px;
      letter-spacing: 2px;
    }

    .review-text {
      font-size: 14px;
      color: var(--text);
      line-height: 1.65;
      margin-bottom: 6px;
    }

    .review-date {
      font-size: 12px;
      color: var(--text-muted);
    }

    .rating-bar-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 7px;
      font-size: 13px;
    }

    .rating-bar-label {
      width: 50px;
      font-weight: 600;
      color: var(--text);
    }

    .rating-bar-track {
      flex: 1;
      height: 8px;
      background: var(--border);
      border-radius: 4px;
      overflow: hidden;
    }

    .rating-bar-fill {
      height: 100%;
      background: #facc15;
      border-radius: 4px;
      transition: width .4s;
    }

    .rating-bar-count {
      width: 28px;
      font-size: 12px;
      color: var(--text-muted);
      text-align: right;
    }

    @media (max-width: 600px) {
      .form-grid-2-review {
        grid-template-columns: 1fr !important;
      }
    }


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

    .pg-btn {
      width: 38px;
      height: 38px;
      border-radius: 8px;
      border: 1.5px solid var(--border);
      background: var(--white);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      color: var(--text);
      transition: all .18s;
      font-family: var(--font);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .pg-btn:hover {
      background: var(--blue);
      color: #fff;
      border-color: var(--blue);
    }

    .pg-btn.active {
      background: var(--blue);
      color: #fff;
      border-color: var(--blue);
    }

    .pg-btn:disabled {
      opacity: .4;
      cursor: not-allowed;
    }

    .pg-btn.pg-prev,
    .pg-btn.pg-next {
      width: auto;
      padding: 0 14px;
      gap: 6px;
    }

    .pg-info {
      font-size: 13px;
      color: var(--text-muted);
    }


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

    .page-btn {
      min-width: 38px;
      height: 38px;
      padding: 0 12px;
      border: 1.5px solid var(--border);
      border-radius: 8px;
      background: var(--white);
      color: var(--text-muted);
      font-size: 13.5px;
      font-weight: 600;
      cursor: pointer;
      transition: all .18s;
      font-family: var(--font);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .page-btn:hover {
      border-color: var(--blue);
      color: var(--blue);
      background: var(--blue-light);
    }

    .page-btn.active {
      background: var(--blue);
      color: #fff;
      border-color: var(--blue);
    }

    .page-btn:disabled {
      opacity: .4;
      cursor: not-allowed;
    }

    .products-count-bar {
      text-align: center;
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 16px;
      padding: 8px 16px;
      background: var(--white);
      border-radius: 8px;
      border: 1px solid var(--border);
      display: inline-block;
      margin: 0 auto 16px;
      display: block;
    }

    .products-count-bar strong {
      color: var(--blue);
    }

    /* Accessories divider */
    .acc-section-divider {
      background: linear-gradient(135deg, #0f1a2e 0%, #1e3a8a 100%);
      color: #fff;
      padding: 28px 20px;
      text-align: center;
      margin: 10px 0 0;
    }

    .acc-section-divider h3 {
      font-size: 22px;
      font-weight: 900;
      margin-bottom: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    .acc-section-divider p {
      font-size: 14px;
      color: rgba(255, 255, 255, .75);
    }


    /* ================================================================
   CUSTOMER RATINGS SECTION
================================================================ */
    .ratings-section {
      background: var(--white);
      padding: 48px 0 52px;
      overflow: hidden;
    }

    .ratings-section .section-title {
      margin-bottom: 12px;
    }

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

    .rating-summary {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 24px;
      margin-bottom: 32px;
      flex-wrap: wrap;
    }

    .rating-big-num {
      font-size: 64px;
      font-weight: 900;
      color: var(--blue);
      line-height: 1;
    }

    .rating-stars-big {
      color: #f59e0b;
      font-size: 28px;
      margin-bottom: 6px;
    }

    .rating-total {
      font-size: 14px;
      color: var(--text-muted);
      font-weight: 600;
    }

    .rating-bars {
      display: flex;
      flex-direction: column;
      gap: 7px;
      min-width: 200px;
    }

    .rating-bar-row {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 13px;
    }

    .rating-bar-row span:first-child {
      width: 40px;
      color: var(--text-muted);
      font-weight: 600;
    }

    .rating-bar-bg {
      flex: 1;
      height: 8px;
      background: #f3f4f6;
      border-radius: 4px;
      overflow: hidden;
    }

    .rating-bar-fill {
      height: 100%;
      border-radius: 4px;
      background: linear-gradient(90deg, #f59e0b, #ef4444);
      transition: width .6s ease;
    }

    .rating-bar-count {
      width: 30px;
      color: var(--text-muted);
      font-size: 12px;
      text-align: right;
    }

    /* Marquee — 3 rows */
    .ratings-marquee-outer {
      overflow: hidden;
      position: relative;
      padding: 4px 0;
      mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
      -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    }

    .ratings-marquee-row {
      display: flex;
      gap: 14px;
      margin-bottom: 14px;
      width: max-content;
    }

    .ratings-marquee-row:last-child {
      margin-bottom: 0;
    }

    .ratings-marquee-row:hover {
      animation-play-state: paused;
    }

    /* Row 1 — left to right, 50s */
    .marquee-row-1 {
      animation: mScroll1 25s linear infinite;
    }

    /* Row 2 — right to left (reverse), 42s */
    .marquee-row-2 {
      animation: mScroll2 20s linear infinite;
    }

    /* Row 3 — left to right, 58s */
    .marquee-row-3 {
      animation: mScroll3 30s linear infinite;
    }

    @keyframes mScroll1 {
      from {
        transform: translateX(0);
      }

      to {
        transform: translateX(-50%);
      }
    }

    @keyframes mScroll2 {
      from {
        transform: translateX(-50%);
      }

      to {
        transform: translateX(0);
      }
    }

    @keyframes mScroll3 {
      from {
        transform: translateX(0);
      }

      to {
        transform: translateX(-50%);
      }
    }

    .review-card {
      background: var(--bg);
      border: 1.5px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 18px 20px;
      min-width: 280px;
      max-width: 320px;
      flex-shrink: 0;
      transition: border-color .2s, transform .2s;
      cursor: default;
    }

    .review-card:hover {
      border-color: var(--blue);
      transform: translateY(-2px);
    }

    .review-card-top {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 10px;
    }

    .review-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      font-weight: 800;
      color: #fff;
      flex-shrink: 0;
    }

    .review-name {
      font-size: 14px;
      font-weight: 700;
      margin-bottom: 2px;
    }

    .review-date {
      font-size: 11.5px;
      color: var(--text-muted);
    }

    .review-stars {
      color: #f59e0b;
      font-size: 13px;
      margin-bottom: 8px;
    }

    .review-product {
      font-size: 11.5px;
      color: var(--blue);
      font-weight: 600;
      margin-bottom: 6px;
    }

    .review-text {
      font-size: 13px;
      color: var(--text-muted);
      line-height: 1.6;
    }

    /* Add Review Form */
    .add-review-btn {
      display: block;
      margin: 24px auto 0;
      background: var(--blue);
      color: #fff;
      border: none;
      padding: 12px 28px;
      border-radius: var(--radius);
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      font-family: var(--font);
      transition: all .2s;
      display: flex;
      align-items: center;
      gap: 8px;
      width: fit-content;
      margin: 24px auto 0;
    }

    .add-review-btn:hover {
      background: var(--blue-dark);
      transform: translateY(-2px);
    }

    .review-form-wrap {
      max-width: 560px;
      margin: 24px auto 0;
      background: var(--bg);
      border: 1.5px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px;
      display: none;
    }

    .review-form-wrap.open {
      display: block;
    }

    .star-select {
      display: flex;
      gap: 6px;
      margin-bottom: 14px;
    }

    .star-select button {
      background: none;
      border: none;
      font-size: 28px;
      cursor: pointer;
      color: #d1d5db;
      transition: color .15s, transform .15s;
      line-height: 1;
      padding: 0;
    }

    .star-select button.active,
    .star-select button:hover {
      color: #f59e0b;
      transform: scale(1.15);
    }


    /* ================================================================
   RESPONSIVE FIXES — Ratings + Pagination + Divider
================================================================ */
    @media (max-width: 768px) {
      .rating-summary {
        flex-direction: column;
        gap: 16px;
      }

      .rating-big-num {
        font-size: 48px;
      }

      .rating-stars-big {
        font-size: 22px;
      }

      .rating-bars {
        width: 100%;
      }

      .review-card {
        min-width: 240px;
      }

      .pagination-wrap {
        gap: 5px;
      }

      .page-btn {
        min-width: 34px;
        height: 34px;
        font-size: 12.5px;
        padding: 0 9px;
      }

      .acc-section-divider h3 {
        font-size: 18px;
      }
    }

    @media (max-width: 480px) {
      .rating-big-num {
        font-size: 40px;
      }

      .review-card {
        min-width: 220px;
        padding: 14px 15px;
      }

      .review-text {
        font-size: 12.5px;
      }

      .review-name {
        font-size: 13px;
      }

      .add-review-btn {
        font-size: 13px;
        padding: 10px 22px;
      }

      .review-form-wrap {
        padding: 18px 14px;
      }

      .page-btn {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
        padding: 0 7px;
      }

      .products-count-bar {
        font-size: 12px;
      }
    }


    /* ================================================================
   SHOP BY PRICE — Pink button style
================================================================ */
    .price-filter-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
    }

    .price-filter-btn {
      background: var(--blue);
      /* Website theme blue */
      color: #fff;
      border: none;
      border-radius: 14px;
      padding: 20px 14px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      font-family: var(--font);
      text-align: center;
      transition: background .18s, transform .15s, box-shadow .18s;
      box-shadow: 0 4px 16px rgba(26, 86, 219, .25);
      line-height: 1.3;
    }

    .price-filter-btn:hover {
      background: var(--blue-dark);
      transform: translateY(-3px);
      box-shadow: 0 8px 22px rgba(26, 86, 219, .4);
    }

    .price-filter-btn.active {
      background: #1e3a8a;
      transform: translateY(-1px);
      box-shadow: 0 4px 16px rgba(26, 86, 219, .5);
    }

    /* ================================================================
   SHOP BY BRAND — Logo cards
================================================================ */
    /* brand-logo-grid rules are defined below — do not duplicate */

    /* ================================================================
   DELIVERY REVIEW POPUP MODAL
================================================================ */
    .delivery-review-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      z-index: 9998;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .delivery-review-overlay.open {
      display: flex;
    }

    .delivery-review-box {
      background: var(--white);
      border-radius: var(--radius-lg);
      padding: 0;
      max-width: 460px;
      width: 100%;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
      overflow: hidden;
      animation: slideUp .3s ease;
    }

    .delivery-review-header {
      background: linear-gradient(135deg, #1e3a8a, #1a56db);
      color: #fff;
      padding: 24px 26px;
      text-align: center;
    }

    .delivery-review-header .emoji {
      font-size: 48px;
      margin-bottom: 10px;
      display: block;
    }

    .delivery-review-header h3 {
      font-size: 20px;
      font-weight: 900;
      margin-bottom: 5px;
    }

    .delivery-review-header p {
      font-size: 13.5px;
      opacity: .85;
    }

    .delivery-review-body {
      padding: 22px 26px 24px;
    }

    .delivery-order-info {
      background: var(--blue-light);
      border-radius: var(--radius);
      padding: 12px 16px;
      margin-bottom: 18px;
      font-size: 13.5px;
      color: var(--blue);
      font-weight: 600;
      text-align: center;
    }

    @media (max-width: 768px) {
      .price-filter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
      }

      .price-filter-btn {
        padding: 16px 10px;
        font-size: 12.5px;
        border-radius: 10px;
      }
    }

    @media (max-width: 480px) {
      .price-filter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }

      .price-filter-btn {
        padding: 14px 8px;
        font-size: 12px;
        border-radius: 9px;
      }
    }


    /* ================================================================
   PILL FILTER BUTTONS — Smartphones & Accessories Pages
   Matches reference Image 1 & 2
================================================================ */
    .sp-filter-card {
      background: #fff;
      border-radius: 16px;
      padding: 22px 24px;
      margin-bottom: 18px;
      box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    }

    .sp-filter-title {
      text-align: center;
      font-size: 13px;
      font-weight: 800;
      color: var(--text-muted);
      letter-spacing: 1.5px;
      text-transform: uppercase;
      margin-bottom: 16px;
    }

    .sp-pill-wrap {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: center;
    }

    .sp-pill {
      padding: 10px 20px;
      border-radius: 50px;
      border: 1.8px solid #e5e7eb;
      background: #fff;
      color: #374151;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      font-family: var(--font);
      transition: all .18s;
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .sp-pill:hover {
      border-color: var(--blue);
      color: var(--blue);
      background: #f0f7ff;
    }

    .sp-pill-active,
    .sp-pill.active {
      background: var(--blue) !important;
      color: #fff !important;
      border-color: var(--blue) !important;
    }

    /* ================================================================
   BRAND LOGO CARDS — Home Page (Image 4 style)
   Colored square cards, brand name only — no icons
================================================================ */
    /* ================================================================
   SHOP BY BRAND — Colored cards, name only, no logos
   Reference: Image 2 style with rounded squares
================================================================ */
    .brand-logo-grid {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 10px;
    }

    .brand-logo-card {
      border-radius: 18px;
      aspect-ratio: 1 / 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 5px;
      cursor: pointer;
      transition: transform .2s ease, box-shadow .2s ease;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
      overflow: hidden;
      user-select: none;
    }

    .brand-logo-card:hover {
      transform: translateY(-6px) scale(1.05);
      box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    }

    .brand-logo-card:active {
      transform: scale(.97);
    }

    /* Brand name text */
    .brand-card-name {
      font-size: 14px;
      font-weight: 800;
      text-align: center;
      line-height: 1.2;
      padding: 0 8px;
      word-break: break-word;
      font-family: var(--font);
    }

    .brand-card-sub {
      font-size: 10px;
      font-weight: 600;
      text-align: center;
      line-height: 1.2;
      padding: 0 6px;
      opacity: .85;
      font-family: var(--font);
    }

    /* Responsive */
    @media (max-width: 1024px) {
      .brand-logo-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
      }
    }

    @media (max-width: 768px) {
      .brand-logo-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
      }

      .brand-card-name {
        font-size: 14px;
      }

      .brand-card-sub {
        font-size: 10px;
      }

      .sp-pill {
        padding: 8px 16px;
        font-size: 13px;
      }

      .sp-filter-card {
        padding: 18px 16px;
      }
    }

    @media (max-width: 540px) {
      .brand-logo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 9px;
      }

      .brand-logo-card {
        border-radius: 16px;
      }

      .brand-card-name {
        font-size: 13px;
      }
    }

    @media (max-width: 380px) {
      .brand-logo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 7px;
      }

      .brand-card-name {
        font-size: 12px;
      }

      .brand-card-sub {
        font-size: 9px;
      }

      .sp-pill {
        padding: 7px 13px;
        font-size: 12.5px;
      }

      .sp-pill-wrap {
        gap: 7px;
      }
    }


    /* ================================================================
   ACCESSORIES PAGE — Category Filter Pills (Image 2 style)
================================================================ */
    .acc-pill-wrap {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: center;
    }

    .acc-pill {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 11px 20px;
      border-radius: 50px;
      /* Fully rounded pill */
      border: 1.5px solid #e2e8f0;
      /* Light grey outline inactive */
      background: #ffffff;
      color: #475569;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all .18s ease;
      font-family: var(--font);
      white-space: nowrap;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }

    .acc-pill:hover {
      border-color: var(--blue);
      color: var(--blue);
      background: #eff6ff;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(26, 86, 219, 0.15);
    }

    .acc-pill.acc-pill-active,
    .acc-pill-active {
      background: var(--blue) !important;
      color: #ffffff !important;
      border-color: var(--blue) !important;
      box-shadow: 0 4px 14px rgba(26, 86, 219, 0.3);
    }

    @media (max-width: 600px) {
      .acc-pill {
        padding: 9px 15px;
        font-size: 13px;
      }

      .acc-pill-wrap {
        gap: 8px;
      }
    }


    /* ================================================================
   HOME ACCESSORIES — Category Pill Filter (Image 2 style)
================================================================ */
    .home-acc-cat-wrap {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: center;
      background: #F0F4FF;
      border-radius: 18px;
      padding: 18px 16px;
    }

    .home-acc-pill {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 10px 20px;
      border-radius: 40px;
      /* Fully rounded pills */
      border: 2px solid #e2e8f0;
      background: #fff;
      color: #374151;
      font-size: 14px;
      font-weight: 600;
      font-family: var(--font);
      cursor: pointer;
      transition: all .18s ease;
      white-space: nowrap;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }

    .home-acc-pill:hover {
      border-color: var(--blue);
      color: var(--blue);
      background: #EEF2FF;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(26, 86, 219, 0.15);
    }

    .home-acc-pill.active {
      background: var(--blue);
      color: #fff;
      border-color: var(--blue);
      box-shadow: 0 4px 14px rgba(26, 86, 219, 0.3);
    }

    @media (max-width: 600px) {
      .home-acc-cat-wrap {
        gap: 7px;
        padding: 14px 10px;
      }

      .home-acc-pill {
        font-size: 12.5px;
        padding: 8px 14px;
        gap: 5px;
      }
    }


    /* ================================================================
   SMARTPHONES PAGE — Brand Grid Cards (Square, like home page)
================================================================ */
    .sp-brand-grid {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 10px;
      margin-top: 12px;
    }

    .sp-brand-card {
      border-radius: 18px;
      aspect-ratio: 1 / 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 5px;
      cursor: pointer;
      transition: transform .2s ease, box-shadow .2s ease, outline .15s;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
      /* Same as home */
      overflow: hidden;
      user-select: none;
    }

    .sp-brand-card:hover {
      transform: translateY(-6px) scale(1.05);
      /* Same as home */
      box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    }

    .sp-brand-card:active {
      transform: scale(.97);
    }

    .sp-brand-card.sp-brand-active {
      outline: 3px solid #fff;
      outline-offset: 2px;
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(26, 86, 219, .45);
    }

    .sp-brand-name {
      font-size: 14px;
      font-weight: 800;
      text-align: center;
      line-height: 1.2;
      padding: 0 8px;
      word-break: break-word;
      font-family: var(--font);
    }

    .sp-brand-sub {
      font-size: 10px;
      font-weight: 600;
      text-align: center;
      opacity: .85;
      padding: 0 6px;
      font-family: var(--font);
    }

    @media (max-width: 1024px) {
      .sp-brand-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
      }
    }

    @media (max-width: 768px) {
      .sp-brand-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
      }

      .sp-brand-name {
        font-size: 14px;
      }

      .sp-brand-sub {
        font-size: 10px;
      }
    }

    @media (max-width: 540px) {
      .sp-brand-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 9px;
      }

      .sp-brand-card {
        border-radius: 16px;
      }

      .sp-brand-name {
        font-size: 13px;
      }
    }

    @media (max-width: 380px) {
      .sp-brand-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
      }

      .sp-brand-name {
        font-size: 11.5px;
      }
    }

    /* ================================================================
   SMART SEARCH — Dropdown Suggestions
================================================================ */
    #search-dropdown {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      width: 100%;
      max-width: 640px;
      background: var(--white);
      border: 1.5px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
      z-index: 9999;
      overflow: hidden;
      display: none;
    }

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

    .sdrop-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 16px;
      cursor: pointer;
      font-size: 14px;
      font-family: var(--font);
      color: var(--text);
      border-bottom: 1px solid var(--border);
      transition: background .12s;
    }

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

    .sdrop-item:hover,
    .sdrop-item.active {
      background: var(--blue-light);
      color: var(--blue);
    }

    .sdrop-item i {
      color: var(--text-muted);
      font-size: 13px;
      width: 16px;
      flex-shrink: 0;
    }

    .sdrop-item .sdrop-name {
      flex: 1;
    }

    .sdrop-item .sdrop-price {
      font-size: 12.5px;
      color: var(--text-muted);
      font-weight: 600;
    }

    .sdrop-item .sdrop-badge {
      font-size: 11px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 10px;
      background: var(--blue-light);
      color: var(--blue);
    }

    .sdrop-section-header {
      padding: 6px 16px 4px;
      font-size: 10.5px;
      font-weight: 800;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: .8px;
      background: var(--bg);
    }


    /* ================================================================
   ADVANCED FILTERS — chip buttons
================================================================ */
    .adv-chip {
      padding: 5px 11px;
      border: 1.5px solid var(--border);
      border-radius: 20px;
      background: #fff;
      color: var(--text);
      font-size: 12px;
      font-weight: 600;
      font-family: var(--font);
      cursor: pointer;
      transition: all .15s;
      white-space: nowrap;
    }

    .adv-chip:hover {
      border-color: var(--blue);
      color: var(--blue);
      background: var(--blue-light);
    }

    .adv-chip.active {
      background: var(--blue);
      color: #fff;
      border-color: var(--blue);
    }


    /* ================================================================
   COMPARE PRODUCTS — floating bar + modal
================================================================ */
    #compare-bar {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: #1e3a8a;
      color: #fff;
      padding: 14px 20px;
      z-index: 9990;
      display: none;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, .25);
    }

    #compare-bar.visible {
      display: flex;
    }

    .compare-slot {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(255, 255, 255, .12);
      border-radius: 10px;
      padding: 8px 12px;
      min-width: 160px;
      flex: 1;
      max-width: 200px;
      border: 1.5px dashed rgba(255, 255, 255, .3);
    }

    .compare-slot-name {
      font-size: 12px;
      font-weight: 700;
      flex: 1;
      line-height: 1.3;
    }

    .compare-slot-remove {
      background: none;
      border: none;
      color: rgba(255, 255, 255, .7);
      cursor: pointer;
      font-size: 16px;
      padding: 0;
      line-height: 1;
    }

    .compare-slot-remove:hover {
      color: #fff;
    }

    .compare-slot.empty {
      opacity: .45;
    }

    .compare-slot.empty .compare-slot-name {
      font-weight: 400;
      font-style: italic;
    }

    #compare-modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .7);
      z-index: 9999;
      align-items: flex-start;
      justify-content: center;
      padding: 20px;
      overflow-y: auto;
    }

    #compare-modal-overlay.open {
      display: flex;
    }

    #compare-modal {
      background: var(--white);
      border-radius: 18px;
      max-width: 1000px;
      width: 100%;
      margin: auto;
      overflow: hidden;
      box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
    }

    .compare-modal-header {
      background: linear-gradient(135deg, var(--blue), #1e3a8a);
      padding: 18px 24px;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .compare-modal-header h3 {
      font-size: 17px;
      font-weight: 800;
      margin: 0;
    }

    .compare-modal-body {
      overflow-x: auto;
    }

    .compare-table {
      width: 100%;
      border-collapse: collapse;
      min-width: 600px;
    }

    .compare-table th {
      background: var(--bg);
      padding: 16px 14px;
      text-align: center;
      border-bottom: 2px solid var(--border);
      font-size: 13px;
      font-weight: 800;
      color: var(--text);
      vertical-align: top;
    }

    .compare-table th .ct-name {
      font-size: 13.5px;
      font-weight: 800;
      color: var(--blue);
      margin-bottom: 4px;
    }

    .compare-table th .ct-price {
      font-size: 15px;
      font-weight: 900;
      color: var(--blue);
    }

    .compare-table th .ct-orig {
      font-size: 11px;
      color: var(--text-muted);
      text-decoration: line-through;
    }

    .compare-table td {
      padding: 11px 14px;
      text-align: center;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
      vertical-align: middle;
    }

    .compare-table tr:nth-child(odd) {
      background: #f9fafb;
    }

    .compare-table td:first-child {
      text-align: left;
      font-weight: 700;
      color: var(--text-muted);
      background: var(--bg) !important;
      font-size: 12.5px;
      white-space: nowrap;
      padding-left: 20px;
    }

    .compare-best {
      color: #059669;
      font-weight: 800;
    }

    .compare-table img {
      width: 80px;
      height: 80px;
      object-fit: contain;
      border-radius: 8px;
    }

    .product-card-compare-btn {
      background: none;
      border: 1.5px solid var(--blue);
      color: var(--blue);
      border-radius: 8px;
      padding: 5px 10px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      font-family: var(--font);
      transition: .15s;
      display: flex;
      align-items: center;
      gap: 4px;
      margin-top: 6px;
      width: 100%;
      justify-content: center;
    }

    .product-card-compare-btn:hover,
    .product-card-compare-btn.in-compare {
      background: var(--blue);
      color: #fff;
    }

    @media (max-width: 600px) {
      #compare-bar {
        flex-direction: column;
        align-items: flex-start;
      }

      .compare-slot {
        max-width: 100%;
        width: 100%;
      }
    }


    /* ================================================================
   BEST PHONES GUIDES PAGE
================================================================ */
    .guide-hero {
      background: linear-gradient(135deg, #1e3a8a 0%, #1a56db 60%, #2563eb 100%);
      padding: 50px 0 40px;
      text-align: center;
      color: #fff;
    }

    .guide-hero h1 {
      font-size: clamp(22px, 3vw, 32px);
      font-weight: 900;
      margin-bottom: 10px;
    }

    .guide-hero p {
      font-size: 15px;
      opacity: .85;
      max-width: 500px;
      margin: 0 auto 24px;
    }

    .guide-chips-scroll {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding-bottom: 6px;
      justify-content: center;
      flex-wrap: wrap;
    }

    .guide-chip {
      padding: 8px 18px;
      border-radius: 30px;
      border: 2px solid rgba(255, 255, 255, .4);
      background: rgba(255, 255, 255, .12);
      color: #fff;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      font-family: var(--font);
      white-space: nowrap;
      transition: .18s;
      flex-shrink: 0;
    }

    .guide-chip:hover,
    .guide-chip.active {
      background: #fff;
      color: var(--blue);
      border-color: #fff;
    }

    .guides-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
      gap: 20px;
      padding: 28px 0;
    }

    .guide-card {
      background: var(--white);
      border-radius: 16px;
      border: 1.5px solid var(--border);
      overflow: hidden;
      box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
      cursor: pointer;
      transition: transform .2s, box-shadow .2s;
    }

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

    .guide-card-header {
      padding: 18px 20px 14px;
      display: flex;
      align-items: flex-start;
      gap: 14px;
    }

    .guide-card-emoji {
      font-size: 36px;
      line-height: 1;
      flex-shrink: 0;
    }

    .guide-card-title {
      font-size: 16px;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 4px;
    }

    .guide-card-meta {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 600;
    }

    .guide-card-tag {
      display: inline-block;
      font-size: 11px;
      font-weight: 700;
      padding: 2px 9px;
      border-radius: 10px;
      margin-bottom: 6px;
    }

    .guide-product-list {
      border-top: 1px solid var(--border);
    }

    .guide-product-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 18px;
      border-bottom: 1px solid var(--border);
      transition: background .15s;
      cursor: pointer;
    }

    .guide-product-row:last-child {
      border-bottom: none;
    }

    .guide-product-row:hover {
      background: var(--blue-light);
    }

    .guide-rank {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--blue);
      color: #fff;
      font-size: 11px;
      font-weight: 900;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .guide-rank.gold {
      background: #f59e0b;
    }

    .guide-rank.silver {
      background: #6b7280;
    }

    .guide-rank.bronze {
      background: #b45309;
    }

    .guide-product-info {
      flex: 1;
    }

    .guide-product-name {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
    }

    .guide-product-price {
      font-size: 12px;
      color: var(--blue);
      font-weight: 700;
    }

    .guide-product-why {
      font-size: 11px;
      color: var(--text-muted);
    }

    .guide-view-all {
      display: block;
      text-align: center;
      padding: 12px;
      font-size: 13px;
      font-weight: 700;
      color: var(--blue);
      background: var(--blue-light);
    }

    .guide-view-all:hover {
      background: #dbeafe;
    }

    /* ================================================================
   PRICE ALERT / NOTIFY ME MODAL
================================================================ */
    #price-alert-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .6);
      z-index: 9995;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    #price-alert-overlay.open {
      display: flex;
    }

    #price-alert-modal {
      background: var(--white);
      border-radius: 20px;
      max-width: 420px;
      width: 100%;
      overflow: hidden;
      box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
      animation: slideUp .28s ease;
    }

    .alert-modal-head {
      background: linear-gradient(135deg, #1e3a8a, #1a56db);
      padding: 22px 24px;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .alert-modal-head h3 {
      font-size: 16px;
      font-weight: 800;
      margin: 0;
    }

    .alert-modal-body {
      padding: 22px 24px 26px;
    }

    .alert-type-tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 18px;
    }

    .alert-tab {
      flex: 1;
      padding: 9px;
      border-radius: 10px;
      border: 2px solid var(--border);
      background: #fff;
      font-size: 13px;
      font-weight: 700;
      color: var(--text-muted);
      cursor: pointer;
      font-family: var(--font);
      text-align: center;
      transition: .15s;
    }

    .alert-tab.active {
      border-color: var(--blue);
      color: var(--blue);
      background: var(--blue-light);
    }

    .alert-product-preview {
      display: flex;
      align-items: center;
      gap: 12px;
      background: var(--bg);
      border-radius: 12px;
      padding: 12px;
      margin-bottom: 18px;
    }

    .alert-product-preview img {
      width: 52px;
      height: 52px;
      object-fit: contain;
      border-radius: 8px;
    }

    .alert-product-preview .ap-name {
      font-size: 13px;
      font-weight: 800;
      color: var(--text);
    }

    .alert-product-preview .ap-price {
      font-size: 13px;
      color: var(--blue);
      font-weight: 700;
    }

    .alert-success {
      text-align: center;
      padding: 16px 0;
      display: none;
    }

    .alert-success .as-icon {
      font-size: 52px;
      margin-bottom: 10px;
    }

    .alert-success h4 {
      font-size: 16px;
      font-weight: 800;
      margin-bottom: 6px;
    }

    .alert-success p {
      font-size: 13px;
      color: var(--text-muted);
    }

    @media (max-width: 600px) {
      .guides-grid {
        grid-template-columns: 1fr;
      }

      .guide-hero {
        padding: 36px 0 30px;
      }
    }


    /* ================================================================
   PTA APPROVED BADGE
================================================================ */
    .pta-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #d1fae5;
      color: #065f46;
      font-size: 10.5px;
      font-weight: 800;
      padding: 2px 7px;
      border-radius: 20px;
      border: 1px solid #6ee7b7;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .pta-badge i {
      font-size: 9px;
    }

    /* PTA banner on product detail */
    .pta-banner {
      display: flex;
      align-items: center;
      gap: 12px;
      background: linear-gradient(135deg, #ecfdf5, #d1fae5);
      border: 1.5px solid #6ee7b7;
      border-radius: 12px;
      padding: 12px 16px;
      margin-bottom: 14px;
    }

    .pta-banner-icon {
      font-size: 28px;
      flex-shrink: 0;
    }

    .pta-banner-text h5 {
      font-size: 14px;
      font-weight: 800;
      color: #065f46;
      margin: 0 0 2px;
    }

    .pta-banner-text p {
      font-size: 12px;
      color: #047857;
      margin: 0;
    }

    /* Open Parcel badge on checkout */
    .open-parcel-option {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      border: 2px solid var(--border);
      border-radius: 12px;
      padding: 16px;
      cursor: pointer;
      transition: border-color .18s, background .18s;
      margin-top: 10px;
      background: #fff;
      width: 100%;
      box-sizing: border-box;
    }

    .open-parcel-option.selected {
      border-color: var(--blue);
      background: var(--blue-light);
    }

    .open-parcel-option.selected .op-title {
      color: var(--blue);
    }

    .open-parcel-option input[type="radio"] {
      width: 18px;
      height: 18px;
      margin-top: 3px;
      flex-shrink: 0;
      accent-color: var(--blue);
      cursor: pointer;
    }

    .open-parcel-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #dbeafe;
      color: var(--blue);
      font-size: 10px;
      font-weight: 800;
      padding: 2px 7px;
      border-radius: 10px;
      margin-top: 3px;
    }



    /* ================================================================
   MOBILE CARD — Horizontal layout improvements
================================================================ */
    @media (max-width: 480px) {

      /* 1 column grid */
      .products-grid {
        grid-template-columns: 1fr !important;
        max-width: 420px;
        margin: 0 auto;
      }

      /* Horizontal card layout */
      .product-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0 !important;
        padding: 0 !important;
        border-radius: 14px !important;
        overflow: hidden;
      }

      /* Left: image */
      .product-img-wrap {
        width: 120px !important;
        min-width: 120px !important;
        height: 120px !important;
        flex-shrink: 0 !important;
        border-radius: 0 !important;
        background: var(--bg);
        padding: 10px !important;
      }

      .product-img-wrap img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        max-height: 100px !important;
      }

      /* Right: info */
      .product-info {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 10px 12px !important;
      }

      .product-info h3 {
        font-size: 13px !important;
        line-height: 1.3 !important;
        margin-bottom: 5px !important;
        white-space: normal !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
      }

      /* Price row */
      .product-price {
        margin-bottom: 8px !important;
        flex-wrap: wrap;
        gap: 4px;
      }

      .price-current {
        font-size: 14px !important;
      }

      .price-original {
        font-size: 11px !important;
      }

      /* PTA + warranty badges */
      .pta-badge,
      [style*="1 Year Warranty"] {
        font-size: 10px !important;
        padding: 1px 5px !important;
      }

      /* Buttons */
      .product-actions {
        gap: 5px !important;
        flex-wrap: wrap !important;
      }

      .btn-cart {
        font-size: 11.5px !important;
        padding: 7px 10px !important;
        flex: 1 !important;
      }

      .btn-buy {
        font-size: 11.5px !important;
        padding: 7px 10px !important;
      }

      /* Keep optional compare and price-alert controls out of compact mobile cards. */
      .product-card-compare-btn,
      .product-card-compare-btn+button {
        display: none !important;
      }

      /* Badge positioning */
      .product-badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
        top: 5px !important;
        left: 5px !important;
      }

      /* Out of stock */
      .out-of-stock-overlay {
        font-size: 10px !important;
        letter-spacing: 0 !important;
      }
    }


    /* ================================================================
   ANIMATED HAMBURGER BUTTON
================================================================ */
    .hamburger {
      display: none;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 5px;
      width: 40px;
      height: 40px;
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px;
      border-radius: 8px;
      transition: background .2s;
      position: relative;
      z-index: 1001;
    }

    .hamburger:hover {
      background: var(--blue-light);
    }

    .hamburger:active {
      transform: scale(.93);
    }

    .hb-line {
      display: block;
      width: 24px;
      height: 2.5px;
      background: var(--text);
      border-radius: 4px;
      transition:
        transform 0.35s cubic-bezier(.23, 1, .32, 1),
        opacity 0.25s ease,
        width 0.3s ease;
      transform-origin: center;
    }

    /* Line 1 — top */
    .hb-line-1 {
      transform-origin: center;
    }

    /* Line 2 — middle */
    .hb-line-2 {
      width: 18px;
    }

    /* Line 3 — bottom */
    .hb-line-3 {
      transform-origin: center;
    }

    /* OPEN STATE — X shape */
    .hamburger.is-open .hb-line-1 {
      transform: translateY(7.5px) rotate(45deg);
      width: 24px;
    }

    .hamburger.is-open .hb-line-2 {
      opacity: 0;
      transform: scaleX(0);
    }

    .hamburger.is-open .hb-line-3 {
      transform: translateY(-7.5px) rotate(-45deg);
      width: 24px;
    }

    @media (max-width: 1024px) {
      .hamburger {
        display: flex !important;
      }
    }


    /* ================================================================
   LOYALTY POINTS SYSTEM CSS
================================================================ */
    /* Navbar points badge */
    #loyalty-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: linear-gradient(135deg, #f59e0b, #d97706);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 20px;
      margin-left: 4px;
      white-space: nowrap;
      box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
      cursor: pointer;
      transition: transform 0.15s;
    }

    #loyalty-badge:hover {
      transform: scale(1.05);
    }

    /* Loyalty card in profile */
    .loyalty-card {
      background: linear-gradient(135deg, #1e3a8a, #1a56db);
      color: #fff;
      border-radius: 16px;
      padding: 20px;
      margin: 12px 0;
      position: relative;
      overflow: hidden;
    }

    .loyalty-card::before {
      content: '';
      position: absolute;
      top: -30px;
      right: -30px;
      width: 120px;
      height: 120px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.08);
    }

    .loyalty-tier-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 700;
      margin-bottom: 10px;
    }

    .tier-bronze {
      background: #cd7f32;
      color: #fff;
    }

    .tier-silver {
      background: #9ca3af;
      color: #fff;
    }

    .tier-gold {
      background: #f59e0b;
      color: #fff;
    }

    .tier-platinum {
      background: #7c3aed;
      color: #fff;
    }

    .loyalty-progress-bar {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 10px;
      height: 8px;
      margin: 10px 0 4px;
      overflow: hidden;
    }

    .loyalty-progress-fill {
      height: 100%;
      border-radius: 10px;
      background: linear-gradient(90deg, #fbbf24, #f59e0b);
      transition: width 0.5s ease;
    }

    .loyalty-history-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    .loyalty-history-table th {
      background: #f8fafc;
      padding: 10px 12px;
      text-align: left;
      font-size: 11px;
      font-weight: 700;
      color: #6b7280;
      text-transform: uppercase;
      border-bottom: 2px solid #e5e7eb;
    }

    .loyalty-history-table td {
      padding: 10px 12px;
      border-bottom: 1px solid #f3f4f6;
      vertical-align: middle;
    }

    .pts-earned {
      color: #059669;
      font-weight: 700;
    }

    .pts-redeemed {
      color: #dc2626;
      font-weight: 700;
    }

    .pts-bonus {
      color: #7c3aed;
      font-weight: 700;
    }

    /* Checkout points section */
    .loyalty-checkout-box {
      background: linear-gradient(135deg, #eff6ff, #dbeafe);
      border: 1.5px solid #93c5fd;
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 14px;
    }

    .points-redeem-input {
      display: flex;
      gap: 8px;
      align-items: center;
      margin-top: 8px;
    }

    .points-redeem-input input {
      flex: 1;
      padding: 9px 12px;
      border: 1.5px solid #93c5fd;
      border-radius: 8px;
      font-size: 14px;
      font-family: var(--font);
      outline: none;
    }

    .points-redeem-input input:focus {
      border-color: #1a56db;
    }

    .btn-apply-points {
      padding: 9px 16px;
      background: #1a56db;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      font-family: var(--font);
      white-space: nowrap;
    }

    .btn-apply-points:hover {
      background: #1e40af;
    }


    /* ================================================================
   LUCKY DRAW STYLES
================================================================ */
    .lucky-draw-card {
      background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
      border-radius: 16px;
      padding: 22px;
      color: #fff;
      margin-top: 16px;
      position: relative;
      overflow: hidden;
    }

    .lucky-draw-card::before {
      content: '🎰';
      position: absolute;
      right: -10px;
      top: -10px;
      font-size: 80px;
      opacity: 0.08;
    }

    .lucky-draw-title {
      font-size: 18px;
      font-weight: 800;
      margin-bottom: 4px;
      letter-spacing: 0.3px;
    }

    .lucky-draw-subtitle {
      font-size: 12px;
      opacity: 0.75;
      margin-bottom: 16px;
    }

    .lucky-countdown {
      display: flex;
      gap: 10px;
      margin: 14px 0;
      justify-content: center;
    }

    .lucky-count-block {
      background: rgba(255, 255, 255, 0.15);
      border-radius: 10px;
      padding: 10px 14px;
      text-align: center;
      min-width: 60px;
      animation: luckyPulse 2s ease-in-out infinite;
    }

    .lucky-count-num {
      font-size: 22px;
      font-weight: 800;
      color: #fcd34d;
      display: block;
      line-height: 1;
    }

    .lucky-count-lbl {
      font-size: 10px;
      opacity: 0.7;
      margin-top: 2px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    @keyframes luckyPulse {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.03);
      }
    }

    .lucky-entry-btn {
      width: 100%;
      padding: 13px;
      background: linear-gradient(90deg, #f59e0b, #d97706);
      color: #1c1917;
      border: none;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 800;
      cursor: pointer;
      font-family: var(--font);
      margin-top: 14px;
      transition: opacity 0.2s;
    }

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

    .lucky-entry-btn:not(:disabled):hover {
      opacity: 0.88;
    }

    .lucky-info-row {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      padding: 7px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .lucky-info-row:last-child {
      border-bottom: none;
    }

    .lucky-entered-badge {
      background: #10b981;
      color: #fff;
      padding: 6px 14px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 700;
      display: inline-block;
      margin-top: 10px;
    }

    .lucky-winner-box {
      background: linear-gradient(90deg, #f59e0b22, #fcd34d22);
      border: 1.5px solid #f59e0b;
      border-radius: 10px;
      padding: 10px 14px;
      margin-top: 14px;
      text-align: center;
      font-size: 13px;
    }

    .lucky-entries-list {
      background: rgba(255, 255, 255, 0.08);
      border-radius: 10px;
      padding: 10px 14px;
      margin-top: 12px;
      font-size: 12.5px;
      max-height: 120px;
      overflow-y: auto;
    }

    /* Admin Lucky Draw */
    .luckydraw-admin-card {
      background: linear-gradient(135deg, #1e1b4b, #312e81);
      border-radius: 12px;
      padding: 20px;
      color: #fff;
      margin-bottom: 20px;
    }

    .admin-lucky-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    .admin-lucky-table th {
      background: #f9fafb;
      padding: 10px 14px;
      text-align: left;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      color: #6b7280;
      border-bottom: 2px solid #e5e7eb;
    }

    .admin-lucky-table td {
      padding: 11px 14px;
      border-bottom: 1px solid #f3f4f6;
      color: #374151;
    }

    /* Points earn info on product cards */
    .pts-earn-label {
      font-size: 11.5px;
      color: #92400e;
      background: #fef3c7;
      border-radius: 5px;
      padding: 2px 7px;
      display: inline-block;
      margin-top: 4px;
      font-weight: 600;
    }

    /* Admin loyalty tab */
    .loyalty-stat-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
      margin-bottom: 20px;
    }

    .loyalty-stat-card {
      background: #fff;
      border-radius: 12px;
      padding: 16px;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
      text-align: center;
    }

    .loyalty-stat-num {
      font-size: 24px;
      font-weight: 800;
      color: #1a56db;
    }

    .loyalty-stat-lbl {
      font-size: 12px;
      color: #6b7280;
      margin-top: 2px;
    }

    .loyalty-top-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    /* Loyalty badge in navbar */
    #loyalty-badge {
      display: none;
      cursor: pointer;
      background: #f59e0b;
      color: #fff;
      font-size: 11.5px;
      font-weight: 700;
      padding: 4px 10px;
      border-radius: 20px;
      align-items: center;
      gap: 3px;
      white-space: nowrap;
      transition: opacity 0.2s;
    }

    #loyalty-badge:hover {
      opacity: 0.85;
    }

    .loyalty-top-table th {
      background: #f8fafc;
      padding: 10px 14px;
      text-align: left;
      font-size: 11px;
      font-weight: 700;
      color: #6b7280;
      border-bottom: 2px solid #e5e7eb;
    }

    .loyalty-top-table td {
      padding: 11px 14px;
      border-bottom: 1px solid #f3f4f6;
    }

    .manual-pts-form {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
      margin-top: 14px;
      background: #f8fafc;
      padding: 14px;
      border-radius: 10px;
    }

    .manual-pts-form input,
    .manual-pts-form select {
      padding: 8px 12px;
      border: 1.5px solid #e5e7eb;
      border-radius: 8px;
      font-size: 13px;
      font-family: var(--font);
      outline: none;
    }

    .manual-pts-form input:focus,
    .manual-pts-form select:focus {
      border-color: #1a56db;
    }

    @media(max-width:600px) {
      .loyalty-stat-row {
        grid-template-columns: 1fr 1fr;
      }
    }

/* Optional product-card summary. The element is not rendered when empty. */
.product-short-description {
  margin: 5px 0 8px;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================================================================
   TARGETED PRODUCT DETAIL DATA LAYOUT
   Keeps card thumbnails out of the detail page and renders only
   selected-variant imagery and admin-created specification data.
================================================================ */
.product-detail-page .detail-top {
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  gap: 32px;
}

.product-detail-page .detail-img-gallery {
  min-width: 0;
}

.product-detail-page .detail-main-img {
  display: block;
  min-height: 320px;
  max-height: 460px;
  margin-inline: auto;
  object-fit: contain;
}

.product-detail-page .detail-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  margin: -4px 0 14px;
  color: var(--text-muted);
  font-size: 13px;
}

.product-detail-page .detail-rating-row[hidden] {
  display: none;
}

.product-detail-page .detail-rating-stars {
  color: #f59e0b;
  font-size: 16px;
  letter-spacing: 1px;
  line-height: 1;
}

.product-detail-page .detail-rating-row strong {
  color: var(--text);
  font-weight: 800;
}

.product-detail-page .detail-price-row {
  margin-top: 0;
}

.product-detail-page .detail-stock-wrap {
  display: flex;
  align-items: center;
  gap: 10px 12px;
  flex-wrap: wrap;
  padding-top: 16px;
}

.product-detail-page .detail-stock-badge,
.product-detail-page .detail-stock-qty-msg {
  margin: 0;
}

.product-detail-page .detail-stock-qty-msg {
  font-size: 13px;
}

.product-detail-page .detail-desc[hidden] {
  display: none;
}

.product-detail-page .variant-section[hidden] {
  display: none;
}

.product-detail-page .csw-card {
  appearance: none;
  width: 104px;
  min-height: 126px;
  font-family: var(--font);
  color: var(--text);
}

.product-detail-page .csw-card:focus-visible,
.product-detail-page .storage-pill:focus-visible {
  outline: 3px solid rgba(26, 86, 219, .25);
  outline-offset: 2px;
}

.product-detail-page .csw-card.oos,
.product-detail-page .csw-card:disabled,
.product-detail-page .storage-pill:disabled {
  opacity: .52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.product-detail-page .csw-card:disabled:hover {
  border-color: #e5e7eb;
  box-shadow: none;
}

.product-detail-page .csw-label {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.product-detail-page .csw-oos {
  color: var(--danger);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
}

.product-detail-page .variant-option-x {
  margin-right: 4px;
  color: var(--danger);
  font-weight: 900;
}

.product-detail-page .btn-disabled,
.product-detail-page .detail-actions button:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.product-detail-page .detail-product-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.product-detail-page .quick-specs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-detail-page .quick-spec-val {
  overflow-wrap: anywhere;
}

.product-detail-page .specs-section {
  overflow: visible;
}

.product-detail-page .specs-header {
  border-radius: 20px 20px 0 0;
}

.product-detail-page .specs-grid {
  position: relative;
  padding: 18px;
  background: #f7f9fc;
  transition: max-height .25s ease;
}

.product-detail-page .spec-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.product-detail-page .spec-columns.is-single-column {
  grid-template-columns: minmax(0, 1fr);
}

.product-detail-page .spec-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.product-detail-page .specs-grid.is-collapsed {
  max-height: 760px;
  overflow: hidden;
}

.product-detail-page .specs-grid.is-collapsed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(247, 249, 252, 0), #f7f9fc 88%);
}

.product-detail-page .specs-group-card {
  width: 100%;
  height: auto;
  min-height: 0;
  align-self: start;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 1px 5px rgba(15, 23, 42, .04);
}

.product-detail-page .specs-group-title {
  margin: 0;
  padding: 12px 16px;
  color: var(--blue-dark);
  background: var(--blue-light);
  border: 0;
  font-size: 12px;
  line-height: 1.35;
}

.product-detail-page .specs-group-rows {
  min-width: 0;
}

.product-detail-page .specs-row {
  display: grid;
  grid-template-columns: minmax(110px, 40%) minmax(0, 1fr);
  gap: 14px;
  padding: 11px 16px;
}

.product-detail-page .specs-key,
.product-detail-page .specs-val {
  width: auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-detail-page .specs-toggle-wrap {
  border-radius: 0 0 20px 20px;
}

@media (max-width: 1024px) {
  .product-detail-page .detail-top {
    grid-template-columns: minmax(0, 43%) minmax(0, 1fr);
    gap: 22px;
  }

  .product-detail-page .detail-main-img {
    min-height: 280px;
  }

  .product-detail-page .specs-row {
    grid-template-columns: minmax(100px, 42%) minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .product-detail-page .detail-top {
    grid-template-columns: 1fr;
  }

  .product-detail-page .detail-main-img {
    min-height: 260px;
    max-height: 360px;
  }

  .product-detail-page .quick-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-detail-page .specs-grid {
    padding: 14px;
  }

  .product-detail-page .spec-columns,
  .product-detail-page .spec-columns.is-single-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .product-detail-page .spec-column {
    display: contents;
  }

  .product-detail-page .specs-group-card {
    order: var(--spec-mobile-order, 0);
  }

  .product-detail-page .specs-grid.is-collapsed {
    max-height: 900px;
  }
}

@media (max-width: 480px) {
  .product-detail-page .detail-main-img {
    min-height: 220px;
    max-height: 300px;
  }

  .product-detail-page .detail-rating-row {
    flex-wrap: wrap;
    margin-bottom: 10px;
  }

  .product-detail-page .detail-price-row {
    gap: 8px;
  }

  .product-detail-page .detail-price {
    width: 100%;
  }

  .product-detail-page .detail-stock-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-detail-page .color-swatches {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .product-detail-page .csw-card {
    width: 100%;
    min-width: 0;
    min-height: 116px;
    padding-inline: 5px;
  }

  .product-detail-page .csw-img-wrap,
  .product-detail-page .csw-img {
    width: 58px;
    height: 58px;
  }

  .product-detail-page .storage-pills {
    gap: 7px;
  }

  .product-detail-page .storage-pill {
    padding: 8px 13px;
    font-size: 12px;
  }

  .product-detail-page .specs-row {
    grid-template-columns: minmax(92px, 40%) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
  }

  .product-detail-page .specs-group-title {
    padding: 10px 12px;
  }
}

@media (max-width: 340px) {
  .product-detail-page .color-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-detail-page .specs-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .product-detail-page .specs-key {
    font-weight: 700;
  }
}


/* Add/Edit product save validation states */
#admin-product-form .ep-field-invalid {
  border-color: var(--danger, #dc2626) !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08);
}
#admin-product-form .ep-field-error {
  margin-top: 4px;
  color: var(--danger, #dc2626);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
#ep-save-product-btn:disabled {
  cursor: not-allowed;
  opacity: .72;
}

/* ================================================================
   TARGETED COLOR + CONFIGURATION VARIANT UI
================================================================ */
.product-detail-page .configuration-pills {
  align-items: stretch;
}

.product-detail-page .configuration-pill {
  min-height: 44px;
  min-width: 132px;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 12px;
  white-space: normal;
  text-align: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.25;
}

.product-detail-page .configuration-label {
  overflow-wrap: anywhere;
}

.product-detail-page .configuration-sold-out {
  display: block;
  color: var(--danger);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.product-detail-page .configuration-pill.oos {
  text-decoration: none;
}

.ep-variant-color-group {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fbfbfd;
}

.ep-variant-color-header {
  display: grid;
  grid-template-columns: minmax(145px, .8fr) minmax(190px, 1.25fr) minmax(125px, .65fr) minmax(120px, .6fr) auto auto;
  gap: 8px;
  align-items: end;
}

.ep-color-stock-helper {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.ep-variant-field {
  min-width: 0;
}

.ep-variant-field label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.ep-variant-field input,
.ep-variant-field select {
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 6px 8px;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
}

.ep-preview-variant-image,
.ep-add-configuration {
  min-height: 36px;
  border: 1.5px solid #bfdbfe;
  border-radius: 8px;
  padding: 6px 10px;
  background: #eff6ff;
  color: var(--blue);
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.ep-delete-color,
.ep-delete-configuration {
  width: 34px;
  min-width: 34px;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.ep-config-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 7px;
  color: var(--text);
  font-size: 12px;
}

.ep-config-list {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.ep-config-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "storage ram selling original"
    "sku sku sku remove";
  gap: 12px;
  align-items: end;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 9px;
  margin-bottom: 7px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #fff;
}

.ep-config-row > * {
  min-width: 0;
  max-width: 100%;
}

.ep-config-row > .ep-variant-field:nth-child(1) { grid-area: storage; }
.ep-config-row > .ep-variant-field:nth-child(2) { grid-area: ram; }
.ep-config-row > .ep-variant-field:nth-child(3) { grid-area: selling; }
.ep-config-row > .ep-variant-field:nth-child(4) { grid-area: original; }
.ep-config-row > .ep-variant-field:nth-child(5) { grid-area: sku; }
.ep-config-row > .ep-delete-configuration { grid-area: remove; }

.ep-config-row .ep-variant-field label {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.ep-config-row input,
.ep-config-row select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ep-config-row .vc-sku {
  text-overflow: ellipsis;
}

.ep-config-row .ep-delete-configuration {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  justify-self: end;
}

.ep-legacy-variant-warning {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.45;
}

@media (max-width: 1024px) {
  .ep-config-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "storage ram"
      "selling original"
      "sku sku"
      "remove remove";
  }

  .ep-config-row .ep-delete-configuration {
    justify-self: end;
  }
}

@media (max-width: 640px) {
  .product-detail-page .configuration-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .product-detail-page .configuration-pill {
    width: 100%;
    min-width: 0;
  }
  .ep-variant-color-header {
    grid-template-columns: 1fr auto;
  }
  .ep-variant-color-name-field,
  .ep-variant-image-field,
  .ep-variant-color-stock-field,
  .ep-variant-color-status-field {
    grid-column: 1 / -1;
  }
  .ep-config-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "storage"
      "ram"
      "selling"
      "original"
      "sku"
      "remove";
  }

  .ep-config-row .ep-delete-configuration {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }
}

@media (max-width: 360px) {
  .product-detail-page .configuration-pills {
    grid-template-columns: 1fr;
  }
}

/* Admin auto-generated SKU controls */
.ep-auto-sku-control {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}
.ep-auto-sku-control .form-input {
  min-width: 0;
  flex: 1 1 auto;
}
.ep-auto-sku-input[readonly] {
  background: #f8fafc;
  color: var(--text, #111827);
  cursor: text;
  opacity: 1;
}
.ep-auto-sku-helper,
.ep-config-sku-helper {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.35;
  white-space: normal;
}
@media (max-width: 640px) {
  .ep-auto-sku-control {
    flex-direction: column;
  }
}

/* ================================================================
   ADMIN PRODUCT IMPORT
================================================================ */
body.import-modal-open {
  overflow: hidden;
}

.import-product-modal [hidden] {
  display: none !important;
}

.import-product-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100020;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, .72);
}

.import-product-modal {
  width: min(1000px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

.import-product-header,
.import-product-footer {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}

.import-product-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #1a56db);
}

.import-product-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
}

.import-product-header p {
  margin: 4px 0 0;
  font-size: 12px;
  opacity: .84;
}

.import-icon-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.import-icon-btn:focus-visible,
.import-assisted-toggle:focus-visible,
.import-product-modal button:focus-visible,
.import-product-modal input:focus-visible,
.import-product-modal textarea:focus-visible,
.import-product-modal a:focus-visible,
.import-preview:focus-visible,
.import-status:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}

.import-product-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 18px 22px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.import-section {
  min-width: 0;
}

.import-section + .import-section,
.import-preview,
.import-assisted-disclosure {
  margin-top: 16px;
}

.import-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.import-section-heading h3,
.import-preview-title-row h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.import-section-heading p,
.import-preview-title-row p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
}

.import-step-number {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.import-field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.import-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: stretch;
}

.import-url-row > * {
  min-width: 0;
}

.import-primary-action,
#import-extract-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.import-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: import-spin .75s linear infinite;
}

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

.import-helper,
.import-assisted-head p,
.import-preview-head p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.import-url-validation {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 750;
}

.import-url-validation.is-valid { color: #475569; }
.import-url-validation.is-invalid { color: #b91c1c; }

.import-status-section {
  min-height: 0;
}

.import-status {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.45;
}

.import-status.is-loading,
.import-status.is-neutral { color: #334155; background: #f1f5f9; }
.import-status.is-info { color: #1e40af; background: #eff6ff; }
.import-status.is-success { color: #047857; background: #ecfdf5; }
.import-status.is-warning { color: #92400e; background: #fffbeb; }
.import-status.is-error { color: #b91c1c; background: #fef2f2; }

.import-preview {
  min-width: 0;
  padding: 15px;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  background: #fbfbfd;
}

.import-preview-title-row {
  margin-bottom: 12px;
}

.import-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

#import-preview-image {
  width: 130px;
  height: 130px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.import-preview-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.import-preview-field {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}

.import-preview-field span {
  display: block;
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.import-preview-field strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
}

.import-preview-warnings {
  margin-top: 11px;
}

.import-preview-warnings p,
.import-legal-warning {
  margin: 5px 0;
  color: #92400e;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.45;
}

.import-duplicate-box {
  margin-top: 12px;
  padding: 11px;
  border: 1.5px solid #f59e0b;
  border-radius: 10px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 700;
}

.import-duplicate-box p { margin: 0 0 9px; }
.import-duplicate-actions { display: flex; gap: 8px; flex-wrap: wrap; }


.import-assisted-disclosure {
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.import-assisted-toggle {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  color: var(--blue);
  background: #f8fafc;
  font: inherit;
  font-size: 12.5px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.import-disclosure-icon {
  font-size: 18px;
  transition: transform .18s ease;
}

.import-assisted-toggle[aria-expanded="true"] .import-disclosure-icon {
  transform: rotate(180deg);
}

.import-assisted-panel {
  min-width: 0;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: #fbfbfd;
}

.import-assisted-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.import-assisted-head strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.import-source-data {
  width: 100%;
  min-height: 180px;
  max-height: 360px;
  resize: vertical;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.45;
}

.import-product-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 16px;
  border-top: 1.5px solid var(--border);
  background: #fff;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, .05);
}

.import-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 768px) {
  .import-product-modal {
    width: min(100%, 760px);
    max-height: 94vh;
  }
  .import-url-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .import-url-row input {
    grid-column: 1 / -1;
  }
  .import-preview-head {
    grid-template-columns: 1fr;
  }
  #import-preview-image {
    width: 100%;
    height: 170px;
  }
}

@media (max-width: 480px) {
  .import-product-overlay {
    padding: 0;
    align-items: stretch;
  }
  .import-product-modal {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }
  .import-product-header,
  .import-product-body,
  .import-product-footer {
    padding-left: 14px;
    padding-right: 14px;
  }
  .import-url-row,
  .import-preview-fields {
    grid-template-columns: 1fr;
  }
  .import-url-row input {
    grid-column: auto;
  }
  .import-url-row button,
  .import-product-footer button,
  #import-extract-btn {
    min-height: 44px;
    width: 100%;
  }
  .import-assisted-head {
    flex-direction: column;
  }
  .import-assisted-head .btn-outline {
    width: 100%;
    min-height: 44px;
    text-align: center;
  }
  .import-product-footer {
    flex-wrap: wrap;
  }
}



/* Home-page placement controls in the shared Add/Edit Product form. */
.ep-home-visibility-grid {
  min-width: 0;
}

@media (max-width: 600px) {
  .ep-home-visibility-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ================================================================
   UI POLISH — SPACING, CARD RHYTHM & PRODUCT DETAIL PAGE
   CSS-only refinement. Scoped overrides preserve existing markup and logic.
================================================================ */

/* A slightly calmer spacing rhythm across the existing storefront. */
.section {
  padding-block: clamp(48px, 6vw, 72px);
}

.section-title {
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: clamp(24px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: -.025em;
}

.categories-grid,
.products-grid,
.features-grid {
  gap: clamp(14px, 2vw, 24px);
}

.category-card,
.product-card,
.feature-card {
  border-color: rgba(148, 163, 184, .28);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .045);
}

.category-card {
  padding: 28px 18px 22px;
}

.product-card .product-info {
  padding: 18px;
}

.product-card .product-actions {
  gap: 10px;
}

.product-card .btn-cart,
.product-card .btn-buy {
  min-height: 40px;
  border-radius: 10px;
}

.feature-card {
  padding: 30px 22px;
}

.btn-blue,
.btn-orange,
.btn-outline {
  min-height: 42px;
  justify-content: center;
  border-radius: 11px;
}

.btn-blue:focus-visible,
.btn-orange:focus-visible,
.btn-outline:focus-visible {
  outline: 3px solid rgba(26, 86, 219, .22);
  outline-offset: 3px;
}

/* Product-detail design tokens stay local to this page. */
#page-product-detail {
  --detail-border: rgba(148, 163, 184, .24);
  --detail-border-strong: rgba(148, 163, 184, .36);
  --detail-surface: #ffffff;
  --detail-soft: #f8fafc;
  --detail-blue-soft: #f4f8ff;
  --detail-shadow: 0 10px 32px rgba(15, 23, 42, .065), 0 2px 8px rgba(15, 23, 42, .035);
  --detail-shadow-hover: 0 15px 38px rgba(15, 23, 42, .09), 0 4px 12px rgba(15, 23, 42, .045);
  background:
    radial-gradient(circle at 8% 4%, rgba(26, 86, 219, .055), transparent 28rem),
    linear-gradient(180deg, #f8faff 0, var(--bg) 34rem);
}

#page-product-detail .product-detail-page {
  width: min(100%, 1280px);
  max-width: 1280px;
  padding: clamp(28px, 4vw, 48px) clamp(18px, 3.5vw, 42px) clamp(72px, 8vw, 108px);
}

/* Breadcrumb is visually separated from the main cards. */
#page-product-detail .detail-breadcrumb {
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  margin: 0 0 clamp(22px, 3vw, 32px);
  padding: 10px 14px;
  gap: 9px;
  border: 1px solid var(--detail-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
  backdrop-filter: blur(8px);
  line-height: 1.35;
}

#page-product-detail .detail-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

#page-product-detail .detail-top {
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 38px);
  margin-bottom: clamp(28px, 4vw, 44px);
}

#page-product-detail .detail-img-gallery,
#page-product-detail .detail-info {
  border: 1px solid var(--detail-border);
  border-radius: 24px;
  background: var(--detail-surface);
  box-shadow: var(--detail-shadow);
}

#page-product-detail .detail-img-gallery {
  min-height: 520px;
  padding: clamp(28px, 3.6vw, 44px) clamp(22px, 3vw, 36px) 26px;
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

#page-product-detail .detail-img-gallery::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 20px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(219, 234, 254, .58), rgba(248, 250, 252, .35) 52%, transparent 74%);
  pointer-events: none;
}

#page-product-detail .detail-main-img {
  width: min(100%, 470px);
  min-height: 360px;
  max-height: 470px;
  margin: 0 auto 22px;
  padding: 10px;
  border-radius: 18px;
  object-fit: contain;
}

#page-product-detail #detail-badge-row {
  width: 100%;
  margin-top: auto;
  padding-top: 4px;
}

#page-product-detail .detail-product-badge,
#page-product-detail #detail-badge-row > * {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .06);
}

#page-product-detail .detail-info {
  padding: clamp(28px, 3.3vw, 42px);
}

#page-product-detail .detail-category-badge {
  margin-bottom: 15px;
  padding: 6px 13px;
  border: 1px solid rgba(26, 86, 219, .16);
  line-height: 1.2;
}

#page-product-detail .detail-name {
  max-width: 26ch;
  margin: 0 0 16px;
  font-size: clamp(24px, 2.3vw, 31px);
  line-height: 1.24;
  letter-spacing: -.035em;
}

#page-product-detail .detail-rating-row {
  min-height: 24px;
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--detail-border);
}

/* Price, stock and variants read as clear visual groups. */
#page-product-detail .detail-price-row {
  min-height: 84px;
  margin: 0;
  padding: 18px 20px;
  gap: 10px 14px;
  border: 1px solid rgba(26, 86, 219, .16);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--detail-blue-soft), #fbfdff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

#page-product-detail .detail-price {
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -.035em;
}

#page-product-detail .detail-original {
  font-size: 15px;
}

#page-product-detail .detail-discount {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
}

#page-product-detail .detail-stock-wrap {
  min-height: 54px;
  margin-top: 14px;
  padding: 12px 14px;
  gap: 8px 12px;
  border: 1px solid var(--detail-border);
  border-radius: 14px;
  background: var(--detail-soft);
}

#page-product-detail .detail-stock-badge {
  min-height: 32px;
  padding: 7px 13px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55);
}

#page-product-detail .detail-stock-qty-msg {
  line-height: 1.4;
}

#page-product-detail .detail-desc {
  margin: 20px 0 0;
  padding: 0 2px 22px;
  border-bottom: 1px solid var(--detail-border);
  color: #5f6b7c;
  line-height: 1.8;
}

#page-product-detail #detail-variant-wrap {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--detail-border);
  border-radius: 18px;
  background: var(--detail-soft);
}

#page-product-detail .variant-section {
  margin: 0;
}

#page-product-detail .variant-section + .variant-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--detail-border);
}

#page-product-detail .variant-label {
  margin-bottom: 13px;
  color: #526074;
  font-size: 12px;
}

#page-product-detail .color-swatches {
  gap: 12px;
}

#page-product-detail .color-swatch-card,
#page-product-detail .csw-card {
  border-color: var(--detail-border-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, .04);
}

#page-product-detail .color-swatch-card:hover,
#page-product-detail .csw-card:hover {
  box-shadow: 0 8px 18px rgba(26, 86, 219, .12);
}

#page-product-detail .color-swatch-card.active,
#page-product-detail .csw-card.active {
  background: #f2f7ff;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .12), 0 7px 16px rgba(26, 86, 219, .1);
}

#page-product-detail .storage-pills {
  gap: 10px;
}

#page-product-detail .storage-pill,
#page-product-detail .configuration-pill {
  min-height: 44px;
  padding: 10px 16px;
  border-color: var(--detail-border-strong);
  border-radius: 12px;
  background: #fff;
  line-height: 1.25;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .035);
}

#page-product-detail .storage-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(26, 86, 219, .09);
}

#page-product-detail .storage-pill.active,
#page-product-detail .configuration-pill.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(26, 86, 219, .22);
}

#page-product-detail .variant-error {
  margin: 16px 0 0;
  padding: 11px 13px;
  border-radius: 11px;
}

#page-product-detail .detail-actions {
  margin-top: 22px;
  gap: 12px;
}

#page-product-detail .detail-actions .btn-cart-lg,
#page-product-detail .detail-actions .btn-buy-lg {
  min-height: 54px;
  padding: 15px 20px;
  border-radius: 14px;
  font-size: 15px;
  letter-spacing: .005em;
}

#page-product-detail .detail-actions .btn-cart-lg:focus-visible,
#page-product-detail .detail-actions .btn-buy-lg:focus-visible,
#page-product-detail #detail-alert-btn:focus-visible,
#page-product-detail .btn-specs-toggle:focus-visible {
  outline: 3px solid rgba(26, 86, 219, .23);
  outline-offset: 3px;
}

/* Inline attributes are intentionally overridden only for visual styling. */
#page-product-detail #detail-alert-btn {
  min-height: 50px;
  margin-top: 12px !important;
  padding: 13px 18px !important;
  border-width: 1.5px !important;
  border-radius: 14px !important;
  background: #f8fbff !important;
  box-shadow: 0 2px 8px rgba(26, 86, 219, .055);
}

#page-product-detail #detail-alert-btn:hover {
  background: var(--blue-light) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26, 86, 219, .11);
}

/* PTA, service highlights and quick specs become separate breathing sections. */
#page-product-detail .pta-banner {
  margin: 0 0 clamp(24px, 3vw, 32px);
  padding: 20px 24px;
  gap: 18px;
  border-color: rgba(22, 163, 74, .24);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(22, 101, 52, .055);
}

#page-product-detail .pta-banner-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 2px 8px rgba(22, 101, 52, .07);
}

#page-product-detail .pta-banner-text h5 {
  margin-bottom: 5px;
  font-size: 15px;
}

#page-product-detail .trust-badges {
  gap: clamp(12px, 2vw, 18px);
  margin: 0 0 clamp(26px, 3vw, 36px);
}

#page-product-detail .trust-badge {
  min-height: 164px;
  padding: 24px 16px 20px;
  border-color: var(--detail-border);
  border-radius: 18px;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .045);
}

#page-product-detail .trust-badge:hover {
  box-shadow: var(--detail-shadow-hover);
}

#page-product-detail .trust-badge-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--detail-blue-soft);
  font-size: 25px;
}

#page-product-detail .trust-badge h5 {
  margin-bottom: 6px;
  font-size: 14px;
}

#page-product-detail .trust-badge p {
  font-size: 12px;
  line-height: 1.5;
}

#page-product-detail .quick-specs {
  gap: 12px;
  margin: 0 0 clamp(28px, 3vw, 38px);
  padding: 16px;
  overflow: visible;
  border: 1px solid var(--detail-border);
  border-radius: 22px;
  background: var(--detail-surface);
  box-shadow: var(--detail-shadow);
}

#page-product-detail .quick-spec-item {
  min-width: 0;
  min-height: 148px;
  padding: 22px 14px 19px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 15px;
  background: var(--detail-soft);
}

#page-product-detail .quick-spec-item:hover {
  background: var(--detail-blue-soft);
  border-color: rgba(26, 86, 219, .2);
}

#page-product-detail .quick-spec-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  border: 1px solid rgba(26, 86, 219, .1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(26, 86, 219, .065);
}

#page-product-detail .quick-spec-val {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

#page-product-detail .quick-spec-label {
  font-size: 12px;
  line-height: 1.4;
}

/* Specification groups remain data-driven but read like individual cards. */
#page-product-detail .specs-section {
  margin: 0 0 30px;
  overflow: hidden;
  border: 1px solid var(--detail-border);
  border-radius: 22px;
  background: var(--detail-surface);
  box-shadow: var(--detail-shadow);
}

#page-product-detail .specs-header {
  min-height: 66px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--detail-border);
  border-radius: 0;
  background: linear-gradient(180deg, #fff, #fbfcfe);
  font-size: 19px;
  letter-spacing: -.015em;
}

#page-product-detail .specs-header i {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-light);
}

#page-product-detail .specs-grid {
  padding: clamp(16px, 2.3vw, 24px);
  background: #f6f8fc;
}

#page-product-detail .spec-columns,
#page-product-detail .spec-column {
  gap: clamp(14px, 1.8vw, 20px);
}

#page-product-detail .specs-group-card {
  border-color: var(--detail-border);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .045);
}

#page-product-detail .specs-group-card:hover {
  border-color: rgba(26, 86, 219, .2);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

#page-product-detail .specs-group-title {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(26, 86, 219, .1);
  background: linear-gradient(135deg, #edf4ff, #f7faff);
  color: var(--blue-dark);
  font-size: 12.5px;
  letter-spacing: .065em;
}

#page-product-detail .specs-row {
  grid-template-columns: minmax(120px, 40%) minmax(0, 1fr);
  gap: 16px;
  padding: 13px 18px;
  border-bottom-color: rgba(148, 163, 184, .17);
  line-height: 1.5;
}

#page-product-detail .specs-row:nth-child(even) {
  background: #fcfdff;
}

#page-product-detail .specs-row:hover {
  background: #f4f8ff;
}

#page-product-detail .specs-key {
  color: #64748b;
  font-weight: 600;
}

#page-product-detail .specs-val {
  color: #1f2937;
  font-weight: 650;
}

#page-product-detail .specs-toggle-wrap {
  padding: 18px;
  border-top-color: var(--detail-border);
  border-radius: 0;
  background: #fff;
}

#page-product-detail .btn-specs-toggle {
  min-width: 150px;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: 12px;
}

#page-product-detail .product-detail-page > div:last-child {
  padding: 4px 0 0 !important;
}

#page-product-detail .product-detail-page > div:last-child .btn-outline {
  min-width: 164px;
  min-height: 46px;
  padding: 11px 26px !important;
  border-width: 1.5px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
}

@media (max-width: 1100px) {
  #page-product-detail .product-detail-page {
    padding-inline: 24px;
  }

  #page-product-detail .detail-top {
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    gap: 24px;
  }

  #page-product-detail .detail-img-gallery {
    min-height: 470px;
    padding-inline: 24px;
  }

  #page-product-detail .detail-main-img {
    min-height: 320px;
  }

  #page-product-detail .detail-info {
    padding: 30px;
  }
}

@media (max-width: 900px) {
  #page-product-detail .detail-top {
    grid-template-columns: 1fr;
  }

  #page-product-detail .detail-img-gallery {
    position: static;
    min-height: 440px;
  }

  #page-product-detail .detail-main-img {
    min-height: 300px;
    max-height: 390px;
  }
}

@media (max-width: 768px) {
  .section {
    padding-block: 42px;
  }

  #page-product-detail .product-detail-page {
    padding: 22px 16px 72px;
  }

  #page-product-detail .detail-breadcrumb {
    width: 100%;
    margin-bottom: 20px;
    padding: 9px 12px;
    overflow: hidden;
  }

  #page-product-detail .detail-top {
    gap: 18px;
    margin-bottom: 26px;
  }

  #page-product-detail .detail-img-gallery,
  #page-product-detail .detail-info {
    border-radius: 20px;
  }

  #page-product-detail .detail-img-gallery {
    min-height: 390px;
    padding: 26px 20px 20px;
  }

  #page-product-detail .detail-main-img {
    min-height: 270px;
    max-height: 340px;
    margin-bottom: 16px;
  }

  #page-product-detail .detail-info {
    padding: 26px 22px;
  }

  #page-product-detail .detail-name {
    max-width: none;
    font-size: 23px;
  }

  #page-product-detail .detail-price-row {
    min-height: 74px;
    padding: 16px;
  }

  #page-product-detail #detail-variant-wrap {
    padding: 17px;
  }

  #page-product-detail .trust-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-product-detail .quick-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 13px;
  }

  #page-product-detail .quick-spec-item {
    min-height: 138px;
  }

  #page-product-detail .specs-header {
    min-height: 60px;
    padding: 16px 18px;
    font-size: 17px;
  }

  #page-product-detail .specs-grid {
    padding: 14px;
  }

  #page-product-detail .spec-columns,
  #page-product-detail .spec-column {
    gap: 13px;
  }
}

@media (max-width: 540px) {
  .categories-grid,
  .products-grid,
  .features-grid {
    gap: 12px;
  }

  #page-product-detail .product-detail-page {
    padding-inline: 12px;
  }

  #page-product-detail .detail-img-gallery,
  #page-product-detail .detail-info,
  #page-product-detail .quick-specs,
  #page-product-detail .specs-section {
    border-radius: 18px;
  }

  #page-product-detail .detail-img-gallery {
    min-height: 350px;
    padding: 22px 16px 16px;
  }

  #page-product-detail .detail-main-img {
    min-height: 235px;
    max-height: 300px;
    padding: 4px;
  }

  #page-product-detail .detail-info {
    padding: 22px 17px;
  }

  #page-product-detail .detail-category-badge {
    margin-bottom: 12px;
  }

  #page-product-detail .detail-name {
    margin-bottom: 14px;
    font-size: 21px;
  }

  #page-product-detail .detail-price {
    width: 100%;
    font-size: 28px;
  }

  #page-product-detail .detail-stock-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  #page-product-detail #detail-variant-wrap {
    margin-top: 18px;
    padding: 15px;
    border-radius: 15px;
  }

  #page-product-detail .color-swatches {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }

  #page-product-detail .color-swatch-card,
  #page-product-detail .csw-card {
    width: 100%;
    min-width: 0;
  }

  #page-product-detail .storage-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-product-detail .storage-pill,
  #page-product-detail .configuration-pill {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
  }

  #page-product-detail .detail-actions {
    flex-direction: column;
  }

  #page-product-detail .detail-actions .btn-cart-lg,
  #page-product-detail .detail-actions .btn-buy-lg {
    width: 100%;
  }

  #page-product-detail .pta-banner {
    align-items: flex-start;
    padding: 17px;
  }

  #page-product-detail .pta-banner-icon {
    width: 44px;
    height: 44px;
    font-size: 25px;
  }

  #page-product-detail .trust-badge {
    min-height: 154px;
    padding: 20px 12px 17px;
  }

  #page-product-detail .quick-specs {
    gap: 9px;
    padding: 10px;
  }

  #page-product-detail .quick-spec-item {
    min-height: 130px;
    padding: 18px 10px 16px;
  }

  #page-product-detail .quick-spec-icon {
    width: 50px;
    height: 50px;
  }

  #page-product-detail .specs-row {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 12px 14px;
  }

  #page-product-detail .specs-key {
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 750;
  }

  #page-product-detail .specs-val {
    font-size: 13px;
  }

  #page-product-detail .specs-group-title {
    padding: 12px 14px;
  }
}

@media (max-width: 380px) {
  #page-product-detail .color-swatches,
  #page-product-detail .storage-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-product-detail .trust-badges,
  #page-product-detail .quick-specs {
    grid-template-columns: 1fr;
  }

  #page-product-detail .trust-badge,
  #page-product-detail .quick-spec-item {
    min-height: 0;
  }
}

/* ================================================================
   PRODUCT CARD ALIGNMENT — OVERLAY BADGES & STABLE ACTION BASELINE
   CSS-only alignment fix. Existing product rendering and interactions stay intact.
================================================================ */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card .product-img-wrap {
  flex: 0 0 auto;
  height: 190px;
  padding: 44px 18px 14px;
  overflow: hidden;
}

.product-card .product-img-wrap img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 132px;
  object-fit: contain;
  object-position: center;
}

/* Keep the existing HOT / SALE / NEW badge in the upper-left badge lane. */
.product-card .product-badge {
  top: 12px;
  left: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  line-height: 1;
  box-shadow: 0 3px 9px rgba(15, 23, 42, .12);
}

/* Remove the calculated discount badge from price flow and place it opposite the status badge. */
.product-card .price-discount-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, .72);
  line-height: 1;
  box-shadow: 0 3px 9px rgba(5, 150, 105, .2);
  pointer-events: none;
}

.product-card .out-of-stock-overlay {
  z-index: 3;
}

.product-card .product-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.product-card .product-info h3 {
  min-height: calc(2em * 1.4);
  margin-bottom: 6px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.product-card .product-short-description {
  min-height: calc(2em * 1.45);
}

/* The existing PTA / warranty row may wrap, but always retains a stable content lane. */
.product-card .product-info > div:has(> .pta-badge) {
  min-height: 30px;
  align-content: center;
}

/* Auto top margin anchors the complete price + action stack to the card bottom. */
.product-card .product-price {
  flex: 0 0 auto;
  min-height: 48px;
  margin-top: auto;
  margin-bottom: 12px;
  padding-top: 10px;
  align-content: center;
  align-items: baseline;
}

.product-card .price-current,
.product-card .price-original {
  line-height: 1.25;
}

.product-card .product-actions {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.product-card .product-actions .btn-cart,
.product-card .product-actions .btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 42px;
  height: 100%;
  padding: 8px 6px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

@media (max-width: 768px) {
  .product-card .product-img-wrap {
    height: 160px;
    padding: 40px 12px 12px;
  }

  .product-card .product-img-wrap img {
    max-height: 108px;
  }

  .product-card .product-badge,
  .product-card .price-discount-badge {
    top: 10px;
    min-height: 22px;
    padding: 3px 7px;
    font-size: 10px;
  }

  .product-card .product-badge {
    left: 10px;
  }

  .product-card .price-discount-badge {
    right: 10px;
  }

  .product-card .product-price {
    min-height: 44px;
    margin-bottom: 10px;
    padding-top: 8px;
  }

  .product-card .product-actions .btn-cart,
  .product-card .product-actions .btn-buy {
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  .product-card .product-img-wrap {
    height: 142px;
    padding: 36px 9px 10px;
  }

  .product-card .product-img-wrap img {
    max-height: 92px;
  }

  .product-card .product-badge,
  .product-card .price-discount-badge {
    top: 8px;
    min-height: 20px;
    max-width: calc(50% - 14px);
    padding: 3px 6px;
    font-size: 9px;
  }

  .product-card .product-badge {
    left: 8px;
  }

  .product-card .price-discount-badge {
    right: 8px;
  }

  .product-card .product-info h3 {
    min-height: calc(2em * 1.38);
    line-height: 1.38;
  }

  .product-card .product-info > div:has(> .pta-badge) {
    min-height: 28px;
  }

  .product-card .product-price {
    min-height: 42px;
    gap: 5px;
  }

  .product-card .product-actions {
    gap: 5px;
  }

  .product-card .product-actions .btn-cart,
  .product-card .product-actions .btn-buy {
    min-height: 38px;
    padding-inline: 4px;
  }
}

@media (max-width: 380px) {
  .product-card .product-actions {
    grid-template-columns: 1fr;
  }
}

/* Preserve the existing horizontal mobile card while keeping both overlay badges in a clear top lane. */
@media (max-width: 480px) {
  .product-card {
    align-items: stretch !important;
  }

  .product-card .product-img-wrap {
    align-self: flex-start !important;
    height: 142px !important;
    padding: 36px 9px 10px !important;
  }

  .product-card .product-img-wrap img {
    max-height: 92px !important;
  }

  .product-card .product-info {
    padding: 38px 12px 10px !important;
  }

  .product-card .product-badge {
    top: 8px !important;
    left: 8px !important;
  }
}

/* Allow the existing warranty chip to wrap inside narrow cards without changing its markup. */
.product-card .product-info > div:has(> .pta-badge) > span:not(.pta-badge) {
  display: inline-block !important;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  line-height: 1.25;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

/* ================================================================
   SMARTPHONE BRAND FILTER — COMPACT RESPONSIVE SELECTOR
   CSS-only refinement. Existing brand markup, colors and filtering stay intact.
================================================================ */
#page-smartphones > div > .container {
  padding-top: 20px !important;
}

#page-smartphones .sp-filter-card:has(.sp-brand-grid) {
  margin-bottom: 14px !important;
  padding: 18px 20px 20px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

#page-smartphones .sp-filter-card:has(.sp-brand-grid) .sp-filter-title {
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 1.25px;
}

#page-smartphones .sp-filter-card:has(.sp-brand-grid) > div:nth-child(2) {
  margin-bottom: 10px !important;
  text-align: center;
}

#page-smartphones #sp-brand-all {
  display: inline-flex;
  width: max-content;
  min-height: 38px;
  margin-inline: auto;
  padding: 8px 18px !important;
  font-size: 13px !important;
  box-shadow: 0 2px 7px rgba(15, 23, 42, .08);
}

#page-smartphones .sp-brand-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

#page-smartphones .sp-brand-card {
  position: relative;
  isolation: isolate;
  aspect-ratio: auto;
  min-width: 0;
  min-height: 104px;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .08),
    0 3px 10px rgba(15, 23, 42, .1);
  outline: none;
  overflow: hidden;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    outline-color .18s ease;
}

#page-smartphones .sp-brand-card > span {
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
  overflow-wrap: anywhere;
}

/* Override only inline text sizes; every brand's existing color and type treatment remains unchanged. */
#page-smartphones .sp-brand-card > span:first-child {
  padding-inline: 6px;
  font-size: clamp(18px, 1.35vw, 21px) !important;
  line-height: 1.08 !important;
}

#page-smartphones .sp-brand-card .sp-brand-sub,
#page-smartphones .sp-brand-card > span:first-child + span:not(.sp-brand-name) {
  margin-top: 2px !important;
  padding-inline: 6px;
  font-size: 12px !important;
  line-height: 1.12 !important;
}

#page-smartphones .sp-brand-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .12),
    0 7px 16px rgba(15, 23, 42, .16);
}

#page-smartphones .sp-brand-card:active {
  transform: translateY(0) scale(.985);
}

#page-smartphones .sp-brand-card.sp-brand-active {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 2px #fff,
    0 7px 18px rgba(26, 86, 219, .3);
}

#page-smartphones .sp-brand-card:focus-visible {
  outline: 3px solid #0f172a;
  outline-offset: 3px;
  box-shadow:
    0 0 0 2px #fff,
    0 7px 18px rgba(15, 23, 42, .24);
}

#page-smartphones #sp-brand-all:focus-visible {
  outline: 3px solid #0f172a;
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  #page-smartphones .sp-brand-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
  }

  #page-smartphones .sp-brand-card {
    min-height: 98px;
  }
}

@media (max-width: 900px) {
  #page-smartphones > div > .container {
    padding-top: 18px !important;
  }

  #page-smartphones .sp-filter-card:has(.sp-brand-grid) {
    padding: 16px;
  }

  #page-smartphones .sp-brand-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
  }

  #page-smartphones .sp-brand-card {
    min-height: 92px;
    padding: 12px 10px;
    border-radius: 11px;
  }

  #page-smartphones .sp-brand-card > span:first-child {
    font-size: 18px !important;
  }

  #page-smartphones .sp-brand-card .sp-brand-sub,
  #page-smartphones .sp-brand-card > span:first-child + span:not(.sp-brand-name) {
    font-size: 11px !important;
  }
}

@media (max-width: 640px) {
  #page-smartphones > div > .container {
    padding-top: 16px !important;
  }

  #page-smartphones .sp-filter-card:has(.sp-brand-grid) {
    margin-bottom: 12px !important;
    padding: 14px 12px 16px;
    border-radius: 12px;
  }

  #page-smartphones .sp-filter-card:has(.sp-brand-grid) .sp-filter-title {
    margin-bottom: 8px;
    font-size: 11.5px;
  }

  #page-smartphones .sp-filter-card:has(.sp-brand-grid) > div:nth-child(2) {
    margin-bottom: 8px !important;
  }

  #page-smartphones #sp-brand-all {
    min-height: 36px;
    padding: 7px 15px !important;
    font-size: 12.5px !important;
  }

  #page-smartphones .sp-brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #page-smartphones .sp-brand-card {
    min-height: 82px;
    padding: 10px 8px;
    border-radius: 10px;
  }

  #page-smartphones .sp-brand-card > span:first-child {
    font-size: 16.5px !important;
  }

  #page-smartphones .sp-brand-card .sp-brand-sub,
  #page-smartphones .sp-brand-card > span:first-child + span:not(.sp-brand-name) {
    font-size: 10.5px !important;
  }
}

@media (max-width: 480px) {
  /* Keep a two-column selector while reserving a slim lane for the fixed WhatsApp control. */
  #page-smartphones .sp-brand-grid {
    padding-right: 50px;
  }
}

@media (max-width: 380px) {
  #page-smartphones .sp-filter-card:has(.sp-brand-grid) {
    padding: 10px 10px 12px;
  }

  #page-smartphones .sp-filter-card:has(.sp-brand-grid) .sp-filter-title {
    margin-bottom: 6px;
  }

  #page-smartphones .sp-filter-card:has(.sp-brand-grid) > div:nth-child(2) {
    margin-bottom: 6px !important;
  }

  #page-smartphones #sp-brand-all {
    min-height: 34px;
  }

  #page-smartphones .sp-brand-grid {
    gap: 5px;
  }

  #page-smartphones .sp-brand-card {
    min-height: 72px;
    padding: 8px 7px;
  }

  #page-smartphones .sp-brand-card > span:first-child {
    font-size: 15px !important;
  }

  #page-smartphones .sp-brand-card .sp-brand-sub,
  #page-smartphones .sp-brand-card > span:first-child + span:not(.sp-brand-name) {
    font-size: 10px !important;
  }
}

/* ================================================================
   PUREPHONEZ BRAND LOGO INTEGRATION
   Approved sources: assets/images/purephonez-logo.png and assets/images/purephonez-icon.png
================================================================ */
.navbar-brand,
.navbar-logo.purephonez-brand,
.purephonez-brand,
.purephonez-footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0;
  line-height: 1;
}

.navbar-logo.purephonez-brand,
.purephonez-brand {
  gap: 0;
  letter-spacing: 0;
  white-space: nowrap;
}

.purephonez-logo {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.purephonez-logo-navbar {
  height: 44px;
  max-width: 220px;
}

.purephonez-footer-brand {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
  border-radius: 8px;
}

.purephonez-logo-footer {
  height: 54px;
  max-width: 280px;
}

.navbar-logo.purephonez-brand:focus-visible,
.purephonez-footer-brand:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

@media (max-width: 992px) {
  .purephonez-logo-navbar {
    height: 38px;
    max-width: 195px;
  }
}

@media (max-width: 768px) {
  .navbar-logo.purephonez-brand {
    flex: 0 0 auto;
  }

  .purephonez-logo-navbar {
    height: 32px;
    max-width: 160px;
  }

  .purephonez-logo-footer {
    height: 43px;
    max-width: 225px;
  }
}

@media (max-width: 380px) {
  .purephonez-logo-navbar {
    height: 32px;
    max-width: 145px;
  }

  .purephonez-logo-footer {
    height: 40px;
    max-width: 210px;
  }
}


/* ================================================================
   PRODUCT CARD ECOMMERCE ACTIONS
================================================================ */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  outline: none;
}

.product-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .18), var(--shadow-lg);
}

.product-card .product-img-wrap,
.product-card .product-info h3,
.product-card .product-price,
.product-card .product-trust-badges {
  cursor: pointer;
}

.product-card .product-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.product-card .product-trust-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  margin: 4px 0 6px;
  flex-wrap: wrap;
}

.product-card .product-warranty-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border: 1px solid #fde047;
  border-radius: 20px;
  background: #fef9c3;
  color: #713f12;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.25;
}

.product-card .product-warranty-badge i {
  font-size: 9px;
}

.product-card .product-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 0;
}

.product-card .product-actions .btn-cart,
.product-card .product-actions .btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  padding: 9px 8px;
  border: 0;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}

.product-card .product-actions .btn-cart:hover:not(:disabled) {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.product-card .product-actions .btn-buy:hover:not(:disabled) {
  filter: brightness(.94);
  transform: translateY(-1px);
}

.product-card .product-actions .btn-cart:active:not(:disabled),
.product-card .product-actions .btn-buy:active:not(:disabled) {
  transform: translateY(0);
}

.product-card .product-actions .btn-cart:focus-visible,
.product-card .product-actions .btn-buy:focus-visible {
  outline: 3px solid rgba(15, 23, 42, .38);
  outline-offset: 2px;
}

.product-card .product-actions button:disabled,
.product-card .product-actions .btn-disabled {
  opacity: .58;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(.12);
}

.product-card .product-actions button.is-loading {
  pointer-events: none;
  opacity: .75;
}

@media (max-width: 480px) {
  .product-card .product-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px !important;
  }

  .product-card .product-actions .btn-cart,
  .product-card .product-actions .btn-buy {
    min-height: 44px !important;
    padding: 8px 5px !important;
    font-size: 11.5px !important;
  }

  .product-card .product-warranty-badge {
    padding: 2px 5px;
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .product-card .product-actions {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   ADMIN DASHBOARD UI REFINEMENT
   Scoped to admin products, dashboard cards, and admin panel dialogs.
================================================================ */
.admin-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Dashboard summary cards */
#section-dashboard .stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  min-width: 0;
  min-height: 92px;
  position: relative;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .055);
  color: #111827;
  font-family: var(--font);
  text-align: left;
  appearance: none;
}

button.admin-stat-card {
  width: 100%;
  cursor: pointer;
}

.admin-stat-card--clickable {
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.admin-stat-card--clickable:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 30px rgba(26, 86, 219, .11);
  transform: translateY(-2px);
}

.admin-stat-card--clickable:active {
  transform: translateY(0);
}

.admin-stat-card--clickable:focus-visible {
  outline: 3px solid rgba(26, 86, 219, .25);
  outline-offset: 3px;
  border-color: #1a56db;
}

.admin-stat-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 19px;
}

.admin-stat-icon--blue { color: #1a56db; background: #eaf1ff; }
.admin-stat-icon--green { color: #047857; background: #dcfce7; }
.admin-stat-icon--pink { color: #be185d; background: #fce7f3; }
.admin-stat-icon--amber { color: #b45309; background: #fef3c7; }
.admin-stat-icon--purple { color: #6d28d9; background: #ede9fe; }

.admin-stat-copy {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
}

.admin-stat-copy .stat-num {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-stat-copy .stat-label {
  display: block;
  color: #6b7280;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
}

.admin-stat-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  color: #9ca3af;
  font-size: 13px;
}

/* Products section shell and controls */
.admin-content,
#section-products {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-products-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-products-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.admin-products-heading__copy {
  min-width: 0;
}

.admin-products-eyebrow,
.admin-chart-eyebrow {
  margin: 0 0 5px;
  color: #1a56db;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.admin-products-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-products-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 900;
  letter-spacing: -.025em;
}

.admin-products-heading p:not(.admin-products-eyebrow) {
  max-width: 680px;
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.admin-products-count {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  white-space: nowrap;
}

.admin-products-count strong {
  color: #1a56db;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.admin-products-count span {
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.admin-product-toolbar__actions,
.admin-product-toolbar__filters,
.admin-bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-product-toolbar__actions {
  flex: 0 0 auto;
}

.admin-toolbar-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  white-space: nowrap;
}

.admin-product-toolbar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .04);
}

.admin-product-toolbar__filters {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 8px;
}

.admin-filter-field,
.admin-product-search-field {
  min-width: 0;
}

.admin-product-toolbar .admin-search {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 30px 8px 11px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  color: #111827;
  background-color: #fff;
  font-family: var(--font);
  font-size: 12px;
  box-sizing: border-box;
}

.admin-product-toolbar .admin-search:hover {
  border-color: #cbd5e1;
}

.admin-product-toolbar .admin-search:focus {
  border-color: #1a56db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
}

.admin-product-search-field {
  position: relative;
  display: block;
}

.admin-product-search-field > i,
.admin-product-search-field > .admin-product-search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  color: #94a3b8;
  font-size: 13px;
  transform: translateY(-50%);
  pointer-events: none;
}

.admin-product-search-field .admin-search {
  padding-left: 38px;
  padding-right: 12px;
  font-size: 13px;
}

.admin-reset-filters {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: #475569;
  background: #f8fafc;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.admin-reset-filters[hidden] {
  display: none;
}

.admin-reset-filters:hover {
  color: #1e40af;
  border-color: #93c5fd;
  background: #eff6ff;
}

.admin-reset-filters:focus-visible,
.admin-product-toolbar .admin-search:focus-visible {
  outline: 3px solid rgba(26, 86, 219, .2);
  outline-offset: 2px;
}

.admin-bulk-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}

.admin-bulk-count {
  color: #1e40af;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-bulk-action {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.admin-bulk-action--publish { color: #047857; background: #d1fae5; border-color: #6ee7b7; }
.admin-bulk-action--draft { color: #92400e; background: #fef3c7; border-color: #fde68a; }
.admin-bulk-action--archive { color: #9f1239; background: #fff1f2; border-color: #fecdd3; }
.admin-bulk-action--delete { color: #fff; background: #991b1b; border-color: #991b1b; }
.admin-bulk-action:hover { filter: brightness(.97); }
.admin-bulk-action:focus-visible {
  outline: 3px solid rgba(26, 86, 219, .22);
  outline-offset: 2px;
}

/* Products data table */
.admin-products-table-card {
  width: 100%;
  max-width: 100%;
  overflow: visible;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .055);
  box-sizing: border-box;
}

.admin-products-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.admin-products-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-products-col-select { width: 44px; }
.admin-products-col-product { width: 30%; }
.admin-products-col-classification { width: 13%; }
.admin-products-col-pricing { width: 13%; }
.admin-products-col-inventory { width: 12%; }
.admin-products-col-status { width: 16%; }
.admin-products-col-actions { width: 150px; }

.admin-products-table th {
  padding: 11px 10px;
  color: #64748b;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
}

.admin-products-table th:first-child { border-radius: 15px 0 0 0; }
.admin-products-table th:last-child { border-radius: 0 15px 0 0; text-align: right; }

.admin-products-table td {
  min-width: 0;
  padding: 10px;
  border-top: 1px solid #edf0f4;
  color: #334155;
  background: #fff;
  font-size: 12px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.admin-product-row {
  transition: background-color .16s ease;
}

.admin-product-row:hover td {
  background: #fbfdff;
}

.admin-product-row.is-selected td {
  background: #eff6ff;
}

.admin-product-row.is-out-of-stock td {
  background-image: linear-gradient(rgba(248, 250, 252, .5), rgba(248, 250, 252, .5));
}

.admin-product-select-cell,
.admin-product-select-column {
  text-align: center !important;
}

.admin-product-select-cell input,
.admin-product-select-column input {
  width: 17px;
  height: 17px;
  accent-color: #1a56db;
  cursor: pointer;
}

.admin-product-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-product-thumbnail {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  padding: 5px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  box-sizing: border-box;
}

.admin-product-copy {
  min-width: 0;
}

.admin-product-name {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-product-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
  margin-top: 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.admin-product-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-product-classification-cell,
.admin-product-price-cell,
.admin-product-stock-cell,
.admin-product-status-cell {
  min-width: 0;
  line-height: 1.35;
}

.admin-product-classification-cell > strong,
.admin-product-price-cell > strong {
  display: block;
  color: #111827;
  font-size: 12px;
  font-weight: 850;
}

.admin-category-badge {
  display: inline-flex;
  max-width: 100%;
  margin-top: 6px;
  padding: 4px 7px;
  overflow: hidden;
  border-radius: 999px;
  color: #1e40af;
  background: #eff6ff;
  font-size: 9.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-product-price-cell > strong,
.admin-product-price-cell > span {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.admin-product-price-cell > span {
  display: block;
  margin-top: 5px;
  color: #94a3b8;
  font-size: 10px;
  text-decoration: line-through;
}

.admin-product-price-cell > .admin-product-price-empty {
  text-decoration: none;
  white-space: normal;
}

.admin-stock-badge,
.admin-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-stock-badge > span,
.admin-status-badge > span {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
}

.admin-stock-badge.is-in-stock { color: #047857; background: #ecfdf5; }
.admin-stock-badge.is-out-of-stock { color: #b91c1c; background: #fef2f2; }

.admin-product-stock-cell small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.admin-status-badge--published { color: #047857; background: #d1fae5; }
.admin-status-badge--draft { color: #92400e; background: #fef3c7; }
.admin-status-badge--archived { color: #9f1239; background: #ffe4e6; }

.admin-product-statuses {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
}

.admin-product-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.admin-product-flag--featured { color: #92400e; background: #fffbeb; }
.admin-product-flag--home { color: #075985; background: #e0f2fe; }

.admin-product-actions-cell {
  text-align: right;
}

.admin-product-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

.admin-product-action {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  color: #475569;
  background: #fff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}

.admin-product-action:hover {
  transform: translateY(-1px);
  border-color: #94a3b8;
  background: #f8fafc;
}

.admin-product-action svg { display: block; flex: 0 0 auto; }
.admin-product-action:active { transform: translateY(0); }
.admin-product-action:focus-visible {
  outline: 3px solid rgba(26, 86, 219, .22);
  outline-offset: 2px;
}

.admin-product-action--edit {
  width: auto;
  min-width: 68px;
  flex-basis: auto;
  padding: 0 11px;
  color: #fff;
  border-color: #1a56db;
  background: #1a56db;
}

.admin-product-action--edit:hover { color: #fff; border-color: #1648bb; background: #1648bb; }
.admin-product-action--more[aria-expanded="true"] { color: #1e40af; border-color: #93c5fd; background: #eff6ff; }

.admin-product-action-menu {
  position: fixed;
  z-index: 100050;
  width: 208px;
  max-width: calc(100vw - 20px);
  padding: 6px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .22);
}

.admin-product-action-menu[hidden] { display: none; }

.admin-product-menu-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  color: #334155;
  background: transparent;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.admin-product-menu-item i {
  width: 17px;
  color: #64748b;
  text-align: center;
}

.admin-product-menu-item:hover,
.admin-product-menu-item:focus-visible {
  color: #1e40af;
  outline: none;
  background: #eff6ff;
}

.admin-product-menu-item--danger,
.admin-product-menu-item--danger i { color: #b91c1c; }
.admin-product-menu-item--danger:hover,
.admin-product-menu-item--danger:focus-visible { color: #991b1b; background: #fef2f2; }

.admin-product-menu-separator {
  height: 1px;
  margin: 5px 4px;
  background: #e5e7eb;
}

.admin-products-empty {
  padding: 44px 20px !important;
  color: #64748b;
  text-align: center;
}

.admin-products-empty i,
.admin-products-empty strong,
.admin-products-empty span { display: block; }
.admin-products-empty i { margin-bottom: 9px; color: #94a3b8; font-size: 26px; }
.admin-products-empty strong { color: #334155; font-size: 14px; }
.admin-products-empty span { margin-top: 5px; font-size: 12px; }

/* Shared accessible panel close control */
.admin-panel-close {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  background: #f8fafc;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.admin-panel-close svg {
  display: block;
  pointer-events: none;
}

.admin-panel-close:hover {
  color: #111827;
  border-color: #cbd5e1;
  background: #eef2f7;
}

.admin-panel-close:active { transform: scale(.96); }
.admin-panel-close:focus-visible {
  outline: 3px solid rgba(26, 86, 219, .28);
  outline-offset: 2px;
}

.admin-panel-close--inverse,
.import-icon-btn.admin-panel-close--inverse {
  color: #fff;
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.14);
}

.admin-panel-close--inverse:hover,
.import-icon-btn.admin-panel-close--inverse:hover {
  color: #fff;
  border-color: rgba(255,255,255,.48);
  background: rgba(255,255,255,.24);
}

/* Dashboard chart dialog */
.admin-chart-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(3px);
}

.admin-chart-overlay.is-open {
  display: flex;
}

.admin-chart-dialog {
  width: min(760px, 100%);
  max-height: min(90vh, 720px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .32);
}

.admin-chart-dialog:focus { outline: none; }

.admin-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.admin-chart-header h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.015em;
}

.admin-chart-content {
  max-height: calc(90vh - 92px);
  padding: 20px;
  overflow-y: auto;
}

.admin-chart-summary {
  margin-bottom: 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.admin-chart-plot {
  overflow-x: auto;
  padding: 10px 6px 2px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #fff;
}

.admin-chart-plot:focus-visible {
  outline: 3px solid rgba(26, 86, 219, .18);
  outline-offset: 2px;
}

.admin-chart-plot svg {
  display: block;
  min-width: 560px;
  overflow: visible;
}

.admin-chart-empty {
  margin: 16px 0 2px;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1100px) {
  #section-products,
  #section-products .admin-products-panel,
  #section-products .admin-products-table-card {
    min-width: 0;
    max-width: 100%;
  }

  .admin-product-toolbar__filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-reset-filters {
    width: 100%;
  }

  .admin-products-table-scroll {
    overflow: visible;
  }

  .admin-products-table,
  .admin-products-table tbody {
    width: 100%;
    min-width: 0;
    display: block;
  }

  .admin-products-table colgroup,
  .admin-products-table thead {
    display: none;
  }

  .admin-products-table tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .admin-product-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 36px minmax(0, 1.45fr) minmax(125px, .75fr) minmax(120px, .65fr);
    grid-template-areas:
      "select product product product"
      "classification classification pricing inventory"
      "status status status actions";
    gap: 12px 14px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
  }

  .admin-product-row:hover,
  .admin-product-row.is-selected {
    border-color: #93c5fd;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
  }

  .admin-product-row.is-selected {
    background: #f8fbff;
  }

  .admin-products-table td,
  .admin-product-row:hover td,
  .admin-product-row.is-selected td,
  .admin-product-row.is-out-of-stock td {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    background-image: none;
    white-space: normal;
  }

  .admin-product-select-cell { grid-area: select; align-self: start; padding-top: 4px !important; }
  .admin-product-main-cell { grid-area: product; }
  .admin-product-classification-cell { grid-area: classification; }
  .admin-product-price-cell { grid-area: pricing; }
  .admin-product-stock-cell { grid-area: inventory; }
  .admin-product-status-cell { grid-area: status; }
  .admin-product-actions-cell { grid-area: actions; align-self: end; }

  .admin-product-classification-cell,
  .admin-product-price-cell,
  .admin-product-stock-cell,
  .admin-product-status-cell {
    padding-top: 10px !important;
    border-top: 1px solid #eef2f7 !important;
  }

  .admin-product-classification-cell::before,
  .admin-product-price-cell::before,
  .admin-product-stock-cell::before,
  .admin-product-status-cell::before {
    display: block;
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
  }

  .admin-product-classification-cell::before { content: 'Classification'; }
  .admin-product-price-cell::before { content: 'Pricing'; }
  .admin-product-stock-cell::before { content: 'Inventory'; }
  .admin-product-status-cell::before { content: 'Status'; }

  .admin-product-actions {
    justify-content: flex-end;
  }

  .admin-products-empty {
    display: block !important;
    border: 0 !important;
  }
}

@media (max-width: 760px) {
  #section-dashboard .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .admin-stat-card {
    min-height: 82px;
    padding: 14px;
  }

  .admin-stat-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 17px;
  }

  .admin-products-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .admin-product-toolbar__actions {
    width: 100%;
  }

  .admin-product-toolbar__actions > button {
    flex: 1 1 0;
  }

  .admin-product-toolbar {
    padding: 10px;
    border-radius: 13px;
  }

  .admin-product-toolbar__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-bulk-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-bulk-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .admin-bulk-action {
    flex: 1 1 calc(50% - 5px);
  }

  .admin-products-table tbody {
    padding: 10px;
  }

  .admin-product-row {
    grid-template-columns: 32px minmax(0, 1fr) minmax(120px, .75fr);
    grid-template-areas:
      "select product product"
      "classification classification classification"
      "pricing inventory inventory"
      "status status status"
      "actions actions actions";
    gap: 11px 12px;
    padding: 13px;
  }

  .admin-product-thumbnail {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .admin-product-actions-cell {
    padding-top: 2px !important;
  }

  .admin-product-actions {
    justify-content: flex-start;
  }

  .admin-chart-overlay {
    align-items: flex-end;
    padding: 12px;
  }

  .admin-chart-dialog {
    max-height: 88vh;
    border-radius: 18px 18px 12px 12px;
  }

  .admin-chart-header,
  .admin-chart-content {
    padding: 15px;
  }

  .admin-chart-plot svg {
    min-width: 520px;
  }
}

@media (max-width: 480px) {
  #section-dashboard .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-stat-card {
    min-height: 76px;
  }

  .admin-products-heading p:not(.admin-products-eyebrow) {
    font-size: 12px;
  }

  .admin-product-toolbar__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-product-toolbar__actions > button {
    width: 100%;
    padding-inline: 9px !important;
  }

  .admin-product-toolbar__filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-product-row {
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-areas:
      "select product"
      "classification classification"
      "pricing pricing"
      "inventory inventory"
      "status status"
      "actions actions";
    padding: 12px;
  }

  .admin-product-classification-cell,
  .admin-product-price-cell,
  .admin-product-stock-cell,
  .admin-product-status-cell {
    display: grid;
    grid-template-columns: minmax(92px, .45fr) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .admin-product-classification-cell::before,
  .admin-product-price-cell::before,
  .admin-product-stock-cell::before,
  .admin-product-status-cell::before {
    margin: 2px 0 0;
  }

  .admin-product-actions {
    width: 100%;
  }

  .admin-product-action--edit {
    flex: 1 1 auto;
  }

  .admin-chart-overlay {
    padding: 0;
  }

  .admin-chart-dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }
}

/* Canonical product stock: variant totals are derived from configuration rows. */
#ep-stock-qty.is-derived-stock {
  background: #f3f6fb;
  color: #374151;
  cursor: not-allowed;
  font-variant-numeric: tabular-nums;
}

#ep-stock-status:disabled {
  background: #f3f6fb;
  color: #4b5563;
  opacity: 1;
  cursor: not-allowed;
}


/* ================================================================
   STOREFRONT PRODUCT PREVIEW CONSISTENCY
   Scoped to catalogue cards and product-detail color previews only.
================================================================ */
.product-card .product-card-media {
  width: 100%;
  height: clamp(220px, 17vw, 250px);
  flex: 0 0 clamp(220px, 17vw, 250px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px 20px;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfcfe 0%, #f7f9fc 100%);
}

.product-card .product-card-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  transform-origin: 0 0;
  transform: translate(var(--preview-translate-x, 0px), var(--preview-translate-y, 0px)) scale(var(--preview-scale, 1));
  transition: transform .2s ease, opacity .2s ease;
}

.product-card:hover .product-card-image {
  transform: translate(var(--preview-translate-x, 0px), var(--preview-translate-y, 0px)) scale(var(--preview-scale, 1));
}

.product-card .product-card-media:has(.product-card-image[data-preview-normalized="fallback"]) {
  padding-inline: 30px;
}

@media (max-width: 1100px) {
  .product-card .product-card-media {
    height: 210px;
    flex-basis: 210px;
    padding: 24px 20px 18px;
  }
}

@media (max-width: 768px) {
  .product-card .product-card-media {
    height: 190px;
    flex-basis: 190px;
    padding: 22px 17px 16px;
  }
}

@media (max-width: 480px) {
  .product-card .product-card-media {
    width: 142px !important;
    min-width: 142px !important;
    height: 176px !important;
    flex: 0 0 142px !important;
    align-self: stretch !important;
    padding: 34px 12px 14px !important;
  }

  .product-card .product-card-image {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
  }

  .product-card .product-info {
    padding-top: 38px !important;
  }
}

/* ================================================================
   Lucky Draw customer reservation confirmation
================================================================ */
body.lucky-confirm-open {
  overflow: hidden;
}

.lucky-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(5px);
}

.lucky-confirm-overlay.open {
  display: flex;
}

.lucky-confirm-dialog {
  position: relative;
  width: min(100%, 520px);
  max-height: min(90vh, 720px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(26, 86, 219, 0.14);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.3);
  color: #111827;
  animation: luckyConfirmIn 180ms ease-out;
}

@keyframes luckyConfirmIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lucky-confirm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #4b5563;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.lucky-confirm-close:hover:not(:disabled) {
  background: #e5e7eb;
  color: #111827;
  transform: translateY(-1px);
}

.lucky-confirm-close svg {
  width: 20px;
  height: 20px;
}

.lucky-confirm-close path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.lucky-confirm-icon {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1a56db, #4f46e5);
  box-shadow: 0 12px 26px rgba(26, 86, 219, 0.25);
  color: #fff;
  font-size: 24px;
}

.lucky-confirm-heading {
  padding-right: 34px;
}

.lucky-confirm-kicker {
  margin: 0 0 5px;
  color: #1a56db;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lucky-confirm-heading h2 {
  margin: 0;
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.2;
}

.lucky-confirm-heading > p:last-child {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

.lucky-confirm-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 18px;
}

.lucky-confirm-summary > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
}

.lucky-confirm-summary span,
.lucky-confirm-summary strong {
  display: block;
}

.lucky-confirm-summary span {
  margin-bottom: 5px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
}

.lucky-confirm-summary strong {
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.lucky-confirm-summary .lucky-confirm-summary-highlight {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fffbeb;
}

.lucky-confirm-summary-highlight strong {
  color: #b45309;
}

.lucky-confirm-message {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.lucky-confirm-message--error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.lucky-confirm-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.lucky-confirm-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 13px;
  font: 800 14px/1 var(--font);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.lucky-confirm-btn--secondary {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
}

.lucky-confirm-btn--primary {
  border: 1px solid #1a56db;
  background: #1a56db;
  color: #fff;
  box-shadow: 0 10px 22px rgba(26, 86, 219, 0.22);
}

.lucky-confirm-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.lucky-confirm-btn--secondary:hover:not(:disabled) {
  background: #f9fafb;
}

.lucky-confirm-btn--primary:hover:not(:disabled) {
  background: #1749b8;
  box-shadow: 0 12px 26px rgba(26, 86, 219, 0.28);
}

.lucky-confirm-btn:disabled,
.lucky-confirm-close:disabled {
  cursor: wait;
  opacity: 0.65;
}

.lucky-confirm-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: luckyConfirmSpin 650ms linear infinite;
}

.lucky-confirm-btn[aria-busy="true"] .lucky-confirm-spinner {
  display: inline-block;
}

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

.lucky-confirm-footnote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.5;
}

.lucky-confirm-close:focus-visible,
.lucky-confirm-btn:focus-visible {
  outline: 3px solid rgba(26, 86, 219, 0.3);
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .lucky-confirm-overlay {
    align-items: center;
    padding: 12px;
  }

  .lucky-confirm-dialog {
    width: 100%;
    max-height: 92vh;
    padding: 24px 18px 20px;
    border-radius: 22px 22px 16px 16px;
  }

  .lucky-confirm-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .lucky-confirm-actions {
    grid-template-columns: 1fr;
  }

  .lucky-confirm-btn--primary {
    order: -1;
  }
}


/* Lucky Draw schedule and configured-date states */
.lucky-schedule-card{margin:0 0 20px;padding:20px;border:1px solid #dbe5f3;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(17,24,39,.06)}
.lucky-schedule-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.lucky-schedule-header h3{margin:0;color:#111827;font-size:17px;font-weight:800}.lucky-schedule-header p{margin:5px 0 0;color:#6b7280;font-size:13px}
.lucky-schedule-timezone{padding:6px 10px;border-radius:999px;background:#eff6ff;color:#1a56db;font-size:11px;font-weight:800;white-space:nowrap}
.lucky-schedule-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.lucky-schedule-field{display:flex;min-width:0;flex-direction:column;gap:7px}.lucky-schedule-field>span,.lucky-schedule-readonly>span{color:#374151;font-size:12px;font-weight:750}
.lucky-schedule-field input,.lucky-schedule-field select{width:100%;height:42px;box-sizing:border-box;border:1px solid #d1d5db;border-radius:10px;background:#fff;padding:0 12px;color:#111827;font:inherit;font-size:13px}.lucky-schedule-field input:focus,.lucky-schedule-field select:focus{outline:3px solid rgba(26,86,219,.14);border-color:#1a56db}.lucky-schedule-field input[readonly]{background:#f9fafb;color:#6b7280}
.lucky-schedule-readonly{display:flex;min-height:42px;flex-direction:column;justify-content:center;gap:5px;border:1px solid #e5e7eb;border-radius:10px;background:#f9fafb;padding:8px 12px}.lucky-schedule-readonly strong{font-size:14px;color:#111827}
.lucky-schedule-error{min-height:14px;color:#dc2626;font-size:11px}.lucky-schedule-warning{margin-top:14px;border:1px solid #fbbf24;border-radius:10px;background:#fffbeb;padding:10px 12px;color:#92400e;font-size:12px;font-weight:650}
.lucky-schedule-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px}.lucky-schedule-actions button{min-height:42px;border:0;border-radius:10px;background:#1a56db;padding:0 18px;color:#fff;font-weight:800;cursor:pointer}.lucky-schedule-actions button:disabled{cursor:not-allowed;opacity:.65}.lucky-schedule-actions button:focus-visible{outline:3px solid rgba(26,86,219,.25);outline-offset:2px}.lucky-schedule-actions span{font-size:12px;font-weight:700;color:#166534}
.lucky-draw-unavailable{margin:12px 0;padding:10px 12px;border:1px solid #fde68a;border-radius:10px;background:#fffbeb;color:#92400e;font-size:12px;line-height:1.45}
@media(max-width:900px){.lucky-schedule-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.lucky-schedule-card{padding:16px}.lucky-schedule-header{flex-direction:column}.lucky-schedule-grid{grid-template-columns:1fr}.lucky-schedule-actions button{width:100%}}

/* ====================================================================
   Admin Lucky Draw management — canonical active draw dashboard
==================================================================== */
#section-luckydraw,
#section-luckydraw * {
  box-sizing: border-box;
}

.lucky-admin-shell {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 18px;
}

.lucky-admin-page-header,
.lucky-active-header,
.lucky-admin-section-header,
.lucky-schedule-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.lucky-admin-page-header {
  padding: 4px 2px 2px;
}

.lucky-admin-page-header h2,
.lucky-active-header h3,
.lucky-admin-section-header h3,
.lucky-schedule-header h3 {
  margin: 0;
  color: #111827;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.lucky-admin-page-header h2 { font-size: clamp(22px, 2vw, 30px); }
.lucky-active-header h3,
.lucky-admin-section-header h3,
.lucky-schedule-header h3 { font-size: 17px; }

.lucky-admin-page-header p:not(.lucky-admin-eyebrow),
.lucky-active-header p,
.lucky-admin-section-header p,
.lucky-schedule-header p {
  margin: 5px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.55;
}

.lucky-admin-eyebrow {
  margin: 0 0 4px;
  color: #1d4ed8;
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.lucky-schedule-timezone {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 800;
}

.lucky-admin-service-message {
  padding: 13px 15px;
  border: 1px solid #bfdbfe;
  border-radius: 11px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 13px;
  font-weight: 700;
}

.lucky-admin-service-message[data-type="error"] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.lucky-active-draw,
.lucky-schedule-card,
.lucky-admin-section-card {
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .055);
}

.lucky-active-draw {
  overflow: hidden;
  border-color: #c7d2fe;
  background: linear-gradient(145deg, #ffffff, #f8faff);
}

.lucky-active-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.lucky-active-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.lucky-active-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.lucky-admin-btn,
.lucky-table-action,
.lucky-entry-actions button,
.lucky-winner-form button,
.lucky-schedule-actions button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 13px;
  font: 750 12.5px/1.2 var(--font);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.lucky-admin-btn:hover,
.lucky-table-action:hover,
.lucky-entry-actions button:hover,
.lucky-winner-form button:hover,
.lucky-schedule-actions button:hover { transform: translateY(-1px); }

.lucky-admin-btn:focus-visible,
.lucky-table-action:focus-visible,
.lucky-entry-actions button:focus-visible,
.lucky-winner-form button:focus-visible,
.lucky-schedule-actions button:focus-visible,
.lucky-entry-tools input:focus-visible,
.lucky-entry-tools select:focus-visible,
.lucky-schedule-field input:focus-visible,
.lucky-schedule-field select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .2);
  outline-offset: 2px;
}

.lucky-admin-btn--primary,
.lucky-schedule-actions #ald-schedule-save,
.lucky-winner-form button {
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 6px 14px rgba(29, 78, 216, .18);
}

.lucky-admin-btn--secondary,
.lucky-schedule-cancel,
.lucky-table-action,
.lucky-entry-actions button {
  border-color: #d1d5db;
  background: #fff;
  color: #374151;
}

.lucky-admin-btn--warning { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.lucky-admin-btn--danger { background: #b91c1c; color: #fff; }
.lucky-admin-btn--danger-outline { background: #fff; border-color: #fca5a5; color: #b91c1c; }

.lucky-active-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: #e5e7eb;
}

.lucky-active-summary article {
  min-width: 0;
  padding: 17px 16px;
  background: #fff;
}

.lucky-active-summary span {
  display: block;
  margin-bottom: 5px;
  color: #6b7280;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.lucky-active-summary strong {
  display: block;
  min-width: 0;
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lucky-status-chip,
.lucky-entry-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.lucky-status-chip--open,
.lucky-entry-status--assigned,
.lucky-entry-status--active { background: #dcfce7; color: #166534; }
.lucky-status-chip--scheduled { background: #dbeafe; color: #1d4ed8; }
.lucky-status-chip--closed,
.lucky-status-chip--completed { background: #f3f4f6; color: #4b5563; }
.lucky-status-chip--cancelled,
.lucky-entry-status--refunded,
.lucky-entry-status--cancelled { background: #fee2e2; color: #991b1b; }
.lucky-status-chip--archived { background: #ede9fe; color: #5b21b6; }

.lucky-schedule-card,
.lucky-admin-section-card { padding: 20px; }

.lucky-schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.lucky-schedule-field,
.lucky-schedule-readonly {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.lucky-schedule-field > span,
.lucky-schedule-readonly > span {
  color: #374151;
  font-size: 11.5px;
  font-weight: 800;
}

.lucky-schedule-field input,
.lucky-schedule-field select,
.lucky-entry-tools input,
.lucky-entry-tools select,
.lucky-winner-form input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  color: #111827;
  padding: 9px 11px;
  font: 500 13px/1.2 var(--font);
}

.lucky-schedule-field input[readonly],
.lucky-schedule-readonly {
  background: #f9fafb;
}

.lucky-schedule-readonly {
  align-content: center;
  min-height: 68px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 11px 13px;
}

.lucky-schedule-readonly strong { color: #111827; font-size: 14px; }
.lucky-schedule-error { min-height: 15px; color: #b91c1c; font-size: 11.5px; font-weight: 650; }
.lucky-schedule-warning,
.lucky-action-warning {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #fde68a;
  border-radius: 9px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  line-height: 1.5;
}

.lucky-schedule-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

#ald-schedule-message { font-size: 12.5px; font-weight: 700; }

.lucky-admin-section-header { margin-bottom: 14px; }
.lucky-entry-tools { display: flex; flex: 1 1 440px; justify-content: flex-end; gap: 8px; }
.lucky-entry-tools label:first-child { flex: 1 1 280px; max-width: 420px; }
.lucky-entry-tools label:last-child { flex: 0 1 150px; }
.lucky-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }

.admin-lucky-table {
  min-width: 880px;
  table-layout: auto;
}

.admin-lucky-table tbody tr:hover { background: #f8fafc; }
.admin-lucky-table td { vertical-align: middle; }
.admin-lucky-table td small { display: block; max-width: 180px; margin-top: 3px; color: #9ca3af; overflow: hidden; text-overflow: ellipsis; }
.admin-lucky-table code { display: block; max-width: 170px; color: #475569; font: 600 10.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; }
.lucky-empty-cell { padding: 28px !important; text-align: center; color: #9ca3af !important; }
.lucky-entry-actions { display: flex; gap: 6px; }
.lucky-entry-actions button { min-height: 32px; padding: 6px 8px; font-size: 10.5px; white-space: nowrap; }
.lucky-table-action { min-height: 32px; padding: 6px 9px; font-size: 11px; white-space: nowrap; }

.lucky-winner-card { border-color: #bbf7d0; background: linear-gradient(145deg, #fff, #f0fdf4); }
.lucky-winner-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 9px; }
.lucky-winner-display { margin-top: 12px; color: #166534; font-size: 13px; }

.lucky-admin-action-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(5px);
}

.lucky-admin-action-overlay.is-open { display: flex; }
.lucky-admin-action-dialog {
  width: min(520px, 100%);
  max-height: min(680px, calc(100vh - 32px));
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 18px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 28px 80px rgba(15,23,42,.28);
}

.lucky-admin-action-dialog > header,
.lucky-admin-action-dialog > .lucky-admin-action-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lucky-admin-action-dialog h3 { margin: 0; color: #111827; font-size: 19px; }
.lucky-admin-action-dialog > p { margin: 16px 0 0; color: #4b5563; font-size: 13.5px; line-height: 1.65; }
.lucky-admin-action-dialog > .lucky-admin-action-footer { justify-content: flex-end; margin-top: 18px; }

@media (max-width: 1280px) {
  .lucky-active-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .lucky-admin-page-header,
  .lucky-active-header,
  .lucky-admin-section-header,
  .lucky-schedule-header { flex-direction: column; align-items: stretch; }
  .lucky-active-actions { justify-content: flex-start; }
  .lucky-schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lucky-entry-tools { width: 100%; justify-content: stretch; }
  .lucky-winner-form { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .lucky-active-header,
  .lucky-schedule-card,
  .lucky-admin-section-card { padding: 15px; }
  .lucky-active-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lucky-schedule-grid { grid-template-columns: 1fr; }
  .lucky-active-actions,
  .lucky-schedule-actions,
  .lucky-entry-tools { display: grid; grid-template-columns: 1fr; }
  .lucky-admin-btn,
  .lucky-schedule-actions button { width: 100%; min-height: 42px; }
  .lucky-admin-action-overlay { padding: 10px; align-items: flex-end; }
  .lucky-admin-action-dialog { border-radius: 18px 18px 8px 8px; }
}

/* ======================================================================
   ADMIN LUCKY DRAW MANAGEMENT — responsive lifecycle dashboard
   ====================================================================== */
#section-luckydraw,
#section-luckydraw .lucky-admin-shell,
#section-luckydraw .lucky-active-draw,
#section-luckydraw .lucky-admin-section-card,
#section-luckydraw .lucky-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.lucky-active-draw {
  overflow: visible;
  border-color: #dbe4f5;
  background: #fff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, .07);
}

.lucky-active-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  background: linear-gradient(145deg, #fff, #f8faff);
}

.lucky-active-heading { min-width: 0; }
.lucky-active-cycle {
  display: block;
  margin-top: 9px;
  color: #0f172a;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.1;
  letter-spacing: -.025em;
}
.lucky-active-heading > p { margin: 7px 0 0; color: #64748b; font-size: 13px; }

.lucky-active-actions {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 650px;
}

.lucky-admin-more-wrap { position: relative; }
.lucky-admin-more-trigger { display: inline-flex; align-items: center; gap: 7px; }
.lucky-admin-more-trigger svg { fill: currentColor; }
.lucky-admin-more-menu {
  z-index: 10120;
  width: min(230px, calc(100vw - 20px));
  border: 1px solid #dbe1ea;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .2);
}
.lucky-admin-more-menu[hidden] { display: none; }
.lucky-admin-more-menu button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 9px 11px;
  color: #334155;
  font: 700 12.5px/1.25 var(--font);
  text-align: left;
  cursor: pointer;
}
.lucky-admin-more-menu button:hover,
.lucky-admin-more-menu button:focus-visible { background: #f1f5f9; outline: none; }
.lucky-admin-more-menu button.is-danger { color: #b91c1c; }
.lucky-admin-more-menu button.is-danger:hover,
.lucky-admin-more-menu button.is-danger:focus-visible { background: #fef2f2; }

.lucky-active-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 8px;
  background: #fff;
}
.lucky-active-summary article {
  min-width: 0;
  min-height: 92px;
  border: 1px solid #e7ebf2;
  border-radius: 13px;
  background: #f8fafc;
  padding: 15px;
}
.lucky-active-summary article:nth-child(1) { background: #eff6ff; border-color: #bfdbfe; }
.lucky-active-summary article:nth-child(6) { background: #f0fdf4; border-color: #bbf7d0; }
.lucky-active-summary strong { font-size: 15px; overflow-wrap: normal; word-break: normal; }

.lucky-capacity-panel {
  display: grid;
  gap: 9px;
  padding: 12px 20px 22px;
  background: #fff;
}
.lucky-capacity-panel > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: #475569; font-size: 12px; }
.lucky-capacity-panel strong { color: #1e293b; }
.lucky-capacity-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.lucky-capacity-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  transition: width .25s ease;
}

.lucky-entries-card { overflow: visible; }
.lucky-entries-header { align-items: center; }
.lucky-entry-tools { min-width: 0; flex: 1 1 460px; }
.lucky-entry-search { position: relative; display: flex; align-items: center; min-width: 0; }
.lucky-entry-search > svg { position: absolute; left: 12px; color: #94a3b8; pointer-events: none; }
.lucky-entry-search input { padding-left: 37px; padding-right: 36px; }
.lucky-entry-search > button {
  position: absolute;
  right: 7px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
}
.lucky-entry-search > button:hover { background: #f1f5f9; }

.lucky-table-scroll { overflow: visible; }
.admin-lucky-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}
.admin-lucky-table th,
.admin-lucky-table td { min-width: 0; padding: 12px 10px; overflow-wrap: anywhere; }
.admin-lucky-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.admin-lucky-table td { border-bottom: 1px solid #eef2f7; color: #334155; font-size: 12px; }
.admin-lucky-table tbody tr:last-child td { border-bottom: 0; }
.admin-lucky-table tbody tr:hover { background: #f8fbff; }
.admin-lucky-entries-table .lucky-col-entry { width: 15%; }
.admin-lucky-entries-table .lucky-col-customer { width: 32%; }
.admin-lucky-entries-table .lucky-col-reserved { width: 17%; }
.admin-lucky-entries-table .lucky-col-points { width: 12%; }
.admin-lucky-entries-table .lucky-col-status { width: 13%; }
.admin-lucky-entries-table .lucky-col-actions { width: 11%; }

.lucky-entry-primary,
.lucky-customer-cell { display: grid; min-width: 0; gap: 4px; }
.lucky-entry-primary > strong { font-size: 14px; color: #0f172a; }
.lucky-entry-primary small,
.lucky-customer-cell small { display: flex !important; align-items: center; flex-wrap: wrap; gap: 5px; max-width: 100% !important; margin: 0 !important; color: #64748b !important; }
.lucky-entry-primary code { display: inline !important; max-width: 100% !important; font-size: 10.5px; }
.lucky-customer-cell strong { color: #111827; font-size: 13px; }
.lucky-customer-cell > span { color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lucky-copy-mini {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #dbe1ea;
  border-radius: 6px;
  background: #fff;
  padding: 3px 6px;
  color: #2563eb;
  font: 750 9.5px/1 var(--font);
  cursor: pointer;
}
.lucky-copy-mini:hover,
.lucky-copy-mini:focus-visible { border-color: #93c5fd; background: #eff6ff; outline: 2px solid rgba(37,99,235,.18); }
.lucky-winner-mini { width: fit-content; border-radius: 999px; background: #fef3c7; color: #92400e; padding: 3px 7px; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.admin-lucky-table time { display: grid; gap: 3px; color: #334155; }
.admin-lucky-table time small { color: #94a3b8; }
.lucky-points-value { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lucky-table-action { min-width: 56px; min-height: 38px; }

.lucky-entry-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 15px;
}
.lucky-entry-pagination button {
  min-height: 36px;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  background: #fff;
  padding: 7px 11px;
  color: #334155;
  font: 750 11px/1 var(--font);
  cursor: pointer;
}
.lucky-entry-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.lucky-entry-pagination span { color: #64748b; font-size: 11.5px; font-weight: 700; }

.lucky-winner-card { border-color: #c7d2fe; background: linear-gradient(145deg, #fff, #f8faff); }
.lucky-status-chip--winner_selected { background: #fef3c7; color: #92400e; }
.lucky-status-chip--winner_announced { background: #dcfce7; color: #166534; }
.lucky-winner-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px dashed #c7d2fe;
  border-radius: 13px;
  background: #fff;
  padding: 16px;
}
.lucky-winner-empty > div:nth-child(2) { flex: 1; min-width: 0; }
.lucky-winner-empty p { margin: 4px 0 0; color: #64748b; font-size: 12.5px; line-height: 1.5; }
.lucky-winner-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-size: 20px; }
.lucky-winner-summary {
  display: grid;
  grid-template-columns: .7fr 1.5fr 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}
.lucky-winner-summary > div { display: grid; min-width: 0; gap: 4px; }
.lucky-winner-summary span { color: #64748b; font-size: 10.5px; font-weight: 800; text-transform: uppercase; }
.lucky-winner-summary strong { color: #0f172a; }
.lucky-winner-summary small { color: #64748b; overflow: hidden; text-overflow: ellipsis; }
.lucky-winner-actions { display: flex !important; flex-wrap: wrap; justify-content: flex-end; }

.lucky-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-color: #fecaca;
  background: #fffafa;
}
.lucky-danger-zone p:last-child { margin: 5px 0 0; color: #7f1d1d; font-size: 12.5px; line-height: 1.55; }

.admin-lucky-history-table th:nth-child(1) { width: 22%; }
.admin-lucky-history-table th:nth-child(2) { width: 15%; }
.admin-lucky-history-table th:nth-child(3) { width: 13%; }
.admin-lucky-history-table th:nth-child(4) { width: 22%; }
.admin-lucky-history-table th:nth-child(5) { width: 17%; }
.admin-lucky-history-table th:nth-child(6) { width: 11%; }
.admin-lucky-history-table td > small { display: block; margin-top: 4px; color: #94a3b8; }
.lucky-history-audit { color: #64748b; font-size: 11px; font-weight: 700; }

.lucky-action-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
  margin-top: 15px;
}
.lucky-action-summary > div { display: grid; gap: 4px; border: 1px solid #e5e7eb; border-radius: 9px; background: #f8fafc; padding: 10px; }
.lucky-action-summary span { color: #64748b; font-size: 9.5px; font-weight: 800; text-transform: uppercase; }
.lucky-action-summary strong { color: #0f172a; font-size: 12px; overflow-wrap: anywhere; }
.lucky-action-confirmation { display: grid; gap: 7px; margin-top: 14px; color: #374151; font-size: 12px; }
.lucky-action-confirmation input { width: 100%; min-height: 42px; border: 1px solid #d1d5db; border-radius: 9px; padding: 9px 11px; font: 600 13px/1.2 var(--font); }

.lucky-entry-detail-dialog { width: min(660px, 100%); }
.lucky-entry-detail-content { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 16px; }
.lucky-entry-detail-content > div:not(.lucky-entry-detail-actions) { position: relative; display: grid; min-width: 0; gap: 5px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f8fafc; padding: 11px; }
.lucky-entry-detail-content span { color: #64748b; font-size: 9.5px; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.lucky-entry-detail-content strong { color: #111827; font-size: 12.5px; overflow-wrap: anywhere; }
.lucky-entry-detail-content .lucky-copy-mini { width: fit-content; }
.lucky-entry-detail-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 6px; }

@media (max-width: 1280px) {
  .lucky-active-summary { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 1000px) {
  .lucky-active-header { flex-direction: column; }
  .lucky-active-actions { justify-content: flex-start; max-width: none; }
  .lucky-winner-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .lucky-winner-actions { justify-content: flex-start; }
  .admin-lucky-entries-table th:nth-child(4),
  .admin-lucky-entries-table td:nth-child(4),
  .admin-lucky-entries-table th:nth-child(5),
  .admin-lucky-entries-table td:nth-child(5) { display: none; }
  .admin-lucky-entries-table .lucky-col-entry { width: 18%; }
  .admin-lucky-entries-table .lucky-col-customer { width: 43%; }
  .admin-lucky-entries-table .lucky-col-reserved { width: 24%; }
  .admin-lucky-entries-table .lucky-col-actions { width: 15%; }
}

@media (max-width: 720px) {
  .lucky-active-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .lucky-active-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); width: 100%; }
  .lucky-active-actions .lucky-admin-btn,
  .lucky-admin-more-wrap,
  .lucky-admin-more-trigger { width: 100%; }
  .lucky-capacity-panel > div:first-child { flex-direction: column; gap: 4px; }
  .lucky-entries-header { gap: 12px; }
  .lucky-entry-tools { display: grid; grid-template-columns: 1fr; width: 100%; }
  .lucky-entry-tools label:first-child,
  .lucky-entry-tools label:last-child { max-width: none; }

  .admin-lucky-entries-table,
  .admin-lucky-entries-table tbody,
  .admin-lucky-entries-table tr,
  .admin-lucky-entries-table td { display: block; width: 100%; }
  .admin-lucky-entries-table colgroup,
  .admin-lucky-entries-table thead { display: none; }
  .admin-lucky-entries-table tbody { display: grid; gap: 12px; }
  .admin-lucky-entries-table tr { border: 1px solid #e5e7eb; border-radius: 13px; background: #fff; padding: 13px; box-shadow: 0 5px 16px rgba(15,23,42,.045); }
  .admin-lucky-entries-table td,
  .admin-lucky-entries-table td:nth-child(4),
  .admin-lucky-entries-table td:nth-child(5) { display: grid; grid-template-columns: 88px minmax(0,1fr); align-items: start; gap: 10px; border: 0; padding: 7px 0; }
  .admin-lucky-entries-table td::before { content: attr(data-label); color: #64748b; font-size: 9.5px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
  .admin-lucky-entries-table td[data-label="Entry"] { padding-top: 0; }
  .admin-lucky-entries-table td[data-label="Actions"] { padding-bottom: 0; }
  .admin-lucky-entries-table td[data-label="Actions"] .lucky-table-action { width: 100%; }
  .lucky-customer-cell > span { white-space: normal; overflow-wrap: anywhere; }
  .lucky-entry-pagination { justify-content: space-between; }

  .admin-lucky-history-table,
  .admin-lucky-history-table tbody,
  .admin-lucky-history-table tr,
  .admin-lucky-history-table td { display: block; width: 100%; }
  .admin-lucky-history-table thead { display: none; }
  .admin-lucky-history-table tbody { display: grid; gap: 10px; }
  .admin-lucky-history-table tr { border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; }
  .admin-lucky-history-table td { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 9px; border: 0; padding: 6px 0; }
  .admin-lucky-history-table td::before { content: attr(data-label); color: #64748b; font-size: 9.5px; font-weight: 850; text-transform: uppercase; }
  .lucky-winner-summary { grid-template-columns: 1fr; }
  .lucky-danger-zone { flex-direction: column; align-items: stretch; }
  .lucky-action-summary,
  .lucky-entry-detail-content { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .lucky-active-header,
  .lucky-active-summary,
  .lucky-capacity-panel,
  .lucky-admin-section-card { padding-left: 14px; padding-right: 14px; }
  .lucky-active-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .lucky-active-summary article { min-height: 82px; padding: 12px; }
  .lucky-active-actions { grid-template-columns: 1fr; }
  .admin-lucky-entries-table td { grid-template-columns: 76px minmax(0,1fr); }
  .lucky-winner-empty { align-items: flex-start; flex-wrap: wrap; }
  .lucky-winner-empty > button { width: 100%; }
}

.lucky-admin-action-dialog button:disabled { cursor: not-allowed; opacity: .62; }


/* Lucky Draw current deletion confirmation */
.lucky-draw-delete-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border-radius: 24px;
  padding: 24px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}
.lucky-draw-delete-modal .lucky-action-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lucky-draw-delete-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 20px 0 0;
  margin: 20px 0 0;
  border-top: 1px solid #e2e8f0;
  background: transparent;
  color: inherit;
  position: static;
  height: auto;
  overflow: visible;
}
.lucky-draw-delete-actions .lucky-admin-btn {
  min-height: 48px;
  margin: 0;
}
@media (max-width: 520px) {
  .lucky-draw-delete-modal { padding: 20px; border-radius: 22px; }
  .lucky-draw-delete-modal .lucky-action-summary { grid-template-columns: 1fr; }
  .lucky-draw-delete-actions { flex-direction: column; align-items: stretch; }
  .lucky-draw-delete-actions .lucky-admin-btn { width: 100%; }
}

/* ================================================================
   AUTH RECOVERY — password reset, profile recovery, account status
================================================================ */
.forgot-password-button {
  display: block;
  min-height: 40px;
  margin: -8px 0 10px auto;
  padding: 8px 2px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.forgot-password-button:hover { text-decoration: underline; }

.forgot-password-button:focus-visible,
.input-icon-wrap .toggle-pw:focus-visible,
.password-reset-dialog button:focus-visible,
.password-reset-dialog input:focus-visible,
.profile-recovery-panel button:focus-visible,
.signup-account-exists-actions button:focus-visible,
.admin-account-action:focus-visible {
  outline: 3px solid rgba(26, 86, 219, 0.28);
  outline-offset: 2px;
}

.input-icon-wrap .toggle-pw {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-reset-overlay {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.68);
  overflow-y: auto;
}

.password-reset-overlay[hidden] { display: none; }

.password-reset-dialog {
  position: relative;
  width: min(100%, 470px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: auto;
  padding: 32px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
}

.password-reset-dialog h2 {
  margin: 0 36px 9px 0;
  font-size: 24px;
  font-weight: 850;
  color: var(--text);
}

.password-reset-dialog > p,
.password-reset-dialog #password-reset-form-view > p,
.password-reset-success p {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.password-reset-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #334155;
  cursor: pointer;
}

.password-reset-actions,
.signup-account-exists-actions {
  display: flex;
  gap: 10px;
}

.password-reset-actions > *,
.signup-account-exists-actions > * { flex: 1; }

.password-reset-actions .btn-blue,
.password-reset-actions .btn-outline,
.signup-account-exists-actions .btn-blue,
.signup-account-exists-actions .btn-outline {
  min-height: 44px;
  padding: 10px 14px;
}

.password-reset-actions--stacked { margin-top: 22px; }

.password-reset-back {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.password-reset-success { text-align: center; }
.password-reset-success strong {
  display: block;
  margin: -12px 0 16px;
  overflow-wrap: anywhere;
  color: var(--text);
}
.password-reset-success-icon {
  margin: 4px 0 14px;
  color: #059669;
  font-size: 48px;
}
.password-reset-cooldown {
  min-height: 20px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.signup-account-exists-actions {
  margin: -4px 0 14px;
}

.profile-recovery-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
}
.profile-recovery-panel h3 {
  margin: 0 0 5px;
  color: #9a3412;
  font-size: 16px;
}
.profile-recovery-panel p {
  margin: 0 0 12px;
  color: #7c2d12;
  font-size: 13px;
  line-height: 1.45;
}
.profile-recovery-actions {
  display: grid;
  gap: 8px;
}
.profile-recovery-actions button { min-height: 40px; }
.profile-recovery-signout {
  border: 0;
  background: transparent;
  color: #b91c1c;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.account-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.account-status-badge.is-healthy { background: #dcfce7; color: #166534; }
.account-status-badge.is-warning { background: #fef3c7; color: #92400e; }
.account-status-badge.is-danger { background: #fee2e2; color: #991b1b; }
.account-status-badge.is-disabled { background: #e5e7eb; color: #374151; }
.admin-account-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-account-action {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--blue);
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}
.admin-account-action.is-danger { color: #b91c1c; border-color: #fecaca; background: #fff7f7; }
.admin-account-action:disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 520px) {
  .password-reset-overlay { padding: 10px; align-items: flex-end; }
  .password-reset-dialog {
    width: 100%;
    max-height: calc(100vh - 10px);
    padding: 26px 20px 22px;
    border-radius: 20px 20px 0 0;
  }
  .password-reset-actions { flex-direction: column-reverse; }
  .password-reset-actions--stacked { flex-direction: column; }
}

.admin-account-delete-summary {
  display: grid;
  gap: 4px;
  margin: 18px 0;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
.admin-account-delete-summary span { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.admin-account-delete-summary strong { overflow-wrap: anywhere; }
.admin-account-delete-confirm { background: #b91c1c !important; border-color: #b91c1c !important; }


@media (max-width: 600px) {
  .profile-overlay {
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .profile-modal {
    max-height: calc(100dvh - 24px);
  }

  .account-info-body {
    padding: 14px 16px 18px;
  }
}

/* ================================================================
   ADMIN PRODUCT VARIANT CONTAINMENT + TRUSTED PRICE ALERT STATE
================================================================ */
#admin-product-form {
  container-type: inline-size;
}

#admin-product-form,
#admin-product-form * {
  box-sizing: border-box;
}

.ep-variant-color-group,
.ep-variant-color-header,
.ep-config-heading,
.ep-config-list,
.ep-config-row,
.ep-variant-color-header > *,
.ep-variant-field,
.ep-variant-field input,
.ep-variant-field select {
  max-width: 100%;
  min-width: 0;
}

.ep-variant-color-group {
  overflow: hidden;
}

/* The Product Form modal is narrower than many desktop viewports. Use the
   form's actual inline size so actions wrap before they can leave the card. */
.ep-variant-color-header {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ep-variant-image-field input {
  width: 100%;
  text-overflow: ellipsis;
}

.ep-variant-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

.ep-variant-actions .ep-preview-variant-image {
  flex: 0 1 180px;
  min-width: 78px;
}

.ep-variant-actions .ep-delete-color {
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
}

.ep-config-heading {
  flex-wrap: wrap;
}

.ep-add-configuration {
  max-width: 100%;
}

@container (min-width: 980px) {
  .ep-variant-color-header {
    grid-template-columns:
      minmax(130px, .8fr)
      minmax(180px, 1.35fr)
      minmax(118px, .65fr)
      minmax(116px, .65fr)
      minmax(124px, auto);
  }

  .ep-variant-actions {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .ep-variant-color-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .ep-variant-color-name-field,
  .ep-variant-image-field,
  .ep-variant-color-stock-field,
  .ep-variant-color-status-field,
  .ep-variant-actions {
    grid-column: 1;
  }

  .ep-variant-actions {
    width: 100%;
  }

  .ep-variant-actions .ep-preview-variant-image {
    flex: 1 1 auto;
    min-height: 44px;
  }

  .ep-variant-actions .ep-delete-color {
    flex-basis: 48px;
    width: 48px;
    min-width: 48px;
    min-height: 44px;
  }

  .ep-config-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .ep-add-configuration {
    width: 100%;
    min-height: 44px;
  }
}

#detail-alert-btn.price-alert-active {
  border-color: #059669 !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
}

#detail-alert-btn.price-alert-loading,
#detail-alert-btn:disabled {
  cursor: wait !important;
  opacity: .72;
}

/* ================================================================
   UNIFORM STOREFRONT PRODUCT IMAGE STAGE
   Final scoped guardrails for catalogue cards. Original image URLs are kept;
   only confidently detected outer whitespace is normalized in presentation.
================================================================ */
.product-card .product-card-media {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  contain: layout paint;
  place-items: center;
}

.product-card .product-card-image {
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  object-fit: contain;
  object-position: 50% 50%;
}


/* ================================================================
   PRODUCT AVAILABILITY STATUS — Sold Out / Discontinued
================================================================ */
.product-badge-discontinued,
.detail-product-status-banner {
  background: linear-gradient(135deg, #b42318, #e76f1e);
  color: #fff;
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: 0 6px 18px rgba(180,35,24,.24);
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.product-card .product-badge-discontinued {
  position: absolute;
  inset: 12px auto auto 12px;
  z-index: 4;
  max-width: calc(100% - 24px);
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 10.5px;
  line-height: 1.15;
}
#page-product-detail .detail-img-gallery { position: relative; }
.detail-product-status-banner {
  position: absolute;
  inset: 14px auto auto 14px;
  z-index: 5;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.1;
}
.detail-product-status-message {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}
.ep-product-status-warning {
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid #fdba74;
  border-radius: 9px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
}
.product-detail-page .csw-card { position: relative; }
.product-detail-page .csw-oos {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;
  padding: 2px 5px;
  border-radius: 999px;
  background: #7f1d1d;
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: .02em;
  pointer-events: none;
}
.product-detail-page .csw-card.oos {
  opacity: .78;
  cursor: pointer;
}
.product-detail-page .csw-card.oos:hover,
.product-detail-page .csw-card.oos:focus-visible { opacity: 1; }
@media (max-width: 480px) {
  .product-card .product-badge-discontinued { inset: 8px auto auto 8px; font-size: 9px; padding: 4px 7px; }
  .detail-product-status-banner { inset: 9px auto auto 9px; font-size: 9.5px; padding: 6px 8px; }
}

/* ================================================================
   SMARTPHONE PRICE REVIEW & UPDATE
================================================================ */
.price-review-page { min-width: 0; }
.price-review-header,
.price-review-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.price-review-header { margin-bottom: 18px; }
.price-review-header h2,
.price-review-section-heading h3 { margin: 0 0 5px; color: var(--text, #111827); }
.price-review-header p,
.price-review-section-heading p { margin: 0; color: var(--text-muted, #6b7280); line-height: 1.5; }
.price-review-header-actions,
.price-review-selection-actions,
.price-review-confirm-actions,
.price-review-section-heading > div:last-child { display: flex; flex-wrap: wrap; gap: 9px; }
.price-review-header-actions .btn-blue,
.price-review-header-actions .btn-outline { min-height: 42px; white-space: nowrap; }
.price-review-message {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  font-size: 13px;
  font-weight: 700;
}
.price-review-message.is-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.price-review-message.is-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.price-review-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  border-radius: 14px;
}
.price-review-toolbar select,
.price-review-search input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  padding: 0 11px;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
}
.price-review-search {
  flex: 1 1 300px;
  min-width: 220px;
  position: relative;
}
.price-review-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #6b7280; }
.price-review-search input { padding-left: 36px; }
.price-review-toolbar > label:not(.price-review-search) { flex: 0 1 180px; min-width: 150px; }
.price-review-filter-chips { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 7px; }
.price-review-filter-chips button,
.price-review-selection-actions button {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  min-height: 34px;
  padding: 6px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.price-review-filter-chips button.is-active { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.price-review-mapping,
.price-review-results {
  margin-bottom: 15px;
  padding: 15px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 14px;
}
.price-review-mapping-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}
.price-review-mapping-grid label { min-width: 0; font-size: 12px; font-weight: 800; color: #374151; }
.price-review-mapping-grid select {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 5px;
  min-height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  padding: 0 8px;
  box-sizing: border-box;
}
.price-review-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 11px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
}
.price-review-selection-actions button { border-color: #4b5563; background: #1f2937; color: #fff; }
.price-review-selection-actions .btn-outline { border-radius: 9px; background: #fff; color: #111827; }
.price-review-table-shell {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}
.price-review-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.price-review-table { width: 100%; min-width: 1280px; border-collapse: collapse; font-size: 12px; }
.price-review-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 9px;
  background: #f8fafc;
  color: #475569;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid #e5e7eb;
}
.price-review-table td { padding: 10px 9px; border-bottom: 1px solid #eef2f7; vertical-align: middle; color: #334155; }
.price-review-table tr:last-child td { border-bottom: 0; }
.price-review-table tr.is-decrease { background: #f0fdf4; }
.price-review-table tr.is-large { background: #fffbeb; }
.price-review-table tr.is-invalid,
.price-review-table tr.is-unmatched,
.price-review-table tr.is-ambiguous { background: #fff7ed; }
.price-review-product-cell { min-width: 230px; }
.price-review-product { display: flex; align-items: center; gap: 9px; min-width: 0; }
.price-review-product img { width: 42px; height: 42px; flex: 0 0 42px; object-fit: contain; border-radius: 8px; background: #f8fafc; }
.price-review-product-copy { min-width: 0; }
.price-review-product-copy strong { display: block; color: #111827; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.price-review-product-copy span { color: #64748b; }
.price-review-money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-review-money.is-new { font-weight: 850; color: #0f172a; }
.price-review-difference.is-decrease { color: #15803d; font-weight: 850; }
.price-review-difference.is-increase { color: #1d4ed8; font-weight: 850; }
.price-review-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 850;
  white-space: nowrap;
}
.price-review-status--ambiguous,
.price-review-status--unmatched { background: #ffedd5; color: #c2410c; }
.price-review-status--invalid { background: #fee2e2; color: #b91c1c; }
.price-review-status--unchanged { background: #f1f5f9; color: #64748b; }
.price-review-warning { min-width: 180px; max-width: 270px; color: #92400e; overflow-wrap: anywhere; }
.price-review-empty { padding: 38px !important; text-align: center; color: #64748b !important; }
.price-review-results { margin-top: 15px; background: #fff; border-color: #e5e7eb; }
.price-review-result-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eef2f7; }
.price-review-result-row:last-child { border-bottom: 0; }
.price-review-confirm-overlay { z-index: 11000; padding: 18px; }
.price-review-confirm-card { width: min(560px, 100%); max-height: calc(100dvh - 36px); overflow-y: auto; padding: 24px; box-sizing: border-box; }
.price-review-confirm-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.price-review-confirm-summary > div { padding: 11px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f8fafc; }
.price-review-confirm-summary strong { display: block; font-size: 20px; color: #111827; }
.price-review-confirm-summary span { color: #64748b; font-size: 12px; }
.price-review-confirm-note { color: #6b7280; font-size: 13px; line-height: 1.5; }
.price-review-confirm-actions { justify-content: flex-end; margin-top: 18px; }

@media (max-width: 1100px) {
  .price-review-header { flex-direction: column; }
  .price-review-header-actions { width: 100%; }
  .price-review-mapping-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .price-review-header-actions > button { flex: 1 1 100%; width: 100%; }
  .price-review-toolbar { align-items: stretch; }
  .price-review-search,
  .price-review-toolbar > label:not(.price-review-search) { flex-basis: 100%; min-width: 0; }
  .price-review-mapping-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-review-selection-bar { align-items: stretch; }
  .price-review-selection-actions { width: 100%; }
  .price-review-selection-actions button { flex: 1 1 calc(50% - 8px); }
  .price-review-section-heading { flex-direction: column; }
}
@media (max-width: 420px) {
  .price-review-mapping-grid,
  .price-review-confirm-summary { grid-template-columns: 1fr; }
  .price-review-selection-actions button { flex-basis: 100%; }
}

/* ================================================================
   PRE-LAUNCH REVIEW RATING: ENCODING-SAFE, KEYBOARD ACCESSIBLE
================================================================ */
.rating-stars-big,
.review-stars,
.detail-rating-stars,
.admin-review-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
}

.rating-star-icon,
.review-stars .rating-star-icon,
.detail-rating-stars .rating-star-icon,
.admin-review-stars .rating-star-icon {
  display: inline-grid;
  width: 1em;
  height: 1em;
  color: #d1d5db;
  flex: 0 0 auto;
}

.rating-star-icon svg,
.review-star-button svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.rating-star-icon.is-filled {
  color: #f59e0b;
}

.review-rating-fieldset {
  border: 0;
  min-width: 0;
  padding: 0;
  margin: 0 0 18px;
}

.review-rating-fieldset legend {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 10px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
}

.required-mark {
  color: var(--danger);
}

.review-star-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.review-star-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #d1d5db;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.review-star-button.is-highlighted {
  color: #f59e0b;
}

.review-star-button:hover {
  background: #fffbeb;
}

.review-star-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 2px;
  border-color: var(--blue);
}

.review-star-label {
  min-width: 64px;
  margin-left: 3px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
}

.verified-purchase-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #d1fae5;
  color: #065f46;
  font-size: 10.5px;
  font-weight: 750;
  vertical-align: middle;
}

.review-verification-status {
  min-height: 18px;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
}

.review-verification-status.is-valid { color: #047857; }
.review-verification-status.is-error { color: #b91c1c; }
.review-verification-status.is-loading { color: #1d4ed8; }

#rv-submit-button[aria-busy="true"] {
  cursor: wait;
}

@media (max-width: 480px) {
  .review-star-button {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .review-star-control {
    gap: 5px;
  }

  .review-star-label {
    flex-basis: 100%;
    margin: 2px 0 0;
  }
}

/* Smartphone Price Updater — simplified master-file workflow */
.price-review-required,
.price-review-optional {
  float: right;
  margin-left: 6px;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.price-review-required { color: #b91c1c; }
.price-review-optional { color: #64748b; font-weight: 700; }
.price-review-selection-bar {
  align-items: flex-start;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #dbe3ee;
}
.price-review-counts {
  display: flex;
  flex: 1 1 420px;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.price-review-counts span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  white-space: nowrap;
}
.price-review-counts strong { color: #0f172a; font-size: 14px; }
.price-review-selection-actions { justify-content: flex-end; }
.price-review-selection-actions button,
.price-review-selection-actions .btn-outline,
.price-review-selection-actions .btn-blue {
  min-height: 38px;
  border-radius: 9px;
  padding: 7px 12px;
}
.price-review-selection-actions .btn-blue { border-color: #2563eb; background: #2563eb; color: #fff; }
.price-review-selection-actions button:disabled { cursor: not-allowed; opacity: .52; }
.price-review-table tr[data-review-selectable="true"] { cursor: pointer; }
.price-review-table tr[data-review-selectable="true"]:hover { box-shadow: inset 0 0 0 999px rgba(37, 99, 235, .035); }
.price-review-row-check { width: 17px; height: 17px; accent-color: #2563eb; cursor: pointer; }
.price-review-row-check:disabled { cursor: not-allowed; opacity: .45; }
.price-review-sticky-select {
  position: sticky !important;
  left: 0;
  z-index: 3 !important;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  box-sizing: border-box;
  background: #fff;
}
th.price-review-sticky-select { z-index: 5 !important; background: #f8fafc; }
.price-review-sticky-product {
  position: sticky !important;
  left: 44px;
  z-index: 2 !important;
  background: #fff;
  box-shadow: 1px 0 0 #e5e7eb;
}
th.price-review-sticky-product { z-index: 4 !important; background: #f8fafc; }
.price-review-table tr.is-decrease > .price-review-sticky-select,
.price-review-table tr.is-decrease > .price-review-sticky-product { background: #f0fdf4; }
.price-review-table tr.is-large > .price-review-sticky-select,
.price-review-table tr.is-large > .price-review-sticky-product { background: #fffbeb; }
.price-review-table tr.is-invalid > .price-review-sticky-select,
.price-review-table tr.is-invalid > .price-review-sticky-product,
.price-review-table tr.is-unmatched > .price-review-sticky-select,
.price-review-table tr.is-unmatched > .price-review-sticky-product,
.price-review-table tr.is-ambiguous > .price-review-sticky-select,
.price-review-table tr.is-ambiguous > .price-review-sticky-product,
.price-review-table tr.is-stale > .price-review-sticky-select,
.price-review-table tr.is-stale > .price-review-sticky-product,
.price-review-table tr.is-failed > .price-review-sticky-select,
.price-review-table tr.is-failed > .price-review-sticky-product { background: #fff7ed; }
.price-review-status--changed-valid { background: #dbeafe; color: #1d4ed8; }
.price-review-status--stale { background: #fef3c7; color: #92400e; }
.price-review-status--failed { background: #fee2e2; color: #b91c1c; }
.price-review-money .is-not-set { color: #64748b; }

@media (max-width: 720px) {
  .price-review-counts { flex-basis: 100%; }
  .price-review-selection-actions { width: 100%; justify-content: stretch; }
  .price-review-selection-actions button { flex: 1 1 calc(50% - 8px); }
}
@media (max-width: 420px) {
  .price-review-selection-actions button { flex-basis: 100%; }
  .price-review-counts span { flex: 1 1 calc(50% - 7px); justify-content: center; }
}
