﻿/* ================================
   FINAL MOBILE FIX - PHOTOCART
   Loaded LAST to override all conflicts.
   ================================ */

/* --- BASE TECHNICAL FIXES --- */
html, body {
  overflow-x: hidden !important;
  width: 100%;
  position: relative;
  touch-action: manipulation;
}

body {
  font-size: 16px;
  padding-bottom: 72px;
}

img, video, svg {
  max-width: 100%;
  height: auto;
}
/* Exclude Fabric.js canvas from height:auto â€” it sets height inline */
canvas:not(#wallCanvas):not(.lower-canvas):not(.upper-canvas) {
  max-width: 100%;
  height: auto;
}

button, .btn {
  min-height: 44px;
  font-size: 16px;
  padding: 12px 16px;
}

.hero-scene, .hero {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.marquee {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}


.hero-scene { display: none !important; }


/* 2b. Mobile Hero Slider Styles */
.mobile-hero-slider {
  display: block !important;
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.mhs-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 300%; /* 3 slides */
}

.mhs-slide {
  position: relative;
  width: 33.333%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.mhs-bg {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  opacity: 0.7;
}

.mhs-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  z-index: 1;
}

.mhs-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 90%;
}

.mhs-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #d4ae6e;
  color: #000;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.mhs-title {
  font-size: 2rem !important;
  line-height: 1.1 !important;
  margin-bottom: 8px !important;
  color: #fff !important;
  font-family: 'Playfair Display', serif !important;
}

.mhs-subtitle {
  font-size: 0.9rem !important;
  color: #ddd !important;
  margin-bottom: 20px !important;
}

.mhs-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #000;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}

.mhs-dots {
  position: absolute;
  bottom: 80px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 10;
}

.mhs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
}

.mhs-dot.active {
  background: #fff;
  width: 20px;
  border-radius: 10px;
}

.mhs-stats {
  display: flex;
  justify-content: space-between;
  background: #111;
  padding: 15px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.mhs-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mhs-stat-val {
  color: #d4ae6e;
  font-weight: 700;
  font-size: 1rem;
}

.mhs-stat-lbl {
  color: #888;
  font-size: 0.6rem;
  text-transform: uppercase;
}


@media (min-width: 1102px) {
  .mhs-slide {
    aspect-ratio: 21 / 9;
    min-height: auto;
    padding: 60px;
  }
  .mhs-title {
    font-size: 3.5rem !important;
  }
  .mhs-subtitle {
    font-size: 1.2rem !important;
  }
}



/* --- PREMIUM APP LOADER --- */
.pc-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* Interaction safety */
}

.pc-loader-inner {
  text-align: center;
}

.pc-logo-wrap {
  position: relative;
  margin-bottom: 15px;
}

.pc-logo {
  width: 125px;
  height: 125px;
  object-fit: contain;
  animation: pcPulse 1.8s ease-in-out infinite;
}

.pc-brand {
  font-size: 30px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}

.pc-tagline {
  font-size: 15px;
  color: #666;
}

.pc-progress {
  width: 170px;
  height: 6px;
  background: #eaeaea;
  border-radius: 999px;
  overflow: hidden;
  margin: 14px auto 0;
}

.pc-progress span {
  display: block;
  width: 45%;
  height: 100%;
  background: #111;
  animation: pcLoad 1.15s linear infinite;
}

@keyframes pcPulse {
  0% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 0.92; }
}

@keyframes pcLoad {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}

@media (max-width: 768px) {

  /* ===== HEADER / NAVBAR FIX ===== */
  .navbar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    height: 60px !important;
    flex-wrap: nowrap !important;
  }

  .nav-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 10px !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .logo {
    order: 0 !important;
    flex: 0 1 auto !important;
    margin: 0 !important;
    position: static !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  .logo img {
    height: 32px !important;
    width: auto !important;
    display: block !important;
    flex-shrink: 0 !important;
  }

  .logo-text {
    font-size: 1.1rem !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100px !important;
  }

  .mobile-toggle {
    font-size: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    order: -1 !important;
    z-index: 1200 !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    min-width: 32px !important;
    padding: 0 !important;
  }

  .nav-actions {
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .icon-btn {
    font-size: 18px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .badge {
    top: -2px !important;
    right: -2px !important;
    font-size: 9px !important;
    padding: 2px 4px !important;
  }

  .marquee-pro {
    font-size: 13px !important;
    text-align: center !important;
  }

  /* ===== CATEGORY CARDS FIX ===== */
  .pc-grid-2 {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  .category-card {
    flex: 1 !important;
    min-height: 140px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  .category-card .cat-img {
    width: 100% !important;
    height: 100px !important;
    overflow: hidden !important;
  }

  .category-card .cat-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .category-card .cat-content h3 {
    font-size: 13px !important;
    text-align: center !important;
    margin: 8px 4px 4px !important;
  }

  .category-card .cat-content p {
    display: none !important;
  }

  .category-card .cat-content .link-text {
    font-size: 11px !important;
    display: block !important;
    text-align: center !important;
    padding-bottom: 8px !important;
  }

  /* ===== PRICE FIX ===== */
  .price,
  .product-card .price,
  .price-value,
  #studioPrice {
    font-size: 14px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  /* ===== STUDIO CUSTOMIZER FIX ===== */
  .studio-section {
    padding: 30px 0 20px !important;
  }

  .studio-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .studio-preview-col {
    position: relative !important;
    top: auto !important;
  }

  .studio-preview-card {
    padding: 20px !important;
    aspect-ratio: auto !important;
    min-height: 250px !important;
  }

  .studio-frame {
    width: 70% !important;
    margin: 0 auto !important;
  }

  .studio-title {
    font-size: 1.5rem !important;
    text-align: center !important;
  }

  .studio-footer {
    flex-direction: column !important;
    gap: 15px !important;
    text-align: center !important;
  }

  .studio-frame-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }

  /* ===== EDIT POPUP (BOTTOM SHEET) ===== */
  .edit-popup {
    position: fixed !important;
    bottom: -100% !important;
    left: 0 !important;
    width: 100% !important;
    max-height: 55% !important;
    background: #fff !important;
    border-radius: 20px 20px 0 0 !important;
    transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 9999 !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15) !important;
    overflow-y: auto !important;
  }

  .edit-popup.active {
    bottom: 0 !important;
  }

  .edit-popup .popup-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 4px;
    margin: 10px auto;
  }

  .popup-content {
    padding: 15px 20px 30px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .popup-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-align: center;
  }

  .popup-content button {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #e5e2e1;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .popup-content button:hover,
  .popup-content button:active {
    background: #f8f5f0;
    border-color: #d4af37;
  }

  .popup-content button.popup-done-btn {
    background: #1c1b1b;
    color: #fff;
    border-color: #1c1b1b;
  }

  .edit-popup-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.4) !important;
    z-index: 9998 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s !important;
  }

  .edit-popup-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* ===== GENERAL BUTTON FIX ===== */
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-pc-primary {
    padding: 10px 16px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* ===== STICKY CART BAR ===== */
  .sticky-cart {
    position: fixed !important;
    bottom: 90px !important;    /* Above bottom nav */
    left: 10px !important;
    right: 10px !important;
    background: linear-gradient(135deg, #1c1b1b 0%, #333 100%) !important;
    color: white !important;
    text-align: center !important;
    padding: 12px 20px !important;
    border-radius: 14px !important;
    z-index: 1900 !important;
    display: none !important;    /* Shown via JS when cart has items */
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px) !important;
  }

  .sticky-cart.visible {
    display: flex !important;
  }

  .sticky-cart .cart-info {
    font-size: 13px;
    font-weight: 600;
  }

  .sticky-cart .cart-total-display {
    font-size: 15px;
    font-weight: 700;
    color: #d4af37;
  }

  .sticky-cart .cart-checkout-btn {
    background: #d4af37 !important;
    color: #1c1b1b !important;
    border: none !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    cursor: pointer !important;
  }

  /* ===== CART DRAWER LAYOUT FIX ===== */
  .cart-drawer {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    height: 100dvh !important;
  }
  .cart-header {
    flex: 0 0 auto !important;
  }
  .cart-items {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    padding-bottom: 20px !important;
  }
  .cart-footer {
    flex: 0 0 auto !important;
    position: sticky !important;
    bottom: 0 !important;
    background: #fff !important;
    z-index: 10 !important;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05) !important;
    padding-bottom: env(safe-area-inset-bottom, 20px) !important;
  }

  /* ===== MOBILE NAV DRAWER FIX ===== */
  .nav-links {
    display: none;
    flex-direction: column !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    background: #fff !important;
    padding: 20px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    z-index: 1100 !important;
    gap: 15px !important;
  }
  .nav-links.open {
    display: flex !important;
  }
  .nav-links a {
    font-size: 16px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
  }

  /* ===== ENSURE CHECKOUT & EDIT POPUP ACCESSIBILITY ===== */
  .mobile-bottom-nav {
    z-index: 2000 !important;
  }
  .mobile-sticky-checkout {
    z-index: 2100 !important;
    bottom: 60px !important; /* clear bottom nav */
  }

  /* ===== PREVENT HORIZONTAL OVERFLOW ON CARDS ===== */
  .slide, .card, .product-card, .customizer-preview {
    max-width: 100% !important;
  }
}

/* ===== SMALL PHONE ADJUSTMENTS ===== */
@media (max-width: 380px) {
  .logo img {
    width: 100px !important;
  }

  .category-card .cat-img {
    height: 80px !important;
  }

  .category-card .cat-content h3 {
    font-size: 11px !important;
  }

  .studio-frame {
    width: 80% !important;
  }

  .product-card h3 {
    font-size: 0.5rem !important;
  }

  .product-card .price {
    font-size: 0.5rem !important;
  }
}

/* ============================================================
   PHOTOCART v8.0 â€” SPRINT 2 REMEDIATION PATCHES
   B14, B15, B16, B19, B20, B21, B22, B23, B24, B25, B26, B28
   ============================================================ */

/* B19: Prevent hero section horizontal scroll bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hero-scene {
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}
.hero-scene-bg {
  overflow: hidden;
  max-width: 100%;
}
.hero-scene-container {
  overflow-x: hidden;
}
.hero-scene-posters {
  max-width: 100%;
}

/* B20: Remove mobile gap between hero and marquee â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {
  .hero-scene {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  .section {
    padding: 20px 0 !important;
  }
  #acrylic-posters,
  #paper-posters {
    padding: 25px 0 !important;
  }
}

/* B25: Ensure loader is fully centered both axes â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pc-loader {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
}
.pc-loader-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}
.pc-logo-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

/* B22/B23: Floating AI button â€” hide on auth pages â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Requires <body class="auth-page"> on login/signup/forgot/reset */
body.auth-page .floating-ai-btn,
body.auth-page .ai-mini-chat {
  display: none !important;
  pointer-events: none !important;
}

/* B24: Hide floating AI button on mobile (bottom-nav already present) */
@media (max-width: 768px) {
  .floating-ai-btn {
    display: none !important;
  }
  .ai-mini-chat {
    display: none !important;
  }
}

/* B14/B15/B16: Desktop header alignment â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (min-width: 769px) {
  .nav-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
  }
  .logo {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .logo img {
    max-height: 58px !important;
    max-width: 58px !important;
    width: auto !important;
    height: auto !important;
  }
  .logo-text {
    white-space: nowrap !important;
    font-size: 1.6rem !important;
    flex-shrink: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 160px !important;
  }
  .nav-links {
    display: flex !important;
    align-items: center !important;
    gap: 28px !important;
    flex-wrap: nowrap !important;
    transform: translateY(2px) !important; /* Optical alignment so text baseline aligns with icons */
  }
  .nav-links a {
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
  }
  .nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
  }
  .icon-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
}

/* B26: Small mobile header layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 480px) {
  .navbar {
    padding: 8px 12px !important;
  }
  .logo img {
    width: 36px !important;
    height: 36px !important;
  }
  .logo-text {
    font-size: 1.1rem !important;
    max-width: 100px !important;
  }
  .mobile-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .nav-actions {
    gap: 6px !important;
  }
  .icon-btn {
    min-width: 36px !important;
    min-height: 36px !important;
    font-size: 1.1rem !important;
  }
}

/* B28: Touch-friendly buttons and inputs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {
  .studio-ghost-btn {
    padding: 12px 18px !important;
    font-size: 0.75rem !important;
    min-height: 44px !important;
  }
  .studio-select-btn {
    padding: 14px 10px !important;
    min-height: 52px !important;
    font-size: 0.8rem !important;
  }
  .studio-toggle-btn {
    min-height: 44px !important;
    font-size: 0.8rem !important;
  }
  .wpm-room-btn {
    min-height: 44px !important;
    padding: 10px 16px !important;
  }
  /* Ensure all clickable items have adequate size */
  a, button, [role="button"] {
    min-touch-action: manipulation;
  }
}

/* B7: Constrain customizer frame height â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (min-width: 769px) {
  .studio-frame {
    max-height: 150vh !important;
  }
  .studio-preview-card {
    max-height: 160vh !important;
    overflow: hidden !important;
  }
}

/* B27: Mobile customizer â€” always visible below preview â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 1101px) {
  .pc-controls {
    display: block !important;
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    background: #fff !important;
    z-index: auto !important;
    padding: 16px 16px 20px !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
    transition: none !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* No longer needed â€” kept for backward compat but has no visual effect */
  .pc-controls.mobile-bottom-sheet-active {
    bottom: auto !important;
  }

  .mobile-sheet-header {
    display: flex !important;
  }

  .desktop-only {
    display: none !important;
  }

  /* Size grid: enforce 2-column layout on mobile */
  .studio-grid-select {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .studio-select-btn {
    padding: 10px 8px !important;
    font-size: 0.75rem !important;
    border-radius: 10px !important;
    min-height: 52px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
  }
}

/* ============================================================
   MINI-DESKTOP REDESIGN (ALL SECTIONS SIDE-BY-SIDE)
   Forcing desktop-like layout on mobile screens v1.1
   ============================================================ */

@media (max-width: 1101px) {
  /* 1. Global Scaling & High-Definition Rendering */
  :root {
    --side-padding: 15px;
  }
  
  body {
    font-size: 16px !important; /* Significant upscale for readability */
    font-weight: 500 !important;
    line-height: 1.5 !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
  }

  /* Sharp Images */
  img {
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
  }

  .container {
    padding: 0 var(--side-padding) !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  /* Force weights on key elements */
  h1, h2, h3, .logo-text, .stat-value {
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
  }

  a, button, label {
    font-weight: 600 !important;
  }

  /* 2. Hero Section: Side-by-Side */
  .hero-scene-container {
    display: grid !important;
    grid-template-columns: 58% 42% !important; /* Give more space to text */
    gap: 10px !important;
    align-items: center !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    min-height: auto !important;
  }
  
  .hero-scene {
    padding: 60px 0 40px !important; /* Give more height */
    overflow: hidden !important;
    display: block !important; /* Show premium hero on mobile */
  }

    .hero-scene-posters {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    width: 100% !important;
    align-items: center !important; /* Center posters in their col */
    transform: none !important; /* Remove scaling to fix blur/misalignment */
    position: relative !important;
    right: auto !important;
    top: auto !important;
    order: 2 !important;
  }

  .scene-poster {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 200px !important; /* Keep it compact */
  }

  /* Hide extra posters on mobile so it doesn't stack too tall */
  .poster-center, .poster-right {
    display: none !important;
  }

  .hero-scene-content {
    text-align: left !important;
    padding: 0 !important;
    order: 1 !important;
  }

  .hero-offer-bar {
    font-size: 0.55rem !important;
    padding: 4px 6px !important;
    margin-bottom: 8px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    display: inline-block !important;
  }

  .scene-urgency {
    font-size: 0.55rem !important;
    padding: 4px 6px !important;
    margin-bottom: 8px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    border-radius: 40px !important;
  }

  .scene-tag {
    font-size: 0.6rem !important;
    padding: 4px 8px !important;
    margin-bottom: 8px !important;
    display: inline-block !important;
  }

  .scene-title {
    font-size: 1.3rem !important; /* Scaled down */
    font-weight: 800 !important;
    line-height: 1.15 !important;
    margin-bottom: 8px !important;
    color: #fdfaf5 !important;
  }

  .scene-subtitle {
    font-size: 0.95rem !important;
    display: block !important;
    margin-bottom: 20px !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
    color: #e0d8cc !important;
  }

  .scene-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: flex-start !important;
  }

  .btn-scene-primary, .btn-scene-secondary {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 0.7rem !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  .hero-scene-stats {
    grid-column: span 2 !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    margin-top: 15px !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    padding-top: 10px !important;
    gap: 5px !important;
    order: 3 !important;
  }

  .stat-value { font-size: 0.85rem !important; }
  .stat-text { font-size: 0.5rem !important; }

  /* 3. Studio Customizer: Side-by-Side */
  .studio-layout {
    display: grid !important;
    grid-template-columns: 45% 55% !important;
    gap: 10px !important;
    align-items: start !important;
  }

  .studio-preview-col {
    position: sticky !important;
    top: 60px !important;
    z-index: 100 !important;
    padding-bottom: 0 !important;
  }

  .studio-preview-card {
    padding: 15px !important;
    min-height: 280px !important; /* Taller for tall frames */
    border-radius: 16px !important;
    aspect-ratio: auto !important; /* Remove 1:1 constraint */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fdfdfd !important;
    overflow: hidden !important;
  }
  
  /* Prevent cropping: Frame fits card */
  .studio-frame {
    max-width: 95% !important;
    max-height: 250px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
  }

  .pc-controls {
    padding: 0 0 100px !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .studio-title {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    text-align: left !important;
    margin-bottom: 15px !important;
  }

  .studio-grid-select {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .studio-select-btn {
    padding: 10px 6px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    min-height: 50px !important;
    border-radius: 8px !important;
  }

  .studio-footer {
    display: flex !important;
    position: static !important;
    background: transparent !important;
    padding: 15px 0 0 !important;
    border-top: 1px solid rgba(0,0,0,0.05) !important;
    flex-direction: column !important;
    gap: 10px !important;
    box-shadow: none !important;
  }

  .studio-price-box {
    text-align: left !important;
  }

  .price-label { font-size: 0.65rem !important; }
  #studioPrice { font-size: 1.1rem !important; }

  #studioAddToCart {
    width: 100% !important;
    padding: 12px !important;
    font-size: 0.75rem !important;
    border-radius: 8px !important;
  }

  /* 4. Shop & Category Grids (Force 2-column) */
  .pc-grid-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding: 0 !important;
  }

  .product-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .product-card {
    padding: 0 !important;
    border-radius: 8px !important;
  }

  .product-image {
    height: 160px !important; /* Smaller image height */
  }

  .product-info {
    padding: 10px !important; /* Compact padding */
  }

  .product-info h4 {
    font-size: 0.75rem !important;
    margin-bottom: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .product-info .price {
    font-size: 0.7rem !important;
    margin-bottom: 5px !important;
  }

  .product-info .btn-pc-primary {
    padding: 6px 10px !important;
    font-size: 0.65rem !important;
    margin-top: 5px !important;
  }

  .product-stars {
    font-size: 0.65rem !important;
    margin: 2px 0 !important;
  }



  /* 5. Footer: Multi-column */
  .footer-content {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr 1fr !important;
    gap: 15px !important;
    text-align: left !important;
  }

  .footer-col {
    margin: 0 !important;
  }

  .footer-col h3 {
    font-size: 0.8rem !important;
    margin-bottom: 10px !important;
  }

  .footer-links li a {
    font-size: 0.7rem !important;
  }

  .footer-bottom {
    text-align: left !important;
  }

  /* 6. Reviews Section (Side-by-side cards) */
  .review-track {
    display: flex !important;
    gap: 15px !important;
    overflow-x: auto !important;
    padding-bottom: 20px !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .review-card-v2 {
    flex: 0 0 75% !important; /* Show part of the next card */
    scroll-snap-align: center !important;
    padding: 20px !important;
    font-size: 0.8rem !important;
  }

  /* 7. Inspiration Gallery (Bento-lite) */
  .section-header-v2 {
    margin-top: 5px !important;
    margin-bottom: 15px !important;
  }

  .reviews-v2 {
    padding-top: 5px !important;
    padding-bottom: 20px !important;
    margin-top: -10px !important;
  }

  .inspiration-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-auto-rows: auto !important;
    gap: 12px !important;
  }

  .insp-item {
    height: 140px !important;
  }

  .insp-large {
    grid-column: span 2 !important;
    grid-row: span 1 !important; /* Prevent extra row span gap */
    height: 200px !important;
  }

  .insp-wide {
    grid-column: span 2 !important;
    grid-row: span 1 !important;
    height: 160px !important;
  }

  .insp-overlay span {
    font-size: 0.75rem !important;
  }

  .insp-link {
    font-size: 0.65rem !important;
    padding: 6px 12px !important;
  }

  /* 8. Features Section (2 Columns) */
  #features-container {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .feature-item {
    padding: 20px 12px !important;
  }

  .feature-icon {
    font-size: 1.8rem !important;
  }

  .feature-item h3 {
    font-size: 0.85rem !important;
  }

  .feature-item p {
    font-size: 0.7rem !important;
  }

  
}


/* GLOBAL MARQUEE STYLES */
.glass-marquee-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Photo-frame look for all product cards in shop/home grids */
.product-grid .product-card,
.product-card.frame-look {
  border-radius: 16px !important;
  border: 1px solid #b6905f !important;
  background: linear-gradient(155deg, #8e6b44 0%, #6f4f2f 38%, #a98558 100%) !important;
  box-shadow: 0 14px 30px rgba(41, 25, 10, 0.28), inset 0 0 0 2px rgba(255, 240, 214, 0.2) !important;
  overflow: hidden !important;
}

.product-grid .product-card .product-image,
.product-card.frame-look .frame-window {
  position: relative !important;
  margin: 12px !important;
  border-radius: 7px !important;
  border: 12px solid #f1ead8 !important; /* photo mat */
  background: #e8dfc9 !important;
  box-shadow: inset 0 0 0 1px rgba(67, 46, 25, 0.28), inset 0 10px 22px rgba(0, 0, 0, 0.14) !important;
  overflow: hidden !important;
}

.product-grid .product-card .product-image::before,
.product-card.frame-look .frame-window::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 7px;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -2px 6px rgba(0,0,0,0.25);
}

.product-grid .product-card .product-media,
.product-card.frame-look .frame-window .product-media {
  border-radius: 3px !important;
  transform: scale(1.01) !important;
}

.product-grid .product-card .product-info,
.product-card.frame-look .product-info {
  background: linear-gradient(180deg, rgba(255, 247, 233, 0.98), #fff) !important;
  border-top: 1px solid rgba(111, 83, 53, 0.3) !important;
}

@media (max-width: 768px) {
  .product-grid .product-card .product-image,
  .product-card.frame-look .frame-window {
    margin: 9px !important;
    border-width: 8px !important;
  }
}

/* Product-card spacing cleanup (desktop + mobile) */
.product-grid .product-card .product-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.product-grid .product-card .product-info h4 {
  margin: 0 0 2px 0 !important;
  min-height: 0 !important;
  line-height: 1.28 !important;
}

.product-grid .product-card .product-info .price,
.product-grid .product-card .product-info p {
  margin: 0 !important;
}

.product-grid .product-card .product-info .btn-pc-primary,
.product-grid .product-card .product-info .btn {
  margin-top: 6px !important;
}

@media (max-width: 768px) {
  /* Auth page: compact mobile layout */
  body.auth-page .top-bar {
    display: none !important;
  }

  body.auth-page .announcement-marquee,
  body.auth-page .marquee-pro {
    margin-top: 0 !important;
  }

  body.auth-page .auth-container {
    min-height: auto !important;
    padding-top: 68px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-bottom: 90px !important;
  }

  body.auth-page .auth-card {
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    padding: 14px 12px !important;
    border-radius: 12px !important;
  }

  body.auth-page .auth-header h1 {
    font-size: 1.45rem !important;
    line-height: 1.2 !important;
  }

  body.auth-page .auth-header p,
  body.auth-page .auth-footer p {
    font-size: 0.86rem !important;
    line-height: 1.35 !important;
  }
}

.glass-marquee-container {
  display: flex !important;
  overflow: hidden !important;
  width: 100% !important;
}

.glass-marquee-track {
  display: flex !important;
  gap: 12px !important;
  width: max-content !important;
  animation: scrollLeftToRight 180s linear infinite !important;
}

.glass-marquee-card {
  display: block !important;
  flex: 0 0 160px !important;
  height: 220px !important;
  border-radius: 12px !important;
  background: #f8f8f8 !important;
  overflow: hidden !important;
  position: relative !important;
}

.glass-marquee-card .marquee-media {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* ============================================================
   MOBILE LAYOUT RESET v2.0 (single, clean source of truth)
   Applied last to override older conflicting mobile rules.
   ============================================================ */
@media (max-width: 1101px) {
  body {
    font-size: 15px !important;
    line-height: 1.45 !important;
    padding-bottom: 84px !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .section {
    padding: 28px 0 !important;
  }

  /* Header */
  .navbar {
    height: 64px !important;
    min-height: 64px !important;
    padding: 8px 10px !important;
  }

  .nav-container {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .logo {
    justify-self: center !important;
  }

  .logo img {
    height: 34px !important;
    width: auto !important;
  }

  .logo-text {
    max-width: 96px !important;
    font-size: 1rem !important;
  }

  .icon-btn,
  .mobile-toggle {
    min-width: 38px !important;
    min-height: 38px !important;
  }

  /* Hero */
  .hero-scene {
    display: none !important;
  }

  .mobile-hero-slider {
    display: block !important;
  }

  .mhs-slide {
    min-height: 420px !important;
    padding: 28px 16px !important;
  }

  .mhs-title {
    font-size: 1.85rem !important;
  }

  .mhs-subtitle {
    font-size: 0.88rem !important;
  }

  /* Catalog / cards */
  .pc-grid-2,
  .product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .product-card {
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .product-image {
    height: 170px !important;
  }

  .product-info {
    padding: 10px !important;
  }

  .product-info h4 {
    font-size: 0.82rem !important;
    line-height: 1.3 !important;
    min-height: 2.1em !important;
    margin-bottom: 4px !important;
    overflow: hidden !important;
  }

  .product-info .price {
    font-size: 0.8rem !important;
  }

  .product-info .btn-pc-primary,
  .product-info .btn {
    min-height: 40px !important;
    font-size: 0.75rem !important;
  }

  /* Customizer */
  .studio-layout {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .studio-preview-col {
    position: static !important;
  }

  .studio-preview-card {
    min-height: 280px !important;
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .studio-frame {
    width: min(78vw, 300px) !important;
    max-width: 100% !important;
  }

  .pc-controls {
    position: static !important;
    background: #fff !important;
    border-radius: 16px !important;
    padding: 14px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06) !important;
  }

  .studio-grid-select {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .studio-footer {
    position: static !important;
    padding: 10px 0 0 !important;
    border-top: 1px solid rgba(0,0,0,0.08) !important;
  }

  #studioAddToCart {
    width: 100% !important;
    min-height: 46px !important;
  }

  /* Checkout */
  .checkout-layout {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 16px 14px 120px !important;
  }

  .checkout-summary {
    position: static !important;
    top: auto !important;
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .mobile-sticky-checkout {
    bottom: 64px !important;
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-sticky-checkout .btn {
    min-height: 44px !important;
  }

  /* Auth pages */
  .auth-container {
    min-height: auto !important;
    padding-top: 84px !important;
    padding-bottom: 24px !important;
  }

  .auth-card {
    max-width: 100% !important;
    padding: 20px 16px !important;
    border-radius: 14px !important;
  }

  .auth-form {
    gap: 14px !important;
  }

  .form-input {
    min-height: 44px !important;
  }

  /* Cart */
  .cart-drawer {
    width: min(100%, 420px) !important;
  }

  .cart-item {
    grid-template-columns: 74px 1fr !important;
    gap: 10px !important;
  }

  .cart-item-img {
    width: 74px !important;
    height: 74px !important;
    object-fit: cover !important;
  }

  .cart-item-controls button {
    min-width: 34px !important;
    min-height: 34px !important;
  }

  .cart-footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .cart-footer .btn {
    min-height: 46px !important;
  }

  /* Footer */
  .footer-content {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}

@media (max-width: 420px) {
  .product-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .product-image {
    height: 150px !important;
  }

  .mhs-title {
    font-size: 1.65rem !important;
  }

  .checkout-layout {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* ============================================================
   April 2026: Production hotfixes for mobile coupon/header/footer/auth/customizer
   ============================================================ */
@media (max-width: 768px) {
  .announcement-marquee,
  .marquee-pro {
    font-size: 12px !important;
    letter-spacing: 0.02em !important;
    line-height: 1.3 !important;
  }

  .announcement-marquee .marquee-item,
  .marquee-pro .marquee-pro-content {
    font-family: "Inter", sans-serif !important;
    unicode-bidi: plaintext;
  }

  .navbar {
    height: 62px !important;
    min-height: 62px !important;
    padding: 6px 8px !important;
  }

  .nav-container {
    grid-template-columns: 38px minmax(0, 1fr) auto !important;
    gap: 6px !important;
    align-items: center !important;
  }

  .logo {
    justify-self: start !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .logo img {
    height: 30px !important;
    max-width: 100% !important;
    flex-shrink: 0 !important;
  }

  .logo-text {
    display: none !important;
  }

  .nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    min-width: 0 !important;
  }

  .icon-btn,
  .mobile-toggle {
    min-width: 34px !important;
    min-height: 34px !important;
    font-size: 16px !important;
  }

  .search-bar,
  .search-input,
  input[type="search"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  .auth-container {
    padding-top: 74px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .auth-card {
    max-width: 360px !important;
    margin: 0 auto !important;
    padding: 16px 14px !important;
    border-radius: 12px !important;
  }

  .auth-form {
    gap: 10px !important;
  }

  .auth-form input,
  .auth-form .form-input {
    min-height: 40px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
  }

  .auth-form .btn,
  .auth-form button[type="submit"] {
    min-height: 40px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
  }

  .studio-grid-select {
    gap: 6px !important;
  }

  .studio-select-btn {
    min-height: 44px !important;
    padding: 8px 6px !important;
    font-size: 0.75rem !important;
    border-radius: 10px !important;
    line-height: 1.2 !important;
  }

  .studio-select-btn small {
    font-size: 0.68rem !important;
  }
}

.footer .logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: max-content !important;
}

.footer .logo .logo-text {
  max-width: none !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* ============================================================
   May 2026: Header overlap + card video crop fixes
   ============================================================ */
@media (max-width: 1101px) {
  .navbar .nav-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .navbar .mobile-toggle {
    flex: 0 0 auto !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }

  .navbar .logo {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .navbar .logo img {
    height: 32px !important;
    width: auto !important;
    flex-shrink: 0 !important;
  }

  /* Keep brand visible but never let it collide with icons */
  .navbar .logo-text {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: clamp(1rem, 3.2vw, 1.55rem) !important;
    line-height: 1 !important;
  }

  .navbar .nav-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: fit-content !important;
  }

  .navbar .icon-btn {
    min-width: 34px !important;
    min-height: 34px !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
  }

  .navbar .badge {
    top: -4px !important;
    right: -3px !important;
  }

  /* Product cards: show more of video inside same card area (no crop) */
  .product-card .product-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f6f6f6 !important;
    overflow: hidden !important;
  }

  .product-card .product-image video,
  .product-card .product-image video.product-media {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f6f6f6 !important;
  }

  /* Category cards in hero/shop section */
  .category-card .cat-img {
    height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    background: #f6f6f6 !important;
  }

  .category-card .cat-img video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f6f6f6 !important;
  }
}

/* ============================================================
   Customizer Mobile Priority (Poster visibility first)
   ============================================================ */
@media (max-width: 768px) {
  #customizer .studio-layout {
    gap: 10px !important;
  }

  #customizer .studio-preview-card {
    min-height: 360px !important;
    padding: 10px !important;
  }

  #customizer .studio-frame {
    width: min(90vw, 360px) !important;
    max-height: 330px !important;
  }

  #customizer .pc-controls,
  #customizer .studio-controls-col {
    padding: 10px 10px 90px !important;
  }

  #customizer .studio-title {
    font-size: 1.05rem !important;
    margin-bottom: 8px !important;
    line-height: 1.15 !important;
  }

  #customizer .studio-control-group {
    margin-bottom: 8px !important;
  }

  #customizer .studio-label {
    font-size: 0.58rem !important;
    margin-bottom: 4px !important;
  }

  #customizer .studio-select-btn,
  #customizer .studio-toggle-btn {
    min-height: 38px !important;
    padding: 6px 5px !important;
    font-size: 0.68rem !important;
  }

  #customizer .studio-select-btn small {
    font-size: 0.58rem !important;
  }

  #customizer .studio-frame-item span {
    font-size: 0.5rem !important;
  }

  #customizer .studio-footer {
    padding-top: 8px !important;
    gap: 8px !important;
  }

  #customizer #studioPrice {
    font-size: 1rem !important;
  }
}


