/* TV Ekipman Modern UI 3.0 — ONLY <=991.98px.
 * Electro 3.5.6's own search, gallery, mobile menu and WooCommerce events survive.
 * No viewport lock, no custom font-family, no JS-driven layout overrides.
 */
@media screen and (min-width: 992px) {
  body.tve-modern-ui .tvemui-footer-links { display:none !important; }
}

@media screen and (max-width: 991.98px) {
  body.tve-modern-ui {
    --tve3-ink: #23364b;
    --tve3-muted: #617388;
    --tve3-edge: #e3e9f1;
    --tve3-bg: #f7f9fb;
    --tve3-card: #ffffff;
    --tve3-primary: #245c91;
    color: var(--tve3-ink);
    background-color: var(--tve3-bg);
    -webkit-text-size-adjust: 100%;
  }
  /* Constrain Bootstrap rows/columns and content, but don't touch slider internals. */
  body.tve-modern-ui #page,
  body.tve-modern-ui .site,
  body.tve-modern-ui .site-content,
  body.tve-modern-ui .site-content > .container,
  body.tve-modern-ui .content-area,
  body.tve-modern-ui .site-main,
  body.tve-modern-ui .woocommerce,
  body.tve-modern-ui .site-content article {
    min-width: 0;
    max-width: 100%;
  }
  body.tve-modern-ui .site-content { background: var(--tve3-bg); }
  body.tve-modern-ui .site-content > .container { padding-left: 14px; padding-right: 14px; }
  body.tve-modern-ui .site-content :is(img, video, picture, iframe, embed, object) { max-width: 100%; }
  body.tve-modern-ui .site-content :is(img, video) { height: auto; }
  body.tve-modern-ui .site-content :is(.row, .col, [class*="col-"]) { min-width: 0; }

  /* Only when JS detects two simultaneously visible native header searches. */
  body.tve-modern-ui .site-header .site-search.tvemui-mobile-extra-search,
  body.tve-modern-ui .tvemui-mobile-extra-search { display:none !important; }

  /* Electro original header (no second 'Ürünlerde ara' injected). */
  body.tve-modern-ui .mobile-header-v1,
  body.tve-modern-ui .mobile-header-v2,
  body.tve-modern-ui .handheld-header,
  body.tve-modern-ui .handheld-header-v2 {
    background: #fff;
    border-bottom: 1px solid var(--tve3-edge);
  }
  body.tve-modern-ui :is(.mobile-header-v1, .mobile-header-v2-inner, .handheld-header, .handheld-header-v2) {
    min-width:0;
  }
  body.tve-modern-ui :is(.mobile-header-v1, .mobile-header-v2-inner, .handheld-header-v2) .header-logo {
    min-width: 0;
    max-width: 46%;
  }
  body.tve-modern-ui :is(.mobile-header-v1, .mobile-header-v2-inner, .handheld-header-v2) .header-logo img,
  body.tve-modern-ui :is(.mobile-header-v1, .mobile-header-v2-inner, .handheld-header-v2) .header-logo svg {
    width: auto;
    max-width: min(36vw, 145px);
    height: auto;
  }
  body.tve-modern-ui :is(.off-canvas-navbar-toggle-buttons, .handheld-navbar-toggle-buttons) .navbar-toggler,
  body.tve-modern-ui .handheld-header-links > ul li > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 44px;
  }
  body.tve-modern-ui :is(.mobile-header-v1, .mobile-header-v2, .handheld-header-v2) .site-search {
    width: 100%;
    min-width: 0;
    margin-top: 7px;
    margin-bottom: 12px;
    padding: 0;
    z-index: 2;
  }
  body.tve-modern-ui :is(.mobile-header-v1, .mobile-header-v2, .handheld-header-v2) .site-search form {
    display: flex;
    align-items: center;
    min-width: 0;
    width: 100%;
    min-height: 46px;
    border: 1px solid #d9e3ef;
    border-radius: 12px;
    background-color: #f6f8fb;
    overflow: hidden;
  }
  body.tve-modern-ui :is(.mobile-header-v1, .mobile-header-v2, .handheld-header-v2) .site-search form input.search-field {
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
    min-height: 46px;
    height: 46px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--tve3-ink);
    font-size: 16px;
  }
  body.tve-modern-ui :is(.mobile-header-v1, .mobile-header-v2, .handheld-header-v2) .site-search form button[type="submit"] {
    flex: 0 0 48px;
    min-width: 48px;
    height: 46px;
    margin: 0;
    padding: 0;
    color: var(--tve3-ink);
    background: transparent !important;
  }
  body.tve-modern-ui :is(.mobile-header-v1, .mobile-header-v2, .handheld-header-v2) .site-search form:focus-within {
    border-color: #8eb0d3;
    box-shadow: 0 0 0 3px rgba(36, 92, 145, .1);
  }

  /* Real Electro mobile department tabs. No duplicate nav and no dead demo links. */
  body.tve-modern-ui .mobile-handheld-department { width: 100%; min-width: 0; margin: 4px 0 0; }
  body.tve-modern-ui .mobile-handheld-department ul.nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px 0 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  body.tve-modern-ui .mobile-handheld-department ul.nav::-webkit-scrollbar { display:none; }
  body.tve-modern-ui .mobile-handheld-department ul.nav li {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    text-align: center;
  }
  body.tve-modern-ui .mobile-handheld-department ul.nav li > a {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-height: 42px;
    max-width: none;
    padding: 9px 13px;
    background: #f6f8fb;
    border: 1px solid #e1e8f0;
    border-radius: 999px;
    color: #40546a;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    text-decoration: none;
  }
  body.tve-modern-ui .mobile-handheld-department ul.nav li a i { font-size: 16px; margin: 0; }
  body.tve-modern-ui .mobile-handheld-department ul.nav li:is(.tve-mobile-current,.current-menu-item,.current-product_cat-ancestor,.current-menu-ancestor) > a,
  body.tve-modern-ui .mobile-handheld-department ul.nav a[aria-current="page"],
  body.tve-modern-ui .mobile-handheld-department ul.nav a[aria-current="location"] {
    background: #e6f0fb;
    color: #164c7c;
    border-color: #8db8df;
    box-shadow: inset 0 0 0 1px rgba(36,92,145,.06);
  }
  body.tve-modern-ui .off-canvas-navigation a { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
  body.tve-modern-ui .off-canvas-navigation li:is(.tve-mobile-current,.current-menu-item,.current-menu-ancestor) > a { color: #174f82; font-weight: 750; }

  /* Product/category headers, filters and standard forms. */
  body.tve-modern-ui .woocommerce-breadcrumb { font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; margin-bottom: 12px; }
  body.tve-modern-ui :is(.page-title, .entry-title, .section-title) { overflow-wrap: anywhere; }
  body.tve-modern-ui .woocommerce-page .page-title,
  body.tve-modern-ui .post-type-archive-product .page-title { font-size: 23px; line-height: 1.3; }
  body.tve-modern-ui .site-content :is(input[type="search"], input[type="text"], input[type="email"], input[type="number"], input[type="tel"], select, textarea) {
    max-width: 100%; font-size:16px;
  }
  body.tve-modern-ui .shop-control-bar {
    padding: 12px;
    margin: 0 0 15px;
    background: #fff;
    border: 1px solid var(--tve3-edge);
    border-radius: 12px;
    gap: 10px;
  }
  body.tve-modern-ui .shop-control-bar :is(.woocommerce-ordering,select) { max-width: 100%; min-width: 0; }
  body.tve-modern-ui .woocommerce-pagination .page-numbers { min-width: 38px; min-height: 38px; }

  /* WooCommerce listing: two legible cards at normal phone widths. */
  body.tve-modern-ui :is(ul.products,ul.products.columns-4,ul.products.columns-3) {
    min-width:0;
  }
  body.tve-modern-ui ul.products:not(.owl-carousel):not(.slick-slider):not([data-view^="list-view"]) {
    display: flex;
    flex-flow: row wrap;
    align-items: stretch;
    width: auto;
    margin-left: -5px;
    margin-right: -5px;
  }
  body.tve-modern-ui ul.products:not(.owl-carousel):not(.slick-slider):not([data-view^="list-view"]) > li.product {
    float: none;
    clear: none;
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
    padding: 5px;
    margin: 0 0 8px;
    min-width: 0;
    display: flex;
  }
  body.tve-modern-ui .products > li.product .product-inner,
  body.tve-modern-ui .owl-item > li.product .product-inner {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width:100%;
    max-width:100%;
    min-width:0;
    height:auto;
    padding: 10px;
    background: #fff;
    border:1px solid var(--tve3-edge);
    border-radius: 13px;
    box-shadow: 0 3px 12px rgba(36,54,75,.045);
    overflow-wrap: anywhere;
  }
  body.tve-modern-ui .products > li.product .product-thumbnail,
  body.tve-modern-ui .owl-item > li.product .product-thumbnail { width:100%; min-width:0; margin: 0 0 9px; }
  body.tve-modern-ui .products > li.product .product-thumbnail img,
  body.tve-modern-ui .owl-item > li.product .product-thumbnail img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 190px;
    object-fit: contain;
    margin: 0 auto;
  }
  body.tve-modern-ui .products > li.product .loop-product-categories,
  body.tve-modern-ui .owl-item > li.product .loop-product-categories { height: auto; min-height:0; max-height:2.8em; overflow:hidden; font-size:11px; line-height:1.35; }
  body.tve-modern-ui .products > li.product .woocommerce-loop-product__title,
  body.tve-modern-ui .owl-item > li.product .woocommerce-loop-product__title {
    height: auto;
    min-height: 0;
    max-height: none;
    color: var(--tve3-ink);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.38;
    overflow-wrap: anywhere;
  }
  body.tve-modern-ui .products > li.product .price-add-to-cart,
  body.tve-modern-ui .owl-item > li.product .price-add-to-cart { height:auto; min-height:0; margin-top:auto; }
  body.tve-modern-ui .products > li.product .price,
  body.tve-modern-ui .owl-item > li.product .price {
    display:block; width:100%; max-width:100%;
    font-size: 15px; font-weight:750; line-height:1.42;
    color:var(--tve3-ink); white-space:normal; overflow-wrap:anywhere;
  }
  body.tve-modern-ui ul.products:not([data-view^="list-view"]) > li.product .add-to-cart-wrap { display:block; width:100%; }
  body.tve-modern-ui ul.products:not([data-view^="list-view"]) > li.product .add-to-cart-wrap :is(a.button,a.added_to_cart) {
    display: flex;
    justify-content:center;
    align-items:center;
    width:100%; min-width:0; min-height:42px;
    padding:8px 6px; margin:7px 0 0;
    border:1px solid #d6e1ee;
    border-radius:9px;
    background: #edf4fc;
    color:#174e7d;
    font-size:12px;
    line-height:1.3;
    font-weight:700;
    text-indent:0;
    white-space:normal;
    text-align:center;
  }
  body.tve-modern-ui ul.products:not([data-view^="list-view"]) > li.product .add-to-cart-wrap :is(a.button,a.added_to_cart)::before { display:none; }
  /* Carousel wrappers use theme-calculated slide widths, never force slide count. */
  body.tve-modern-ui :is(.owl-carousel,.owl-stage,.owl-item,.slick-track,.slick-slide) { min-width:0; }

  /* Product page: image, summary and purchasing controls stacked at ALL mobile/tablet widths. */
  body.tve-modern-ui.single-product .single-product-wrapper.row {
    display:flex;
    flex-direction:column;
    width:100%;
    max-width:100%;
    min-width:0;
    margin-left:0;
    margin-right:0;
    margin-bottom:25px;
  }
  body.tve-modern-ui.single-product .single-product-wrapper > :is(.product-images-wrapper,.summary,.entry-summary,.product-actions-wrapper) {
    display:block;
    float:none;
    flex:0 0 100% !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:0 0 15px;
    padding:0;
  }
  body.tve-modern-ui.single-product div.product div.images,
  body.tve-modern-ui.single-product div.product div.summary,
  body.tve-modern-ui.single-product .product-images-wrapper :is(.woocommerce-product-gallery,.electro-wc-product-gallery) {
    float:none;
    width:100% !important;
    max-width:100% !important;
    min-width:0;
    margin-left:0;
    margin-right:0;
  }
  body.tve-modern-ui.single-product .product-images-wrapper :is(.woocommerce-product-gallery,.electro-wc-product-gallery) {
    position:relative;
    padding:10px;
    background:#fff;
    border:1px solid var(--tve3-edge);
    border-radius:15px;
    box-sizing:border-box;
  }
  body.tve-modern-ui.single-product .product-images-wrapper :is(.flex-viewport,.woocommerce-product-gallery__wrapper,.electro-wc-product-gallery__wrapper) {
    max-width:100%; min-width:0;
  }
  body.tve-modern-ui.single-product .product-images-wrapper .flex-viewport { overflow:hidden; }
  body.tve-modern-ui.single-product .product-images-wrapper :is(img,video,iframe) {
    max-width:100%; height:auto;
  }
  body.tve-modern-ui.single-product .product-images-wrapper :is(.woocommerce-product-gallery__image,.electro-wc-product-gallery__image) img { display:block; margin:0 auto; object-fit:contain; }
  body.tve-modern-ui.single-product .product-images-wrapper .flex-control-thumbs { max-width:100%; min-width:0; }
  body.tve-modern-ui.single-product .product-images-wrapper .flex-control-thumbs li { min-width:0; }
  body.tve-modern-ui.single-product :is(.summary,.entry-summary,.product-actions,.product-actions-wrapper) {
    max-width:100%; min-width:0; overflow-wrap:anywhere;
  }
  body.tve-modern-ui.single-product .product_title { font-size:clamp(21px,5.6vw,29px); line-height:1.32; font-weight:700; margin-bottom:12px; overflow-wrap:anywhere; }
  body.tve-modern-ui.single-product .summary .price,
  body.tve-modern-ui.single-product .product-actions .price { font-size:clamp(22px,5.4vw,30px); line-height:1.35; font-weight:750; overflow-wrap:anywhere; }
  body.tve-modern-ui.single-product .woocommerce-product-details__short-description { font-size:15px; line-height:1.68; color:#465c72; max-width:100%; }
  body.tve-modern-ui.single-product .product-actions { border:1px solid var(--tve3-edge); border-radius:14px; padding:14px; background:#fff; }
  body.tve-modern-ui.single-product :is(.cart,.variations_form,.woocommerce-variation-add-to-cart) { min-width:0; max-width:100%; }
  body.tve-modern-ui.single-product form.cart :is(.single_add_to_cart_button,button.button) {
    min-height:48px;
    max-width:100%;
    padding:11px 14px;
    border-radius:10px;
    font-size:15px;
    white-space:normal;
  }
  body.tve-modern-ui.single-product form.cart :is(select,input,textarea) { max-width:100%; min-width:0; }
  body.tve-modern-ui.single-product .product-actions .action-buttons { display:flex; flex-wrap:wrap; gap:8px; }
  body.tve-modern-ui.single-product .single-product-wrapper :is(.brand,.availability) { max-width:100%; }

  /* Critical Electro full-viewport tabs reset (theme uses width:100vw/left:50%). */
  body.tve-modern-ui.single-product .electro-tabs {
    position:relative;
    left:auto;
    width:100%;
    max-width:100%;
    min-width:0;
    margin-left:0;
    padding:0;
    background:transparent;
    margin-bottom:24px;
  }
  body.tve-modern-ui.single-product .electro-tabs .electro-tab,
  body.tve-modern-ui.single-product :is(.woocommerce-tabs,.wc-tabs-wrapper,.woocommerce-Tabs-panel,.wc-tab) {
    width:100%;
    max-width:100%;
    min-width:0;
  }
  body.tve-modern-ui.single-product .electro-tabs .container { width:100%; max-width:100%; min-width:0; padding:0; }
  body.tve-modern-ui.single-product .electro-tabs .electro-tab .tab-content,
  body.tve-modern-ui.single-product .woocommerce-tabs .wc-tab {
    padding:15px;
    border:1px solid var(--tve3-edge);
    border-radius:13px;
    background:#fff;
    max-width:100%;
    min-width:0;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    font-size:14px;
    line-height:1.7;
    overflow-wrap:anywhere;
  }
  body.tve-modern-ui.single-product :is(.wc-tabs,.ec-tabs) {
    max-width:100%;
    min-width:0;
    display:flex;
    flex-wrap:nowrap;
    gap:9px;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    margin-bottom:13px;
    padding-bottom:4px;
    scrollbar-width:thin;
  }
  body.tve-modern-ui.single-product :is(.wc-tabs,.ec-tabs) li { flex:0 0 auto; margin:0; padding:0; }
  body.tve-modern-ui.single-product :is(.wc-tabs,.ec-tabs) li a { display:block; padding:8px 11px; font-size:14px; line-height:1.35; white-space:nowrap; }
  body.tve-modern-ui.single-product :is(.wc-tabs,.ec-tabs) li.active a { font-weight:750; }
  body.tve-modern-ui.single-product :is(.wc-tab,.woocommerce-Tabs-panel,.electro-tab .tab-content) table,
  body.tve-modern-ui.single-product :is(.wc-tab,.woocommerce-Tabs-panel,.electro-tab .tab-content) pre {
    max-width:none;  /* its parent scrolls, not the whole page */
    width:max-content;
    min-width:100%;
  }
  body.tve-modern-ui.single-product :is(.wc-tab,.woocommerce-Tabs-panel,.electro-tab .tab-content) table td,
  body.tve-modern-ui.single-product :is(.wc-tab,.woocommerce-Tabs-panel,.electro-tab .tab-content) table th {
    padding:9px 11px;
    vertical-align:top;
    overflow-wrap:break-word;
  }
  body.tve-modern-ui.single-product :is(.wc-tab,.woocommerce-Tabs-panel,.electro-tab .tab-content) :is(iframe,video) { max-width:100%; }
  body.tve-modern-ui .site-content :is(.entry-content,.woocommerce-product-details__short-description) { min-width:0; max-width:100%; overflow-wrap:anywhere; }
  body.tve-modern-ui .site-content :is(.entry-content,.woocommerce-product-details__short-description) :is(pre,code) { overflow-wrap:anywhere; white-space:pre-wrap; }
  body.tve-modern-ui .site-content :is(.entry-content,.woocommerce-product-details__short-description) table { max-width:100%; }

  /* Cart/checkout content shouldn't cause page-level sideways scrolling. */
  body.tve-modern-ui.woocommerce-cart .woocommerce,
  body.tve-modern-ui.woocommerce-checkout .woocommerce { max-width:100%; min-width:0; }
  body.tve-modern-ui :is(.woocommerce-cart-form,.cart-collaterals,.woocommerce-checkout-review-order-table) { max-width:100%; }
  body.tve-modern-ui .woocommerce-cart-form { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  body.tve-modern-ui :is(.woocommerce a.button,.woocommerce button.button,.woocommerce input.button) { border-radius:10px; min-height:42px; }

  /* Native mobile footer without Electro's placeholder categories. */
  body.tve-modern-ui .handheld-footer { background:#f5f8fc; border-top:1px solid var(--tve3-edge); }
  body.tve-modern-ui .handheld-footer .tvemui-footer-links {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:17px;
    width:100%;
    max-width:100%;
    padding:17px 4px 14px;
  }
  body.tve-modern-ui .tvemui-footer-group { min-width:0; }
  body.tve-modern-ui .tvemui-footer-group h3 { margin:0 0 9px; font-size:15px; line-height:1.4; font-weight:750; color:var(--tve3-ink); }
  body.tve-modern-ui .tvemui-footer-group a { display:block; min-height:36px; padding:7px 0; color:#4e6279; font-size:14px; line-height:1.45; text-decoration:none; overflow-wrap:anywhere; }
  body.tve-modern-ui .footer-newsletter:has(.newsletter-form button[type="button"]) { display:none; }
  body.tve-modern-ui :is(a,button,input,select,textarea):focus-visible { outline:2px solid #387aaf; outline-offset:2px; }
}

/* Very narrow phones: product text has breathing room instead of two 140px cards. */
@media screen and (max-width: 359.98px) {
  body.tve-modern-ui ul.products:not(.owl-carousel):not(.slick-slider):not([data-view^="list-view"]) > li.product {
    width:100%; max-width:100%; flex:0 0 100%;
  }
  body.tve-modern-ui .mobile-handheld-department ul.nav li > a { padding-inline:10px; }
}

@media (prefers-reduced-motion: reduce) {
  body.tve-modern-ui .products > li.product .product-inner { transition:none; }
}
