/* ==========================================================================
   Clote — Mobile-only layer (≤ 768px)
   All rules here are either:
     A) "hide on desktop"  — rules outside the media query
     B) "show + style on mobile" — rules inside @media (max-width: 768px)
   Desktop styles in style.css are NEVER touched by this file.
   ========================================================================== */

/* ── A. Hide every mobile-only element on ALL screen sizes by default ── */
.mob-header,
.mob-search-bar,
.mob-drawer,
.mob-drawer-overlay,
.bottom-nav { display: none !important; }

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

  /* ── 1. Kill desktop chrome ── */
  .topbar   { display: none !important; }
  .header   { display: none !important; }
  .navbar   { display: none !important; }

  /* ── 2. Body spacing: fixed header (56px) + search bar (52px) = 108px top;
            bottom nav 64px ── */
  body { padding-top: 108px !important; padding-bottom: 68px !important; }

  /* ── 3. Unhide mobile chrome ── */
  .mob-header        { display: flex !important; }
  .mob-search-bar    { display: flex !important; }
  .bottom-nav        { display: flex !important; }
  /* drawer + overlay only shown when .open class is toggled by JS */
  .mob-drawer          { display: flex !important; }
  .mob-drawer-overlay  { display: block !important; }


  /* =========================================================================
     MOBILE HEADER
     Fixed top bar: hamburger | logo (center) | search + cart
     ========================================================================= */
  .mob-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 500;
    background: #fff;
    height: 56px;
    align-items: center;
    padding: 0 14px;
    gap: 8px;
    border-bottom: 1px solid #ececec;
    box-shadow: 0 1px 8px rgba(0,0,0,.07);
  }

  .mob-hamburger {
    flex-shrink: 0;
    background: none; border: none; cursor: pointer;
    width: 38px; height: 38px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; border-radius: 8px;
    transition: background .15s;
  }
  .mob-hamburger:hover { background: #f4f6fa; }
  .mob-hamburger span {
    display: block; width: 20px; height: 2px;
    background: #253d4e; border-radius: 2px;
  }

  .mob-logo {
    flex: 1; display: flex; align-items: center; justify-content: center;
  }
  .mob-logo a { display: flex; align-items: center; }
  .mob-logo img { height: 32px; width: auto; display: block; }

  .mob-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }

  .mob-icon-btn {
    position: relative;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    color: #253d4e; font-size: 17px;
    border-radius: 50%; text-decoration: none;
    transition: background .15s, color .15s;
  }
  .mob-icon-btn:hover { background: #f4f6fa; color: #3bb77e; }

  .mob-badge {
    position: absolute; top: 3px; right: 3px;
    min-width: 16px; height: 16px; border-radius: 999px;
    background: #3bb77e; color: #fff;
    font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px; line-height: 1;
    font-family: "Quicksand", sans-serif;
    border: 2px solid #fff;
  }


  /* =========================================================================
     MOBILE SEARCH BAR
     Fixed strip directly below the header
     ========================================================================= */
  .mob-search-bar {
    position: fixed; top: 56px; left: 0; right: 0; z-index: 499;
    background: #fff;
    padding: 8px 14px 10px;
    border-bottom: 1px solid #ececec;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
  }

  .mob-search-bar form {
    display: flex; align-items: center; width: 100%;
    background: #f4f6fa; border-radius: 10px;
    border: 1.5px solid #ececec;
    padding: 0 12px; gap: 8px;
    transition: border-color .2s;
  }
  .mob-search-bar form:focus-within {
    border-color: #3bb77e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59,183,126,.1);
  }
  .mob-search-bar form > i { color: #adadad; font-size: 13px; flex-shrink: 0; }
  .mob-search-bar form input {
    flex: 1; border: none; background: transparent; outline: none;
    font-size: 13px; color: #253d4e; padding: 10px 0;
    font-family: inherit;
  }
  .mob-search-bar form input::placeholder { color: #c0c0c0; }
  .mob-search-bar form button {
    background: #3bb77e; border: none; cursor: pointer;
    width: 28px; height: 28px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; flex-shrink: 0;
    transition: background .15s;
  }
  .mob-search-bar form button:hover { background: #2a9d6a; }
  .mob-search-bar form { position: relative; }
  .mob-search-bar .search-suggestions {
    top: calc(100% + 6px);
    left: 0; right: 0;
    max-height: 320px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
  }
  .mob-search-bar .search-suggestions__item img { width: 36px; height: 36px; }


  /* =========================================================================
     SLIDE-IN DRAWER
     Default state: hidden off-screen left. .open class slides it in.
     ========================================================================= */
  .mob-drawer-overlay {
    position: fixed; inset: 0; z-index: 998;
    background: rgba(15,23,42,.5);
    backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
  }
  .mob-drawer-overlay.open { opacity: 1; pointer-events: all; }

  .mob-drawer {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: min(300px, 82vw); z-index: 999;
    background: #fff;
    flex-direction: column; overflow: hidden;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.12);
  }
  .mob-drawer.open { transform: translateX(0); }

  /* Drawer: header row */
  .mob-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 16px 14px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
  }
  .mob-drawer-head img { height: 28px; }
  .mob-drawer-close {
    background: #f4f6fa; border: none; cursor: pointer;
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #253d4e; font-size: 14px; transition: background .15s;
  }
  .mob-drawer-close:hover { background: #ececec; }

  /* Drawer: user strip */
  .mob-drawer-user {
    padding: 12px 16px;
    background: linear-gradient(135deg, #e8f7f0, #f4f6fa);
    border-bottom: 1px solid #e8f7f0;
    flex-shrink: 0;
  }
  .mob-drawer-user a {
    display: flex; align-items: center; gap: 10px;
    color: #253d4e; font-family: "Quicksand", sans-serif;
    font-weight: 700; font-size: 14px; text-decoration: none;
  }
  .mob-drawer-user a i {
    font-size: 30px; color: #3bb77e;
  }
  .mob-drawer-user .ud-name { font-size: 14px; font-weight: 700; color: #253d4e; }
  .mob-drawer-user .ud-sub { font-size: 11px; color: #7e7e7e; margin-top: 1px; }

  /* Drawer: scrollable nav area */
  .mob-drawer-nav {
    flex: 1; overflow-y: auto; padding: 6px 0;
    scrollbar-width: thin;
    scrollbar-color: #ececec transparent;
  }
  .mob-drawer-nav::-webkit-scrollbar { width: 4px; }
  .mob-drawer-nav::-webkit-scrollbar-thumb { background: #ececec; border-radius: 2px; }

  .drawer-section-label {
    display: block;
    font-size: 10px; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: #b0b8c4;
    padding: 14px 16px 5px;
  }

  .mob-drawer-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; color: #253d4e;
    font-size: 13.5px; font-family: "Quicksand", sans-serif; font-weight: 600;
    text-decoration: none;
    border-radius: 0;
    transition: background .12s, color .12s;
  }
  .mob-drawer-nav a:hover { background: #f4f6fa; color: #3bb77e; }
  .mob-drawer-nav a:hover i { color: #3bb77e; }
  .mob-drawer-nav a i {
    width: 22px; height: 22px; text-align: center; font-size: 15px;
    color: #7e7e7e; flex-shrink: 0; line-height: 22px;
  }
  .mob-drawer-nav a.drawer-active { color: #3bb77e; background: #f0fbf6; }
  .mob-drawer-nav a.drawer-active i { color: #3bb77e; }

  /* Drawer: footer */
  .mob-drawer-foot {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 11px; color: #c0c8d0; text-align: center;
    flex-shrink: 0;
  }


  /* =========================================================================
     BOTTOM NAVIGATION BAR
     5 tabs: Home | Shop | Categories | Cart | Account
     ========================================================================= */
  .bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
    background: #fff;
    height: 62px;
    align-items: stretch;
    border-top: 1px solid #ececec;
    box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  }

  .bottom-nav a {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px;
    color: #b0b8c4;
    font-size: 10px; font-weight: 700;
    font-family: "Quicksand", sans-serif;
    text-decoration: none;
    position: relative;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav a i { font-size: 19px; line-height: 1; transition: transform .15s; }
  .bottom-nav a span { line-height: 1; }

  .bottom-nav a.active { color: #3bb77e; }
  .bottom-nav a.active i { transform: translateY(-1px); }

  /* top accent bar on active tab */
  .bottom-nav a.active::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 32px; height: 3px;
    background: #3bb77e; border-radius: 0 0 6px 6px;
  }

  /* ── Center cart button — elevated bubble ── */
  .bnav-cart-center {
    position: relative;
    margin-top: -18px; /* lifts it above the bar */
  }
  .bnav-cart-bubble {
    position: relative;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3bb77e, #2a9d6a);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(59,183,126,.45);
    margin: 0 auto 2px;
    transition: transform .15s, box-shadow .15s;
  }
  .bnav-cart-center:hover .bnav-cart-bubble,
  .bnav-cart-center.active .bnav-cart-bubble {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(59,183,126,.55);
  }
  .bnav-cart-bubble i {
    font-size: 20px !important;
    color: #fff !important;
    transform: none !important;
  }
  /* override default active color for center tab text */
  .bnav-cart-center span { color: #3bb77e !important; }
  .bnav-cart-center::before { display: none !important; } /* no top bar on center */

  /* cart badge — sits on the bubble for center tab, on icon for others */
  .bnav-badge {
    position: absolute; top: -2px; right: -2px;
    min-width: 16px; height: 16px; border-radius: 999px;
    background: #f74b81; color: #fff;
    font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; line-height: 1;
    font-family: "Quicksand", sans-serif;
    border: 2px solid #fff;
  }


  /* =========================================================================
     GENERAL LAYOUT / CONTAINER
     ========================================================================= */
  .container { padding: 0 14px !important; }

  /* =========================================================================
     HERO BANNER
     ========================================================================= */
  .hero-banner {
    min-height: 180px;
    padding: 22px 18px;
    border-radius: 16px;
    margin: 0 14px 0;
  }
  .slide-caption h2 { font-size: 19px; line-height: 1.3; margin-bottom: 6px; }
  .slide-caption p  { font-size: 12.5px; margin-bottom: 14px; }
  .slide-caption .btn { padding: 9px 18px; font-size: 13px; }

  /* =========================================================================
     SECTIONS
     ========================================================================= */
  .section { padding: 18px 0 !important; }
  .section-head { margin-bottom: 12px; padding: 0 14px; }
  .section-head h3 { font-size: 16px; }
  .section-head a { font-size: 13px; }

  /* =========================================================================
     CATEGORY CIRCLES — horizontal pill scroll row
     ========================================================================= */
  .cat-circles {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: visible;
    gap: 10px;
    padding: 2px 14px 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* kill grid */
    grid-template-columns: unset !important;
  }
  .cat-circles::-webkit-scrollbar { display: none; }

  .cat-circle {
    flex: 0 0 76px !important;
    min-width: 76px;
    padding: 12px 4px 10px;
    border-radius: 16px;
  }
  .cat-circle .ring {
    width: 50px; height: 50px;
    border-radius: 50%;
    margin: 0 auto 8px;
  }
  .cat-circle .ring i { font-size: 20px; }
  .cat-circle span { font-size: 11px; }
  .cat-circle small { font-size: 10px; }

  /* =========================================================================
     POPULAR PRODUCTS TABS
     ========================================================================= */
  .tabs {
    display: flex !important; flex-wrap: nowrap !important;
    overflow-x: auto; scrollbar-width: none; gap: 6px;
    padding: 0 14px 4px; margin: 0 !important;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex-shrink: 0; padding: 6px 14px; font-size: 12px; border-radius: 20px; }

  .section-head .tabs { padding: 0; }

  /* =========================================================================
     PRODUCT GRID — 2 column, edge-to-edge
     ========================================================================= */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 0 14px;
  }

  /* =========================================================================
     PRODUCT CARD
     ========================================================================= */
  .product-card { border-radius: 12px; }
  .product-card .thumb img { height: 140px; object-fit: cover; }
  .product-card .info { padding: 8px 10px 10px; }
  .product-card .cat-label { font-size: 10px; margin-bottom: 3px; }
  .product-card .title { font-size: 12.5px; line-height: 1.35; }
  .product-card .rating { margin: 3px 0; }
  .product-card .seller { font-size: 11px; }
  .product-card .price-row { flex-direction: column; align-items: flex-start; gap: 5px; }
  .product-card .prices .price { font-size: 14px; }
  .product-card .prices .old   { font-size: 11px; }
  .product-card .add-btn {
    width: 100%; justify-content: center;
    font-size: 11.5px; padding: 8px 10px;
    border-radius: 8px;
  }

  /* =========================================================================
     DEALS GRID
     ========================================================================= */
  .deals-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; padding: 0 14px; }

  /* =========================================================================
     4-COLUMN LIST → stacked cards
     ========================================================================= */
  .list-cols { grid-template-columns: 1fr !important; gap: 10px !important; padding: 0 14px; }
  .list-col { border: 1px solid #ececec; border-radius: 12px; padding: 14px; background: #fff; }
  .list-col h4 { font-size: 14px; margin-bottom: 4px; padding-bottom: 10px; }
  .list-item img { width: 60px; height: 60px; }

  /* =========================================================================
     HOME LAYOUT
     ========================================================================= */
  .home-layout { grid-template-columns: 1fr !important; }
  .home-layout .sidebar { display: none !important; }

  /* =========================================================================
     TRUST BAR
     ========================================================================= */
  .trust-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; padding: 0 14px; }
  .trust-item { padding: 13px 10px; border-radius: 12px; }
  .trust-item .ic { font-size: 24px; }
  .trust-item h4 { font-size: 12.5px; }
  .trust-item p  { font-size: 11px; }

  /* =========================================================================
     NEWSLETTER
     ========================================================================= */
  .newsletter {
    flex-direction: column; text-align: center;
    padding: 24px 20px; gap: 16px; border-radius: 16px; margin: 0 14px;
  }
  .newsletter-text h2 { font-size: 18px; }
  .newsletter-text p  { font-size: 13px; }
  .newsletter-form { flex-direction: column; gap: 8px; }
  .newsletter-form input { border-radius: 10px !important; border-right: 1px solid var(--line-2) !important; }
  .newsletter-form .btn { border-radius: 10px; width: 100%; }

  /* =========================================================================
     FOOTER — replaced by bottom nav on mobile
     ========================================================================= */
  .footer { display: none !important; }

  /* -----------------------------------------------------------------------
     RTL: mirror the mobile chrome and drawer without changing LTR defaults.
     ----------------------------------------------------------------------- */
  [dir="rtl"] body.fullwidth-theme {
    direction: rtl;
    text-align: start;
  }

  [dir="rtl"] body.fullwidth-theme .mob-drawer {
    left: auto;
    right: 0;
    transform: translateX(100%);
    box-shadow: -4px 0 24px rgba(0,0,0,.12);
  }

  [dir="rtl"] body.fullwidth-theme .mob-drawer.open {
    transform: translateX(0);
  }

  [dir="rtl"] body.fullwidth-theme .mob-search-bar form button i,
  [dir="rtl"] body.fullwidth-theme .mob-drawer-nav a i,
  [dir="rtl"] body.fullwidth-theme .flip-rtl {
    display: inline-block;
  }

  [dir="rtl"] body.fullwidth-theme .mob-search-bar form button i {
    transform: scaleX(-1);
  }

  [dir="rtl"] body.fullwidth-theme .mob-badge {
    right: auto;
    left: 3px;
  }

  [dir="rtl"] body.fullwidth-theme .newsletter {
    text-align: right;
  }

  [dir="rtl"] body.fullwidth-theme .newsletter-form input {
    border-right: none !important;
    border-left: 1px solid var(--line-2) !important;
  }

  [dir="rtl"] body.fullwidth-theme .bottom-nav {
    direction: rtl;
  }

  [dir="rtl"] body.fullwidth-theme .bottom-nav .bnav-badge {
    right: auto;
    left: -2px;
  }

} /* end @media ≤ 768px */
