/* ============================================================================
   OHM Refresh — responsive refinements
   Based on styles(2).css and elementor-compat(1).css.
   Load AFTER both existing stylesheets. Desktop (901px+) is unchanged.
   ============================================================================ */

/* Tablet and mobile ------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --gutter: 24px; --section-y: 64px; }
  .site-header .header-inner {
    position: relative;
    min-height: 70px;
    gap: 12px;
    padding-inline: 24px;
  }
  .site-header .logo { flex: 0 1 auto; min-width: 0; }
  .site-header .logo img { max-width: 100%; height: 39px; object-fit: contain; }
  .site-header .header-actions { flex: 0 0 auto; gap: 2px; }
  .site-header .icon-btn { width: 42px; height: 42px; }

  /* Use the existing .nav.open class and .has-sub.open submenu toggle. */
  .site-header .nav {
    position: absolute;
    z-index: 70;
    top: 100%; left: 0; right: 0;
    width: 100%;
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 24px 24px;
    background: #0e0e10;
    border-bottom: 1px solid #26262a;
    box-shadow: 0 18px 35px rgba(0,0,0,.2);
    align-items: stretch;
  }
  .site-header .nav:not(.open) { display: none; }
  .site-header .nav.open { display: flex; }
  .site-header .nav > a,
  .site-header .nav-item > a { min-height: 48px; display: flex; align-items: center; }
  .site-header .nav-item.has-sub {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    gap: 0;
    margin-right: 0;
  }
  .site-header .nav-item.has-sub > a { flex: 1 1 auto; min-width: 0; }
  .site-header .nav-item.has-sub > .sub-toggle {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }
  .site-header .nav .submenu {
    position: static;
    left: auto; top: auto;
    flex: 0 0 100%;
    width: 100%; min-width: 0; max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0 0 12px 12px;
    border: 0; border-radius: 0;
    box-shadow: none;
    background: transparent;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    overflow: visible;
  }
  .site-header .nav .submenu::before,
  .site-header .nav .submenu::after { display: none; }
  .site-header .nav-item.has-sub.open > .submenu,
  .site-header .nav-item.has-sub:focus-within > .submenu { display: block; }
  .site-header .submenu a.sub-link { padding: 10px 4px; gap: 12px; }
  .site-header .submenu .sub-img { flex: 0 0 72px; width: 72px; height: 54px; }
  .site-header .submenu .sub-text b { font-size: .92rem; }
  .site-header .submenu .sub-text small { font-size: .8rem; }
  .site-header .submenu .sub-foot { margin-top: 4px; }

  /* Common layouts */
  .section { padding: 48px var(--gutter); }
  .page-hero { padding: 56px var(--gutter); }
  .row { gap: 28px; }
  .col, .col--narrow { min-width: 0; }
  .section-head { margin-bottom: 30px; }
  .hero { min-height: 68svh; padding-inline: var(--gutter); }
  .hero-logo img { max-width: 75vw; }
  .cards { gap: 18px; }
  .cards > .card { flex-basis: calc(50% - 9px); max-width: none; min-width: 0; }
  .gallery figure { flex-basis: calc(50% - 7px); }
  .footer-top { gap: 28px; }
  .footer-brand { flex-basis: 100%; max-width: none; }
  .footer-col { flex: 1 1 160px; }

  /* Single product: one readable column and a contained gallery */
  .ohm-product-page .pdp { flex-direction: column; gap: 32px; }
  .ohm-product-page .pdp-gallery,
  .ohm-product-page .pdp-info { flex: 0 1 auto; width: 100%; min-width: 0; }
  .ohm-product-page .pdp-main { max-width: 680px; margin-inline: auto; }
  .ohm-product-page .thumbs { justify-content: flex-start; }
  .ohm-product-page .ohm-product-tabs .e-n-tabs-heading { overflow-x: auto; }
  .ohm-product-page .ohm-product-tabs .e-n-tab-title { flex: 0 0 auto; }

  /* Cart: recommendations above totals, each taking full row at this width */
  body.woocommerce-cart .woocommerce .cart-collaterals { display: flex; flex-direction: column; gap: 30px; }
  body.woocommerce-cart .woocommerce .cart-collaterals .cross-sells,
  body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals {
    float: none; width: 100%; max-width: 100%;
  }
  body.woocommerce-cart .woocommerce .cart-collaterals .cross-sells { order: 1; }
  body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals { order: 2; }
  body.woocommerce-cart .woocommerce .ohm-cart-recommendations .cards { gap: 16px; }
  body.woocommerce-cart .woocommerce .ohm-cart-recommendations .card {
    flex: 1 1 calc(50% - 8px); max-width: none; min-width: 0;
  }

  /* Checkout form and summary stack using the classic WooCommerce markup. */
  body.woocommerce-checkout .woocommerce form.checkout { display: block; }
  body.woocommerce-checkout .woocommerce form.checkout > #customer_details {
    width: 100%; margin-bottom: 28px;
  }
  body.woocommerce-checkout .woocommerce form.checkout > #order_review_heading,
  body.woocommerce-checkout .woocommerce form.checkout > #order_review { width: 100%; }
  .ohm-account-page .woocommerce-MyAccount-navigation,
  .ohm-account-page .woocommerce-MyAccount-content { width: 100%; float: none; }
}

/* Phone ------------------------------------------------------------------- */
@media (max-width: 600px) {
  :root { --gutter: 18px; --section-y: 48px; --radius: 16px; }
  body { font-size: 16px; }
  .site-header .header-inner { min-height: 64px; padding-inline: 14px; gap: 6px; }
  .site-header .logo img { height: 34px; }
  .site-header .icon-btn { width: 38px; height: 42px; }
  .site-header .icon-btn svg { width: 21px; height: 21px; }
  .site-header .nav { max-height: calc(100dvh - 64px); padding: 8px 18px 20px; }
  .site-header .nav a { font-size: 1rem; }
  .site-header .cart-count { right: -2px; top: 0; }
  .site-header .submenu .sub-img { flex-basis: 64px; width: 64px; height: 50px; }

  .section { padding: 40px var(--gutter); }
  .page-hero { padding: 44px var(--gutter); }
  .page-hero .display, .ohm-standard-page .page-hero .display {
    font-size: clamp(2.1rem, 9vw, 3.1rem) !important;
    line-height: 1.08;
    overflow-wrap: break-word;
  }
  .page-hero .breadcrumb { margin-bottom: 18px; }
  .hero { min-height: 65svh; padding: 52px var(--gutter); }
  .hero h1 { font-size: clamp(2.25rem, 10vw, 3.5rem); }
  .hero-logo img { width: min(80vw, 420px); max-width: 100%; }
  .hero-image img { aspect-ratio: 4 / 3; }
  .h2 { font-size: clamp(1.75rem, 7.5vw, 2.6rem); }
  .eyebrow { letter-spacing: .2em; }
  .section-head { margin-bottom: 24px; }
  .row, .row--tight { flex-direction: column; gap: 22px; align-items: stretch; }
  .col, .col--narrow { flex: 0 1 auto; width: 100%; }
  .cards > .card { flex: 0 0 100%; max-width: none; }
  .card-body { padding: 20px 20px 24px; }
  .card h3 { font-size: 1.4rem; }
  .gallery figure { flex: 0 0 100%; }
  .iconbox, .quote, .support-item { flex: 0 0 100%; }
  .range3-wrap { padding-inline: 12px; }
  .r3 { min-height: 450px; }
  .r3-body { width: 100%; padding: 22px; }
  .thumbs { gap: 8px; }
  .ohm-product-page .thumb { flex: 0 0 64px; width: 64px; height: 64px; }
  .ohm-product-page .pdp-info h1 { font-size: clamp(2rem, 8vw, 2.7rem); }
  .ohm-product-page .pdp-main img { padding: 12px; }
  .ohm-product-page .pdp-main img.is-cover { padding: 0; }

  /* Preserve quantity + Add to basket in one row above the wishlist. */
  .ohm-product-page .pdp-info .woocommerce-variation-add-to-cart,
  .ohm-product-page .pdp-info form.cart:not(.variations_form) {
    grid-template-columns: 112px minmax(0, 1fr);
    column-gap: 8px; row-gap: 14px;
  }
  .ohm-product-page .pdp-info form.cart .quantity {
    width: 112px; height: 50px; min-width: 0;
    grid-column: 1; grid-row: 1;
  }
  .ohm-product-page .pdp-info form.cart .quantity input.qty { width: 26px; }
  .ohm-product-page .pdp-info form.cart .quantity .ohm-qty-minus,
  .ohm-product-page .pdp-info form.cart .quantity .ohm-qty-plus {
    flex: 0 0 36px; width: 36px; height: 46px;
  }
  body.woocommerce .ohm-product-page .pdp-info form.cart button.single_add_to_cart_button,
  body.woocommerce .ohm-product-page .pdp-info form.cart button.single_add_to_cart_button.button {
    grid-column: 2; grid-row: 1;
    min-width: 0; width: 100%; min-height: 50px;
    padding: 10px 12px; font-size: .82rem;
    white-space: normal;
  }
  .ohm-product-page .pdp-info form.cart .tinv-wraper,
  .ohm-product-page .pdp-info form.cart .tinv-wishlist {
    grid-column: 1 / -1; grid-row: 2; width: 100%;
  }
  .ohm-product-page .ohm-product-tabs .e-n-tabs-heading { flex-wrap: nowrap; }
  .ohm-product-page .ohm-product-tabs .e-n-tab-title { padding: 12px 14px; font-size: .88rem; }

  /* Full-width mobile basket drawer with an always-visible action area. */
  .drawer { width: 100%; max-width: 100%; }
  .drawer-head { padding: 16px 18px; }
  .drawer-body { padding: 10px 18px; }
  .drawer-foot { padding: 16px 18px max(18px, env(safe-area-inset-bottom)); }
  .drawer .cart-line { gap: 12px; }
  .drawer .cart-line img { flex-basis: 64px; width: 64px; height: 64px; }
  .drawer .cart-line .price { font-size: .9rem; }
  .drawer .drawer-actions { gap: 8px; }
  .drawer .drawer-actions .btn { min-height: 48px; padding: 12px 8px; font-size: .8rem; }
  .drawer .drawer-total { font-size: 1.05rem; }

  /* WooCommerce classic cart + checkout */
  body.woocommerce-cart .woocommerce,
  body.woocommerce-checkout .woocommerce { width: calc(100% - 32px); }
  body.woocommerce-cart .woocommerce .ohm-cart-recommendations .card {
    flex: 0 0 100%; max-width: 100%;
  }
  body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals { padding: 20px; }
  body.woocommerce-cart .woocommerce .coupon { align-items: stretch; }
  body.woocommerce-cart .woocommerce .coupon #coupon_code { max-width: 100%; }
  body.woocommerce-checkout .woocommerce form.checkout > #customer_details { padding: 20px; }
  body.woocommerce-checkout .woocommerce form.checkout > #order_review_heading { padding: 22px 20px 12px; }
  body.woocommerce-checkout .woocommerce form.checkout > #order_review { padding: 0 20px 22px; }
  body.woocommerce-checkout .woocommerce .form-row-first,
  body.woocommerce-checkout .woocommerce .form-row-last { float: none; width: 100%; }

  .ohm-account-page .woocommerce-MyAccount-navigation,
  .ohm-account-page .woocommerce-MyAccount-content { padding: 18px; }
  .ohm-account-page .woocommerce-MyAccount-navigation ul { gap: 4px; }
  .ohm-account-page .woocommerce-MyAccount-navigation a { padding: 10px 12px; font-size: .85rem; }
  .ohm-account-page .woocommerce #customer_login > .u-column1,
  .ohm-account-page .woocommerce #customer_login > .u-column2 { flex-basis: 100%; }

  .footer-top { gap: 26px 16px; }
  .footer-brand { flex: 0 0 100%; }
  .footer-col, .footer-col--info { flex: 1 1 calc(50% - 12px); min-width: 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
  .ohm-policies-grid { grid-template-columns: 1fr; }
  .newsletter-form, #newsletter .newsletter-form { max-width: 100%; }
  #newsletter .newsletter-form .elementor-form-fields-wrapper { grid-template-columns: minmax(0,1fr); }
  #newsletter .newsletter-form .elementor-button { width: 100%; }
}

/* Extra-small phones ------------------------------------------------------ */
@media (max-width: 380px) {
  :root { --gutter: 14px; }
  .site-header .header-inner { padding-inline: 10px; }
  .site-header .logo img { height: 30px; }
  .site-header .header-actions { gap: 0; }
  .site-header .icon-btn { width: 35px; }
  .drawer .cart-line { flex-wrap: wrap; }
  .drawer .cart-line .price { margin-left: 76px; }
  .drawer .drawer-actions .btn { font-size: .75rem; }
  .ohm-product-page .pdp-info .woocommerce-variation-add-to-cart,
  .ohm-product-page .pdp-info form.cart:not(.variations_form) {
    grid-template-columns: 108px minmax(0, 1fr);
  }
  .ohm-product-page .pdp-info form.cart .quantity { width: 108px; }
}

/* Respect user motion preferences --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .site-header .nav, .site-header .submenu, .card, .r3 { scroll-behavior: auto; }
}

/* ============================================================
   Product Features: bounded horizontal carousel (tablet/mobile)
   Replaces all previous FEATURES carousel rules.
   ============================================================ */
@media (max-width: 1024px) {
  /* Elementor flex/grid children must be allowed to shrink to the viewport. */
  .ohm-product-page .section,
  .ohm-product-page .section > .e-con-inner {
    min-width: 0;
    max-width: 100%;
  }

  

  .ohm-product-page .section > .e-con-inner {
    width: 100%;
  }

  .ohm-product-page .feat-carousel.e-con {
    box-sizing: border-box;
    display: flex !important; /* override Elementor's e-grid */
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    gap: 20px !important;
    padding: 0 0 8px !important;
  }

  .ohm-product-page .feat-carousel.e-con::-webkit-scrollbar {
    display: none;
  }

  .ohm-product-page .feat-carousel.e-con > .e-con.iconbox {
    box-sizing: border-box;
    flex: 0 0 calc((100% - 20px) / 2) !important;
    width: calc((100% - 20px) / 2) !important;
    min-width: 0 !important;
    max-width: none !important;
    scroll-snap-align: start;
  }



    .ohm-product-page .ohm-feature-arrows {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }


  .ohm-product-page .ohm-feature-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--taupe-line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
  }

  .ohm-product-page .ohm-feature-arrow:disabled {
    opacity: .35;
    cursor: default;
  }
}

@media (max-width: 600px) {
  .ohm-product-page .feat-carousel.e-con {
    gap: 16px !important;
  }

  .ohm-product-page .feat-carousel.e-con > .e-con.iconbox {
    /* One card plus a glimpse of the next. */
    flex-basis: 85% !important;
    width: 85% !important;
  }
}

@media (min-width: 1025px) {
  .ohm-product-page .ohm-feature-arrows { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ohm-product-page .feat-carousel.e-con { scroll-behavior: auto; }
}

/* Mobile footer — Information beneath Company Policies */
@media (max-width: 600px) {

    .site-footer .footer-top {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 20px;
    }

    .site-footer .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
        min-width: 0;
    }

    .site-footer .footer-col {
        min-width: 0;
        width: 100%;
    }

    .site-footer .footer-col--info {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
    }

    /* Prevent email addresses and long links from overflowing */
    .site-footer .footer-info,
    .site-footer .footer-info li,
    .site-footer .footer-info a {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: normal;
    }
}

/* PRODUCT TABS — scrollable navigation with arrows */
@media (max-width: 900px) {

    .ohm-product-page .ohm-product-tabs,
    .ohm-product-page .ohm-product-tabs .e-n-tabs {
        min-width: 0;
        max-width: 100%;
    }

    .ohm-product-page .ohm-product-tabs .e-n-tabs {
        position: relative;
    }

    .ohm-product-page .ohm-product-tabs .e-n-tabs-heading {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: calc(100% - 112px);
        max-width: calc(100% - 112px);
        margin-inline: 56px;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .ohm-product-page .ohm-product-tabs .e-n-tabs-heading::-webkit-scrollbar {
        display: none;
    }

    .ohm-product-page .ohm-product-tabs .e-n-tab-title {
        flex: 0 0 auto !important;
        width: max-content;
        max-width: none;
        white-space: nowrap;
        scroll-snap-align: start;
    }

    .ohm-tabs-arrow {
        position: absolute;
        z-index: 5;
        top: var(--ohm-tabs-arrow-top, 0px);
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--taupe-line);
        border-radius: 50%;
        background: #fff;
        color: var(--ink);
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
    }

    .ohm-tabs-arrow--prev { left: 0; }
    .ohm-tabs-arrow--next { right: 0; }

    .ohm-tabs-arrow:disabled {
        opacity: .3;
        cursor: default;
    }
}

@media (min-width: 901px) {
    .ohm-tabs-arrow {
        display: none;
    }
}