/* Mobile / tablet fixes — keep Noir Verre look usable on phones */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  overflow-x: hidden !important;
  max-width: 100vw;
  position: relative;
}

img, video, svg {
  max-width: 100%;
  height: auto;
}

/* Forms must be selectable/typable on mobile */
input, textarea, select, [contenteditable],
input *, textarea * {
  -webkit-user-select: text !important;
  user-select: text !important;
  cursor: text !important;
}

/* Kill custom cursor + cursor:none on touch / small screens */
@media (max-width: 1024px), (hover: none), (pointer: coarse) {
  .custom-cursor,
  body.landing-page .custom-cursor,
  #customCursor {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  body.landing-page,
  body.landing-page *,
  body,
  body * {
    cursor: auto !important;
  }

  a, button, .btn-primary, .btn-secondary, label, summary {
    cursor: pointer !important;
  }
}

/* ——— Navbar ——— */
@media (max-width: 900px) {
  .navbar {
    padding: 0.85rem 0;
  }

  .nav-container {
    padding: 0 1rem !important;
    gap: 0.65rem;
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .nav-logo {
    min-width: 0;
    flex: 1 1 auto;
    z-index: 1003;
  }

  .nav-logo a {
    font-size: clamp(1.45rem, 6vw, 1.85rem) !important;
    white-space: nowrap;
  }

  .nav-actions {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    flex: 0 0 auto;
    margin-left: 0 !important;
    position: relative;
    z-index: 1005;
  }

  .nav-cart {
    font-size: 0.72rem !important;
    letter-spacing: 0.08em;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    padding: 0.35rem 0 !important;
  }

  .nav-account-link {
    display: none !important; /* keep header clean on phones */
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .nav-menu {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    background: #000 !important;
    backdrop-filter: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 5.5rem 1.35rem 2rem !important;
    gap: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    z-index: 1002;
    transform: none !important;
  }

  .nav-menu.active {
    display: flex !important;
  }

  .nav-menu > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    margin: 0 !important;
  }

  .nav-menu a {
    display: block;
    padding: 1rem 0 !important;
    font-size: 1rem !important;
    letter-spacing: 0.12em !important;
    color: #fff !important;
    text-align: left !important;
    width: 100%;
    box-sizing: border-box;
  }

  .nav-menu a::after {
    display: none !important;
  }

  .nav-menu li.dropdown > a::before {
    float: right;
    margin-top: 0.15rem;
  }

  .dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 0 0.35rem !important;
    padding: 0 0 0.65rem 0.85rem !important;
    background: transparent !important;
    border: none !important;
    border-left: 2px solid rgba(85, 255, 81, 0.35) !important;
    box-shadow: none !important;
    left: auto !important;
  }

  .dropdown-menu a {
    padding: 0.55rem 0 !important;
    font-size: 0.86rem !important;
    color: rgba(255, 255, 255, 0.72) !important;
    letter-spacing: 0.04em !important;
    text-transform: none !important;
  }

  .dropdown-menu a:hover {
    padding-left: 0 !important;
  }

  body.nav-open {
    overflow: hidden !important;
  }

  body.nav-open .navbar {
    z-index: 1003;
  }
}

/* ——— Hero: fill phone like desktop composition ——— */
.hero-mobile-stage {
  display: none;
}

@media (max-width: 900px) {
  .hero-section {
    min-height: 100svh !important;
    min-height: 100dvh !important;
    background-image: none !important;
    background-color: #000 !important;
    background-attachment: scroll !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
  }

  .hero-section::after {
    height: 28% !important;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, #000 100%) !important;
  }

  .hero-mobile-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 5.5rem 1.25rem 2.5rem;
    box-sizing: border-box;
    position: relative;
    z-index: 5;
    gap: 0.35rem;
  }

  .hero-mobile-bottle {
    width: min(58vw, 240px);
    height: auto;
    display: block;
    filter: drop-shadow(0 18px 40px rgba(85, 255, 81, 0.18));
    margin-bottom: 0.5rem;
  }

  .hero-mobile-copy {
    display: flex !important;
    position: static;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
    gap: 0.55rem;
    width: 100%;
  }

  .hero-mobile-copy .hero-kicker {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
  }

  .hero-mobile-copy .hero-name {
    font-family: 'Parfumerie Script', serif;
    font-size: clamp(2.6rem, 14vw, 3.6rem);
    color: #55ff51;
    margin: 0;
    line-height: 1;
    text-shadow: 0 0 24px rgba(85, 255, 81, 0.35);
  }

  .hero-mobile-copy .hero-line {
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    max-width: 18rem;
    line-height: 1.45;
  }

  .hero-mobile-copy .hero-cta {
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.7rem 1.6rem;
    border: 1px solid #55ff51;
    color: #55ff51;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
  }

  .fade-section {
    padding: 5.5rem 1.15rem 3.5rem !important;
    min-height: auto;
  }

  .fade-section.hero-section {
    padding: 0 !important;
  }

  .section-title {
    font-size: clamp(2rem, 10vw, 2.8rem) !important;
  }

  .story-text {
    font-size: 0.95rem !important;
    padding: 0 0.25rem;
  }

  .story-card-3d,
  .experience-card-3d {
    transform: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 1.35rem !important;
    min-height: 0 !important;
  }

  .story-card-title {
    font-size: clamp(1.55rem, 7.5vw, 2.1rem) !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .story-card-text,
  .experience-description {
    font-size: 0.92rem !important;
    overflow-wrap: anywhere;
  }

  .section-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: hidden;
  }

  .fade-section {
    overflow-x: hidden !important;
    max-width: 100vw;
  }

  .experience-grid {
    gap: 1rem !important;
    margin-top: 2rem !important;
  }

  .collection-grid,
  .experience-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .perfume-image-wrapper {
    height: auto !important;
    min-height: 220px;
  }

  .explore-store-btn {
    display: inline-flex;
    width: auto;
    max-width: 100%;
  }
}

@media (min-width: 901px) {
  .hero-mobile-stage {
    display: none !important;
  }
}

/* ——— Store ——— */
@media (max-width: 968px) {
  .store-section,
  .cart-section,
  .checkout-section,
  .product-section,
  .contact-section,
  .faq-section,
  .auth-section,
  .account-section,
  .confirmation-section {
    padding: 5.5rem 1rem 3rem !important;
  }

  .store-title,
  .cart-title,
  .checkout-title,
  .product-title,
  .contact-title,
  .faq-title {
    margin-bottom: 1.5rem !important;
    font-size: clamp(2.2rem, 11vw, 3rem) !important;
  }

  .store-content {
    display: flex !important;
    flex-direction: column;
    gap: 1.25rem !important;
  }

  .store-products {
    order: 1;
  }

  .store-sidebar {
    order: 2;
    position: relative !important;
    top: 0 !important;
  }

  .filter-card {
    padding: 1rem 1.1rem !important;
  }

  .filter-card h3 {
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem !important;
  }

  .filter-card h3::after {
    content: '▾';
    color: #55ff51;
    font-size: 0.85rem;
  }

  .filter-card.is-open h3::after {
    content: '▴';
  }

  .filter-card .filter-body {
    display: none;
    margin-top: 1.25rem;
  }

  .filter-card.is-open .filter-body {
    display: block;
  }
}

/* Desktop: filters always visible */
@media (min-width: 969px) {
  .filter-card .filter-body {
    display: block !important;
  }

  .filter-card h3::after {
    display: none !important;
  }
}

@media (max-width: 968px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.85rem !important;
  }

  .store-product-item {
    max-width: 100%;
  }

  .store-product-image-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    height: 160px !important;
    padding: 0.75rem !important;
    box-sizing: border-box;
  }

  .store-product-name {
    font-size: 0.95rem !important;
  }

  .store-product-price {
    font-size: 0.9rem !important;
  }

  .store-product-actions {
    flex-direction: row !important;
    gap: 0.4rem !important;
    align-items: stretch;
  }

  .store-product-actions .btn-primary,
  .store-product-actions button,
  .store-add-wishlist {
    width: auto;
    flex: 1;
    min-height: 40px !important;
    padding: 0.45rem 0.35rem !important;
    font-size: 0.68rem !important;
  }

  .store-title,
  .cart-title,
  .checkout-title {
    text-shadow: 0 0 10px rgba(85, 255, 81, 0.22) !important;
  }
}

@media (max-width: 360px) {
  .products-grid {
    grid-template-columns: 1fr !important;
  }

  .store-product-image-wrapper {
    height: 220px !important;
  }
}

/* ——— Cart / Checkout / Product ——— */
@media (max-width: 968px) {
  .cart-content,
  .checkout-content,
  .product-container {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .cart-summary,
  .checkout-summary,
  .product-image-wrapper {
    position: relative !important;
    top: 0 !important;
  }

  .checkout-form-wrapper,
  .cart-item,
  .order-summary {
    padding: 1.25rem !important;
  }

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

  .cart-item {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .cart-item-image,
  .cart-item-image img {
    width: 100% !important;
    max-width: 220px;
    margin: 0 auto;
  }

  .product-image-wrapper {
    height: min(55vh, 380px) !important;
    padding: 1rem !important;
  }

  .product-actions {
    flex-direction: column !important;
  }

  .product-actions button,
  .product-actions .btn-primary,
  .wishlist-btn {
    width: 100%;
  }
}

/* ——— Footer / misc pages ——— */
@media (max-width: 768px) {
  .footer {
    padding: 2.5rem 1.15rem 1.25rem !important;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
  }

  .footer-section:first-child {
    grid-column: 1 / -1;
  }

  .toast.is-show {
    left: 12px !important;
    right: 12px !important;
    top: 76px !important;
    max-width: none;
  }

  .nv-policy {
    padding: 6rem 1.15rem 3rem !important;
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr !important;
  }
}
