/*
 * ═══════════════════════════════════════════════════════════════
 * ✦ NOCTARIE — Mobile Premium CSS v2.0
 * ═══════════════════════════════════════════════════════════════
 *
 * ARCHITECTURE:
 *   - This file layers ON TOP of main.css mobile rules.
 *   - Uses !important sparingly, only to override inline styles
 *     or main.css rules that cannot be refactored.
 *   - All rules scoped inside media queries = zero desktop impact.
 *
 * BREAKPOINTS:
 *   991px  — Tablet boundary (overflow safety only)
 *   768px  — Mobile master (matches main.css breakpoint)
 *   430px  — Compact mobile (iPhone 14PM, Pixel 7)
 *   374px  — Ultra-small (iPhone SE, Galaxy S)
 *
 * PRIORITY ORDER:
 *   1. Checkout / Payment
 *   2. Product Detail
 *   3. Cart Drawer
 *   4. Navigation & Menu
 *   5. Homepage (Hero, Grid, Categories)
 *   6. Global Utilities & Safety
 */


/* ═══════════════════════════════════════════════════════════════
   0) OVERFLOW SAFETY — Prevent any horizontal scroll
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
  html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  body,
  .container,
  .hero,
  .products-section,
  .categories-section,
  .marquee-section,
  footer,
  .shop-layout,
  .product-detail,
  .checkout-page,
  .profile-container {
    overflow-x: hidden;
    max-width: 100vw;
  }
}


/* ═══════════════════════════════════════════════════════════════
   1) CHECKOUT / PAYMENT — Premium Flow
   ═══════════════════════════════════════════════════════════════
   The most critical area. Must feel structured, trustworthy,
   calm, and polished. Optimized for one-hand completion.
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Layout ── */
  .checkout-page {
    padding: calc(var(--nav-h) + 16px) 16px 40px !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* ── Step Indicators — Horizontal pill style ── */
  .checkout-steps {
    margin-bottom: 24px;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--grey-200);
    padding-bottom: 0;
  }
  .checkout-steps::-webkit-scrollbar { display: none; }

  .step {
    padding: 10px 12px;
    font-size: 8px;
    letter-spacing: 0.15em;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 40px;
    gap: 6px;
  }

  .step-num {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }

  /* ── Section Titles ── */
  .checkout-section-title {
    font-size: 12px;
    letter-spacing: 0.12em;
    margin-bottom: 20px;
    padding-bottom: 12px;
  }

  /* ── Cart Items in Checkout ── */
  .checkout-cart-items {
    margin-top: 12px;
  }

  /* ── Step Action Buttons ── */
  .checkout-step-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
  }
  .checkout-step-actions--end {
    justify-content: flex-end;
  }

  .checkout-back-btn {
    flex: 1;
    padding: 16px 12px !important;
    background: white !important;
    color: var(--black) !important;
    border: 1px solid var(--grey-200) !important;
    font-size: 11px;
    letter-spacing: 0.1em;
    min-height: 52px;
  }

  .checkout-next-btn {
    flex: 2;
    padding: 16px 12px !important;
    min-height: 52px;
    font-size: 12px !important;
    letter-spacing: 0.1em;
  }

  /* ── Contact Section ── */
  .contact-section {
    padding: 20px 16px;
    margin-bottom: 20px;
    border-color: var(--grey-200);
  }

  .contact-section-header {
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .contact-field {
    margin-bottom: 16px;
  }

  .contact-field input {
    font-size: 16px;
    min-height: 48px;
    padding: 14px 0;
  }

  .contact-field label {
    font-size: 9px;
    letter-spacing: 0.18em;
  }

  .phone-input-wrapper input {
    min-height: 48px;
    font-size: 16px;
  }

  .country-badge {
    font-size: 13px;
    padding: 14px 10px 14px 0;
    margin-right: 10px;
  }

  .field-error {
    font-size: 11px;
    margin-top: 4px;
  }

  .field-helper {
    font-size: 10px;
    line-height: 1.5;
  }

  .email-suggestion {
    font-size: 11px;
    padding: 10px 12px;
  }

  /* ── Address Grid — Single column on mobile ── */
  .address-grid {
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  .address-grid .form-group {
    margin-bottom: 12px;
  }

  .address-grid .form-group input {
    padding: 14px 0;
    font-size: 16px;
    min-height: 48px;
  }

  .address-grid .form-group label {
    font-size: 9px;
    letter-spacing: 0.18em;
  }

  /* ── Saved Address Cards ── */
  .saved-address-card {
    padding: 16px;
    margin-bottom: 10px;
    min-height: 44px;
  }

  .saved-address-card h4 {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .saved-address-card p {
    font-size: 11px;
    line-height: 1.5;
  }

  /* ── Auth Status Banner ── */
  #auth-status-banner {
    border-radius: 4px;
    padding: 12px 14px !important;
    margin-bottom: 14px !important;
  }

  #auth-status-banner p {
    font-size: 12px !important;
  }

  #force-guest-btn {
    font-size: 9px !important;
    padding: 6px 10px !important;
    width: 100%;
    margin-top: 8px;
  }

  /* ── Order Summary Box — Mobile ── */
  .order-summary-box {
    position: relative;
    top: 0;
    padding: 20px 16px;
    border-radius: 0;
    background: var(--grey-100);
  }

  .order-summary-box .checkout-section-title {
    font-size: 11px;
    padding-bottom: 12px;
    margin-bottom: 16px;
  }

  .order-summary-line {
    font-size: 12px;
    padding: 8px 0;
  }

  .order-summary-total {
    font-size: 16px;
    padding-top: 12px;
    margin-top: 6px;
  }

  /* ── PayTR Payment iframe — Full bleed, premium feel ── */
  .paytr-iframe-container {
    margin: 0 -16px;
    width: calc(100% + 32px);
    border: none;
    border-top: 1px solid var(--grey-200);
    border-bottom: 1px solid var(--grey-200);
    min-height: 1100px;
    background: #fff;
  }

  .paytr-iframe-container iframe {
    min-height: 1100px;
    height: 1100px;
  }

  /* ── Payment step header refinement ── */
  #payment-step .checkout-section-title {
    margin-bottom: 12px;
  }

  #payment-step p {
    font-size: 11px;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  /* ── Review step mobile refinement ── */
  #review-content > div {
    padding: 16px !important;
    margin-bottom: 12px !important;
    border-radius: 4px !important;
  }

  #review-content h3 {
    font-size: 12px !important;
    margin-bottom: 12px !important;
  }

  /* ── Billing checkbox area ── */
  #billing-same {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  /* ── Checkout form general inputs — iOS zoom prevention ──  */
  .checkout-page input[type="text"],
  .checkout-page input[type="email"],
  .checkout-page input[type="tel"],
  .checkout-page select,
  .checkout-page textarea {
    font-size: 16px !important;
    min-height: 48px;
    -webkit-appearance: none;
    border-radius: 0;
  }

  .checkout-page .btn-primary {
    min-height: 52px;
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  /* ── Checkout Cart Items — Mobile ── */
  .co-cart-item {
    gap: 12px;
    padding: 12px 10px;
    margin-bottom: 12px;
    align-items: flex-start;
  }

  .co-cart-item__img {
    width: 64px;
    height: 84px;
    border-radius: 2px;
  }

  .co-cart-item__name {
    font-size: 13px;
    margin-bottom: 2px;
    line-height: 1.25;
  }

  .co-cart-item__variant {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .co-cart-item__actions {
    gap: 10px;
    flex-wrap: wrap;
  }

  .co-cart-item__qty button {
    min-width: 40px;
    min-height: 40px;
    padding: 4px 10px;
    font-size: 16px;
  }

  .co-cart-item__qty span {
    min-width: 40px;
    font-size: 13px;
  }

  .co-cart-item__remove {
    font-size: 11px;
    padding: 6px 0;
    min-height: 36px;
    display: flex;
    align-items: center;
  }

  .co-cart-item__price {
    font-size: 13px;
  }
}

/* Checkout — Small phones */
@media (max-width: 430px) {
  .checkout-page {
    padding: calc(var(--nav-h) + 12px) 14px 32px !important;
  }

  .step {
    font-size: 7px;
    padding: 8px 10px;
    letter-spacing: 0.1em;
  }

  .step-num {
    width: 18px;
    height: 18px;
    font-size: 8px;
  }

  .checkout-next-btn {
    font-size: 11px !important;
  }

  .order-summary-box {
    padding: 16px 14px;
  }
}

@media (max-width: 374px) {
  .checkout-page {
    padding: calc(var(--nav-h) + 10px) 12px 28px !important;
  }

  .checkout-step-actions {
    flex-direction: column;
    gap: 8px;
  }

  .checkout-back-btn,
  .checkout-next-btn {
    flex: none !important;
    width: 100%;
  }
}


/* ═══════════════════════════════════════════════════════════════
   2) PRODUCT DETAIL PAGE — Immersive Mobile PDP
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  .product-detail {
    display: flex;
    flex-direction: column;
  }

  /* Gallery — Full bleed swipeable */
  .product-gallery {
    position: relative;
    top: 0;
    height: auto;
    aspect-ratio: 3/4;
    overflow: hidden;
    width: 100%;
    display: flex;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .product-gallery::-webkit-scrollbar { display: none; }

  .gallery-main {
    min-width: 100%;
    height: 100%;
    scroll-snap-align: start;
  }

  /* Gallery dots — Pill-style indicator */
  .gallery-thumbs {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    top: auto;
    transform: none;
    flex-direction: row;
    justify-content: center;
    padding: 0;
    pointer-events: none;
    gap: 4px;
  }

  .gallery-thumb {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    opacity: 1;
    margin: 0 2px;
    transition: all 0.3s ease;
  }

  .gallery-thumb.active {
    background: var(--white);
    width: 24px;
    border-radius: 10px;
  }

  /* Info panel — Editorial spacing */
  .product-info-panel {
    padding: 28px 20px 180px;
    gap: 20px;
  }

  .product-info-breadcrumb {
    font-size: 9px;
    letter-spacing: 0.18em;
    flex-wrap: wrap;
    margin-bottom: 4px;
    color: var(--grey-400);
  }

  .product-info-title {
    font-size: clamp(22px, 6vw, 30px);
    letter-spacing: -0.02em;
    line-height: 1.05;
  }

  .product-info-desc {
    font-size: 13px;
    line-height: 1.7;
    max-width: 100%;
    color: var(--grey-600);
    letter-spacing: 0;
  }

  /* Price — Prominent */
  .product-info-price .price-current {
    font-size: 22px;
  }
  .product-info-price .price-old {
    font-size: 16px;
  }

  /* Size grid — 48px minimum touch targets */
  .size-grid {
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 8px;
  }

  .size-box {
    min-height: 48px;
    font-size: 14px;
    border-radius: 0;
  }

  .size-box .stock-warning {
    font-size: 8px;
  }

  .product-size-header {
    font-size: 10px;
    margin-bottom: 10px;
  }

  /* Sticky bottom CTA bar */
  .product-add-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(244, 242, 238, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 100;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  }

  .product-add-section .qty-selector {
    flex-shrink: 0;
    transform: none;
  }

  .product-add-section .wishlist-btn-icon {
    display: none !important;
  }

  .add-to-cart-btn {
    flex: 1;
    min-height: 52px;
    font-size: 12px;
    font-family: var(--font-black);
    letter-spacing: 0.1em;
    border-radius: 0;
  }

  /* Qty selector refinement */
  .qty-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .qty-display {
    min-width: 44px;
    height: 44px;
  }

  /* Accordion — Touch friendly */
  .accordion-btn {
    padding: 14px 0;
    font-size: 11px;
    min-height: 48px;
  }

  .accordion-content {
    font-size: 13px;
    line-height: 1.7;
  }

  /* Related products section */
  .related-section {
    padding: 48px 0;
    border-top-width: 1px;
  }
}

@media (max-width: 430px) {
  .product-info-panel {
    padding: 24px 16px 170px;
  }

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

@media (max-width: 374px) {
  .product-info-panel {
    padding: 20px 14px 160px;
  }

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

  .product-gallery {
    aspect-ratio: 1;
  }
}


/* ═══════════════════════════════════════════════════════════════
   3) CART DRAWER — Bottom Sheet Style
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .cart-drawer {
    width: 100%;
    border-radius: 16px 16px 0 0;
  }

  .cart-drawer-header {
    padding: 20px 20px 14px;
    border-bottom: 1px solid var(--grey-200);
  }

  /* Drawer handle indicator */
  .cart-drawer-header::before {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    background: var(--grey-200);
    border-radius: 2px;
    margin: 0 auto 14px;
  }

  .cart-drawer-title {
    font-size: 16px;
    letter-spacing: 0.06em;
  }

  .cart-items-list {
    padding: 16px 20px;
  }

  .cart-item {
    grid-template-columns: 68px 1fr auto;
    gap: 12px;
  }

  .cart-item-image {
    width: 68px;
    height: 88px;
    border-radius: 2px;
  }

  .cart-item-name {
    font-size: 12px;
    line-height: 1.3;
  }

  .cart-item-variant {
    font-size: 10px;
    margin-bottom: 6px;
  }

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

  .cart-remove-btn {
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
  }

  .cart-drawer-footer {
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    background: var(--white);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.04);
  }

  .cart-shipping-note {
    font-size: 10px;
    margin-bottom: 14px;
  }

  .checkout-btn {
    min-height: 52px;
    font-size: 12px;
    letter-spacing: 0.12em;
    border-radius: 0;
  }
}

@media (max-width: 430px) {
  .cart-item {
    grid-template-columns: 56px 1fr auto;
    gap: 10px;
  }

  .cart-item-image {
    width: 56px;
    height: 72px;
  }

  .cart-item-name {
    font-size: 11px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   4) NAVIGATION — Clean Bar & Fullscreen Menu
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Nav bar height: tokenized for announcement + nav */
  :root {
    --announcement-h: 32px;
    --nav-main-h: 56px;
  }

  .nav {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(244, 242, 238, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .nav-inner {
    padding: 0 14px;
    grid-template-columns: 44px 1fr auto;
  }

  .nav-logo {
    font-size: 14px;
    letter-spacing: 0.1em;
  }

  /* Touch targets — 44px minimum */
  .nav-actions {
    gap: 2px;
  }

  .nav-actions .nav-icon-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    flex-shrink: 0;
  }

  .nav-actions .nav-icon-btn svg {
    width: 19px;
    height: 19px;
  }

  .mobile-menu-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  /* ── Mobile Menu Overlay — Fullscreen editorial ── */
  .nav-links {
    padding: calc(var(--nav-h) + 12px) 28px calc(40px + env(safe-area-inset-bottom));
    gap: 6px;
    background: var(--black);
  }

  .nav-links a {
    font-size: 28px;
    letter-spacing: 0.06em;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
    width: 100%;
    transition: color 0.3s, opacity 0.3s;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--accent) !important;
    opacity: 1;
  }

  /* Brand mark in menu */
  .nav-links::after {
    content: '✦';
    display: block;
    margin-top: auto;
    padding-top: 24px;
    font-size: 12px;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.12);
    text-align: center;
  }
}

@media (max-width: 430px) {
  .nav-logo {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  .nav-inner {
    padding: 0 12px;
  }

  .nav-actions .nav-icon-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .nav-actions .nav-icon-btn svg {
    width: 18px;
    height: 18px;
  }

  .nav-links a {
    font-size: 24px;
    padding: 10px 0;
  }

  .nav-links {
    padding: 70px 24px calc(32px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 374px) {
  .nav-logo {
    font-size: 12px;
  }

  .nav-actions {
    gap: 0;
  }

  .nav-actions .nav-icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   5) HOMEPAGE — Hero, Marquee, Grid, Categories, Brand Strip
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Hero ── */
  .hero {
    min-height: 100svh;
    min-height: 100vh; /* fallback */
  }

  .hero-editorial {
    padding: 0 20px 56px;
    justify-content: flex-end;
  }

  .hero-editorial::after {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.8) 0%,
      rgba(0, 0, 0, 0.4) 30%,
      rgba(0, 0, 0, 0.05) 60%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  .hero-season {
    font-size: 10px;
    letter-spacing: 0.25em;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.6);
  }

  .hero-headline {
    font-size: clamp(36px, 10vw, 52px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .hero-cta-group {
    flex-direction: row;
    gap: 8px;
    width: 100%;
  }

  .hero-cta-group a {
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-cta-group a:active {
    background: rgba(255, 255, 255, 0.12);
  }

  /* ── Section Headers — Premium typography ── */
  .section-header {
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
  }

  .section-label {
    font-size: 9px;
    letter-spacing: 0.28em;
    margin-bottom: 4px;
  }

  .section-title {
    font-size: clamp(24px, 7vw, 34px);
    letter-spacing: -0.02em;
    line-height: 1;
  }

  .featured-header-title {
    font-size: clamp(24px, 7vw, 38px);
    letter-spacing: -0.03em;
    line-height: 1.05;
  }

  .featured-header-subtitle {
    font-size: 10px;
    letter-spacing: 0.18em;
    margin-top: 6px;
    color: var(--grey-400);
  }

  .btn-ghost {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  /* ── Products Section — Spacing ── */
  .products-section {
    padding: 48px 0;
  }

  .marquee-section + .products-section {
    padding-top: 52px;
  }

  .products-section[style*="padding-top:0"] {
    padding-top: 8px !important;
    padding-bottom: 48px;
  }

  /* ── Product Grid — 2 columns ── */
  .products-grid,
  .products-grid-5 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--grey-200);
  }

  .product-card-body {
    padding: 12px 12px 18px;
    gap: 3px;
  }

  .product-card-cat {
    font-size: 8px;
    letter-spacing: 0.18em;
    margin-bottom: 2px;
  }

  .product-card-name {
    font-size: 13px;
    letter-spacing: -0.01em;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .price-current {
    font-size: 13px;
    font-weight: 500;
  }

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

  .product-card-image {
    aspect-ratio: 3/4;
  }

  .product-card-badge {
    top: 8px;
    left: 8px;
    font-size: 7px;
    padding: 3px 7px;
    letter-spacing: 0.1em;
  }

  /* Wishlist button on card */
  .wishlist-btn-card {
    width: 38px;
    height: 38px;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .wishlist-btn-card svg {
    width: 16px;
    height: 16px;
  }

  /* Hide desktop hover actions on mobile */
  .product-card-actions {
    display: none;
  }

  .product-card:hover .product-card-image img {
    transform: none;
  }

  /* Size chips on card */
  .size-row {
    margin-top: 4px;
  }

  .size-chip {
    width: 30px;
    height: 30px;
    font-size: 9px;
  }

  /* ── Categories — Vertical stack ── */
  .categories-section {
    padding: 0 0 48px;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    height: auto;
    gap: 2px;
    background: transparent;
  }

  .categories-grid .category-card {
    aspect-ratio: 16/10;
    margin-bottom: 0;
  }

  .category-card img {
    filter: brightness(0.55);
  }

  .category-card:hover img {
    transform: none;
  }

  .category-card-label {
    padding: 20px 16px;
    justify-content: flex-end;
  }

  .category-num {
    font-size: 9px;
    letter-spacing: 0.22em;
    margin-bottom: 4px;
  }

  .category-name {
    font-size: 26px;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
  }

  .category-link {
    font-size: 9px;
    letter-spacing: 0.18em;
  }

  .category-card-teaser .category-link {
    font-size: 16px;
    letter-spacing: 0.08em;
  }

  .category-card-teaser .category-name {
    margin-bottom: 12px;
  }

  /* ── Marquee — Refined ── */
  .marquee-section {
    padding: 12px 0;
    border-top: none;
    border-bottom: none;
  }

  .marquee-track {
    gap: 36px;
  }

  .marquee-track span {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .marquee-track .sep {
    font-size: 6px;
  }

  /* ── Brand Strip ── */
  .brand-strip-section {
    padding: 56px 0 !important;
  }

  .brand-strip-grid {
    gap: 40px;
    grid-template-columns: 1fr;
  }

  .editorial-frame {
    padding: 48px 32px;
  }

  .editorial-frame::before {
    clip-path: polygon(
      0 20px, 20px 0, 
      calc(100% - 20px) 0, 100% 20px, 
      100% calc(100% - 20px), calc(100% - 20px) 100%, 
      20px 100%, 0 calc(100% - 20px)
    );
  }

  .frame-corner {
    width: 20px;
    height: 20px;
  }

  .brand-stats-row {
    gap: 20px !important;
    flex-wrap: wrap;
  }

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

@media (max-width: 430px) {
  .hero-editorial {
    padding: 0 16px 48px;
  }

  .hero-headline {
    font-size: clamp(32px, 9vw, 42px);
    margin-bottom: 24px;
  }

  .hero-cta-group a {
    font-size: 9px;
    letter-spacing: 0.12em;
    padding: 12px 8px;
    min-height: 44px;
  }

  .categories-grid .category-card {
    aspect-ratio: 16/9;
  }

  .category-name {
    font-size: 20px;
  }

  .category-card-label {
    padding: 16px 14px;
  }

  .category-card-teaser .category-link {
    font-size: 14px;
  }

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

  .product-card-name {
    font-size: 12px;
    line-height: 1.2;
  }

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

  .price-old {
    font-size: 10px;
  }

  .brand-strip-section {
    padding: 40px 0 !important;
  }
}

@media (max-width: 374px) {
  .hero-editorial {
    padding: 0 14px 40px;
  }

  .hero-headline {
    font-size: 28px;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
  }

  .hero-cta-group {
    flex-direction: column;
    gap: 6px;
  }

  .hero-cta-group a {
    width: 100%;
    font-size: 10px;
    padding: 12px;
  }

  .container {
    padding: 0 12px;
  }

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

  .product-card-name {
    font-size: 11px;
  }

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


/* ═══════════════════════════════════════════════════════════════
   6) FOOTER — Clean & Spacious
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  footer {
    padding: 44px 0 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 36px;
  }

  .footer-brand-name {
    font-size: 18px;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
  }

  .footer-brand-desc {
    font-size: 13px;
    line-height: 1.7;
    max-width: 100%;
    color: rgba(255, 255, 255, 0.3);
  }

  .footer-col-title {
    font-size: 9px;
    letter-spacing: 0.2em;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.2);
  }

  .footer-links {
    gap: 0;
  }

  .footer-links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  }

  .footer-links a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    transition: color 0.2s;
  }

  .footer-links a:active {
    color: var(--white);
  }

  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
    padding-top: 20px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .footer-copy {
    font-size: 9px;
    letter-spacing: 0.06em;
    order: 2;
  }

  .footer-socials {
    order: 1;
    gap: 28px;
    justify-content: center;
  }

  .footer-socials a {
    font-size: 10px;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.3);
    padding: 6px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}


/* ═══════════════════════════════════════════════════════════════
   7) AUTH MODAL — Bottom Sheet
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .modal-overlay {
    align-items: flex-end;
  }

  .modal {
    width: 100%;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
    transform: translateY(100%);
  }

  .modal-overlay.open .modal {
    transform: translateY(0);
  }

  /* Handle indicator */
  .modal::before {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    background: var(--grey-200);
    border-radius: 2px;
    margin: 0 auto 20px;
  }

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

  .form-group input {
    padding: 14px 0;
    font-size: 16px;
    min-height: 48px;
  }

  .form-group label {
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  .modal .btn-primary,
  .modal .btn {
    min-height: 52px;
    font-size: 12px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   8) SHOP PAGE — Collection Browser
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .shop-layout {
    padding-top: calc(var(--nav-h) + 20px);
  }

  .shop-header {
    padding-bottom: 14px;
  }

  .shop-header .section-title {
    font-size: 28px;
  }

  /* Filter tabs — pill style */
  .filter-tabs {
    border: none;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    display: flex;
  }
  .filter-tabs::-webkit-scrollbar { display: none; }

  .filter-tab {
    border: 1px solid var(--grey-200);
    border-right: 1px solid var(--grey-200);
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 14px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s;
  }

  .filter-tab.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
  }

  .search-bar {
    border-radius: 0;
  }

  .search-bar input {
    min-height: 44px;
    flex: 1;
    width: 100%;
  }

  .search-bar button {
    min-width: 44px;
    min-height: 44px;
  }

  .sort-select {
    min-height: 44px;
    width: 100%;
    font-size: 10px;
  }

  .shop-toolbar {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 20px;
    padding: 14px 0;
  }

  .shop-toolbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .toolbar-right {
    justify-content: space-between;
    width: 100%;
    margin-top: 6px;
    gap: 10px;
  }

  .shop-empty {
    padding: 48px 16px;
  }

  .shop-empty h3 {
    font-size: 18px;
  }

  .pagination {
    padding: 36px 0;
    gap: 6px;
  }

  .page-btn {
    width: 44px;
    height: 44px;
    font-size: 12px;
  }
}


/* Section 9 (Profile) — moved and expanded in Section 17 below */


/* ═══════════════════════════════════════════════════════════════
   10) TOAST NOTIFICATIONS — Non-Overlapping
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .toast-container {
    bottom: calc(72px + env(safe-area-inset-bottom));
    right: 12px;
    left: 12px;
    align-items: stretch;
    z-index: 150;
  }

  .toast {
    max-width: 100%;
    font-size: 11px;
    padding: 12px 14px;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }
}


/* ═══════════════════════════════════════════════════════════════
   11) iOS & SAFARI SPECIFIC FIXES
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Prevent input zoom on iOS — CRITICAL */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px;
  }

  /* Tap highlight removal */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  /* Smooth momentum scrolling */
  .cart-items-list,
  .nav-links,
  .filter-tabs,
  .profile-sidebar,
  .checkout-steps {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

/* Safe area for notch devices */
@supports (padding: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    .product-add-section {
      padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .cart-drawer-footer {
      padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .modal {
      padding-bottom: calc(28px + env(safe-area-inset-bottom));
    }

    .footer-bottom {
      padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }

    .nav-links {
      padding-bottom: calc(40px + env(safe-area-inset-bottom));
    }
  }
}


/* ═══════════════════════════════════════════════════════════════
   12) PERFORMANCE — Animation Optimization
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Kill heavy transforms on mobile */
  .hero-editorial-bg {
    transition: none;
  }

  .hero-editorial:hover .hero-editorial-bg {
    transform: none;
  }

  /* Layer promotion for composite animations */
  .nav,
  .product-add-section,
  .cart-drawer,
  .modal {
    will-change: transform;
  }

  .category-card:hover img {
    transform: none;
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }

  .nav-links li {
    transition: none;
  }

  .cart-drawer,
  .modal {
    transition-duration: 0.1ms;
  }
}


/* ═══════════════════════════════════════════════════════════════
   13) ACCESSIBILITY — Focus States
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  :focus:not(:focus-visible) {
    outline: none;
  }
}


/* ═══════════════════════════════════════════════════════════════
   14) WISHLIST & MISC DRAWERS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--grey-200);
  }
}


/* ═══════════════════════════════════════════════════════════════
   15) LEGAL PAGES — Mobile Readability
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .legal-content,
  .kvkk-content {
    padding: calc(var(--nav-h) + 20px) 16px 40px;
    font-size: 14px;
    line-height: 1.8;
  }
}


/* ═══════════════════════════════════════════════════════════════
   16) SKELETON LOADER — Pulse Animation
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  @keyframes pulse {
    0%   { opacity: 1; }
    50%  { opacity: 0.5; }
    100% { opacity: 1; }
  }
}


/* ═══════════════════════════════════════════════════════════════
   17) PROFILE — Complete Mobile Overhaul
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* ── Main Layout: Stack sidebar + content vertically ── */
  .profile-container {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    margin-top: calc(var(--nav-h) + 8px) !important;
    padding: 0 16px 48px !important;
    min-height: auto;
  }

  .profile-sidebar-title {
    display: none;
  }

  /* ── Tab Navigation: Horizontal pills ── */
  .profile-sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--grey-200);
    gap: 6px;
    margin-bottom: 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .profile-sidebar::-webkit-scrollbar { display: none; }

  .profile-tab-btn {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--grey-100);
    flex-shrink: 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    letter-spacing: 0.06em;
    border: 1px solid var(--grey-200);
    border-bottom: 1px solid var(--grey-200);
  }

  .profile-tab-btn.active {
    background: var(--black);
    color: white;
    border-color: var(--black);
  }

  .profile-tab-btn span {
    display: none;
  }

  /* ── Content Area ── */
  .profile-content {
    padding-top: 0;
  }

  .tab-header {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .tab-desc {
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.6;
  }

  /* ── Overview Grid: Stack cards ── */
  .profile-overview-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 16px !important;
  }

  /* ── Info cards ── */
  .profile-info-card {
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 12px;
  }

  .profile-info-card .name-row {
    gap: 8px;
    margin-bottom: 10px;
  }

  .profile-info-card .name-row .display-name {
    font-size: 16px;
  }

  .email-label {
    font-size: 10px;
    margin-bottom: 2px;
  }

  .email-value {
    font-size: 13px;
  }

  /* ── Membership / Account Form ── */
  .membership-card {
    padding: 16px;
    border-radius: 10px;
  }

  .membership-card-title {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .membership-alert {
    font-size: 12px;
    padding: 12px;
    gap: 8px;
    margin-bottom: 16px;
    line-height: 1.5;
  }

  .membership-alert svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  /* ── Form fields: full width on mobile ── */
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-field input,
  .form-field select {
    min-height: 52px;
    font-size: 16px;
  }

  .form-field-full input {
    min-height: 52px;
    font-size: 16px;
  }

  .form-field label,
  .form-field-full label {
    font-size: 10px;
    top: 8px;
  }

  .select-wrapper select {
    min-height: 52px;
    font-size: 16px;
  }

  textarea {
    min-height: 80px;
    font-size: 16px !important;
  }

  .kvkk-text {
    font-size: 11px;
    line-height: 1.6;
  }

  /* ── Consents ── */
  .consent-row {
    gap: 8px;
    margin-bottom: 16px;
  }

  .consent-item {
    font-size: 12px;
    gap: 10px;
    padding: 4px 0;
    line-height: 1.5;
  }

  .consent-item input[type="checkbox"] {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .sub-consent {
    margin-left: 32px;
  }

  .onayla-btn {
    width: 100%;
    min-height: 52px;
    font-size: 13px;
    border-radius: 8px;
  }

  /* ── Orders Tab ── */
  .order-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 16px !important;
    border-radius: 10px !important;
    margin-bottom: 10px !important;
  }

  .order-card div:last-child {
    text-align: left !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
  }

  /* ── Addresses Tab: Stack ── */
  #addresses-list {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Address tab header: stack button below title */
  #tab-addresses > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  #tab-addresses > div:first-child .btn {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Address card action buttons */
  .profile-info-card > div:last-child {
    flex-wrap: wrap;
  }

  .profile-info-card > div:last-child .btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ── Wishlist Grid ── */
  .wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--grey-200);
  }
}

/* ── Profile small phone ── */
@media (max-width: 430px) {
  .profile-container {
    padding: 0 12px 40px !important;
  }

  .profile-tab-btn {
    font-size: 10px;
    padding: 7px 12px;
    min-height: 36px;
  }

  .tab-header {
    font-size: 20px;
  }

  .profile-info-card {
    padding: 14px;
  }

  .membership-card {
    padding: 14px;
  }
}

@media (max-width: 374px) {
  .profile-tab-btn {
    font-size: 9px;
    padding: 6px 10px;
    min-height: 34px;
    letter-spacing: 0.04em;
  }

  .tab-header {
    font-size: 18px;
  }

  .membership-alert {
    flex-direction: column;
    text-align: center;
  }
}


/* ═══════════════════════════════════════════════════════════════
   18) ADDRESS MODAL — Mobile Bottom Sheet
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  #address-modal-overlay {
    align-items: flex-end;
  }

  #address-modal {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 16px 16px 0 0;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  #address-modal .modal-header {
    position: sticky;
    top: 0;
    background: #fff;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--grey-200);
    margin-bottom: 16px;
    z-index: 1;
  }

  #address-modal .modal-header h2 {
    font-size: 18px !important;
  }

  #address-modal .form-field input,
  #address-modal .form-field select,
  #address-modal textarea {
    min-height: 52px;
    font-size: 16px;
  }

  #address-modal .form-row {
    grid-template-columns: 1fr;
  }

  #address-modal .onayla-btn {
    width: 100%;
    min-height: 52px;
    margin-top: 12px;
    border-radius: 8px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   19) ORDER STATUS & SUCCESS — Mobile Polish
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .os-container {
    padding: calc(var(--nav-h) + 16px) 16px 48px;
  }

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

  .os-subtitle {
    font-size: 13px;
  }

  .os-field input {
    font-size: 16px;
    min-height: 48px;
    padding: 14px 14px;
  }

  .os-submit {
    min-height: 52px;
    font-size: 12px;
  }

  .os-detail-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .os-item {
    padding: 12px 14px;
    font-size: 12px;
  }

  .os-back-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Success page */
  .success-container {
    padding: calc(var(--nav-h) + 20px) 16px 40px;
  }

  .order-box {
    padding: 20px 16px;
    margin: 24px 0;
  }

  .order-row {
    font-size: 12px;
    padding: 10px 0;
  }

  /* Fail page */
  .fail-container {
    padding: calc(var(--nav-h) + 20px) 16px 40px;
    text-align: center;
  }
}


/* ═══════════════════════════════════════════════════════════════
   20) CHECKOUT SMALL PHONE — Cart Items
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 430px) {
  .co-cart-item {
    gap: 10px;
    padding: 10px 8px;
  }

  .co-cart-item__img {
    width: 56px;
    height: 72px;
  }

  .co-cart-item__name {
    font-size: 12px;
  }

  .co-cart-item__price {
    font-size: 12px;
  }

  .co-cart-item__qty button {
    min-width: 36px;
    min-height: 36px;
    padding: 2px 8px;
  }

  .co-cart-item__qty span {
    min-width: 32px;
    font-size: 12px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   21) BRAND STRIP / EDITORIAL FRAME — Mobile
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .brand-strip-grid {
    grid-template-columns: 1fr !important;
    gap: 40px;
  }

  .editorial-frame {
    padding: 48px 28px;
  }

  .editorial-frame::before {
    clip-path: polygon(
      0 20px, 20px 0,
      calc(100% - 20px) 0, 100% 20px,
      100% calc(100% - 20px), calc(100% - 20px) 100%,
      20px 100%, 0 calc(100% - 20px)
    );
  }

  .frame-corner {
    width: 20px;
    height: 20px;
  }

  .brand-strip-section h2 {
    font-size: clamp(28px, 8vw, 48px) !important;
  }
}

@media (max-width: 430px) {
  .editorial-frame {
    padding: 36px 20px;
  }

  .brand-strip-section {
    padding: 56px 0 !important;
  }
}

@media (max-width: 374px) {
  .editorial-frame {
    padding: 28px 16px;
  }

  .frame-corner {
    width: 16px;
    height: 16px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   22) FOOTER LARGE SECTION — Brand Strip / Stats
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Brand-strip footer stats */
  .brand-stats-row {
    gap: 16px !important;
    flex-wrap: wrap;
  }

  .brand-stats-row > div {
    min-width: calc(50% - 12px);
  }

  /* Footer large headline section */
  .footer-headline {
    font-size: clamp(28px, 8vw, 48px) !important;
    line-height: 1.05 !important;
  }

  .footer-quote-card {
    padding: 16px !important;
    font-size: 12px !important;
  }
}


/* ═══════════════════════════════════════════════════════════════
   23) ORDERS PAGE (/siparislerim) — Mobile
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .orders-container {
    padding: calc(var(--nav-h) + 16px) 16px 48px;
  }

  .orders-container .order-detail-card {
    padding: 16px;
    border-radius: 10px;
  }

  .order-items-grid {
    grid-template-columns: 1fr;
  }

  .order-item-row {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding: 12px 0;
  }

  .order-item-row img {
    width: 64px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
  }
}

