/*
 Theme Name:   Spalvų ratas — Divi Child
 Description:  Spalvų ratas el. parduotuvė — Divi vaikų tema
 Author:       Spalvų ratas
 Template:     Divi
 Version:      1.0.1
 Text Domain:  spalvu-ratas-child

 Spalvų paletė:
   #E8531A — CTA oranžinė
   #c94415 — CTA hover
   #1A1A2E — Tamsiai mėlyna (antraštės, antriniai mygtukai)
   #2D6A4F — Žalia (sandėlis, hover)
   #F5F0E8 — Kreminė (fonas)
   #3D3D3D — Pagrindinis tekstas
   #6B6B6B — Pagalbinis tekstas
   #111827 — Produkto H1
*/

/* ==============================================================
   SELF-HOSTED VARIABLE FONTS (pakeičia Google Fonts)
   ============================================================== */

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/inter-variable-latin.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-display: optional;
    font-style: normal;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/inter-variable-latin-ext.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-display: optional;
    font-style: normal;
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('assets/fonts/plus-jakarta-sans-variable-latin.woff2') format('woff2-variations');
    font-weight: 200 800;
    font-display: optional;
    font-style: normal;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('assets/fonts/plus-jakarta-sans-variable-latin-ext.woff2') format('woff2-variations');
    font-weight: 200 800;
    font-display: optional;
    font-style: normal;
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Slick carousel icon font — woff2 versija */
@font-face {
    font-family: 'slick';
    font-display: optional;
    src: url('assets/fonts/slick.woff2') format('woff2'),
         url('assets/fonts/slick.woff') format('woff'),
         url('assets/fonts/slick.ttf') format('truetype');
}

/* ETmodules (Divi icon font) — override su woff2 ir swap (vietoje block) */
@font-face {
    font-family: ETmodules;
    font-display: swap;
    src: url('/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.woff2') format('woff2'),
         url('/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.woff') format('woff'),
         url('/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.ttf') format('truetype');
}

/* ==============================================================
   1. GLOBALUS NUSTATYMAS — visi mygtukai ir laukeliai
   ============================================================== */

button,
.button,
input[type="button"],
input[type="submit"],
input[type="reset"],
input,
textarea,
select,
.wp-block-button__link,
.et_pb_button {
    border-radius: 0 !important;
}

/* ==============================================================
   2. WOOCOMMERCE MYGTUKAI — border-radius: 0
   ============================================================== */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .cart .button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce #payment #place_order,
.woocommerce-page #payment #place_order,
.woocommerce .single_add_to_cart_button,
.woocommerce button.single_add_to_cart_button.alt,
.woocommerce .cart .actions .button,
.woocommerce button[name="update_cart"],
.woocommerce-checkout #place_order,
.woocommerce .return-to-shop a,
.woocommerce .cart-empty + .return-to-shop a,
.woocommerce .cart .coupon .button,
.woocommerce-cart .coupon .button,
.woocommerce td.product-remove a.remove,
.woocommerce .woocommerce-MyAccount-content .button,
.woocommerce-account .woocommerce-Button {
    border-radius: 0 !important;
}

/* ==============================================================
   3. DIVI MYGTUKAI — border-radius: 0
   ============================================================== */

.et_pb_button,
.et_pb_promo_button,
.et_pb_more_button,
.et_pb_newsletter_button,
.et_pb_contact_submit,
.et_pb_login .et_pb_button,
.et_pb_wc_add_to_cart a.button,
.et_pb_wc_add_to_cart button.button {
    border-radius: 0 !important;
}

/* ==============================================================
   4. FORMŲ LAUKELIAI — border-radius: 0
   ============================================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="month"],
input[type="week"],
textarea,
select,
.woocommerce-input-wrapper input,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.et_pb_contact_field input,
.et_pb_contact_field textarea,
.et_pb_contact_field select {
    border-radius: 0 !important;
}

/* ==============================================================
   5. PAIEŠKOS LAUKELIS
   ============================================================== */

.search-form input[type="search"],
.search-form input[type="text"],
.searchform input,
.widget_search input,
input.search-field,
.wp-block-search__input,
.wp-block-search__button,
.woocommerce-product-search input[type="search"],
.woocommerce-product-search button[type="submit"],
.et_pb_search input[type="text"],
.et_pb_search button[type="submit"] {
    border-radius: 0 !important;
}

/* ==============================================================
   6. PRODUKTO PUSLAPIS — qty + CTA eilutė
   ============================================================== */

.woocommerce .product .cart {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.woocommerce .product form.cart .quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* "Kiekis:" žyma kairėje — sulygiuota su variantų th */
.woocommerce div.product form.cart .quantity::before {
    content: "Kiekis:";
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #3D3D3D;
    min-width: 90px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Variantų lentelė — th plotis sulygiuotas su Kiekis žyma */
.woocommerce div.product table.variations {
    width: 100%;
    border-collapse: collapse;
}
.woocommerce div.product table.variations th.label {
    min-width: 0px;
    width: 90px;
    padding: 0px 12px 0px 0;
    vertical-align: top;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #3D3D3D;
    white-space: nowrap;
}
.woocommerce div.product table.variations td.value {
    padding: 8px 0;
    vertical-align: middle;
    width: 100%;
}

/* Variantų pasirinkimo dėžutė */
.woocommerce div.product .variations select,
.woocommerce div.product table.variations td.value select {
    background: transparent !important;
    border: 1px solid #cccccc !important;
    border-radius: 0 !important;
    height: 48px !important;
    padding: 0 36px 0 14px !important;
    font-size: 15px !important;
    font-family: 'Inter', sans-serif !important;
    color: #3D3D3D !important;
    width: 100% !important;
    box-sizing: border-box !important;
    appearance: auto;
    cursor: pointer;
}
.woocommerce div.product .variations select:focus,
.woocommerce div.product table.variations td.value select:focus {
    outline: none !important;
    border-color: #1A1A2E !important;
    box-shadow: 0 0 0 2px rgba(26, 26, 46, 0.12) !important;
}

/* Kiekio input */
.woocommerce div.product form.cart .quantity .qty,
.woocommerce .product .cart input.qty,
input.qty {
    border-radius: 0 !important;
    height: 48px;
    line-height: 48px;
    padding: 0 12px;
    box-sizing: border-box;
    -moz-appearance: textfield;
    text-align: center;
    min-width: 64px;
    border: 1px solid #cccccc;
}

.woocommerce div.product form.cart .quantity .qty::-webkit-outer-spin-button,
.woocommerce div.product form.cart .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* „Į krepšelį" mygtukas */
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce .product .cart button.single_add_to_cart_button {
    border-radius: 0 !important;
    height: 48px;
    line-height: 48px;
    padding: 0 24px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==============================================================
   7. KREPŠELIS
   ============================================================== */

.woocommerce-cart table.cart td.actions input[type="text"],
.woocommerce-cart table.cart input.qty,
.woocommerce table.cart input.qty {
    border-radius: 0 !important;
    height: 40px;
    padding: 0 8px;
    box-sizing: border-box;
}

.woocommerce-cart .cart .coupon input#coupon_code,
.woocommerce .cart .coupon input[type="text"],
.coupon input.input-text {
    border-radius: 0 !important;
    height: 40px;
    padding: 0 12px;
    box-sizing: border-box;
}

.woocommerce-cart .cart .coupon .button,
.woocommerce .cart .coupon button {
    border-radius: 0 !important;
    height: 40px;
    line-height: 40px;
    padding: 0 16px;
    box-sizing: border-box;
}

.woocommerce-cart .cart .actions .button[name="update_cart"],
.woocommerce .cart .actions button[name="update_cart"],
.woocommerce-cart .cart_totals,
.woocommerce-cart .cart_totals .wc-proceed-to-checkout a,
.woocommerce td.product-remove a.remove {
    border-radius: 0 !important;
}

/* ==============================================================
   8. CHECKOUT FORMOS LAUKELIAI
   ============================================================== */

.woocommerce-checkout #order_review input,
.woocommerce-checkout #order_review select,
.woocommerce form.checkout input[type="text"],
.woocommerce form.checkout input[type="email"],
.woocommerce form.checkout input[type="tel"],
.woocommerce form.checkout input[type="password"],
.woocommerce form.checkout select,
.woocommerce form.checkout textarea,
.woocommerce #ship-to-different-address input,
#order_comments {
    border-radius: 0 !important;
}

/* ==============================================================
   9. NOTICES / ALERT BLOKAI
   ============================================================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice,
.woocommerce-message a.button,
.woocommerce-info a.button {
    border-radius: 0 !important;
}

/* ==============================================================
   10. CTA MYGTUKAI — #1E6F8A
   ============================================================== */

/* „Į krepšelį" mygtukas — juodas (įskaitant disabled būseną) */
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart .single_add_to_cart_button.disabled,
.woocommerce div.product form.cart .single_add_to_cart_button:disabled,
.woocommerce button.single_add_to_cart_button,
.woocommerce button.single_add_to_cart_button.disabled,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: #000000 !important;
    color: #FFFFFF !important;
    border: 2px solid #000000 !important;
    opacity: 1 !important;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    position: relative !important;
    padding-right: 2.5em !important;
    overflow: hidden !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover,
.woocommerce div.product form.cart .single_add_to_cart_button.disabled:hover,
.woocommerce button.single_add_to_cart_button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
    color: #FFFFFF !important;
}

/* Divi hover rodyklė — fiksuota dešinėje pusėje */
.woocommerce div.product form.cart .single_add_to_cart_button::after,
.woocommerce button.single_add_to_cart_button::after,
.woocommerce div.product form.cart .single_add_to_cart_button:hover::after,
.woocommerce button.single_add_to_cart_button:hover::after {
    position: absolute !important;
    right: 0.7em !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-left: 0 !important;
    font-size: 1.1em !important;
    line-height: 1 !important;
}

/* Checkout ir Place Order — juodi */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-checkout #place_order,
.woocommerce #payment #place_order {
    background-color: #000000 !important;
    color: #FFFFFF !important;
    border: 2px solid #000000 !important;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-checkout #place_order:hover,
.woocommerce #payment #place_order:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
    color: #FFFFFF !important;
}

/* ==============================================================
   11. ANTRINIAI MYGTUKAI — #1A1A2E
   ============================================================== */

.woocommerce a.button:not(.alt):not(.checkout-button),
.woocommerce button.button:not(.alt):not(.single_add_to_cart_button),
.woocommerce input.button:not(.alt),
.woocommerce-cart .cart .actions .button[name="update_cart"],
.woocommerce .cart .coupon .button,
.woocommerce .return-to-shop a.button,
.woocommerce-message a.button,
.woocommerce-info a.button {
    background-color: #1A1A2E !important;
    color: #FFFFFF !important;
    border: 2px solid #1A1A2E !important;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.woocommerce a.button:not(.alt):not(.checkout-button):hover,
.woocommerce button.button:not(.alt):not(.single_add_to_cart_button):hover,
.woocommerce-cart .cart .actions .button[name="update_cart"]:hover,
.woocommerce .cart .coupon .button:hover {
    background-color: #2D6A4F !important;
    border-color: #2D6A4F !important;
    color: #FFFFFF !important;
}

/* ==============================================================
   12. FOCUS BŪSENA — visi laukeliai
   ============================================================== */

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus,
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    outline: none !important;
    border-color: #1E6F8A !important;
    box-shadow: 0 0 0 2px rgba(30, 111, 138, 0.18) !important;
}

.woocommerce div.product form.cart .quantity .qty:focus,
.woocommerce table.cart input.qty:focus {
    border-color: #1E6F8A !important;
    box-shadow: 0 0 0 2px rgba(30, 111, 138, 0.18) !important;
    outline: none !important;
}

/* ==============================================================
   13. WOOCOMMERCE NOTICES — spalvos
   ============================================================== */

.woocommerce-message {
    border-top-color: #2D6A4F !important;
    background-color: #F5F0E8;
}

.woocommerce-info {
    border-top-color: #1A1A2E !important;
    background-color: #F5F0E8;
}

.woocommerce-error {
    border-top-color: #1E6F8A !important;
    background-color: #fff5f2;
}

/* ==============================================================
   14. PRODUKTO PAVADINIMAS (H1) — atsarginis stilius
   ============================================================== */

.woocommerce div.product h1.product_title,
.woocommerce div.product .product_title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #111827 !important;
    font-weight: 800 !important;
    font-size: clamp(22px, 3vw, 32px) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.woocommerce div.product .summary,
.woocommerce div.product .woocommerce-product-gallery {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ==============================================================
   15. PRODUKTŲ TINKLELIS — nuotraukų proporcijos
   ============================================================== */

.woocommerce ul.products li.product .woocommerce-loop-product__link img,
.woocommerce ul.products li.product a img,
.et_pb_wc_upsells .product img,
.et_pb_wc_related_products .product img {
    width: 100%;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center center;
    display: block;
    margin: 0;
    transition: transform 0.3s ease;
}

/* ==============================================================
   16. PRODUKTŲ KORTELĖS — border-radius: 0
   ============================================================== */

.woocommerce ul.products li.product,
.et_pb_shop .product {
    border-radius: 0 !important;
}

.woocommerce ul.products li.product .onsale {
    border-radius: 0 !important;
}

/* ==============================================================
   18. KATEGORIJŲ KARUSELĖ — shadow + šonų gradientas
   ============================================================== */

/* Šešėlis — leidžiame slick-list rodyti overflow */
.sr-kat-karusele .slick-list {
    overflow: visible;
    padding: 8px 0 !important;
}
.sr-kat-img-wrap {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

/* Gradiento užlenkimas šonuose — mask-image ant .slick-list,
   kad rodyklės ant wrapper'io nebūtų fade'inamos */
.sr-kat-karusele {
    position: relative;
}
.sr-kat-karusele .slick-list {
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0,
        #000 50px,
        #000 calc(100% - 50px),
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0,
        #000 50px,
        #000 calc(100% - 50px),
        transparent 100%
    );
}

/* Rodyklių stilius — vienodas su .sr-prod-karusele ir .sr-karusele-wrap */
.sr-kat-karusele .slick-prev,
.sr-kat-karusele .slick-next {
    width: 36px;
    height: 36px;
    background: #121621 !important;
    border-radius: 50%;
    z-index: 2;
}
.sr-kat-karusele .slick-prev { left: -18px; }
.sr-kat-karusele .slick-next { right: -18px; }
.sr-kat-karusele .slick-prev:before,
.sr-kat-karusele .slick-next:before {
    font-size: 18px;
    opacity: 1;
}

/* Divi TB body row'as (kur telpa [contextual_subcat_carousel]) turi overflow:hidden —
   dėl to rodyklės su left:-18px / right:-18px apkerpamos.
   Leidžiame overflow:visible tik ant tų row'ų, kuriuose YRA karuselė. */
.et_pb_row_1_tb_body:has(.sr-kat-karusele),
.et_pb_row:has(.sr-kat-karusele) {
    overflow: visible !important;
}

/* Divi TB sekcija (et_pb_section_0_tb_body) turi hardcoded height 320px + overflow:hidden.
   Kai kategorijos H1 užima 2 eilutes arba karuselė > 320px, apačia nusikerpama.
   Leidžiame natūralų aukštį sekcijoje, kurioje YRA karuselė. */
.et_pb_section:has(.sr-kat-karusele) {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
}

/* ==============================================================
   19. SIDEBAR — kategorijų blokas (wp-block-categories)
   ============================================================== */

/* Sąrašo valymas */
.wp-block-categories-list,
.wp-block-categories-list ul {
    list-style:   none !important;
    padding-left: 0 !important;
}

/* Tėvinės kategorijos */
.wp-block-categories-list > li.cat-item > a {
    font-weight:     700 !important;
    color:           #1A1A2E !important;
    text-decoration: none !important;
    display:         block;
    padding:         4px 0;
}

/* Subkategorijos */
.wp-block-categories-list ul.children li.cat-item a {
    font-weight:     400 !important;
    color:           #666666 !important;
    padding-left:    15px !important;
    display:         block;
    text-decoration: none !important;
    padding-top:     3px;
    padding-bottom:  3px;
}

/* Hover — subkategorijos */
.wp-block-categories-list ul.children li.cat-item a:hover {
    color: #1A1A2E !important;
}

/* Išvalyti mygtukas — paslėptas */
.woocommerce div.product .reset_variations {
    display: none !important;
}

/* Hover — tėvinės kategorijos */
.wp-block-categories-list > li.cat-item > a {
    transition: transform 0.2s ease;
    display: inline-block;
}
.wp-block-categories-list > li.cat-item > a:hover {
    color: #1A1A2E !important;
    transform: scale(1.04);
}

/* ==============================================================
   17. HERO SLIDER — mygtukų stilius
   ============================================================== */

.et_pb_slider .et_pb_more_button.et_pb_button {
    color:            #ffffff !important;
    background-color: transparent !important;
    border-width:     1px !important;
    border-color:     #f5f4f4 !important;
    border-radius:    0px !important;
    font-family:      'Inter', Helvetica, Arial, sans-serif !important;
    font-weight:      600 !important;
    transition:       background-color 0.25s ease, border-color 0.25s ease !important;
}

.et_pb_slider .et_pb_more_button.et_pb_button:hover {
    background-color: rgba(255, 255, 255, 0.12) !important;
    border-color:     #ffffff !important;
}

/* ==============================================================
   20. MOBILE HAMBURGER MENU FIX — leidžia dropdown išeiti iš header
   ==============================================================
   Divi TB header section/row turi overflow:hidden (dėl sticky module),
   dėl to .et_mobile_menu (position:absolute) su hero apkarpomas.
   Sprendimas: overflow:visible mobile view'e, kai meniu atidarytas.
*/
@media (max-width: 980px) {
    /* Aukštesnis specificity nei Divi'io globalus `#page-container,.et_pb_section,.et_pb_row{overflow:hidden!important}` */
    .et_pb_section.et_pb_section_1_tb_header,
    .et_pb_row.et_pb_row_1_tb_header,
    .et_pb_section.et_pb_section_1_tb_header .et_pb_row.et_pb_row_1_tb_header {
        overflow: visible !important;
    }
}

/* ==============================================================
   21. CLS FIX — rezervuoti vietą sekcijoms, kad puslapis nekiltų
   ==============================================================
   CLS attribution rodė (2026-07-07):
   - home CLS 0.712: `.et_builder_inner_content` 390x223 → 390x698 (hero slider ateina)
   - kat CLS 0.923: TB body section'os susikrauna po JS (223→698)
   - product CLS 0.559: sticky header + main content shift'as
   Sprendimas: min-height rezervuoja tikslų final layout aukštį iki JS init'o.
*/

/* Kategorijos puslapio CLS fix — Divi TB body section 0 užrakinta tiksliai final aukščiu
   (391px desktop / 320px mobile), kad nesitraukė iš 500 → 391 sukeliant 108px shift'ą.
   IŠIMTIS: top-level kategorijose (Auto/Jachtai/Plovykloms) section 0 turi subkat GRID'ą,
   kuris gali turėti kelias eilutes (Auto = 20 subkat = ~4 eilutės). Ten leidžiam augti —
   grid'as neturi post-paint shift'o (visi sizes rezervuoti per aspect-ratio 1/1 kortelėse). */
body.tax-product_cat .et_pb_section.et_pb_section_0_tb_body {
    height: 391px !important;
    max-height: 391px !important;
    min-height: 391px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
body.tax-product_cat .et_pb_section.et_pb_section_0_tb_body:has(.sr-kat-grid),
body.tax-product_cat .et_pb_section.et_pb_section_0_tb_body:has(.sr-kat-karusele) {
    height: auto !important;
    max-height: none !important;
    min-height: 391px !important;
    overflow: visible !important;
}
body.tax-product_cat .et_pb_section.et_pb_section_1_tb_body {
    min-height: 500px !important;
}
@media (max-width: 480px) {
    body.tax-product_cat .et_pb_section.et_pb_section_0_tb_body {
        height: 320px !important;
        max-height: 320px !important;
        min-height: 320px !important;
    }
    body.tax-product_cat .et_pb_section.et_pb_section_0_tb_body:has(.sr-kat-grid),
    body.tax-product_cat .et_pb_section.et_pb_section_0_tb_body:has(.sr-kat-karusele) {
        height: auto !important;
        max-height: none !important;
        min-height: 320px !important;
    }
    body.tax-product_cat .et_pb_section.et_pb_section_1_tb_body {
        min-height: 400px !important;
    }
}

/* Home CLS: užrakinti gutter row'o + slider container'io plotį/padding'ą iš pat pradžios */
body.home #main-content .et_pb_row.et_pb_row_0,
body.home #main-content .et_pb_row.et_pb_gutters1 {
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
    max-width: 1080px !important;
}
body.home .et_pb_slider_container_inner,
body.home .et_pb_slider {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
/* Section 1 (3 blurb'ai) — content-driven, be min-height rezervacijos.
   Buvo 200/350px, o realus turinys tik ~170px desktop / ~392px mobile.
   Perteklius rodėsi kaip pilkas plotas po blurb'ų. */
@media (max-width: 480px) {
    body.tax-product_cat .et_pb_section.et_pb_section_0_tb_body {
        min-height: 320px !important;
    }
    body.tax-product_cat .et_pb_section.et_pb_section_1_tb_body {
        min-height: 400px !important;
    }
}

/* Divi TB header'is paslėptas — pakeista statiniu HTML header'iu (žr. includes/static-header.php) */
header.et-l--header,
.et-l.et-l--header {
    display: none !important;
}

/* ==============================================================
   22. STATINIS HTML STICKY HEADER
   ============================================================== */
.sr-static-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-family: 'Inter', sans-serif;
}
/* Rezervuojam vietą po fixed header'iu, kad content'as neužsidėtų */
body.et-db { padding-top: 120px !important; }
@media (max-width: 980px) { body.et-db { padding-top: 82px !important; } }

/* --- Top dark row: logo + search + cart --- */
.sr-header-top {
    background: #1A1A2E;
    color: #ffffff;
    height: 82px;
    display: flex;
    align-items: center;
}
.sr-header-container {
    width: 85%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}
@media (max-width: 980px) {
    .sr-header-container {
        width: 95%;
        padding: 0;
    }
}
.sr-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
    flex-shrink: 0;
}
.sr-header-logo img {
    height: 52px;
    width: 52px;
    object-fit: contain;
    display: block;
    border-radius: 50%;
}
.sr-header-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.sr-header-brand strong {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}
.sr-header-tagline {
    font-size: 12px;
    color: #a8a8b8;
    max-width: 180px;
}

.sr-header-search {
    flex: 1;
    max-width: 640px;
    display: flex;
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    margin: 0 auto;
}
.sr-header-search input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #1a1a2e;
    background: transparent;
    font-family: inherit;
}
.sr-header-search input::placeholder { color: #999; }
.sr-header-search button {
    padding: 0 20px;
    border: none;
    background: #ffffff;
    color: #1a1a2e;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    border-left: 1px solid #eee;
}
.sr-header-search button:hover { background: #f5f5f5; }

.sr-header-cart {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 4px;
}
.sr-header-cart .sr-cart-icon,
.sr-header-cart a { color: #ffffff !important; }
.sr-header-cart svg { stroke: #ffffff !important; fill: none !important; width: 28px !important; height: 28px !important; }

/* --- Bottom light row: menu (desktop) --- */
.sr-header-menu-row {
    background: #ffffff;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f0f0f0;
}
.sr-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 28px;
    align-items: center;
}
.sr-menu li { list-style: none; }
.sr-menu a {
    color: #1a1a2e;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 4px;
    display: block;
    transition: color 0.15s ease;
}
.sr-menu a:hover,
.sr-menu .current-menu-item > a,
.sr-menu .current-menu-parent > a,
.sr-menu .current-menu-ancestor > a,
.sr-menu .current_page_item > a {
    color: #1A1A2E;
    font-weight: 700;
}

/* --- Hamburger (mobile only) --- */
.sr-hamburger {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}
.sr-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.sr-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sr-hamburger.open span:nth-child(2) { opacity: 0; }
.sr-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Mobile drawer (stilius suderintas su .sr-cart-drawer) --- */
.sr-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 90%;
    max-width: 420px;
    background: #ffffff;
    box-shadow: -8px 0 32px rgba(0,0,0,0.18);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    z-index: 200;
    display: flex;
    flex-direction: column;
}
.sr-mobile-drawer.open { transform: translateX(0); }

/* Header — toks pat kaip .sr-cart-drawer__header
   Su !important, kad WooCommerce checkout blocks CSS neuždėtų savo stilių */
.sr-mobile-drawer .sr-mobile-drawer__header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 20px 24px !important;
    background: #1A1A2E !important;
    background-color: #1A1A2E !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    border: 0 !important;
    margin: 0 !important;
}
.sr-mobile-drawer .sr-mobile-drawer__title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif !important;
    font-weight: 800 !important;
    font-size: 18px !important;
    letter-spacing: 0.01em !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    line-height: 1.2 !important;
}
.sr-mobile-drawer .sr-mobile-drawer__close {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    color: #ffffff !important;
    cursor: pointer !important;
    padding: 4px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    transition: background .15s !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
}
.sr-mobile-drawer .sr-mobile-drawer__close:hover { background: rgba(255,255,255,0.1) !important; }
.sr-mobile-drawer .sr-mobile-drawer__close svg {
    width: 24px !important;
    height: 24px !important;
    stroke: #ffffff !important;
    color: #ffffff !important;
    display: block !important;
    fill: none !important;
}

.sr-mobile-drawer__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 20px 30px;
}

.sr-mobile-menu {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}
.sr-mobile-menu li { list-style: none; border-bottom: 1px solid #eee; }
.sr-mobile-menu a {
    display: block;
    padding: 14px 8px;
    color: #1a1a2e;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}
.sr-mobile-menu a:hover { background: #f9f9f9; }
.sr-mobile-menu .current-menu-item > a,
.sr-mobile-menu .current-menu-parent > a,
.sr-mobile-menu .current-menu-ancestor > a,
.sr-mobile-menu .current_page_item > a {
    color: #1A1A2E;
    font-weight: 700;
}
.sr-mobile-search {
    display: flex;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid #eee;
    margin-top: 12px;
}
.sr-mobile-search input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
.sr-mobile-search button {
    padding: 10px 16px;
    background: #1a1a2e;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.sr-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 150;
}
.sr-mobile-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
body.sr-menu-open { overflow: hidden; }

/* --- Mobile responsive --- */
@media (max-width: 980px) {
    .sr-static-header { }
    .sr-header-top {
        height: 82px;
    }
    .sr-header-container {
        gap: 10px;
    }
    /* Mobile: krepšelis ir hamburger stumiamas į dešinę */
    .sr-header-cart {
        margin-left: auto;
    }
    .sr-header-logo img {
        height: 42px;
        width: 42px;
    }
    .sr-header-brand strong { font-size: 14px; }
    .sr-header-tagline {
        font-size: 10px;
        max-width: 140px;
        line-height: 1.15;
    }
    .sr-header-search {
        display: none; /* Paslėpta desktop'e nes yra mobile search'as drawer'yje */
    }
    .sr-header-menu-row {
        display: none;
    }
    .sr-hamburger {
        display: flex;
    }
}

@media (min-width: 981px) {
    .sr-hamburger,
    .sr-mobile-drawer,
    .sr-mobile-backdrop { display: none !important; }
}


/* Karuselių rezervacija pre-Slick init.
   KRITINIS FIX: sub-kat karuselei būtinas MAX-HEIGHT, nes kai Slick dar neinit'inta,
   52 kategorijų item'ai vertically layout'inasi ir section auga iki 8000+ px, tada
   Slick suveikia ir section sumažėja į 391px — DIDELIS CLS shift'as.
*/
.sr-karusele-wrap:not(.slick-initialized),
.sr-prod-karusele:not(.slick-initialized) {
    min-height: 380px;
    overflow: hidden;
}
.sr-kat-karusele:not(.slick-initialized) {
    min-height: 240px;
    overflow: hidden !important;
    display: flex !important;
    flex-wrap: nowrap !important;
}
@media (max-width: 480px) {
    .sr-karusele-wrap:not(.slick-initialized),
    .sr-prod-karusele:not(.slick-initialized) {
        min-height: 320px;
    }
    .sr-kat-karusele:not(.slick-initialized) {
        min-height: 200px;
    }
}

/* Category thumbnails — jau turi aspect-ratio 1:1 + object-fit cover, bet užtikrinam explicit sizing */
.sr-kat-img-wrap {
    aspect-ratio: 1/1;
    display: block;
}
.sr-kat-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Produktų kortelės — kortelės nuotraukos reservation */
.sr-kortele__img-wrap,
.woocommerce ul.products li.product a img,
.et_pb_shop ul.products li.product a img {
    aspect-ratio: 1/1;
    object-fit: cover;
    width: 100%;
    height: auto;
    display: block;
}

/* WooCommerce product gallery main image */
.woocommerce div.product div.images .woocommerce-product-gallery__image {
    aspect-ratio: 1/1;
    display: block;
}
.woocommerce div.product div.images .woocommerce-product-gallery__image img {
    aspect-ratio: 1/1;
    object-fit: contain;
    width: 100%;
    height: auto;
}

