/* TV Ekipman Modern UI 4.0 - Electro 3.5.6 / WooCommerce.
 * DESKTOP (>991px): inherited v1 style unchanged.
 * MOBILE/TABLET: native theme structures, readable cards, no replacement checkout templates.
 * No font-family overrides, no viewport zoom suppression, no global overflow:hidden.
 */
@media screen and (min-width: 992px) {
  body.tvemui-v4 .tvemui-footer-links { display: none !important; }
}
@media screen and (max-width: 991.98px) {
  body.tvemui-v4 {
    --tve-ink:#263748; --tve-sub:#627387; --tve-line:#e5e9eb;
    --tve-wash:#f7f9f8; --tve-paper:#fff; --tve-green:#427925;
    background:var(--tve-wash); -webkit-text-size-adjust:100%;
  }
  body.tvemui-v4 .site-content { background:var(--tve-wash); }
  body.tvemui-v4 :is(#page,.site,.site-content,.content-area,.site-main, .woocommerce) { min-width:0; max-width:100%; }
  body.tvemui-v4 .site-content > .container { max-width:100%; padding-left:14px; padding-right:14px; }
  body.tvemui-v4 .site-content :is(img,picture,video,iframe,embed) { max-width:100%; }
  body.tvemui-v4 .site-content img { height:auto; }
  body.tvemui-v4 .site-content :is(.row,[class*="col-"]) { min-width:0; }
  body.tvemui-v4 .site-content :is(.entry-content,.woocommerce-product-details__short-description,.wp-block-group) { min-width:0; max-width:100%; }
  body.tvemui-v4 .site-content :is(p,h1,h2,h3,h4,li) { overflow-wrap:break-word; word-break:normal; }
  body.tvemui-v4 :is(a,button,input,textarea,select):focus-visible { outline:2px solid var(--tve-green); outline-offset:2px; }

  /* Native Electro headers and search; NO injected second search box. */
  body.tvemui-v4 :is(.mobile-header-v1,.mobile-header-v2,.handheld-header,.handheld-header-v2) {
    background:#fff; border-bottom:1px solid var(--tve-line);
  }
  body.tvemui-v4 :is(.mobile-header-v1,.mobile-header-v2,.handheld-header,.handheld-header-v2) .header-logo img {
    max-width:min(38vw,155px); width:auto; height:auto;
  }
  body.tvemui-v4 .tvemui-duplicate-mobile-search { display:none !important; }
  body.tvemui-v4 :is(.mobile-header-v1,.mobile-header-v2,.handheld-header-v2) .site-search {
    width:100%; max-width:100%; min-width:0; margin:8px 0; padding:0;
  }
  body.tvemui-v4 :is(.mobile-header-v1,.mobile-header-v2,.handheld-header-v2) .site-search form {
    max-width:100%; min-width:0; border:1px solid #dfe6e3; border-radius:12px; background:#f8faf9;
  }
  body.tvemui-v4 :is(.mobile-header-v1,.mobile-header-v2,.handheld-header-v2) .site-search input[type="search"] {
    max-width:100%; min-width:0; font-size:16px; min-height:44px;
  }
  body.tvemui-v4 :is(.mobile-header-v1,.mobile-header-v2,.handheld-header-v2) .site-search form:focus-within {
    border-color:#acc7a1; box-shadow:0 0 0 3px rgba(66,121,37,.10);
  }

  /* Native mobile category row: one active chip, horizontal scroll. */
  body.tvemui-v4 .mobile-handheld-department { max-width:100%; min-width:0; }
  body.tvemui-v4 .mobile-handheld-department ul.nav {
    display:flex; flex-flow:row nowrap; gap:8px;
    overflow-x:auto; max-width:100%; min-width:0;
    padding:8px 2px 10px; -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  body.tvemui-v4 .mobile-handheld-department ul.nav::-webkit-scrollbar { display:none; }
  body.tvemui-v4 .mobile-handheld-department ul.nav > li { flex:0 0 auto; width:auto; max-width:none; margin:0; padding:0; }
  body.tvemui-v4 .mobile-handheld-department ul.nav > li > a {
    display:inline-flex; align-items:center; justify-content:center;
    width:auto; min-height:42px; padding:9px 13px;
    border:1px solid #e0e8e1; border-radius:999px;
    background:#fff; font-size:13px; font-weight:650; line-height:1.25;
    color:#4d6050; text-decoration:none; white-space:nowrap;
  }
  body.tvemui-v4 .mobile-handheld-department ul.nav li:is(.tve-mobile-current,.current-menu-item,.current-menu-ancestor,.current-product_cat-ancestor) > a,
  body.tvemui-v4 .mobile-handheld-department ul.nav li > a[aria-current="page"],
  body.tvemui-v4 .mobile-handheld-department ul.nav li > a[aria-current="location"] {
    background:#e9f3e5; border-color:#a8c39e; color:#295b20;
  }
  body.tvemui-v4 .off-canvas-navigation a { font-size:15px; line-height:1.45; overflow-wrap:break-word; }
  body.tvemui-v4 .off-canvas-navigation .tve-mobile-current > a { color:#2b671f; font-weight:750; }

  /* Home banners & tab navigation. Avoid touching native Owl/hero track geometry. */
  body.tvemui-v4 .site-content :is(.section-products-carousel,.products-carousel-tabs,.section-products-carousel-tabs) { min-width:0; max-width:100%; margin-bottom:23px; }
  body.tvemui-v4 .site-content :is(.section-products-carousel,.products-carousel-tabs) :is(h2,.h1) {
    font-size:clamp(20px,4.8vw,25px); line-height:1.3; font-weight:750; color:var(--tve-ink);
  }
  body.tvemui-v4 .products-carousel-tabs > ul.nav,
  body.tvemui-v4 .products-tabs > ul.nav {
    display:flex; flex-flow:row nowrap; align-items:center; gap:9px;
    max-width:100%; min-width:0; margin:0 0 15px; padding:3px 0 10px;
    overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:thin;
  }
  body.tvemui-v4 .products-carousel-tabs > ul.nav > li,
  body.tvemui-v4 .products-tabs > ul.nav > li { flex:0 0 auto; width:auto; margin:0; padding:0; }
  body.tvemui-v4 .products-carousel-tabs > ul.nav a,
  body.tvemui-v4 .products-tabs > ul.nav a {
    display:block; min-width:0; width:auto; padding:9px 14px;
    border:1px solid #e3e8e4; border-radius:999px; background:#fff;
    color:#496052; font-size:14px; text-decoration:none; white-space:nowrap;
  }
  body.tvemui-v4 .products-carousel-tabs > ul.nav a.active,
  body.tvemui-v4 .products-tabs > ul.nav a.active { background:var(--tve-green); color:#fff; border-color:var(--tve-green); }
  body.tvemui-v4 .products-carousel-tabs .tab-content { min-width:0; max-width:100%; }

  /* Product cards: no 50% width/flex forcing inside Owl. Owl controls slide widths. */
  body.tvemui-v4 .products :is(li.product,div.product) { min-width:0; max-width:100%; }
  body.tvemui-v4 .products :is(li.product,div.product) :is(.product-outer,.product-inner,.product-item__inner,.card-body,.card-body-inner) {
    max-width:100%; min-width:0; box-sizing:border-box;
  }
  body.tvemui-v4 .products :is(li.product,div.product) .product-inner {
    height:auto; padding:12px; margin:0;
    border:1px solid var(--tve-line); border-radius:14px;
    background:var(--tve-paper); box-shadow:0 5px 17px rgba(20,40,33,.045);
  }
  body.tvemui-v4 .products :is(li.product,div.product) .product-thumbnail {
    position:relative; display:block; max-width:100%; min-width:0; height:auto; margin-bottom:9px;
  }
  body.tvemui-v4 .products :is(li.product,div.product) .product-thumbnail img,
  body.tvemui-v4 .products :is(li.product,div.product) img.attachment-woocommerce_thumbnail {
    display:block; max-width:100%; width:100%; height:155px;
    object-fit:contain; margin-inline:auto;
  }
  body.tvemui-v4 .products :is(li.product,div.product) .loop-product-categories {
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1;
    overflow:hidden; height:auto; max-height:1.6em;
    font-size:12px; line-height:1.45; color:var(--tve-sub);
  }
  body.tvemui-v4 .products :is(li.product,div.product) .woocommerce-loop-product__title {
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3;
    overflow:hidden; height:auto; min-height:0; max-height:4.35em;
    font-size:15px; line-height:1.45; font-weight:730;
    letter-spacing:0; color:var(--tve-ink);
    overflow-wrap:break-word; word-break:normal; hyphens:none;
  }
  body.tvemui-v4 .products :is(li.product,div.product) .price-add-to-cart {
    display:block; height:auto; max-width:100%; min-width:0; margin-top:10px;
  }
  body.tvemui-v4 .products :is(li.product,div.product) .price {
    display:block; width:auto; max-width:100%; height:auto;
    font-size:17px; font-weight:780; line-height:1.45;
    color:var(--tve-ink); word-break:normal; overflow-wrap:break-word;
  }
  body.tvemui-v4 .products :is(li.product,div.product) .woocommerce-Price-amount {
    white-space:nowrap; word-break:keep-all; overflow-wrap:normal;
  }
  /* Electro hides the loop purchase button by default until desktop hover. Touch has no hover. */
  body.tvemui-v4 .products :is(li.product,div.product) .price-add-to-cart .add-to-cart-wrap {
    display:block !important; visibility:visible !important; opacity:1 !important;
    position:static !important; height:auto !important; min-height:43px;
    max-width:100%; min-width:0;
  }
  body.tvemui-v4 .products :is(li.product,div.product) .add-to-cart-wrap :is(a.button,a.added_to_cart) {
    display:flex; align-items:center; justify-content:center;
    width:100%; max-width:100%; min-width:0; min-height:43px;
    margin:10px 0 0; padding:9px 11px;
    border:1px solid #d4e4d0; border-radius:10px;
    background:#edf6e9 !important; color:#2d6223 !important;
    font-size:13px; font-weight:750; line-height:1.3;
    white-space:normal; text-align:center; text-indent:0;
  }
  body.tvemui-v4 .products :is(li.product,div.product) .add-to-cart-wrap :is(a.button,a.added_to_cart)::before { display:none; }

  /* Archive grids are controlled by CSS GRID, NOT theme floats. */
  body.tvemui-v4 ul.products:not(.owl-carousel):not(.slick-slider):not([data-view^="list-view"]) {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
    width:100%; max-width:100%; padding:0; margin:0;
  }
  body.tvemui-v4 ul.products:not(.owl-carousel):not(.slick-slider):not([data-view^="list-view"]) > li.product {
    display:block; float:none; clear:none; width:auto; max-width:100%; min-width:0;
    margin:0; padding:0; flex:none;
  }
  body.tvemui-v4 .shop-control-bar { max-width:100%; padding:10px; border:1px solid var(--tve-line); border-radius:12px; background:#fff; }
  body.tvemui-v4 .shop-control-bar :is(select,.woocommerce-ordering) { min-width:0; max-width:100%; }
  body.tvemui-v4 .woocommerce-breadcrumb { margin-bottom:12px; font-size:12px; line-height:1.55; overflow-wrap:break-word; }
  body.tvemui-v4 :is(.page-title,.entry-title,.section-title) { overflow-wrap:break-word; }
  body.tvemui-v4 :is(.woocommerce-ordering select,input[type="search"],input[type="text"],input[type="email"],input[type="number"],select,textarea) { max-width:100%; }
  body.tvemui-v4 input[type="search"], body.tvemui-v4 input[type="text"], body.tvemui-v4 select { font-size:16px; }

  /* Single-product: native Woo cart, variations, request-quote and gallery remain intact. */
  body.tvemui-v4.single-product .single-product-wrapper.row {
    display:flex; flex-flow:column nowrap; align-items:stretch;
    width:100%; max-width:100%; min-width:0; margin-left:0; margin-right:0;
  }
  body.tvemui-v4.single-product .single-product-wrapper > :is(.product-images-wrapper,.summary,.entry-summary,.product-actions-wrapper) {
    flex:0 0 100% !important; display:block; float:none;
    width:100% !important; max-width:100% !important; min-width:0 !important;
    margin:0 0 16px; padding:0;
  }
  body.tvemui-v4.single-product div.product div.images,
  body.tvemui-v4.single-product div.product div.summary,
  body.tvemui-v4.single-product .product-images-wrapper :is(.woocommerce-product-gallery,.electro-gallery) {
    float:none; width:100% !important; max-width:100% !important; min-width:0; margin:0;
  }
  body.tvemui-v4.single-product .product-images-wrapper :is(.woocommerce-product-gallery,.electro-gallery) {
    border:1px solid var(--tve-line); border-radius:14px; padding:10px; background:#fff;
  }
  body.tvemui-v4.single-product .product-images-wrapper :is(.flex-viewport,.owl-stage-outer) { max-width:100%; min-width:0; }
  body.tvemui-v4.single-product .product-images-wrapper :is(img,video,iframe) { display:block; height:auto; max-width:100%; }
  body.tvemui-v4.single-product .product-images-wrapper .woocommerce-product-gallery__image img { margin:0 auto; object-fit:contain; }
  body.tvemui-v4.single-product .single-product-wrapper :is(.summary,.entry-summary,.product-actions,.product-actions-wrapper) { min-width:0; max-width:100%; }
  body.tvemui-v4.single-product .product_title { font-size:clamp(21px,5.3vw,28px); line-height:1.34; color:var(--tve-ink); overflow-wrap:break-word; word-break:normal; }
  body.tvemui-v4.single-product .summary .price,
  body.tvemui-v4.single-product .product-actions .price { font-size:clamp(21px,5.5vw,29px); line-height:1.45; color:var(--tve-ink); overflow-wrap:break-word; word-break:normal; }
  body.tvemui-v4.single-product .woocommerce-product-details__short-description { color:#465b6b; font-size:15px; line-height:1.72; }
  body.tvemui-v4.single-product .product-actions { max-width:100%; border:1px solid var(--tve-line); border-radius:14px; background:#fff; padding:14px; }
  body.tvemui-v4.single-product :is(form.cart,.variations_form,.woocommerce-variation-add-to-cart) { min-width:0; max-width:100%; }
  body.tvemui-v4.single-product form.cart :is(input,select,button) { max-width:100%; }
  body.tvemui-v4.single-product .summary form.cart:not(.variations_form) {
    display:flex; flex-flow:row wrap; align-items:center; gap:10px;
    width:100%; max-width:100%; min-width:0;
  }
  body.tvemui-v4.single-product form.cart .quantity { flex:0 0 84px; max-width:84px; margin:0; }
  body.tvemui-v4.single-product form.cart :is(.quantity input.qty,input.qty) {
    width:84px; max-width:100%; min-height:45px; text-align:center;
    border-radius:9px; border:1px solid #dbe4dd;
  }
  body.tvemui-v4.single-product .summary form.cart:not(.variations_form) .single_add_to_cart_button {
    flex:1 1 175px; width:auto; min-width:175px; text-align:center;
    justify-content:center; white-space:normal;
  }
  body.tvemui-v4.single-product .single_add_to_cart_button::before {
    content:none !important; display:none !important;
  }
  body.tvemui-v4.single-product form.cart :is(button.button,.single_add_to_cart_button) {
    min-height:46px; padding:10px 14px; border-radius:10px;
    font-size:15px; line-height:1.4; white-space:normal;
  }
  body.tvemui-v4.single-product .product-actions .action-buttons { display:flex; flex-wrap:wrap; gap:8px; }

  /* Electro's full-viewport tab breakout causes sideways page overflow: reset just tabs. */
  body.tvemui-v4.single-product .electro-tabs {
    position:relative; left:auto; width:100%; max-width:100%; min-width:0;
    margin:0 0 22px; padding:0; background:transparent;
  }
  body.tvemui-v4.single-product .electro-tabs .container { width:100%; max-width:100%; min-width:0; padding:0; }
  body.tvemui-v4.single-product :is(.woocommerce-tabs,.wc-tabs-wrapper,.woocommerce-Tabs-panel,.wc-tab,.electro-tab) { max-width:100%; min-width:0; }
  body.tvemui-v4.single-product :is(.wc-tabs,.ec-tabs) {
    display:flex; flex-flow:row nowrap; gap:8px; max-width:100%; min-width:0;
    overflow-x:auto; -webkit-overflow-scrolling:touch; padding:0 0 9px;
  }
  body.tvemui-v4.single-product :is(.wc-tabs,.ec-tabs) li { flex:0 0 auto; margin:0; }
  body.tvemui-v4.single-product :is(.wc-tabs,.ec-tabs) li a {
    display:block; white-space:nowrap; padding:10px 12px; border-radius:8px;
    font-size:14px; line-height:1.3;
  }
  body.tvemui-v4.single-product :is(.wc-tab,.woocommerce-Tabs-panel,.electro-tab .tab-content) {
    width:100%; max-width:100%; min-width:0; overflow-x:auto;
    padding:15px; border-radius:12px; border:1px solid var(--tve-line);
    background:#fff; -webkit-overflow-scrolling:touch;
    overflow-wrap:break-word; font-size:14px; line-height:1.65;
  }
  body.tvemui-v4.single-product :is(.wc-tab,.woocommerce-Tabs-panel,.electro-tab .tab-content) table { width:max-content; min-width:100%; max-width:none; }
  body.tvemui-v4.single-product :is(.wc-tab,.woocommerce-Tabs-panel,.electro-tab .tab-content) :is(img,video,iframe) { max-width:100%; }
  body.tvemui-v4.single-product :is(.wc-tab,.woocommerce-Tabs-panel,.electro-tab .tab-content) pre { max-width:100%; white-space:pre-wrap; overflow-wrap:anywhere; }

  /* WooCommerce checkout/cart: avoid site-wide scroll and keep tap targets. */
  body.tvemui-v4 :is(.woocommerce-cart-form,.cart-collaterals,.woocommerce-checkout-review-order) { max-width:100%; min-width:0; }
  body.tvemui-v4 .woocommerce-cart-form { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  body.tvemui-v4 .woocommerce :is(a.button,button.button,input.button) { min-height:43px; border-radius:9px; }

  /* Legacy mobile footer demo widget slots are omitted server-side, replaced with links. */
  body.tvemui-v4 .tvemui-footer-links {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px;
    max-width:100%; width:100%; padding:16px 7px; background:transparent;
  }
  body.tvemui-v4 .tvemui-footer-group { min-width:0; }
  body.tvemui-v4 .tvemui-footer-group h3 { margin:0 0 8px; font-size:15px; font-weight:750; color:var(--tve-ink); }
  body.tvemui-v4 .tvemui-footer-group a { display:block; padding:7px 0; font-size:14px; line-height:1.45; text-decoration:none; color:#526579; }
}
/* A regular phone gets ONE truly readable product per row; Owl is also ONE slide. */
@media screen and (max-width:639.98px) {
  body.tvemui-v4 ul.products:not(.owl-carousel):not(.slick-slider):not([data-view^="list-view"]) {
    grid-template-columns:minmax(0,1fr); gap:13px;
  }
  body.tvemui-v4 .products :is(li.product,div.product) .product-inner { padding:15px; }
  body.tvemui-v4 .products :is(li.product,div.product) .product-thumbnail img,
  body.tvemui-v4 .products :is(li.product,div.product) img.attachment-woocommerce_thumbnail { height:175px; }
  body.tvemui-v4 .products :is(li.product,div.product) .woocommerce-loop-product__title { font-size:16px; line-height:1.42; max-height:4.26em; }
  body.tvemui-v4 .products :is(li.product,div.product) .price { font-size:19px; }
  body.tvemui-v4 .products :is(li.product,div.product) .add-to-cart-wrap :is(a.button,a.added_to_cart) { min-height:45px; font-size:14px; }
}
@media (prefers-reduced-motion:reduce) {
  body.tvemui-v4 .products :is(li.product,div.product) .product-inner { transition:none; }
}
