/*
Theme Name: Storefront Child
Theme URI: https://example.com
Description: Child theme for Storefront
Author: Your Name
Template: storefront
Version: 1.0
*/

/* ================================
   GENERAL
================================ */

a {
    text-decoration: none;
}

/* Override Storefront's default max-width */
.col-full {
    max-width: 1440px;
}

/* ================================
   TOP BAR
================================ */

.custom-topbar {
    background: #222;
    color: #fff;
    font-size: 14px;
}

.topbar-inner {
    max-width: 1440px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 15px;
}

.topbar-left  { flex: 1; text-align: left; }
.topbar-center { flex: 1; text-align: center; }
.topbar-right  { flex: 1; text-align: right; }

.topbar-widget { color: #fff; }
.topbar-widget a { color: #fff; }

@media (max-width: 768px) {
    .custom-topbar { display: none; }
}


/* ================================
   HEADER LAYOUT
================================ */

.site-header {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    margin-bottom: 0 !important;
}

/* Only the masthead col-full gets flex — not every col-full globally */
.site-header .masthead-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 !important;
}

/* ---- Logo ---- */
.header-logo {
    flex: 0 0 auto;
}

.header-logo .site-branding {
    margin: 0;
    padding: 0;
}

.header-logo .site-branding h1,
.header-logo .site-branding .logo {
    margin: 0;
    padding: 0;
    line-height: 1;
    font-size: inherit;
}

.header-logo .custom-logo {
    max-height: 40px;
    width: auto;
    display: block;
}

/* ---- Search ---- */
.header-search {
    flex: 1 1 auto;
    min-width: 0;
}

.header-search .site-search {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

.header-search .site-search .woocommerce-product-search {
    display: flex !important;
    width: 100% !important;
    position: relative !important;
}

.header-search .site-search input[type="search"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    background-image: none !important;
    background: #fff !important;
    padding: 10px 14px 10px 42px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    outline: none !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    appearance: none;
    height: auto !important;
}

.header-search .site-search button[type="submit"] {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 42px !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    font-size: 0 !important;
    color: transparent !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
}

.header-search .site-search button[type="submit"]::before {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    border: 2px solid #999;
    border-radius: 50%;
    margin-right: -4px;
    margin-bottom: -4px;
    flex-shrink: 0;
}

.header-search .site-search button[type="submit"]::after {
    content: '';
    display: block;
    width: 2px;
    height: 7px;
    background: #999;
    border-radius: 1px;
    transform: rotate(45deg);
    margin-left: -3px;
    margin-top: 5px;
    flex-shrink: 0;
}

.header-search .site-search button[type="submit"]:hover::before {
    border-color: #555;
}
.header-search .site-search button[type="submit"]:hover::after {
    background: #555;
}

/* ---- Account ---- */
.header-account {
    flex: 0 0 auto;
    text-align: center;
}

/* ---- Cart ---- */
.header-cart {
    flex: 0 0 auto;
    text-align: center;
}


/* ================================
   HEADER ICON BUTTONS
================================ */

.header-icon-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #333;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 14px;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.header-icon-btn:hover {
    background: #f5f5f5;
    color: #000;
}

.header-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f0f0f0;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.header-icon-btn:hover .header-icon {
    background: #e0e0e0;
}

.cart-count {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #e44;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
}

.cart-total {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: #e44;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid #fff;
    white-space: nowrap;
}

.cart-total .woocommerce-Price-amount,
.cart-total .woocommerce-Price-currencySymbol {
    font-size: inherit;
    color: inherit;
}

.header-icon-label {
    display: block;
    line-height: 1;
}


/* ================================
   PRIMARY NAVIGATION — sticky
================================ */

/* Fix: Storefront sets overflow on #page which silently breaks sticky */
#page {
    overflow: visible !important;
}

.storefront-primary-navigation {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.admin-bar .storefront-primary-navigation {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .storefront-primary-navigation {
        top: 46px;
    }
}

/* Nav inner flex row: logo | menu | search | icons */
.storefront-primary-navigation .nav-inner {
    display: flex !important;
    align-items: center !important;
    height: 40px !important;
    padding: 0 !important;
    gap: 8px;
    overflow: visible !important;
}

/* ---- Sticky Logo — hidden until stuck ---- */
.nav-sticky-logo {
    flex: 0 0 auto;
    display: none;
    align-items: center;
    height: 40px;
    padding-right: 8px;
}

.is-stuck .nav-sticky-logo {
    display: flex;
}

.nav-sticky-logo a {
    display: flex;
    align-items: center;
    height: 40px;
    text-decoration: none;
    color: #333;
    font-weight: 700;
}

.nav-sticky-logo img {
    max-height: 28px;
    width: auto;
    display: block;
}

/* ---- Menu wrap ---- */
.nav-menu-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 40px;
}

.nav-menu-wrap .main-navigation {
    width: auto;
    padding: 0 !important;
    min-height: unset !important;
    background: transparent !important;
}

.nav-menu-wrap .menu-toggle {
    display: none;
}

.nav-menu-wrap .nav-menu,
.nav-menu-wrap .menu > ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    height: 40px !important;
    background: transparent !important;
}

.nav-menu-wrap .nav-menu > li,
.nav-menu-wrap .menu > ul > li {
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    float: none !important;
}

.nav-menu-wrap .nav-menu > li > a,
.nav-menu-wrap .menu > ul > li > a {
    display: flex !important;
    align-items: center !important;
    height: 40px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-menu-wrap .nav-menu > li > a:hover,
.nav-menu-wrap .nav-menu > li.current_page_item > a,
.nav-menu-wrap .menu > ul > li > a:hover {
    color: #000 !important;
    background: #f5f5f5 !important;
}

/* ---- Sticky Search — hidden until stuck ---- */
.nav-search {
    flex: 1 1 auto;
    min-width: 0;
    display: none;
    align-items: center;
    position: relative;
}

.is-stuck .nav-search {
    display: flex;
}

/* Strip all inherited widget/WC styles from every wrapper */
.nav-search .site-search,
.nav-search .widget,
.nav-search .woocommerce {
    all: unset !important;
    display: block !important;
    width: 100% !important;
}

.nav-search .woocommerce-product-search {
    all: unset !important;
    display: flex !important;
    position: relative !important;
    width: 100% !important;
    align-items: center !important;
}

.nav-search input[type="search"] {
    all: unset !important;
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    height: 32px !important;
    padding: 0 12px 0 34px !important;
    background: #f5f5f5 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    color: #333 !important;
    line-height: 32px !important;
}

.nav-search input[type="search"]:focus {
    background: #fff !important;
    border-color: #bbb !important;
    outline: none !important;
}

/* Hide the submit button and ALL its pseudo-elements completely */
.nav-search button[type="submit"],
.nav-search button[type="submit"]::before,
.nav-search button[type="submit"]::after {
    all: unset !important;
    display: none !important;
}

/* Kill any stray pseudo-elements from parent theme on nav-search elements */
.nav-search .site-search::before,
.nav-search .site-search::after,
.nav-search .widget::before,
.nav-search .widget::after,
.nav-search .widget_product_search::before,
.nav-search .widget_product_search::after,
.nav-search label::before,
.nav-search label::after,
.nav-search .woocommerce-product-search::before,
.nav-search .woocommerce-product-search::after {
    display: none !important;
    content: none !important;
}

/* SVG magnifying glass icon */
.nav-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    color: #999;
    line-height: 0;
}

/* ---- Sticky Icons — hidden until stuck ---- */
.nav-icons {
    flex: 0 0 auto;
    display: none;
    align-items: center;
    gap: 4px;
    height: 40px;
}

.is-stuck .nav-icons {
    display: flex;
}

.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-icon-btn:hover {
    background: #f0f0f0;
    color: #000;
}

.nav-cart-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-cart-count {
    position: absolute;
    top: -8px;
    right: -4px;
    background: #e44;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}

/* Space below nav */
#content.site-content {
    padding-top: 20px;
}

#secondary {
    display: none;
}

#primary {
    width: 100%;
    float: none;
}

/* ================================
   MOBILE HEADER
================================ */

/* Hide mobile header on desktop */
.mobile-header,
.mobile-header-search {
    display: none;
}

@media (max-width: 768px) {

    /* Show mobile header, hide desktop header and desktop nav */
    .mobile-header,
    .mobile-header-search {
        display: block;
    }

    .site-header {
        display: none !important;
    }

    .storefront-primary-navigation {
        display: none !important;
    }

    /* ---- Make the whole mobile-header sticky ---- */
    .mobile-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    .admin-bar .mobile-header {
        top: var(--admin-bar-offset, 46px);
    }

    /* ---- Mobile header top row: hamburger | logo | icons ---- */
    .mobile-header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
    }

    /* Hamburger button */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: none;
        background: none;
        color: #333;
        cursor: pointer;
        border-radius: 8px;
        transition: background 0.2s ease;
        flex-shrink: 0;
    }

    .mobile-menu-toggle:hover,
    .mobile-menu-toggle.is-active {
        background: #f0f0f0;
    }

    /* Logo — centered */
    .mobile-header-logo {
        flex: 1 1 auto;
        text-align: center;
        line-height: 0;
    }

    .mobile-header-logo a {
        display: inline-flex;
        align-items: center;
        text-decoration: none;
    }

    .mobile-header-logo img {
        max-height: 32px;
        width: auto;
        display: block;
    }

    .mobile-header-logo .mobile-site-title {
        font-size: 20px;
        font-weight: 700;
        color: #333;
    }

    /* Icons — right side */
    .mobile-header-icons {
        display: flex;
        align-items: center;
        gap: 2px;
        flex-shrink: 0;
    }

    .mobile-icon-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        color: #333;
        text-decoration: none;
        transition: background 0.2s ease;
    }

    .mobile-icon-btn:hover {
        background: #f0f0f0;
    }

    .mobile-cart-wrap {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-cart-count {
        position: absolute;
        top: -6px;
        right: -6px;
        background: #e44;
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
        min-width: 16px;
        height: 16px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
        border: 2px solid #fff;
    }

    /* ---- Mobile search row (scrolls away, not sticky) ---- */
    .mobile-header-search {
        padding: 0 12px 10px;
        background: #fff;
    }

    .mobile-header-search .mobile-search-inner {
        width: 100%;
    }

    .mobile-search-form {
        display: flex;
        position: relative;
        width: 100%;
    }

    .mobile-search-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        z-index: 1;
        color: #999;
        line-height: 0;
    }

    .mobile-search-form input[type="search"] {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
        background: #f5f5f5;
        padding: 9px 12px 9px 36px;
        border: 1px solid #e0e0e0;
        border-radius: 20px;
        font-size: 14px;
        color: #333;
        -webkit-appearance: none;
        appearance: none;
        outline: none;
    }

    .mobile-search-form input[type="search"]:focus {
        background: #fff;
        border-color: #bbb;
    }

    /* ---- Mobile nav drawer ---- */
    .mobile-nav-drawer {
        display: none;
        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav-drawer.is-open {
        display: block;
    }

    .mobile-nav-menu,
    .mobile-nav-drawer > div > ul {
        list-style: none !important;
        margin: 0 !important;
        padding: 8px 0 !important;
    }

    .mobile-nav-menu li,
    .mobile-nav-drawer > div > ul > li {
        margin: 0 !important;
    }

    .mobile-nav-menu a,
    .mobile-nav-drawer > div > ul > li > a {
        display: block !important;
        padding: 12px 20px !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        color: #333 !important;
        text-decoration: none !important;
        border-bottom: 1px solid #f5f5f5 !important;
        transition: background 0.15s ease !important;
    }

    .mobile-nav-menu a:hover,
    .mobile-nav-drawer > div > ul > li > a:hover {
        background: #f5f5f5 !important;
    }

    .mobile-nav-menu .current_page_item > a,
    .mobile-nav-drawer > div > ul > .current_page_item > a {
        color: #000 !important;
        font-weight: 600 !important;
    }

}

/* ================================
   HOMEPAGE SLIDER
================================ */

.homepage-slider {
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    overflow: hidden;
    background: #f5f5f5;
}

.slider-track {
    position: relative;
    width: 100%;
}

.slider-slide {
    display: none;
    width: 100%;
}

.slider-slide.is-active {
    display: block;
    animation: sliderFadeIn 0.5s ease;
}

@keyframes sliderFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.slider-slide img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.slider-slide a {
    display: block;
    line-height: 0;
}

/* Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: none;
    color: #555;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
    opacity: 0;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.15));
}

.homepage-slider:hover .slider-arrow {
    opacity: 1;
}

.slider-prev { left: 16px; }
.slider-next { right: 16px; }

.slider-arrow:hover {
    color: #222;
    transform: translateY(-50%) scale(1.08);
}

.slider-arrow svg circle {
    transition: fill 0.2s ease;
}

.slider-arrow:hover svg circle {
    fill: rgba(255,255,255,0.95);
}

/* Dots */
.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.slider-dot.is-active,
.slider-dot:hover {
    background: #fff;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .slider-arrow {
        width: 36px;
        height: 36px;
        opacity: 1;
    }

    .slider-arrow svg {
        width: 36px;
        height: 36px;
    }

    .slider-prev { left: 8px; }
    .slider-next { right: 8px; }

    .slider-dots {
        bottom: 10px;
        gap: 6px;
    }

    .slider-dot {
        width: 8px;
        height: 8px;
    }
}

/* ================================
   FRONT PAGE — PRODUCT CAROUSEL
================================ */

.frontpage-products {
    max-width: 1440px;
    margin: 30px auto 0;
    padding: 0 15px;
}

.frontpage-section-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 18px;
    color: #222;
    text-align: center;
}

.product-carousel-wrap {
    position: relative;
}

.product-carousel {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
}

.product-carousel::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}

.product-carousel-track {
    display: flex;
    gap: 16px;
    padding: 4px 0 20px;
}

.carousel-product-card {
    flex: 0 0 auto;
    width: 220px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.carousel-product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.carousel-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.carousel-product-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f8f8;
}

.carousel-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-product-title {
    font-size: 14px;
    font-weight: 500;
    margin: 10px 12px 4px;
    color: #333;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-product-price {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    padding: 0 12px 12px;
}

.carousel-product-price del {
    color: #999;
    font-weight: 400;
    font-size: 13px;
}

.carousel-product-price ins {
    text-decoration: none;
    color: #c00;
}

/* Carousel arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: none;
    color: #555;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.12));
}

.carousel-prev { left: -8px; }
.carousel-next { right: -8px; }

.carousel-arrow:hover {
    color: #222;
    transform: translateY(-60%) scale(1.08);
}

/* Mobile: cards narrower, arrows inside */
@media (max-width: 768px) {
    .carousel-product-card {
        width: 160px;
    }

    .carousel-prev { left: 4px; }
    .carousel-next { right: 4px; }

    .frontpage-products {
        margin-top: 20px;
    }
}


/* ================================
   FRONT PAGE — SEO TEXT
================================ */

.frontpage-seo {
    max-width: 1440px;
    margin: 40px auto 0;
    padding: 30px 15px 40px;
    border-top: 1px solid #eee;
}

.frontpage-seo-heading {
    font-size: 22px;
    font-weight: 600;
    color: #222;
    margin: 0 0 12px;
    text-align: center;
}

.frontpage-seo-content {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
}

.frontpage-seo-content p {
    margin: 0 0 12px;
}

.frontpage-seo-content a {
    color: #333;
    text-decoration: underline;
}

/* ================================
   BREADCRUMBS
================================ */

.storefront-breadcrumb {
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.storefront-breadcrumb .woocommerce-breadcrumb {
    margin-bottom: 0 !important;
    padding: 15px 0 !important;
}

/* Reduce space above breadcrumbs on mobile */
@media (max-width: 768px) {

    .mobile-header-search {
        padding-bottom: 4px;
    }

    .storefront-breadcrumb .woocommerce-breadcrumb {
        padding-top: 0 !important;
        padding-bottom: 6px !important;
        margin: 0 !important;
    }

    .storefront-breadcrumb {
        margin-top: 0 !important;
    }

    .woocommerce-breadcrumb {
        font-size: 13px;
    }

}


/* ================================
   SINGLE PRODUCT — RELATED PRODUCTS
================================ */

/* Center the heading */
.related.products > h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #222;
    margin-bottom: 20px;
}

/* Desktop: 5 columns */
.related.products ul.products {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.related.products ul.products li.product {
    width: calc(20% - 13px) !important;
    margin: 0 !important;
    float: none !important;
}

/* Mobile: horizontal scroll carousel */
@media (max-width: 768px) {

    .related.products {
        position: relative;
        overflow: visible;
    }

    .related.products ul.products {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 12px;
        padding: 4px 0 16px;
    }

    .related.products ul.products::-webkit-scrollbar {
        display: none;
    }

    .related.products ul.products li.product {
        flex: 0 0 160px !important;
        width: 160px !important;
        scroll-snap-align: start;
        max-width: none !important;
    }

    .related.products ul.products li.product img {
        border-radius: 8px;
    }
}


/* ================================
   SINGLE PRODUCT — GALLERY 1:1 CROP
================================ */

/* Main gallery image: force square container with centered crop */
.single-product .woocommerce-product-gallery .flex-viewport {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    overflow: hidden;
}

.single-product .woocommerce-product-gallery__wrapper {
    height: 100% !important;
}

.single-product .woocommerce-product-gallery__image {
    aspect-ratio: 1 / 1 !important;
    overflow: hidden;
}

.single-product .woocommerce-product-gallery__image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Force high-quality rendering */
.single-product .woocommerce-product-gallery__image a img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Override srcset sizes so browser picks the largest available source */
.single-product .woocommerce-product-gallery__image img[sizes] {
    sizes: (min-width: 600px) 600px, 100vw;
}

/* Thumbnails: also force square */
.single-product .flex-control-thumbs li {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.single-product .flex-control-thumbs li img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}


/* ================================
   SINGLE PRODUCT — ACCORDION TABS
================================ */

/* Hide default WooCommerce tabs if they somehow still render */
.single-product .woocommerce-tabs {
    display: none !important;
}

.product-accordion-tabs {
    clear: both;
    margin-top: 30px;
    margin-bottom: 20px;
    border-top: 1px solid #e5e5e5;
}

/* Each accordion section */
.accordion-tab {
    border-bottom: 1px solid #e5e5e5;
}

/* Toggle button */
.accordion-tab__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 4px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #222;
    transition: color 0.2s ease;
}

.accordion-tab__toggle:hover {
    color: #666;
    background-color: #fafafa; /* Very faint gray background */
}

/* Chevron icon */
.accordion-tab__icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: #888;
}

.accordion-tab.is-open .accordion-tab__icon {
    transform: rotate(180deg);
}

/* Content area — hidden by default */
.accordion-tab__content {
    display: none;
    padding: 0 4px 20px;
}

.accordion-tab.is-open .accordion-tab__content {
    display: block;
}

/* Remove the default h2 inside tab content (WooCommerce adds "Aprašymas", "Papildoma informacija") */
.accordion-tab__inner > h2:first-child {
    display: none;
}

/* Description text styling */
.accordion-tab__inner {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}

.accordion-tab__inner p {
    margin: 0 0 12px;
}

.accordion-tab__inner p:last-child {
    margin-bottom: 0;
}

/* Truncated state — max height with fade */
.accordion-tab__inner--truncated {
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.accordion-tab__inner--truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}

/* Expanded state */
.accordion-tab__inner--expanded {
    max-height: none;
    overflow: visible;
}

.accordion-tab__inner--expanded::after {
    display: none;
}

/* Show more / show less button */
.accordion-tab__show-more {
    display: inline-block;
    margin-top: 8px;
    padding: 0;
    border: none;
    background: none;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.accordion-tab__show-more:hover {
    color: #000;
}

/* Toggle show more / show less text */
.accordion-tab__inner--truncated ~ .accordion-tab__show-more .show-less-text {
    display: none;
}

.accordion-tab__inner--truncated ~ .accordion-tab__show-more .show-more-text {
    display: inline;
}

.accordion-tab__inner--expanded ~ .accordion-tab__show-more .show-more-text {
    display: none;
}

.accordion-tab__inner--expanded ~ .accordion-tab__show-more .show-less-text {
    display: inline;
}

/* Table styling inside accordion (Additional Info) */
.accordion-tab__inner .shop_attributes {
    margin: 0;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .accordion-tab__toggle {
        padding: 14px 0;
        font-size: 15px;
    }

    .accordion-tab__content {
        padding: 0 0 16px;
    }

    .accordion-tab__inner--truncated {
        max-height: 120px;
    }
}

/* 1. Remove the default browser/theme outline for everyone */
button:focus,
.button:focus,
input:focus,
a:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* 2. Add a faint gray outline ONLY for keyboard navigation (Tab key) */
button:focus-visible,
.button:focus-visible,
input:focus-visible,
a:focus-visible,
.products a:focus-visible {
    outline: 2px solid #e0e0e0 !important; /* Very faint gray */
    outline-offset: 2px; /* Adds a little breathing room between the element and the line */
}

/* Hide default WooCommerce dropdowns */
.variations select {
    display: none !important;
}

/* Container for the buttons */
.custom-variation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

/* Individual variation button */
.variation-button {
    flex: 0 0 calc(33.333% - 8px); /* 3 items per row */
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.variation-button:hover {
    border-color: #ddd;
    background-color: #fcfcfc; /* Faint gray highlight */
}

.variation-button.is-active {
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Variation Image */
.variation-img {
    display: block;
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    object-fit: cover;
    border-radius: 4px;
}

/* Variation Name Label */
.variation-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    display: block;
}

@media (max-width: 480px) {
    .variation-button {
        flex: 0 0 calc(50% - 6px); /* 2 items per row on mobile */
    }
}

/* 1. Hide the "Clear" variations button */
.reset_variations {
    display: none !important;
}

/* 2. Thinner buttons (max-width 80px) */
.variation-button {
    flex: 0 0 80px; /* Force 80px width */
    max-width: 80px;
    padding: 8px 4px; /* Slightly tighter padding for small width */
}

.variation-img {
    width: 50px; /* Smaller image to fit the 80px container */
    height: 50px;
}

.variation-label {
    font-size: 11px; /* Smaller text for thin buttons */
    line-height: 1.2;
}

.variation-label .attr-name {
    display: block; /* Puts "Color:" on its own line above the value */
    color: #888;
    font-weight: normal;
    font-size: 10px;
}

/* Hide the redundant variation label table cell */
.variations th.label {
    display: none !important;
}

/* Optional: Make the variation buttons take up the full width now that the label is gone */
.variations td.value {
    display: block !important;
    width: 100% !important;
}

/* Make the attribute name inside the button slightly bolder or a different shade */
.variation-label .attr-name {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 2px;
}

/* ================================
   QUANTITY SELECTOR — modern +/−
================================ */

.quantity.qty-styled {
    display: inline-flex;
    align-items: stretch;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    height: 48px;
}

.quantity.qty-styled input.qty {
    width: 48px;
    height: 100%;
    text-align: center;
    border: none !important;
    background: transparent !important;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    -moz-appearance: textfield;
    padding: 0;
    margin: 0;
    box-shadow: none !important;
    outline: none !important;
    order: 1;
}

/* Hide native number spinners */
.quantity.qty-styled input.qty::-webkit-outer-spin-button,
.quantity.qty-styled input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Right-side button column */
.qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 50%;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #444;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
    line-height: 1;
    user-select: none;
}

.qty-btn:hover {
    background: #eaeaea;
    color: #000;
}

.qty-btn:active {
    background: #ddd;
}

/* Stack buttons on the right: + top, − bottom */
.qty-plus {
    order: 2;
    border-left: 1.5px solid #eee;
    border-bottom: 1px solid #eee;
    border-radius: 0;
    margin-left: auto;
    position: absolute;
    top: 0;
    right: 0;
}

.qty-minus {
    order: 3;
    border-left: 1.5px solid #eee;
    border-radius: 0;
    position: absolute;
    bottom: 0;
    right: 0;
}

/* The wrapper needs relative positioning for the stacked buttons */
.quantity.qty-styled {
    position: relative;
    padding-right: 32px;
}

/* Cart page — slightly smaller */
.woocommerce-cart .quantity.qty-styled {
    height: 40px;
}

.woocommerce-cart .quantity.qty-styled input.qty {
    width: 40px;
    font-size: 14px;
}

.woocommerce-cart .qty-btn {
    width: 28px;
    font-size: 13px;
}

.woocommerce-cart .quantity.qty-styled {
    padding-right: 28px;
}


/* ================================
   DELIVERY ESTIMATE
================================ */

.delivery-estimate {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 16px;
    padding: 10px 14px;
    background: #f0faf0;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    color: #2e7d32;
}

.delivery-estimate__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: #2e7d32;
}

.delivery-estimate__text strong {
    font-weight: 600;
}

@media (max-width: 768px) {
    .delivery-estimate {
        font-size: 13px;
        padding: 8px 12px;
    }
}


/* ================================
   VARIATION PRICE — hide duplicate
   (price updates in the main .price)
================================ */

.woocommerce-variation-price {
    display: none !important;
}


/* ================================
   DELIVERY ESTIMATE — Blocks Cart & Checkout
================================ */

.blocks-delivery-est {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 12.5px;
    color: #2e7d32;
    line-height: 1.3;
}

.blocks-delivery-est svg {
    flex-shrink: 0;
}