/* =====================================================================
   Sodaiora on phones: app look
   Bottom tab bar + categories sheet (components/frontend/layout/AppTabBar.tsx),
   a slimmer header, compact product cards and floating buttons moved above the
   tab bar. Everything is inside max-width: 991px, so desktop is unchanged.
   ===================================================================== */

.sd-app-tabs, .sd-app-sheet, .sd-app-sheet-backdrop { display: none; }

@media (max-width: 991px) {
  :root {
    --sd-app-tabs-h: 62px;
    --sd-app-safe: env(safe-area-inset-bottom, 0px);
    --sd-app-bar-bg: rgba(255, 255, 255, 0.96);
    --sd-app-bar-border: rgba(0, 0, 0, 0.07);
    --sd-app-muted: #7a857f;
    --sd-app-sheet-bg: #fff;
    --sd-app-tile: #f3f6f4;
  }
  html[data-theme="dark"] {
    --sd-app-bar-bg: rgba(24, 32, 27, 0.96);
    --sd-app-bar-border: #2c3830;
    --sd-app-muted: #93a097;
    --sd-app-sheet-bg: #18201b;
    --sd-app-tile: #1f2822;
  }

  /* App feel: no blue tap flash, no rubber-band scroll of the whole page behind sheets */
  body { -webkit-tap-highlight-color: transparent; }
  body.sd-app-has-tabs { padding-bottom: calc(var(--sd-app-tabs-h) + var(--sd-app-safe)); }
  body.sd-app-sheet-open { overflow: hidden; }

  /* ---------- bottom tab bar ---------- */
  .sd-app-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9995;
    height: calc(var(--sd-app-tabs-h) + var(--sd-app-safe));
    padding-bottom: var(--sd-app-safe);
    background: var(--sd-app-bar-bg);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--sd-app-bar-border);
    box-shadow: 0 -6px 24px -12px rgba(0, 0, 0, 0.18);
  }
  .sd-app-tabs > a, .sd-app-tabs > button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-width: 0; padding: 6px 2px 4px; border: 0; background: none;
    color: var(--sd-app-muted); font: 600 11px/1.1 "Hind Siliguri", "Lato", sans-serif;
    text-decoration: none; cursor: pointer; transition: color 0.15s;
    -webkit-user-select: none; user-select: none;
  }
  .sd-app-tabs > a > span:last-child, .sd-app-tabs > button > span:last-child {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .sd-app-tabs i { font-size: 20px; line-height: 1; }
  /* every icon sits in the same 24px box so the labels line up */
  .sd-app-tabs > a > i, .sd-app-tabs > button > i, .sd-tab-icon { height: 24px; display: inline-flex; align-items: center; justify-content: center; }
  .sd-app-tabs .active { color: var(--theme-color, #269c53); }
  .sd-app-tabs .active i { transform: translateY(-1px); }
  .sd-app-tabs > a:active, .sd-app-tabs > button:active { transform: scale(0.94); }
  .sd-tab-icon, .sd-app-cart-icon { position: relative; display: inline-flex; }

  /* Cart: the middle tab is a raised round button, like most shop apps */
  .sd-app-cart .sd-app-cart-icon {
    width: 48px; height: 48px; margin-top: -24px; border-radius: 50%;
    align-items: center; justify-content: center;
    background: var(--theme-color, #269c53); color: #fff;
    box-shadow: 0 8px 18px -6px rgba(38, 156, 83, 0.7), 0 0 0 4px var(--sd-app-bar-bg);
  }
  .sd-app-cart .sd-app-cart-icon i { font-size: 21px; }
  .sd-app-cart.active { color: var(--theme-color, #269c53); }

  .sd-tab-count {
    position: absolute; top: -6px; right: -10px;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: #e11d48; color: #fff; font: 700 10px/18px "Lato", sans-serif; text-align: center;
    box-shadow: 0 0 0 2px var(--sd-app-bar-bg);
  }
  .sd-app-cart .sd-tab-count { top: -3px; right: -5px; }

  /* ---------- categories sheet ---------- */
  .sd-app-sheet-backdrop {
    display: block; position: fixed; inset: 0; z-index: 9996;
    background: rgba(0, 0, 0, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.25s;
  }
  .sd-app-sheet-backdrop.open { opacity: 1; pointer-events: auto; }
  .sd-app-sheet {
    display: flex; flex-direction: column;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9997;
    max-height: 78vh; max-height: 78dvh;
    padding: 8px 16px calc(16px + var(--sd-app-safe));
    border-radius: 22px 22px 0 0; background: var(--sd-app-sheet-bg);
    box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, 0.4);
    transform: translateY(105%); visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1), visibility 0s linear 0.3s;
  }
  .sd-app-sheet.open { transform: none; visibility: visible; transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1); }
  .sd-app-sheet-handle { width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: var(--sd-app-bar-border); flex-shrink: 0; }
  .sd-app-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-shrink: 0; }
  .sd-app-sheet-head h3 { margin: 0; font-size: 18px; line-height: 1.2; }
  .sd-app-sheet-head button {
    width: 34px; height: 34px; border: 0; border-radius: 50%;
    background: var(--sd-app-tile); color: var(--title-color, #222); font-size: 15px;
  }
  .sd-app-sheet-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px;
    overflow-y: auto; overscroll-behavior: contain; padding-bottom: 4px;
  }
  .sd-app-cat {
    display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
    color: var(--title-color, #222); font-size: 12px; line-height: 1.25; text-decoration: none;
  }
  .sd-app-cat > span:last-child {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .sd-app-cat-icon {
    display: flex; align-items: center; justify-content: center;
    width: 58px; height: 58px; border-radius: 18px; background: var(--sd-app-tile);
    color: var(--theme-color, #269c53); font-size: 20px;
  }
  .sd-app-cat-icon img { width: 34px; height: 34px; object-fit: contain; }
  .sd-app-cat-offer { background: #fde8ec; color: #e11d48; }
  html[data-theme="dark"] .sd-app-cat-offer { background: #3a1d24; }
  .sd-app-cat:active .sd-app-cat-icon { transform: scale(0.94); }

  /* ---------- header: slim app bar ---------- */
  /* Wishlist, cart and account live in the tab bar now */
  .main-header .menu-right-content .info-list .sodaiora-wish-link,
  .main-header .menu-right-content .info-list .cart-box,
  .main-header .menu-right-content .info-list > li:last-child { display: none !important; }

  /* Floating buttons sit above the tab bar; scroll-to-top is not needed in an app */
  body.sd-app-has-tabs .scroll-to-top { display: none !important; }
  body.sd-app-has-tabs .sdc-launcher { bottom: calc(var(--sd-app-tabs-h) + var(--sd-app-safe) + 12px); }
  body.sd-app-has-tabs .sd-cookie { bottom: calc(var(--sd-app-tabs-h) + var(--sd-app-safe) + 12px); }
  body.sd-app-has-tabs .sodaiora-toast { bottom: calc(var(--sd-app-tabs-h) + var(--sd-app-safe) + 16px); }
}

@media (max-width: 767px) {
  /* The thin promo strip above the header takes a lot of a phone screen */
  .main-header .header-top { display: none; }

  /* ---------- compact product cards (2 per row) ---------- */
  .shop-block-one .inner-box { border-radius: 14px; overflow: hidden; }
  .shop-block-one .inner-box .image-box .image img { aspect-ratio: 1 / 1; object-fit: contain; }
  .shop-block-one .inner-box .lower-content { padding: 10px 10px 12px !important; }
  .shop-block-one .inner-box .lower-content .text { font-size: 12px; line-height: 1.3; }
  .shop-block-one .inner-box .lower-content h4 {
    font-size: 14px; line-height: 1.35; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .shop-block-one .inner-box .lower-content h5 { font-size: 15px; line-height: 1.3; margin-bottom: 4px; }
  .shop-block-one .inner-box .lower-content h5 del { margin-right: 6px !important; font-size: 12px; }
  .shop-block-one .inner-box .lower-content h5 small { display: block; font-size: 11px; }
  .shop-block-one .inner-box .lower-content .product-stock { font-size: 12px; }
  .shop-block-one .inner-box .lower-content .product-stock img { width: 14px; }
  .shop-block-one .inner-box .discount-product, .shop-block-one .inner-box .hot-product { top: 10px !important; font-size: 11px; padding: 2px 8px; }
}

@media (max-width: 575px) {
  /* Home banner: a card, not a full poster */
  .sd-hero-slide .content-box { padding-top: 28px !important; padding-bottom: 36px !important; }
  .sd-hero-slide .content-box .sub-title { font-size: 12px; padding: 4px 12px; margin-bottom: 8px !important; }
  .sd-hero-slide .content-box h2 { font-size: 26px !important; line-height: 1.2 !important; margin-bottom: 8px !important; }
  .sd-hero-slide .content-box h3 { font-size: 18px !important; line-height: 1.3 !important; margin-bottom: 16px !important; }
  .sd-hero-slide .content-box .theme-btn { padding: 10px 22px !important; font-size: 14px !important; }

  /* Section headings in app size */
  .sec-title h2 { font-size: 21px !important; line-height: 1.3 !important; }

  /* Chat: a round button like other apps */
  body.sd-app-has-tabs .sdc-launcher { width: 50px; height: 50px; padding: 0; justify-content: center; right: 12px; }
}

@media (max-width: 575px) {
  /* Home banner: less empty space around it */
  .banner-style-five { padding-bottom: 20px !important; padding-top: 12px !important; }
  .banner-style-five .sd-hero-warm { padding: 20px 16px !important; border-radius: 18px; }

  /* Products always two per row on phones (the home tabs used one full-width card) */
  .row > .shop-block { flex: 0 0 50%; max-width: 50%; width: 50%; padding-left: 6px; padding-right: 6px; margin-bottom: 12px; }
  .row:has(> .shop-block) { margin-left: -6px; margin-right: -6px; }

  /* Category tabs above products: one row of chips you swipe sideways */
  .tab-btns.shop-tab-btn {
    display: flex !important; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin: 0 -15px; padding: 2px 15px 6px;
  }
  .tab-btns.shop-tab-btn::-webkit-scrollbar { display: none; }
  .tab-btns.shop-tab-btn .tab-btn {
    flex: 0 0 auto; margin: 0 !important; padding: 7px 14px !important; border-radius: 20px;
    background: var(--sd-app-tile); font-size: 14px !important; line-height: 1.2 !important; white-space: nowrap;
  }
  .tab-btns.shop-tab-btn .tab-btn::before, .tab-btns.shop-tab-btn .tab-btn::after { display: none !important; }
  .tab-btns.shop-tab-btn .tab-btn.active-btn { background: var(--theme-color, #269c53); color: #fff !important; }
}

/* ---------- More products on screen (like big grocery apps: short picture, + on the picture,
   only name, price and unit underneath). Overrides the compact-card rules above. ---------- */
@media (max-width: 575px) {
  .shop-block-one .inner-box { position: relative; border-radius: 12px; overflow: hidden; }
  .shop-block-one .inner-box .image-box { height: 128px; padding: 8px; display: flex; align-items: center; justify-content: center; }
  .shop-block-one .inner-box .image-box .image { width: 100%; height: 100%; margin: 0; }
  .shop-block-one .inner-box .image-box .image a { display: block; height: 100%; }
  .shop-block-one .inner-box .image-box .image img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; border-radius: 8px; }
  .shop-block-one .inner-box .image-box .image img.sodaiora-noimg { object-fit: cover; }
  .shop-block-one .inner-box .image-box .option-list { display: none !important; }
  .shop-block-one .inner-box .discount-product, .shop-block-one .inner-box .hot-product { top: 8px !important; left: 0 !important; font-size: 10px !important; line-height: 1.4 !important; padding: 2px 7px !important; }

  .shop-block-one .inner-box .lower-content { position: static; padding: 6px 8px 10px !important; }
  /* category label and "In Stock" are dropped; "Out of Stock" still shows */
  .shop-block-one .inner-box .lower-content > .text { display: none; }
  .shop-block-one .inner-box .lower-content .product-stock { display: none; }
  .shop-block-one .inner-box .lower-content .product-stock.out-of-stock { display: block; font-size: 11px; margin-top: 2px; }
  .shop-block-one .inner-box .lower-content .product-stock img { display: none; }
  .shop-block-one .inner-box .lower-content h4 { font-size: 13px !important; line-height: 1.3 !important; min-height: 2.6em; margin: 0 0 4px !important; }
  .shop-block-one .inner-box .lower-content h5 { font-size: 15px !important; line-height: 1.3 !important; margin: 0 !important; }
  .shop-block-one .inner-box .lower-content h5 del { font-size: 11px; margin-right: 4px !important; }
  .shop-block-one .inner-box .lower-content h5 small { display: inline; font-size: 11px; }
  .shop-block-one .inner-box .lower-content .item-quantity-selector { display: none; }

  /* "+" button sits on the picture, bottom-right */
  .shop-block-one .inner-box .lower-content .decore {
    position: absolute !important; top: 92px !important; right: 8px !important; bottom: auto !important; left: auto !important;
    width: 32px !important; height: 32px !important; line-height: 32px !important; font-size: 14px !important;
    border-radius: 50% !important; box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.25); z-index: 2;
  }

  .row > .shop-block { padding-left: 5px; padding-right: 5px; margin-bottom: 10px; }
  .row:has(> .shop-block) { margin-left: -5px; margin-right: -5px; }

  /* Shop page: small title and one-line toolbar */
  .page-title { padding-top: 6px !important; padding-bottom: 14px !important; }
  .page-title .bread-crumb { display: none; }
  .page-title h1, .page-title h2 { font-size: 22px !important; line-height: 1.3 !important; margin: 0 !important; }
  .our-shop .item-shorting { margin-bottom: 12px !important; padding: 8px 12px !important; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .our-shop .item-shorting .left-column .text, .our-shop .item-shorting .left-column .text p { font-size: 12px !important; margin: 0 !important; }
  .our-shop .item-shorting .short-box { margin: 0 !important; }
  .our-shop .item-shorting .menu-box { display: none !important; }
}

@media (max-width: 575px) {
  /* no empty space under each card */
  .shop-block-one .inner-box { margin-bottom: 0 !important; height: 100%; }
  body .sd-shop .shop-block-one .inner-box .lower-content { padding: 6px 8px 10px !important; }
  body .sd-shop .shop-block-one .inner-box .lower-content h4 { font-size: 13px; line-height: 1.3; }
  body .sd-shop .shop-block-one .inner-box .lower-content h5 small { display: inline; font-size: 11px; }
  body .sd-shop .shop-block-one .inner-box .lower-content .product-stock.out-of-stock { position: static; }
  body .sd-shop .shop-block-one .inner-box .decore { top: 92px !important; right: 8px !important; bottom: auto !important; width: 32px; height: 32px; line-height: 32px; }
  body .sd-shop .wrapper .inner-container { gap: 10px; overflow: visible; }
  body .sd-shop .wrapper .inner-container .shop-block-one .inner-box { border-radius: 12px; }

  /* Filters + sort: small buttons */
  .sd-filter-btn { height: 36px !important; padding: 0 14px !important; font-size: 14px !important; margin-bottom: 8px !important; }
  body .sd-shop .item-shorting { padding: 6px 12px !important; margin-bottom: 10px !important; }
}

/* ---------- Product page on phones: buy bar fixed at the bottom ---------- */
.sd-app-buybar { display: none; }
@media (max-width: 991px) {
  body.sd-app-has-buybar { padding-bottom: calc(68px + var(--sd-app-safe)); }
  .sd-app-buybar {
    display: flex; align-items: center; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9995;
    padding: 10px 12px calc(10px + var(--sd-app-safe));
    background: var(--sd-app-bar-bg);
    -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--sd-app-bar-border);
    box-shadow: 0 -6px 24px -12px rgba(0, 0, 0, 0.18);
  }
  .sd-app-buybar-cart {
    position: relative; flex: 0 0 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--sd-app-tile); color: var(--title-color, #222); font-size: 20px;
  }
  .sd-app-buybar-cart .sd-tab-count { top: -5px; right: -5px; }
  .sd-app-buybar-add, .sd-app-buybar-buy {
    flex: 1 1 0; height: 46px; border-radius: 14px; border: 0; padding: 0 8px;
    font: 700 15px/1 "Hind Siliguri", "Lato", sans-serif; white-space: nowrap; cursor: pointer;
  }
  .sd-app-buybar-add { background: rgba(38, 156, 83, 0.12); color: var(--theme-color, #269c53); border: 1.5px solid var(--theme-color, #269c53); }
  .sd-app-buybar-buy { background: var(--theme-color, #269c53); color: #fff; }
  .sd-app-buybar-add:disabled { opacity: 0.5; cursor: not-allowed; }
  .sd-app-buybar button:active, .sd-app-buybar a:active { transform: scale(0.97); }
  /* the bar has these, so the in-page copies go */
  body.sd-app-has-buybar .addto-cart-box .cart-btn,
  body.sd-app-has-buybar .addto-cart-box li:has(> a[href="/cart"]) { display: none !important; }
  body.sd-app-has-buybar .addto-cart-box { margin-bottom: 20px !important; }
  body.sd-app-has-buybar .sdc-launcher { bottom: calc(68px + var(--sd-app-safe) + 12px); }
  body.sd-app-has-buybar .scroll-to-top { display: none !important; }
  body.sd-app-has-buybar .sodaiora-toast { bottom: calc(68px + var(--sd-app-safe) + 16px); }
  /* card logos box (Visa, PayPal ...) takes space and these methods aren't offered */
  .product-details .payment-option, .payment-option:has(.card-list) { display: none; }
}

@media (max-width: 991px) {
  /* Product page: no staff codes, no card logos (only cash on delivery / bKash are offered) */
  .product-info .sd-staff-info { display: none !important; }
  .product-details-content .content-box .payment-option { display: none !important; }
}

/* ---------- Cart on phones: item cards + checkout bar ---------- */
.sd-app-cartlist, .sd-app-checkoutbar { display: none; }
@media (max-width: 767px) {
  .cart-section .table-outer, .table-outer:has(.cart-table) { display: none !important; }
  .sd-app-cartlist { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
  .sd-app-cartitem {
    position: relative; display: flex; gap: 12px; padding: 10px; border-radius: 14px;
    background: var(--sd-app-tile); border: 1px solid var(--sd-app-bar-border);
  }
  .sd-app-cartitem-img { flex: 0 0 72px; height: 72px; border-radius: 10px; overflow: hidden; background: #fff; }
  .sd-app-cartitem-img img { width: 100%; height: 100%; object-fit: contain; }
  .sd-app-cartitem-body { flex: 1; min-width: 0; padding-right: 22px; }
  .sd-app-cartitem-name {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--title-color, #222);
  }
  .sd-app-cartitem-meta { font-size: 12px; color: var(--sd-app-muted); margin-top: 2px; }
  .sd-app-cartitem-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
  .sd-app-cartitem-price strong { display: block; font-size: 15px; line-height: 1.2; color: var(--theme-color, #269c53); }
  .sd-app-cartitem-price small { display: block; font-size: 11px; color: var(--sd-app-muted); }
  .sd-app-cartitem-note { margin-top: 4px; font-size: 11px; color: #e8590c; }
  .sd-app-cartitem-remove {
    position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%;
    background: transparent; color: var(--sd-app-muted); font-size: 11px;
  }
  .sd-app-stepper {
    display: inline-flex; align-items: center; height: 34px; border-radius: 17px;
    background: var(--sd-app-sheet-bg); border: 1px solid var(--sd-app-bar-border); overflow: hidden;
  }
  .sd-app-stepper button {
    width: 34px; height: 34px; border: 0; background: none; color: var(--theme-color, #269c53); font-size: 12px;
  }
  .sd-app-stepper button:disabled { opacity: 0.35; }
  .sd-app-stepper span { min-width: 26px; text-align: center; font-weight: 700; font-size: 14px; color: var(--title-color, #222); }

  /* Order summary: tighter */
  .cart-section .total-cart, .total-cart { padding: 18px 16px !important; border-radius: 16px; }
  .total-cart h3 { font-size: 18px !important; margin-bottom: 12px !important; padding-bottom: 10px !important; }
  .total-cart h4 { font-size: 15px !important; margin-bottom: 8px !important; }
  .total-cart .coupon-box, .total-cart .shipping-cost { margin-bottom: 14px !important; }
  .total-cart .coupon-box .form-group input { height: 44px !important; font-size: 14px !important; }
  .total-cart .coupon-box .form-group button { height: 36px !important; line-height: 36px !important; padding: 0 16px !important; font-size: 14px !important; top: 4px !important; }
  .total-cart .cost-list li, .total-cart .shipping-cost p, .total-cart .sodaiora-summary li { font-size: 14px !important; line-height: 1.5 !important; }
  .total-cart .total-box h4, .total-cart .total-box h5 { font-size: 17px !important; }
  .total-cart .shipping-address { display: none; }
  .total-cart .btn-box { display: none; }

  .sd-app-checkoutbar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; left: 0; right: 0; z-index: 9994;
    bottom: calc(var(--sd-app-tabs-h) + var(--sd-app-safe));
    padding: 10px 14px; background: var(--sd-app-bar-bg);
    -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--sd-app-bar-border);
  }
  .sd-app-checkoutbar-total { flex: 1; line-height: 1.15; }
  .sd-app-checkoutbar-total small { display: block; font-size: 11px; color: var(--sd-app-muted); }
  .sd-app-checkoutbar-total strong { font-size: 18px; color: var(--title-color, #222); }
  .sd-app-checkoutbar button {
    flex: 0 0 auto; height: 44px; padding: 0 22px; border: 0; border-radius: 14px;
    background: var(--theme-color, #269c53); color: #fff; font: 700 15px/1 "Hind Siliguri", "Lato", sans-serif;
  }
  .sd-app-checkoutbar button:disabled { opacity: 0.5; }
  .sd-app-checkoutbar button i { margin-left: 6px; font-size: 13px; }
  body:has(.sd-app-checkoutbar) { padding-bottom: calc(var(--sd-app-tabs-h) + var(--sd-app-safe) + 64px) !important; }
  body:has(.sd-app-checkoutbar) .sdc-launcher { bottom: calc(var(--sd-app-tabs-h) + var(--sd-app-safe) + 76px); }
}

/* ---------- Checkout on phones ---------- */
.sd-app-orderbar { display: none; }
@media (max-width: 767px) {
  /* scroll-to-top isn't needed on any phone page */
  .scroll-to-top { display: none !important; }

  /* Cart and checkout: nothing below the order (promo banner, feature list) */
  body:has(.checkout-section) .cta-style-two, body:has(.checkout-section) .highlights-section,
  body:has(.sd-app-cartlist) .cta-style-two, body:has(.sd-app-cartlist) .highlights-section { display: none !important; }
  .checkout-section { padding-bottom: 24px !important; }
  .checkout-section .sec-title, .cart-section .sec-title { padding-bottom: 12px !important; }
  .checkout-section .sec-title h2, .cart-section .sec-title h2 { font-size: 20px !important; }

  /* Form: smaller boxes and labels */
  .checkout-section .billing-content, .checkout-section .order-info, .checkout-section .inner-box { padding: 16px !important; border-radius: 16px; }
  .checkout-section h3 { font-size: 18px !important; line-height: 1.3 !important; margin-bottom: 10px !important; }
  .checkout-section label { font-size: 14px !important; margin-bottom: 4px !important; }
  .checkout-section .form-group { margin-bottom: 12px !important; }
  .checkout-section input[type="text"], .checkout-section input[type="tel"], .checkout-section input[type="email"],
  .checkout-section select, .checkout-section .nice-select {
    height: 46px !important; line-height: 46px !important; font-size: 15px !important; border-radius: 12px !important; padding: 0 14px !important;
  }
  .checkout-section textarea { min-height: 80px !important; height: 80px !important; font-size: 15px !important; border-radius: 12px !important; }
  .checkout-section p { font-size: 13px !important; line-height: 1.5 !important; }

  /* Order summary: small pictures */
  .checkout-section .order-info img, .checkout-section .order-product img { width: 56px !important; height: 56px !important; object-fit: contain; border-radius: 8px; }
  .checkout-section .order-info h4, .checkout-section .order-info h5, .checkout-section .order-info span { font-size: 15px !important; }
  .checkout-section .order-info .btn-box { display: none; }

  /* Place order bar */
  .sd-app-orderbar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9995;
    padding: 10px 14px calc(10px + var(--sd-app-safe));
    background: var(--sd-app-bar-bg);
    -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--sd-app-bar-border);
    box-shadow: 0 -6px 24px -12px rgba(0, 0, 0, 0.18);
  }
  .sd-app-orderbar .sd-app-checkoutbar-total em { display: block; font-style: normal; font-size: 11px; color: #e8590c; }
  .sd-app-orderbar button {
    flex: 0 0 auto; height: 48px; padding: 0 24px; border: 0; border-radius: 14px;
    background: var(--theme-color, #269c53); color: #fff; font: 700 15px/1 "Hind Siliguri", "Lato", sans-serif;
  }
  .sd-app-orderbar button:disabled { opacity: 0.5; }
  body:has(.sd-app-orderbar) { padding-bottom: calc(72px + var(--sd-app-safe)) !important; }
  body:has(.sd-app-orderbar) .sdc-launcher { bottom: calc(72px + var(--sd-app-safe) + 12px); }
}

@media (max-width: 767px) {
  /* Checkout: one frame, not three nested paddings */
  .checkout-section .inner-container { padding: 16px 12px !important; border-radius: 16px; }
  .checkout-section .billing-content, .checkout-section .order-info { padding: 0 !important; margin-right: 0 !important; margin-bottom: 20px !important; }
}

@media (max-width: 767px) {
  /* Checkout summary: picture beside the name */
  .checkout-section .order-product .single-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px !important; }
  .checkout-section .order-product .product-box { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 !important; }
  .checkout-section .order-product .product-box .image-box { position: static !important; flex: 0 0 52px; width: 52px; height: 52px; margin: 0 !important; }
  .checkout-section .order-product .product-box .image-box img { width: 52px !important; height: 52px !important; }
  .checkout-section .order-product .product-box h6 { font-size: 13px !important; line-height: 1.35 !important; margin: 0 !important; }
  .checkout-section .order-product .single-item > h4 { flex: 0 0 auto; margin: 0 !important; font-size: 14px !important; }
  .checkout-section .cost-box li { padding: 8px 0 !important; }
  .checkout-section .cost-box h4 { font-size: 15px !important; }
}

@media (max-width: 767px) {
  body .checkout-section .order-info .order-product .single-item { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; }
  body .checkout-section .order-info .order-product .product-box { display: flex !important; align-items: center; gap: 10px; }
  body .checkout-section .order-info .order-product .product-box .image-box { margin: 0 !important; height: 52px; }
  body .checkout-section .order-info .cost-box li { margin-bottom: 0 !important; }
}

/* =====================================================================
   Home page on phones: shorter, app-style sections
   (banners and offers swipe sideways instead of stacking full screen)
   ===================================================================== */
@media (max-width: 767px) {
  .main-header .header-lower .outer-box { padding-top: 6px; padding-bottom: 6px; }

  /* ---------- section rhythm: less empty space between blocks ---------- */
  .sec-title h2 { font-size: 19px !important; line-height: 1.3 !important; }
  .sec-title.d_flex { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding-bottom: 12px !important; }
  .sec-title.d_flex a { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--theme-color, #269c53); text-decoration: none; }
  .sec-title.d_flex a::after { content: " \203A"; }
  .sec-title { padding-bottom: 12px !important; }
  .shop-section, .ads-section, .shop-style-two, .shop-style-three, .shop-style-four, .offers-section, .news-section, .cta-style-two, .sd-student {
    padding-top: 14px !important; padding-bottom: 14px !important;
  }
  .banner-style-five { padding-bottom: 8px !important; }

  /* ---------- sideways rows (featured banners, offers, news) ---------- */
  .ads-section .row, .offers-section .row, .news-section .row {
    display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -15px; padding: 0 15px 4px; gap: 12px; scroll-padding-left: 15px;
  }
  .ads-section .row::-webkit-scrollbar, .offers-section .row::-webkit-scrollbar, .news-section .row::-webkit-scrollbar { display: none; }
  .ads-section .row > *, .offers-section .row > *, .news-section .row > * {
    flex: 0 0 82%; max-width: 82%; padding: 0; margin: 0 !important; scroll-snap-align: start;
  }

  /* featured banners: short cards */
  .ads-block-one, .ads-block-one .inner-box { margin: 0 !important; }
  .ads-block-one .inner-box { min-height: 0 !important; height: 168px; padding: 20px 18px !important; border-radius: 16px; overflow: hidden; }
  .ads-block-one .inner-box .image { max-width: 52%; }
  .ads-block-one .inner-box .image img { max-height: 150px; width: auto; }
  .ads-block-one .inner-box .text { font-size: 11px !important; margin-bottom: 4px !important; letter-spacing: 0.5px; }
  .ads-block-one .inner-box h2 { font-size: 21px !important; line-height: 1.2 !important; margin-bottom: 4px !important; position: relative; z-index: 1; }
  .ads-block-one .inner-box h4 { font-size: 14px !important; margin-bottom: 14px !important; position: relative; z-index: 1; }
  .ads-block-one .inner-box .theme-btn { padding: 8px 18px !important; font-size: 13px !important; line-height: 1.2 !important; position: relative; z-index: 1; }

  /* offers: compact cards */
  .offers-block-one .inner-box { padding: 10px !important; border-radius: 16px; height: 100%; }
  .offers-block-one .inner-box .image-box { margin-bottom: 10px !important; border-radius: 12px; overflow: hidden; }
  .offers-block-one .inner-box .image-box img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
  .offers-block-one .inner-box .lower-content { padding: 0 4px 4px !important; text-align: left; }
  .offers-block-one .inner-box .lower-content .sub-title { position: static !important; transform: none !important; display: inline-block; margin-bottom: 6px !important; font-size: 11px !important; }
  .offers-block-one .inner-box .lower-content h6 { font-size: 14px !important; line-height: 1.35 !important; margin-bottom: 2px !important; }
  .offers-block-one .inner-box .lower-content p { font-size: 12px !important; line-height: 1.4 !important; margin: 0 !important; }

  /* news: compact cards */
  .news-block-one .inner-box { margin: 0 !important; height: 100%; border-radius: 16px; overflow: hidden; }
  .news-block-one .inner-box .image-box img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
  .news-block-one .inner-box .lower-content { padding: 12px 14px 14px !important; }
  .news-block-one .inner-box .lower-content h3 { font-size: 15px !important; line-height: 1.35 !important; margin-bottom: 6px !important; }
  .news-block-one .inner-box .lower-content p, .news-block-one .inner-box .lower-content li { font-size: 12px !important; line-height: 1.4 !important; }

  /* ---------- "Hot Deals" and category sliders ---------- */
  .nav-style-one .owl-nav { display: none !important; }
  /* the big category picture beside the slider becomes a slim strip above it */
  .shop-style-four .inner-container { padding-left: 0 !important; }
  .shop-style-four .inner-container .ads-block {
    position: relative !important; inset: auto !important; width: 100% !important; height: 110px !important; min-height: 0 !important;
    margin-bottom: 12px; border-radius: 16px; overflow: hidden;
  }
  .shop-style-four .inner-container .ads-block .bg-layer { background-size: cover !important; background-position: center !important; }
  .shop-style-four .inner-container .ads-block h2 {
    position: absolute !important; left: 16px !important; bottom: 12px !important; top: auto !important; right: auto !important;
    transform: none !important; writing-mode: horizontal-tb !important; margin: 0 !important;
    font-size: 20px !important; line-height: 1.2 !important; color: #fff !important; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  }
  .shop-style-four .sec-title { display: none; }

  /* ---------- two category promos with product lists ---------- */
  .shop-style-three .ads-column .ads-block {
    min-height: 0 !important; height: 150px; padding: 20px 18px !important; margin-bottom: 10px !important; border-radius: 16px; overflow: hidden; text-align: left !important;
  }
  .shop-style-three .ads-column .ads-block .image { max-width: 48%; right: 0 !important; left: auto !important; }
  .shop-style-three .ads-column .ads-block .image img { max-height: 140px; width: auto; }
  .shop-style-three .ads-column .ads-block .text { font-size: 11px !important; margin-bottom: 2px !important; }
  .shop-style-three .ads-column .ads-block h3 { font-size: 21px !important; line-height: 1.2 !important; margin-bottom: 4px !important; position: relative; z-index: 1; }
  .shop-style-three .ads-column .ads-block h4 { font-size: 13px !important; margin-bottom: 12px !important; position: relative; z-index: 1; }
  .shop-style-three .ads-column .ads-block .theme-btn { padding: 7px 16px !important; font-size: 13px !important; line-height: 1.2 !important; position: relative; z-index: 1; }
  /* the four products under each promo: a tidy list */
  .shop-style-three .shop-column { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
  .shop-style-three .shop-column > * { margin: 0 !important; }
  .shop-style-three .shop-column .inner-box { display: flex; align-items: center; gap: 12px; min-height: 0 !important; padding: 8px !important; border-radius: 14px; background: var(--sd-app-tile); }
  .shop-style-three .shop-column .inner-box .image-box,
  .shop-style-three .shop-column .inner-box .image { position: static !important; flex: 0 0 60px; width: 60px !important; height: 60px !important; margin: 0 !important; border-radius: 10px; overflow: hidden; }
  .shop-style-three .shop-column .inner-box img { width: 60px !important; height: 60px !important; object-fit: contain; background: #fff; }
  .shop-style-three .shop-column .inner-box .lower-content, .shop-style-three .shop-column .inner-box .content-box { padding: 0 !important; min-width: 0; }
  .shop-style-three .shop-column .inner-box h4, .shop-style-three .shop-column .inner-box h5, .shop-style-three .shop-column .inner-box h6 { font-size: 14px !important; line-height: 1.3 !important; margin: 0 0 2px !important; }

  /* ---------- free-delivery banners ---------- */
  .cta-section .inner-container { padding: 26px 18px !important; border-radius: 18px; }
  .cta-section .image-layer { display: none; }
  .cta-section .content-box h2 { font-size: 22px !important; line-height: 1.25 !important; margin-bottom: 6px !important; }
  .cta-section .content-box h2 br { display: none; }
  .cta-section .content-box h3 { font-size: 14px !important; line-height: 1.4 !important; margin-bottom: 14px !important; }
  .cta-section .content-box .theme-btn { padding: 9px 22px !important; font-size: 14px !important; }
  .cta-style-two .inner-container, .cta-style-two .inner-box { padding: 24px 18px !important; border-radius: 18px; min-height: 0 !important; }
  .cta-style-two h2 { font-size: 22px !important; line-height: 1.25 !important; }

  /* ---------- "why us" icons: 2 per row ---------- */
  .highlights-section .inner-container { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px !important; }
  .highlights-section .highlights-block-one { float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
  .highlights-section .highlights-block-one .inner-box { display: flex; align-items: center; gap: 8px; padding: 0 !important; min-height: 0 !important; }
  .highlights-section .highlights-block-one .icon-box { position: static !important; flex: 0 0 32px; margin: 0 !important; }
  .highlights-section .highlights-block-one .icon-box img { width: 32px; height: 32px; }
  .highlights-section .highlights-block-one h5 { font-size: 12px !important; line-height: 1.3 !important; margin: 0 !important; }
  .highlights-section .highlights-block-one:last-child { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  /* category promo lists: picture on the left, name above price */
  .shop-style-three .shop-column .shop-block-two { padding: 0 !important; border: 0 !important; }
  .shop-style-three .shop-column .shop-block-two .inner-box {
    display: grid !important; grid-template-columns: 60px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center;
    margin: 0 !important; padding: 8px 12px 8px 8px !important; min-height: 0 !important;
  }
  .shop-style-three .shop-column .shop-block-two .inner-box .image-box { grid-row: 1 / 3; }
  .shop-style-three .shop-column .shop-block-two .inner-box h5 { align-self: end; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .shop-style-three .shop-column .shop-block-two .inner-box h6 { align-self: start; margin: 0 !important; font-size: 14px !important; color: var(--theme-color, #269c53) !important; }

  /* "why us": a plain card (no dark side bands) */
  .highlights-section { padding: 8px 0 20px !important; }
  .highlights-section .bg-color, .highlights-section .shape { display: none !important; }
  .highlights-section .inner-container { border-radius: 16px; border: 1px solid var(--sd-app-bar-border); background: var(--sd-app-tile) !important; }
}
@media (max-width: 767px) {
  .highlights-section .inner-container { height: auto !important; min-height: 0 !important; }
  .shop-style-three .ads-column .ads-block .image { width: 46% !important; max-width: none; height: 100% !important; top: 0 !important; bottom: 0 !important; display: flex; align-items: flex-end; justify-content: flex-end; }
  .shop-style-three .ads-column .ads-block .image img { width: 100% !important; height: 100% !important; max-height: none; object-fit: contain; object-position: right bottom; }
}

/* =====================================================================
   My Account (all screen sizes): sidebar with profile + menu, panel on the right
   components/frontend/shop/AccountView.tsx
   ===================================================================== */
.sd-acc-section {
  --sd-acc-line: rgba(0, 0, 0, 0.08); --sd-acc-soft: #f5f8f6; --sd-acc-muted: #6b7570; --sd-acc-card: #fff;
  padding-top: 8px;
}
html[data-theme="dark"] .sd-acc-section { --sd-acc-line: #2c3830; --sd-acc-soft: #1f2822; --sd-acc-muted: #93a097; --sd-acc-card: #18201b; }
.sd-acc-section .inner-container { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.sd-acc-head { margin: 0 0 24px; }
.page-title:has(+ .sd-acc-section) { padding-bottom: 10px !important; }
.sd-acc-head h1 { margin: 0 0 4px; font-size: 30px; line-height: 1.25; }
.sd-acc-head p { margin: 0; color: var(--sd-acc-muted); font-size: 15px; }

.sd-acc { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.sd-acc > * { min-width: 0; }
.sd-acc-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
.sd-acc-card { background: var(--sd-acc-card); border: 1px solid var(--sd-acc-line); border-radius: 18px; box-shadow: 0 6px 24px -18px rgba(16, 40, 24, 0.35); }

/* profile */
.sd-acc-profile { padding: 24px 20px 18px; text-align: center; }
.sd-acc-avatar {
  width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--theme-color, #269c53), #1b7a3f); color: #fff;
  font: 700 30px/1 "Quicksand", "Hind Siliguri", sans-serif; box-shadow: 0 0 0 4px rgba(38, 156, 83, 0.12);
}
.sd-acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sd-acc-who h3 { margin: 0 0 4px; font-size: 20px; line-height: 1.3; }
.sd-acc-who p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--sd-acc-muted); word-break: break-word; }
.sd-acc-stats { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; border-top: 1px solid var(--sd-acc-line); padding-top: 14px; }
.sd-acc-stats > div + div { border-left: 1px solid var(--sd-acc-line); }
.sd-acc-stats strong { display: block; font-size: 16px; line-height: 1.3; color: var(--title-color, #222); }
.sd-acc-stats span { font-size: 12px; color: var(--sd-acc-muted); }

/* menu */
.sd-acc-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.sd-acc-nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 0; border-radius: 12px;
  background: none; color: var(--title-color, #222); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sd-acc-nav button i { width: 18px; text-align: center; color: var(--sd-acc-muted); font-size: 15px; }
.sd-acc-nav button:hover { background: var(--sd-acc-soft); }
.sd-acc-nav button.active { background: rgba(38, 156, 83, 0.1); color: var(--theme-color, #269c53); font-weight: 600; }
.sd-acc-nav button.active i { color: var(--theme-color, #269c53); }
.sd-acc-nav .sd-tab-count {
  position: static; margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: #e11d48; color: #fff; font: 700 11px/20px "Lato", sans-serif; text-align: center;
}
.sd-acc-nav .sd-acc-logout { margin-top: 4px; border-top: 1px solid var(--sd-acc-line); border-radius: 0 0 12px 12px; color: #d63649; }
.sd-acc-nav .sd-acc-logout i { color: #d63649; }
.sd-acc-nav .sd-acc-logout:hover { background: rgba(214, 54, 73, 0.07); }

/* address */
.sd-acc-address { padding: 16px 18px; }
.sd-acc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.sd-acc-card-head h4 { margin: 0; font-size: 15px; line-height: 1.3; }
.sd-acc-card-head h4 i { color: var(--theme-color, #269c53); margin-right: 4px; }
.sd-acc-card-head button { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 600; color: var(--theme-color, #269c53); cursor: pointer; }
.sd-acc-address p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--sd-acc-muted); }

/* panel */
.sd-acc-panel { padding: 24px 26px 28px; min-height: 420px; }
.sd-acc-title { margin: 0 0 18px !important; font-size: 21px !important; line-height: 1.3 !important; }
.sd-acc-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sd-acc-link { font-size: 14px; font-weight: 600; color: var(--theme-color, #269c53); white-space: nowrap; }
.sd-acc-link i { font-size: 12px; margin-left: 4px; }
.sd-acc-panel .sodaiora-form { max-width: 720px; }

/* orders */
.sd-acc-orders { display: flex; flex-direction: column; gap: 10px; }
.sd-acc-order {
  display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; border: 1px solid var(--sd-acc-line); border-radius: 14px;
  color: inherit; text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.sd-acc-order:hover { border-color: rgba(38, 156, 83, 0.45); box-shadow: 0 8px 22px -16px rgba(16, 40, 24, 0.45); transform: translateY(-1px); }
.sd-acc-order figure { flex: 0 0 64px; width: 64px; height: 64px; margin: 0; border-radius: 12px; overflow: hidden; background: var(--sd-acc-soft); }
.sd-acc-order figure img { width: 100%; height: 100%; object-fit: contain; }
.sd-acc-order-info { flex: 1; min-width: 0; }
.sd-acc-order-info h5 { margin: 0 0 4px; font-size: 16px; line-height: 1.35; color: var(--title-color, #222); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-acc-order-info span { font-size: 13px; color: var(--sd-acc-muted); }
.sd-acc-order-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.sd-acc-order-end strong { font-size: 16px; color: var(--title-color, #222); }
.sd-acc-order-go { color: var(--sd-acc-muted); font-size: 12px; }
.sd-acc-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.sd-acc-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sd-acc-status-done { background: #e6f6ec; color: #1d8a47; }
.sd-acc-status-stop { background: #fdecee; color: #d63649; }
.sd-acc-status-road { background: #e8f1fd; color: #2563c9; }
.sd-acc-status-wait { background: #fff4e0; color: #b86e00; }
html[data-theme="dark"] .sd-acc-status-done { background: #173a25; color: #5fd08a; }
html[data-theme="dark"] .sd-acc-status-stop { background: #3a1d22; color: #ff8593; }
html[data-theme="dark"] .sd-acc-status-road { background: #1b2a42; color: #7fb0ff; }
html[data-theme="dark"] .sd-acc-status-wait { background: #3a2c14; color: #ffc266; }
.sd-acc-empty { padding: 40px 16px; text-align: center; color: var(--sd-acc-muted); }
.sd-acc-empty i { font-size: 40px; color: var(--theme-color, #269c53); opacity: 0.5; margin-bottom: 12px; }
.sd-acc-empty p { margin-bottom: 16px; }

@media (max-width: 991px) {
  .sd-acc { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .sd-acc-side { position: static; gap: 12px; }
  /* menu: four equal boxes, icon above a short name, all visible (no sideways scrolling) */
  .sd-acc-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; }
  .sd-acc-nav button {
    position: relative; flex-direction: column; justify-content: center; gap: 6px; width: auto; min-width: 0;
    padding: 12px 4px 10px; font-size: 12px; font-weight: 600; text-align: center; border-radius: 12px;
  }
  .sd-acc-nav button i { width: auto; font-size: 19px; line-height: 1; }
  .sd-acc-nav-long { display: none; }
  .sd-acc-nav button .sd-acc-nav-short { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sd-acc-nav .sd-tab-count { position: absolute; top: 6px; left: calc(50% + 4px); right: auto; width: auto; margin: 0; min-width: 18px; height: 18px; font-size: 10px; line-height: 18px; padding: 0 5px; }
  .sd-acc-nav .sd-acc-logout { display: none; }
  .sd-acc-logout-bottom {
    order: 5; display: flex !important; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px;
    color: #d63649; font-size: 15px; font-weight: 600; cursor: pointer;
  }
  .sd-acc-logout-bottom:active { background: rgba(214, 54, 73, 0.07); }
  /* phone/tablet order: profile, menu, the chosen tab, then the address */
  .sd-acc-side { display: contents; }
  .sd-acc-profile { order: 1; }
  .sd-acc-nav { order: 2; }
  .sd-acc-main { order: 3; }
  .sd-acc-address { order: 4; }
}
@media (max-width: 767px) {
  .sd-acc-section { padding-bottom: 24px !important; }
  .sd-acc-head { margin-bottom: 14px; }
  .page-title:has(+ .sd-acc-section) { display: none; }
  .sd-acc-section { padding-top: 14px !important; }
  .sd-acc-head h1 { font-size: 22px; }
  .sd-acc-head p { font-size: 13px; }
  .sd-acc-section ~ .highlights-section { display: none; }
  /* profile: picture beside the name */
  .sd-acc-profile { display: grid; grid-template-columns: 64px 1fr; column-gap: 14px; align-items: center; padding: 16px; text-align: left; }
  .sd-acc-avatar { width: 64px; height: 64px; margin: 0; font-size: 22px; }
  .sd-acc-who h3 { font-size: 17px; }
  .sd-acc-who p { font-size: 13px; }
  .sd-acc-stats { grid-column: 1 / -1; margin-top: 14px; padding-top: 12px; text-align: center; }
  .sd-acc-panel { padding: 16px 14px 18px; min-height: 0; border-radius: 16px; }
  .sd-acc-title { font-size: 18px !important; margin-bottom: 12px !important; }
  .sd-acc-order { gap: 12px; padding: 10px; }
  .sd-acc-order figure { flex-basis: 54px; width: 54px; height: 54px; }
  .sd-acc-order-info h5 { font-size: 14px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .sd-acc-order-info span { font-size: 12px; }
  .sd-acc-order-end strong { font-size: 14px; }
  .sd-acc-status { font-size: 11px; padding: 2px 8px; }
  .sd-acc-order-go { display: none; }
}
.sd-acc .sd-photo .sd-acc-avatar-sm { flex: 0 0 72px; width: 72px; height: 72px; margin: 0; font-size: 24px; }
.sd-acc-nav { position: relative; }
.sd-acc-nav-short, .sd-acc-logout-bottom { display: none; }

/* =====================================================================
   App feel on phones: header that stays put, back arrow, [– n +] on cards,
   no slow fade-in animations, small footer
   ===================================================================== */
.sd-app-back, .sd-card-stepper { display: none; }
@media (max-width: 767px) {
  /* ---------- app bar: always on top, one header (no swap to the template's sticky copy) ---------- */
  .main-header { position: sticky !important; top: 0; z-index: 999; background: var(--sd-app-bar-bg); box-shadow: 0 1px 0 var(--sd-app-bar-border); }
  .main-header .sticky-header { display: none !important; }
  .main-header .header-lower { position: static !important; background: transparent !important; }
  .main-header .header-lower .outer-box { display: flex; align-items: center; gap: 8px; }
  /* only the logo shrinks to make room for the back arrow */
  .main-header .header-lower .logo-box { flex: 0 1 auto; min-width: 0; margin-right: auto !important; }
  .main-header .header-lower .logo-box img { max-height: 34px; width: auto; }
  .sd-app-back {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px;
    margin-left: -6px; border: 0; border-radius: 50%; background: transparent; color: var(--title-color, #222); font-size: 18px;
  }
  .sd-app-back:active { background: var(--sd-app-tile); }

  /* ---------- product card: [– n +] once it is in the cart ---------- */
  .shop-block-one .inner-box .lower-content:has(.sd-card-stepper) .decore { display: none !important; }
  .shop-block-one .inner-box .lower-content .sd-card-stepper {
    display: flex; align-items: center; justify-content: space-between;
    position: absolute; top: 90px; right: 8px; z-index: 3; height: 34px; min-width: 104px;
    border-radius: 17px; background: var(--theme-color, #269c53); color: #fff; box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.3);
    animation: sd-pop 0.18s ease-out;
  }
  .sd-card-stepper button { width: 34px; height: 34px; border: 0; background: none; color: #fff; font-size: 12px; }
  .sd-card-stepper button:disabled { opacity: 0.45; }
  .sd-card-stepper span { min-width: 22px; text-align: center; font: 700 14px/1 "Lato", sans-serif; }
  @keyframes sd-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }

  /* ---------- feels faster: content shows at once (no fade-in on scroll, no loading screen) ---------- */
  .wow { visibility: visible !important; animation: none !important; }
  .loader-wrap { display: none !important; }
  html { scroll-behavior: auto; }
  /* buttons and tabs: no text selection or long-press callout, like native controls */
  .sd-app-tabs, .sd-app-buybar, .sd-card-stepper, .sd-app-stepper, .sd-acc-nav, .tab-btns, .theme-btn, .decore {
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  }
  .theme-btn:active, .decore:active { transform: scale(0.97); }

  /* ---------- footer: links only (contact, newsletter and app box are elsewhere in the app) ---------- */
  .main-footer .widget-section { padding: 22px 0 6px !important; }
  .main-footer .logo-widget, .main-footer .download-widget { display: none !important; }
  .main-footer .widget-section .row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
  .main-footer .widget-section .row > .footer-column { width: auto; max-width: none; padding: 0; margin: 0 0 12px; }
  .main-footer .footer-widget { margin: 0 !important; }
  .main-footer .footer-widget .widget-title { margin-bottom: 6px !important; }
  .main-footer .footer-widget .widget-title h3, .main-footer .footer-widget .widget-title h4 { font-size: 15px !important; margin: 0 !important; }
  .main-footer .footer-widget li { margin: 0 !important; }
  .main-footer .footer-widget li a { display: block; padding: 5px 0; font-size: 13px !important; line-height: 1.4 !important; }
  .main-footer .footer-bottom { padding: 12px 0 !important; }
  .main-footer .footer-bottom .bottom-inner { flex-direction: column; gap: 8px; text-align: center; }
  .main-footer .footer-bottom .copyright p { font-size: 12px !important; margin: 0 !important; }
  .main-footer .footer-card { justify-content: center; flex-wrap: wrap; gap: 6px; }
  .main-footer .footer-card img { height: 22px; width: auto; }
}
@media (max-width: 767px) {
  /* the wrapper's overflow:hidden stops position:sticky; clip still hides sideways overflow without that side effect */
  .boxed_wrapper, .page-wrapper { overflow: visible !important; overflow-x: clip !important; }
  html body .main-header.header-style-four .sticky-header,
  html body .main-header.header-style-four.fixed-header .sticky-header { display: none !important; }
  /* footer: no empty cell where the logo column was */
  .main-footer .widget-section .row { margin: 0 !important; }
  .main-footer .footer-column:has(.logo-widget), .main-footer .footer-column:has(.download-widget) { display: none !important; }
}
@media (max-width: 767px) {
  html body .main-header.header-style-four { background: var(--sd-app-sheet-bg) !important; }
}

