/* BONDOK — public responsive refinement, 2026-10-30
 * Structured tablet/mobile sizing; deliberately scoped to avoid desktop changes.
 * Loaded after legacy and adaptive CSS; no Firebase/order logic changes.
 */
:root { --bondok-layout-gutter: clamp(16px, 3vw, 42px); }
@media (max-width:1199px) {
  html { -webkit-text-size-adjust:100%; }
  body:not(.admin-page) { min-width:0; }
  body:not(.admin-page) :is(.profile-page,.collection-page,.gallery-page,.cart-page,.checkout-page,.product-page,.my-orders-page,.wishlist-page,.notifications-page,.track-order-page,.register-page,.login-page,main) { min-width:0; max-width:100%; }
  body:not(.admin-page) :is(input,textarea,select,button,video,img) { max-width:100%; }
  body:not(.admin-page) :is(.cart-container,.checkout-container,.orders-container,.profile-dashboard,.profile-content,.collection-tools,.collection-grid,.cart-layout,.product-page,.contact-container) { min-width:0; }
  /* One stable header arrangement at every tablet width. The menu button
     remains a first-class control instead of squeezing the desktop links. */
  body:not(.admin-page) header.navbar {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto auto !important;
    align-items:center !important;
    justify-content:initial !important;
    column-gap:clamp(6px,1.3vw,14px) !important;
    height:72px !important; min-height:72px !important;
    padding:0 var(--bondok-layout-gutter) !important;
    inset-inline:0 !important;
    max-width:100vw !important;
  }
  body:not(.admin-page) header.navbar > .logo {
    grid-row:1 !important;grid-column:1 !important;
    width:max-content;max-width:100%;min-width:0;justify-self:start;
  }
  body:not(.admin-page) header.navbar .logo-main {
    font-size:clamp(20px,3.5vw,33px) !important;
    letter-spacing:clamp(1px,.4vw,5px) !important;
    white-space:nowrap;
  }
  body:not(.admin-page) header.navbar .logo-sub {
    font-size:clamp(8px,.95vw,11px) !important;
    letter-spacing:clamp(.6px,.22vw,2px) !important;
    white-space:nowrap;
  }
  body:not(.admin-page) header.navbar > .social-links {
    grid-row:1 !important;grid-column:2 !important;
    display:flex !important;align-items:center !important;justify-content:flex-end !important;
    min-width:0;gap:clamp(4px,.9vw,10px) !important;
    margin:0 !important;
  }
  body:not(.admin-page) header.navbar > .menu-toggle {
    grid-row:1 !important;grid-column:3 !important;
    order:initial !important;position:static !important;
    inset:auto !important;transform:none !important;
    display:inline-flex !important;align-items:center;justify-content:center;
    width:42px !important;height:42px !important;min-width:42px !important;
    margin:0 !important;padding:0 !important;
  }
  body:not(.admin-page) header.navbar .social-links > a,
  body:not(.admin-page) header.navbar .language-toggle,
  body:not(.admin-page) header.navbar #languageToggle {
    width:clamp(34px,3.7vw,42px) !important;
    min-width:clamp(34px,3.7vw,42px) !important;
    height:clamp(34px,3.7vw,42px) !important;
    flex:0 0 auto;
  }
  body:not(.admin-page) header.navbar .social-links > a[href*="wa.me"],
  body:not(.admin-page) header.navbar .social-links > a[aria-label="Facebook"],
  body:not(.admin-page) header.navbar .social-links > a[aria-label="TikTok"],
  body:not(.admin-page) header.navbar .social-links > a[aria-label="Instagram"] { display:none !important; }
  /* Legacy menu is still used between 769 and 1199. The mobile app drawer
     intercepts the same button at <=768; do not add a competing drawer. */
  body:not(.admin-page) header.navbar > nav {
    position:fixed !important;
    display:flex !important; flex-direction:column !important;
    justify-content:center !important;align-items:center !important;
    top:72px !important;bottom:auto !important;
    right:-100vw !important; left:auto !important;
    width:100vw !important;max-width:100vw !important;
    height:calc(100dvh - 72px) !important;
    max-height:calc(100dvh - 72px) !important;
    padding:22px 20px !important;gap:clamp(16px,3dvh,28px) !important;
    overflow-y:auto !important;
    background:rgba(9,9,9,.99) !important;
    z-index:10005 !important;
    transition:right .27s ease !important;
  }
  body:not(.admin-page) header.navbar > nav.active {right:0 !important;}
  body:not(.admin-page) header.navbar > nav a {
    font-size:clamp(15px,2.1vw,20px) !important;
    letter-spacing:.10em !important;
    max-width:100%;white-space:normal !important;text-align:center;
  }
  /* Account: controls shouldn't turn into a tall sidebar on tablets. */
  body:not(.admin-page) .profile-dashboard { grid-template-columns:minmax(0,1fr) !important; }
  body:not(.admin-page) .profile-sidebar { width:100% !important;max-width:100% !important; }
  body:not(.admin-page) .profile-side-nav {
    display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:10px !important;
  }
  body:not(.admin-page) .profile-side-btn {
    display:flex !important;align-items:center !important;
    min-width:0 !important;min-height:46px !important;
    padding:10px 12px !important;gap:8px !important;
  }
  body:not(.admin-page) .profile-side-btn span {
    font-size:clamp(12px,1.4vw,14px) !important;
    white-space:normal !important;overflow:visible !important;line-height:1.4 !important;
  }
  body:not(.admin-page) .profile-form-grid,
  body:not(.admin-page) .checkout-delivery-grid { min-width:0;gap:clamp(12px,2vw,22px) !important; }
  body:not(.admin-page) .profile-form-grid > *,
  body:not(.admin-page) .checkout-delivery-grid > * { min-width:0; }
  /* Account/address/order modals use the available viewport without clipping. */
  body:not(.admin-page) :is(.profile-modal,.modal-content,.order-details-box,.perfume-request-dialog,.popup-content) {
    max-width:calc(100dvw - 24px) !important;
    max-height:calc(100dvh - 24px) !important;
  }
  /* Prevent over-large tablet cards, headings and form paddings. */
  body:not(.admin-page) .collection-page .collection-header h1,
  body:not(.admin-page) .section-title h2 {font-size:clamp(30px,4vw,48px) !important;line-height:1.18 !important;}
  body:not(.admin-page) .collection-page .collection-tools {gap:10px 14px !important;}
  body:not(.admin-page) .collection-page .filter-buttons {flex-wrap:wrap !important;justify-content:center !important;}
  body:not(.admin-page) .bondok-concierge-strip {max-width:100%;min-width:0;}
  body:not(.admin-page) .bondok-concierge-copy {min-width:0;}
  body:not(.admin-page) .bondok-concierge-copy h2 {font-size:clamp(17px,2.2vw,24px) !important;}
  body:not(.admin-page) :is(.checkout-card,.cart-summary,.profile-info-card,.profile-extras-card) {max-width:100%;min-width:0;}
  /* Product details retain a comfortable image-to-information proportion. */
  body:not(.admin-page) .product-page .product-image,
  body:not(.admin-page) .product-page .product-info {min-width:0;max-width:100%;}
  body:not(.admin-page) .product-page img {object-fit:contain;max-height:min(58dvh,560px);}
  body:not(.admin-page) .product-purchase-row > *,
  body:not(.admin-page) .cart-summary :is(input,select),
  body:not(.admin-page) .checkout-container :is(input,select,textarea) {min-width:0;max-width:100%;}
}
/* A content-aware grid eliminates device-model cutoffs and full-width perfume
   cards on tablets, while keeping the homepage slider independent. */
body .collection.collection-page .collection-grid {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,285px),1fr)) !important;
  gap:clamp(12px,1.7vw,23px) !important;
  max-width:1360px !important;
  margin-inline:auto !important;
}
body .collection.collection-page .collection-grid > .perfume-card {
  width:100% !important;max-width:none !important;min-width:0 !important;
  padding:clamp(12px,1.5vw,20px) !important;
}
body .collection.collection-page .perfume-card-media {
  width:100% !important;min-width:0 !important;max-width:100% !important;
}
body .collection.collection-page .perfume-card-media img {
  display:block !important;width:100% !important;
  height:clamp(178px,22vw,240px) !important;
  object-fit:contain !important;
}
@media (max-width:950px) and (min-width:601px) {
  body:not(.admin-page) .home-slider .perfume-card {
    flex:0 0 clamp(246px,36vw,320px) !important;
    width:clamp(246px,36vw,320px) !important;
    min-width:0 !important;max-width:none !important;
  }
  body:not(.admin-page) .home-slider .collection-grid {min-width:0;max-width:100%;}
  body:not(.admin-page) .cart-summary {width:100% !important;max-width:850px !important;}
  body:not(.admin-page) .profile-page {padding-inline:var(--bondok-layout-gutter) !important;}
}
@media (max-width:700px) {
  body:not(.admin-page) header.navbar {padding-inline:clamp(10px,3vw,18px) !important;column-gap:6px !important;}
  body:not(.admin-page) header.navbar .logo-main {font-size:clamp(19px,5.2vw,27px) !important;letter-spacing:.075em !important;}
  body:not(.admin-page) header.navbar .logo-sub {font-size:8px !important;letter-spacing:.06em !important;}
  body:not(.admin-page) header.navbar .social-links {gap:4px !important;}
  body:not(.admin-page) header.navbar .social-links > a,
  body:not(.admin-page) header.navbar #languageToggle {width:34px !important;min-width:34px !important;height:34px !important;}
  body:not(.admin-page) header.navbar > .menu-toggle {width:38px !important;min-width:38px !important;height:38px !important;}
  body:not(.admin-page) .profile-side-nav {grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:8px !important;}
  body:not(.admin-page) .profile-side-btn {padding:9px 10px !important;}
  body:not(.admin-page) .profile-form-grid {grid-template-columns:minmax(0,1fr) !important;}
  body:not(.admin-page) .profile-form-grid > * {grid-column:auto !important;}
  body:not(.admin-page) .collection-page .collection-header {max-width:100%;}
  body:not(.admin-page) .bondok-concierge-strip {gap:14px !important;}
  body:not(.admin-page) .collection-page .collection-tools {display:grid !important;grid-template-columns:minmax(0,1fr) !important;}
  body:not(.admin-page) .collection-page .collection-search,
  body:not(.admin-page) .collection-page .collection-sort {width:100% !important;max-width:none !important;}
  body:not(.admin-page) .collection-page .collection-sort-label {width:100% !important;justify-content:space-between;}
  body:not(.admin-page) .product-page {width:100% !important;max-width:100% !important;padding-inline:clamp(14px,4vw,24px) !important;}
  body:not(.admin-page) .cart-page,
  body:not(.admin-page) .checkout-page {padding-inline:clamp(12px,3.5vw,22px) !important;}
}
@media (max-width:360px) {
  body:not(.admin-page) header.navbar .logo-main {font-size:18px !important;letter-spacing:.03em !important;}
  body:not(.admin-page) header.navbar .logo-sub {font-size:7px !important;}
  body:not(.admin-page) .profile-side-nav {grid-template-columns:minmax(0,1fr) !important;}
}
/* Compact the collection concierge on narrow screens: avoid a banner taller
   than the first visible product row. */
@media (max-width:699px) {
  body .collection.collection-page .collection-grid {
    grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr)) !important;
  }
  body:not(.admin-page) .collection-page .collection-request-cta.bondok-concierge-strip {
    display:flex !important;flex-direction:column !important;
    align-items:center !important;justify-content:center !important;
    gap:10px !important;padding:18px 16px !important;
    min-height:0 !important;
  }
  body:not(.admin-page) .collection-page .collection-request-cta .bondok-concierge-brand,
  body:not(.admin-page) .collection-page .collection-request-cta .bondok-concierge-divider { display:none !important; }
  body:not(.admin-page) .collection-page .collection-request-cta .bondok-concierge-copy {width:100% !important;text-align:center !important;}
  body:not(.admin-page) .collection-page .collection-request-cta .bondok-concierge-copy h2 {font-size:clamp(17px,4vw,21px) !important;}
  body:not(.admin-page) .collection-page .collection-request-cta .bondok-concierge-copy p {margin:5px 0 0 !important;}
  body:not(.admin-page) .collection-page .collection-request-cta .bondok-concierge-btn {
    width:min(100%,300px) !important;min-height:43px !important;
    margin:0 !important;
  }
}
@media (max-width:420px) {
  /* Product hero glow extends 10px beyond its container on very narrow screens.
     Clip the decoration rather than increasing the entire page's scroll width. */
  body:not(.admin-page) .product-page {overflow-x:clip;}
}
