/*
  BIG ZAYN — mobile.css
  Responsive styles for tablet (768px) and mobile (480px)
  Add <link rel="stylesheet" href="mobile.css"> to every HTML page
*/

/* =============================================
   TABLET — max-width: 1024px
   ============================================= */
@media (max-width: 1024px) {

  /* TOPBAR */
  .topbar {
    padding: 18px 24px;
  }

  /* TOPNAV — scrollable */
  .topnav {
    top: 73px;
    padding: 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav ul { gap: 0; white-space: nowrap; flex-wrap: nowrap; }
  .topnav ul li a { padding: 12px 14px; font-size: 11px; }

  /* MANIFESTO */
  .manifesto { padding: 160px 32px 80px; }
  .stamp__label { font-size: 48px; }
  .manifesto__para p { font-size: 18px; }
  .manifesto__body { gap: 48px; }

  /* GALLERY */
  .gallery-header { padding: 150px 24px 24px; }
  .gallery { grid-template-columns: repeat(2, 1fr); padding: 0 24px 80px; }
  .gallery-divider { width: calc(100% - 48px); margin: 0 24px 32px; }

  /* DETAIL */
  .detail {
    padding: 140px 24px 32px;
    height: auto;
    overflow: visible;
  }
  .detail__layout {
    grid-template-columns: 64px 1fr 1fr;
    gap: 16px;
  }

  /* CART */
  .cart-page { padding: 140px 24px 60px; }
  .cart-page__layout { grid-template-columns: 1fr; gap: 32px; }
  .cart-summary__inner { position: static; }

  /* CHECKOUT */
  .checkout { padding: 140px 24px 60px; }
  .checkout__layout { grid-template-columns: 1fr; gap: 32px; }
  .checkout__summary-inner { position: static; }

  /* PROFILE */
  .profile { grid-template-columns: 200px 1fr; }

  /* ADMIN */
  .admin { grid-template-columns: 180px 1fr; }
  .admin__main { padding: 32px 24px; }
  .modal__grid { grid-template-columns: 1fr; }
  .modal__images { grid-template-columns: 1fr 1fr; }
}

/* =============================================
   MOBILE — max-width: 768px
   ============================================= */
@media (max-width: 768px) {

  /* TOPBAR */
  .topbar {
    padding: 14px 16px;
  }

  .brand__tagline { display: none; }
  .brand__name { font-size: 13px; }
  .brand__logo { width: 7.5px; height: 7.5px; transform: translateY(-0.5px); }
  .brand { gap: 6px; }
  .topbar__icons { gap: 14px; }
  .icon-btn svg { width: 20px; height: 20px; }

  /* TOPNAV */
  .topnav {
    top: 61px;
    padding: 0 12px;
  }
  .topnav ul li a {
    padding: 10px 10px;
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  /* MANIFESTO */
  .manifesto {
    padding: 130px 20px 60px;
  }
  .manifesto__stamp {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 48px;
  }
  .stamp__label { font-size: 36px; }
  .stamp__line { display: none; }
  .stamp__sub {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 8px;
  }
  .manifesto__para {
    grid-template-columns: 32px 1fr;
    gap: 16px;
  }
  .manifesto__para p { font-size: 15px; line-height: 1.75; }
  .manifesto__body { gap: 36px; }
  .manifesto__footer {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  /* GALLERY */
  .gallery-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 130px 16px 20px;
  }
  .gallery-header__title { font-size: 48px; }
  .gallery-header__right {
    align-items: flex-start;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .gallery-divider { width: calc(100% - 32px); margin: 0 16px 24px; }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    padding: 0 16px 60px;
  }
  .gallery-item__name { font-size: 11px; }
  .gallery-item__price { font-size: 12px; }
  .gallery-item__quickadd { font-size: 9px; }

  /* DETAIL — stack vertically */
  .detail {
    padding: 120px 16px 40px;
    height: auto;
    overflow: visible;
  }
  .detail__layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
  }
  .detail__thumbs {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: visible;
    order: 2;
  }
  .thumb {
    min-width: 60px;
    flex-shrink: 0;
  }
  .detail__image-wrap {
    order: 1;
    height: 60vw;
    max-height: 420px;
  }
  .detail__info {
    order: 3;
    min-height: unset;
  }
  .detail__name { font-size: 20px; }
  .detail__price { font-size: 22px; }
  .btn-bag, .btn-buy { padding: 14px 16px; font-size: 11px; }

  /* CART */
  .cart-page { padding: 120px 16px 60px; }
  .cart-page__title { font-size: 40px; }
  .cart-page__layout { grid-template-columns: 1fr; gap: 24px; }
  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: 14px;
  }
  .cart-item__controls {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(218,211,190,0.08);
    padding-top: 12px;
  }
  .cart-summary__inner { position: static; }

  /* CHECKOUT */
  .checkout { padding: 120px 16px 60px; }
  .checkout__title { font-size: 40px; }
  .checkout__layout { grid-template-columns: 1fr; gap: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field--full { grid-column: 1; }
  .payment-options { flex-wrap: wrap; }
  .payment-opt { flex: 1 1 calc(33% - 8px); min-width: 80px; }
  .checkout__summary-inner { position: static; }
  .checkout__section-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* CONFIRMATION */
  .confirmation { padding: 120px 20px 60px; gap: 24px; }
  .confirmation__title { font-size: 52px; }

  /* PROFILE — login gate */
  .profile-login-gate { padding: 100px 20px 60px; }

  /* PROFILE — logged in */
  .profile {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .profile__sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(218,211,190,0.1);
    padding: 24px 20px;
  }
  .profile__tabs {
    flex-direction: row;
    overflow-x: auto;
    gap: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .profile__tabs::-webkit-scrollbar { display: none; }
  .profile__tab {
    white-space: nowrap;
    border-bottom: none;
    border-right: 1px solid rgba(218,211,190,0.06);
    padding: 10px 14px;
    font-size: 10px;
  }
  .profile__content { padding: 24px 20px; }
  .profile__panel-title { font-size: 32px; }
  .profile__home-cards { flex-wrap: wrap; }
  .measurements-grid { grid-template-columns: 1fr 1fr; }

  /* ADMIN — phone layout lives in admin.css */

  /* GALLERY LOADING */
  .gallery-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: rgba(218,211,190,0.3);
    font-weight: 300;
  }
}

/* =============================================
   SMALL MOBILE — max-width: 480px
   ============================================= */
@media (max-width: 480px) {

  .gallery { grid-template-columns: 1fr; }

  .stamp__label { font-size: 28px; }

  .detail__image-wrap { height: 80vw; }

  .cart-item { grid-template-columns: 72px 1fr; }

  .confirmation__title { font-size: 40px; }

  .profile__panel-title { font-size: 28px; }

  .checkout__title { font-size: 32px; }

  .payment-opt { flex: 1 1 100%; }
}


/* ════════════════════════════════════════════════════════════════════
   (was mobile-fixes.css)
   ════════════════════════════════════════════════════════════════════ */
/*
  BIG ZAYN — mobile-fixes.css
  Targeted mobile fixes on top of mobile.css
*/

/* =============================================
   HAMBURGER NAV — mobile only
   ============================================= */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--cream);
  transition: all 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-dropdown {
  display: none;
  position: fixed;
  top: 61px;
  left: 0;
  right: 0;
  background: var(--green);
  border-bottom: 1px solid rgba(218,211,190,0.15);
  z-index: 999;
  flex-direction: column;
  padding: 8px 0 16px;
}

.nav-dropdown.open { display: flex; }

.nav-dropdown a {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: rgba(218,211,190,0.6);
  padding: 12px 24px;
  display: block;
  border-bottom: 1px solid rgba(218,211,190,0.06);
  transition: color 0.2s;
}

.nav-dropdown a:hover,
.nav-dropdown a.active { color: var(--cream); }
.nav-dropdown a.active { border-left: 2px solid var(--red); padding-left: 22px; }

/* =============================================
   SORT DROPDOWN — all screens
   ============================================= */
.sort-dropdown-wrap {
  position: relative;
}

.sort-dropdown-btn {
  background: none;
  border: 1px solid rgba(218,211,190,0.2);
  color: rgba(218,211,190,0.6);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s, color 0.2s;
}

.sort-dropdown-btn:hover { border-color: var(--cream); color: var(--cream); }

.sort-dropdown-btn::after {
  content: '▾';
  font-size: 10px;
  transition: transform 0.2s;
}

.sort-dropdown-btn.open::after { transform: rotate(180deg); }

.sort-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--green);
  border: 1px solid rgba(218,211,190,0.15);
  min-width: 180px;
  z-index: 50;
  flex-direction: column;
}

.sort-dropdown-menu.open { display: flex; }

.sort-dropdown-menu button {
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(218,211,190,0.5);
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(218,211,190,0.07);
  transition: color 0.2s, background 0.2s;
}

.sort-dropdown-menu button:last-child { border-bottom: none; }
.sort-dropdown-menu button:hover { color: var(--cream); background: rgba(218,211,190,0.05); }
.sort-dropdown-menu button.active { color: var(--cream); }

/* =============================================
   GALLERY — MOBILE FIXES
   ============================================= */
@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 0 0 60px;
  }

  .gallery-header {
    padding: 120px 16px 16px;
  }

  .gallery-header__filters { display: none; } /* replaced by dropdown */

  .gallery-divider { display: none; }

  .gallery-item__image-wrap { aspect-ratio: 3/4; }

  .gallery-item__info {
    padding: 10px 6px 16px;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .gallery-item__price { padding-top: 0; }

  /* Hide auto-swap on mobile — use swipe instead */
  .gallery-item:hover .gallery-item__img--out { opacity: 1; }
  .gallery-item:hover .gallery-item__img--in  { opacity: 0; }
}

/* =============================================
   PRODUCT DETAIL — MOBILE SWIPE VIEWER
   ============================================= */
@media (max-width: 768px) {
  .detail {
    padding: 110px 0 40px;
    height: auto;
    overflow: visible;
  }

  .detail__breadcrumb {
    padding: 0 16px;
    margin-bottom: 12px;
  }

  .detail__layout {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  /* Hide desktop thumbs on mobile */
  .detail__thumbs { display: none; }

  /* Mobile image swiper */
  .detail__image-wrap {
    position: relative;
    width: 100%;
    height: 100vw;
    max-height: 480px;
    background: #fff;
    overflow: hidden;
  }

  .detail__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease, opacity 0.35s ease;
  }

  /* Swipe dots */
  .swipe-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 12px 0 8px;
  }

  .swipe-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(218,211,190,0.25);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
  }

  .swipe-dot.active { background: var(--cream); }

  /* Swipe arrows */
  .swipe-arrows {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
    z-index: 3;
  }

  .swipe-arrow {
    pointer-events: all;
    background: rgba(37,67,54,0.7);
    border: none;
    color: var(--cream);
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
  }

  .swipe-arrow:hover { opacity: 1; }

  /* Label showing which view */
  .swipe-label {
    position: absolute;
    bottom: 10px;
    left: 12px;
    font-family: var(--font-display);
    font-size: 9px;
    letter-spacing: 0.2em;
    color: rgba(37,67,54,0.6);
    z-index: 3;
  }

  .detail__info {
    padding: 20px 16px 32px;
    min-height: unset;
    overflow: visible;
  }

  .detail__specs { margin-top: 12px; }
  .detail__actions { margin-top: 16px; }

  .detail__name { font-size: 18px; }
  .detail__price { font-size: 20px; }
}

/* =============================================
   CART — MOBILE FIXES
   ============================================= */
@media (max-width: 768px) {
  .cart-page { padding: 110px 16px 60px; }

  .cart-item {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 16px 0;
    align-items: flex-start;
  }

  .cart-item__img-wrap {
    width: 64px;
    height: 80px;
    flex-shrink: 0;
  }

  .cart-item__details {
    flex: 1;
    min-width: 0;
  }

  .cart-item__name {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cart-item__controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
  }

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

  .qty-wrap { border: 1px solid rgba(218,211,190,0.15); }
  .qty-btn { width: 28px; height: 28px; font-size: 14px; }
  .qty-num { width: 28px; font-size: 12px; }

  .cart-page__title { font-size: 36px; }
  .cart-checkout-btn { padding: 14px 16px; }
}

/* Show hamburger on mobile */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .topnav { display: none; } /* hidden — replaced by dropdown */
}

/* =============================================
   GALLERY — auto cycle images on mobile
   show all views in sequence
   ============================================= */
@media (max-width: 768px) {

  /* Re-enable image switching in gallery */
  .gallery-item__img--out { opacity: 1; }
  .gallery-item__img--in  { opacity: 0; }

  /* ADD TO BAG — text first, icon second */
  .gallery-item__quickadd {
    flex-direction: row-reverse;
  }

  /* Hide the stray thumb labels that bleed into detail image area */
  .detail__image-wrap .thumb,
  .detail__image-wrap span:not(.swipe-label):not(.detail__sku-stamp),
  .detail__image-wrap .detail__name,
  .detail__image-wrap p {
    display: none !important;
  }
}

/* =============================================
   SORT DROPDOWN — show on all screen sizes
   ============================================= */
.gallery-header__filters { display: flex; }

.sort-dropdown-wrap { position: relative; }

/* Make sort btn visible and accessible */
.sort-dropdown-btn {
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .gallery-header__right {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .sort-dropdown-menu {
    right: 0;
    left: auto;
    min-width: 160px;
  }
}
/* =============================================
   PHONE TOP BAR: ☰ left · logo centred · search, bag, profile right
   Chat floats at the bottom right; TRACK ORDER is in the ☰ menu.
   ============================================= */
.nav-dropdown__extra { display: flex; flex-direction: column; margin-top: 10px; border-top: 1px solid rgba(218,211,190,.15); padding-top: 6px; }
.nav-dropdown__extra a { font-size: 11px; color: rgba(218,211,190,.5); }
.nav-hamburger { position: relative; }
.nav-hamburger.bzchat-has-reply::after { content: ''; position: absolute; top: 0; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--green); }
@media (max-width: 768px) {
  .topbar { position: fixed; }
  .topbar .brand { position: absolute; left: 50%; transform: translateX(-50%); }
  /* Chat is the floating button at the bottom on phones (support.js) */
  .topbar__icons .icon-btn[aria-label="Support"] { display: none; }
}
