/* ==========================================================================
   mobile-pro.css  —  App-like mobile experience (loaded LAST, overrides theme)
   Goal: make the storefront feel like a polished native app on phones.
   Desktop (>= 992px) is left untouched.
   ========================================================================== */

:root { --app-accent: #000; --app-radius: 14px; }

/* --- Global: kill accidental horizontal scroll --- */
html { overflow-x: hidden; }
body { overflow-x: clip; }
img { max-width: 100%; height: auto; }
.mfp-container { padding-left: 10px; padding-right: 10px; }
.white-popup, .announcement-with-content { max-width: 100%; box-sizing: border-box; }

/* The app bottom nav is hidden on desktop */
.app-bottom-nav { display: none; }

/* ==========================================================================
   TABLET & PHONE  (<= 991px)  — the "app" layer
   ========================================================================== */
@media (max-width: 991.98px) {

  /* ----- 1. BOTTOM NAVIGATION BAR ----- */
  .app-bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1050;
    background: #fff;
    border-top: 1px solid #ededed;
    box-shadow: 0 -3px 16px rgba(0,0,0,.07);
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: stretch;
  }
  .app-bottom-nav a {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 50px;
    padding: 2px 0;
    color: #8a8a8a;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: color .15s ease;
  }
  .app-bottom-nav a i { font-size: 21px; line-height: 1; }
  .app-bottom-nav a.active { color: var(--app-accent); }
  .app-bottom-nav a:active { opacity: .6; }
  .app-bottom-nav .nav-badge {
    position: absolute;
    top: -2px;
    right: calc(50% - 20px);
    min-width: 17px; height: 17px;
    padding: 0 4px;
    background: #e63946;
    color: #fff;
    font-size: 10px; font-weight: 700; line-height: 17px;
    text-align: center;
    border-radius: 9px;
  }
  /* leave room so content is never hidden behind the bar */
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  .scroll-to-top-btn { bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important; }

  /* ----- Cookie consent: sit ABOVE the bottom nav, button clickable ----- */
  .cookie-consent, .js-cookie-consent {
    z-index: 1060 !important;                                   /* above bottom nav */
    bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important; /* clear the nav */
    padding: 12px 14px !important;
    box-shadow: 0 -4px 18px rgba(0,0,0,.18);
  }
  .cookie-consent .cookie-container,
  .cookie-consent .items-center,
  .cookie-consent .flex.items-center { flex-wrap: wrap; gap: 8px; }
  .cookie-consent__message { font-size: 12.5px; line-height: 1.45; }
  .js-cookie-consent-agree, .cookie-consent__agree {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px;
    background: #f6c700 !important;
    color: #111 !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    padding: 10px 18px !important;
  }

  /* ----- 2. COMPACT, APP-LIKE HEADER ----- */
  /* Hide the cluttered utility strip (its actions live in the drawer + bottom nav) */
  .site-header .menu-top-area { display: none; }
  .site-header .topbar { padding: 8px 0; box-shadow: 0 1px 10px rgba(0,0,0,.05); }
  .site-header .site-branding .site-logo > img { max-height: 34px; width: auto; }
  .site-header .toolbar-item { min-width: 42px; }

  /* Comfortable tap targets everywhere */
  .t-h-dropdown-menu a,
  .mobile-category a { padding-top: 12px; padding-bottom: 12px; }
  .btn, .product-button {
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }

  /* ----- 3. THE ☰ DRAWER — clean, app-like, complements the bottom nav ----- */
  .mobile-menu {
    width: min(86vw, 348px) !important;
    background: #fff;
    box-shadow: 0 0 46px rgba(0,0,0,.28);
    padding-bottom: 30px;
  }
  /* dim the rest of the screen behind the drawer */
  .mobile-menu.open::after {
    content: '';
    position: fixed;
    top: 0; bottom: 0;
    left: min(86vw, 348px);
    right: 0;
    background: rgba(17,17,17,.5);
  }
  /* drawer header */
  .mobile-menu .mm-heading-area {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px;
  }
  .mobile-menu .mm-heading-area h4 { margin: 0; font-size: 17px; font-weight: 700; }

  /* Menu / Category tabs */
  .mobile-menu .nav-tabs { border-bottom: 1px solid #eee; }
  .mobile-menu .nav-tabs .nav-item span {
    display: block; padding: 13px 8px; text-align: center;
    font-size: 14px; font-weight: 600; color: #888; cursor: pointer;
    border-bottom: 2px solid transparent;
  }
  .mobile-menu .nav-tabs .nav-item span.active {
    color: var(--app-accent); border-bottom-color: var(--app-accent);
  }

  /* Primary menu rows */
  .slideable-menu ul li > a {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; font-size: 15px; color: #2b2b2b;
    border-bottom: 1px solid #f4f4f4; text-decoration: none;
  }
  .slideable-menu ul li > a i.icon-chevron-right { font-size: 13px; color: #c4c4c4; }
  .slideable-menu ul li.active > a { color: var(--app-accent); font-weight: 600; }
  .slideable-menu ul li > a:active { background: #fafafa; }

  /* ----- Quick access block ----- */
  .mm-quick { padding-top: 4px; }
  .mm-quick-label {
    display: block; padding: 18px 18px 6px;
    font-size: 11px; letter-spacing: .6px; text-transform: uppercase;
    color: #9a9a9a; font-weight: 700;
  }
  .mm-quick-list { list-style: none; margin: 0; padding: 0; }
  .mm-quick-list li a {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 18px; color: #333; font-size: 14.5px;
    border-bottom: 1px solid #f5f5f5; text-decoration: none;
  }
  .mm-quick-list li a i { font-size: 18px; width: 22px; text-align: center; color: #666; }
  .mm-quick-list li a:active { background: #fafafa; }
  .mm-currency { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 18px 4px; }
  .mm-currency a {
    padding: 7px 14px; border: 1px solid #e5e5e5; border-radius: 20px;
    font-size: 13px; color: #444; text-decoration: none;
  }
  .mm-currency a.active {
    background: var(--app-accent); color: #fff; border-color: var(--app-accent);
  }
}

/* ==========================================================================
   PHONE  (<= 767px)  — visual polish
   ========================================================================== */
@media (max-width: 767.98px) {

  /* iOS: >=16px inputs stop the auto-zoom jump on focus */
  input.form-control, select.form-control, textarea.form-control,
  .form-control, .search-box input { font-size: 16px !important; }

  /* ----- Card aesthetic: rounded, soft shadow, clean ----- */
  .product-card {
    border-radius: var(--app-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border: 1px solid #f0f0f0;
  }
  .product-card .product-thumb { border-radius: 0; }
  .product-thumb img, .product-card .product-thumb img {
    object-fit: cover; width: 100%;
  }
  .product-card .product-card-body { padding: 12px 12px 14px; }
  .product-card .product-category > a { font-size: 11px; letter-spacing: .3px; }
  .product-card .product-title > a { font-size: 13.5px; line-height: 1.35; }
  .product-card .product-price { font-size: 15px; font-weight: 700; }

  /* Banners: readable text, rounded like app tiles */
  .genius-banner { border-radius: var(--app-radius); overflow: hidden; }
  .genius-banner .inner-content h4 { font-size: 20px; line-height: 1.2; }
  .genius-banner .inner-content p { font-size: 13px; }

  /* Section rhythm — tighter, consistent, app-like */
  .mt-60 { margin-top: 30px !important; }
  .mt-50 { margin-top: 30px !important; }
  .mt-30 { margin-top: 20px !important; }
  .section-title { margin-bottom: 16px; }
  .section-title h2, .section-title .h3 {
    font-size: 21px; line-height: 1.3; font-weight: 700;
  }

  /* Primary actions feel like app buttons */
  .details-page-top-right-content .btn,
  .add-to-cart, .buy-now { border-radius: 10px; font-weight: 600; }
  .subscriber-form .btn-block, .btn-block { border-radius: 10px; }
}

/* ==========================================================================
   SMALL PHONE  (<= 575px)
   ========================================================================== */
@media (max-width: 575.98px) {

  /* Hero: tighter, not empty */
  .hero-slider .item,
  .body_theme2 .hero-slider .item,
  .body_theme3 .hero-slider .item,
  .body_theme4 .hero-slider .item { height: 320px; padding: 0 18px; }
  .slider-area-wrapper .item-inner .title { font-size: 26px; line-height: 1.2; }
  .slider-area-wrapper .item-inner .subtitle { font-size: 14px; line-height: 1.5; }
  .hero-slider .item .btn { margin-top: 8px; }

  /* Container breathing room */
  .container { padding-left: 16px; padding-right: 16px; }

  /* Cookie bar readable */
  .cookie-consent, .js-cookie-consent { font-size: 13px; line-height: 1.5; }
}

/* ==========================================================================
   TINY PHONE  (<= 360px)
   ========================================================================== */
@media (max-width: 360px) {
  .section-title h2, .section-title .h3 { font-size: 19px; }
  .hero-slider .item, .body_theme2 .hero-slider .item { height: 290px; }
  .app-bottom-nav a { font-size: 10px; }
  .app-bottom-nav a i { font-size: 19px; }
}
