/*
 Theme Name:   Child Storefront
 Theme URI:    https://woocommerce.com/storefront/
 Description:  Storefront Child Theme - Homepage full width, Shop so sidebarom vľavo
 Author:       CSX
 Version:      3.0.0
 Template:     storefront
 Text Domain:  child-storefront
*/

/* Základné štýly */
.header-widget-region .widget {
    margin-bottom: 0;
}

.header-widget-region .widget img {
    display: block;
}

/* Oprava overflow na .site – inak sticky nefunguje */
.site {
    overflow-x: clip !important;
}

/* Sticky breadcrumb – vždy viditeľný pri scrollovaní */
.storefront-breadcrumb {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0.8em 0;
    margin-bottom: 1.5em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* Skryť sorting a result count na shop */
.woocommerce-ordering,
.woocommerce-result-count {
    display: none !important;
}

/* ===== MIPO CUSTOM HEADER STYLES (2026-04-21) ===== */

/* Belt-and-braces: hide old nav row in case PHP removal fires late */
.storefront-primary-navigation,
#site-navigation.main-navigation,
.woocommerce-active .site-header .main-navigation {
    display: none !important;
}
.handheld-navigation {
    display: none !important;
}

/* Gray sub-header bar */
.aps-sub-header {
    width: 100%;
    background: #f5f5f5;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.aps-sub-header__inner {
    max-width: 71.75rem;
    margin: 0 auto;
    padding: 0 2.617924rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.aps-sub-header__nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.aps-sub-header__link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.aps-sub-header__link:hover,
.aps-sub-header__link:focus {
    color: #0062b5;
    text-decoration: underline;
}

.aps-sub-header__cart {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    transition: color 0.15s;
}
.aps-sub-header__cart:hover,
.aps-sub-header__cart:focus {
    color: #0062b5;
}

.aps-sub-header__cart-total {
    font-weight: 600;
}
.aps-sub-header__cart-count {
    color: #666;
    font-size: 13px;
}
.aps-sub-header__cart-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

@media (max-width: 768px) {
    .aps-sub-header__inner {
        justify-content: center;
        gap: 14px;
    }
    .aps-sub-header__nav {
        gap: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .aps-sub-header__cart-count {
        display: none;
    }
}
@media (max-width: 480px) {
    .aps-sub-header { font-size: 13px; }
    .aps-sub-header__nav { gap: 10px; }
}

/* ===== END APS HEADER ===== */

/* Remove 68px gap between site header and MIPO sub-header bar
   (Storefront default: margin-bottom: 4.236em on .site-header) */
.site-header {
    margin-bottom: 0 !important;
}

/* ===== APS CUSTOM SEARCH BAR (variant A minimalistic) ===== */

.site-header .site-search {
    max-width: 320px;
    width: 100%;
}

.site-header .site-search .widget.woocommerce.widget_product_search {
    margin: 0;
    padding: 0;
}

.site-header .site-search .widget_product_search {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0;
}

.site-header .site-search .widget_product_search .search-field {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fafafa;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 16px 16px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
}

.site-header .site-search .widget_product_search .search-field::placeholder {
    color: #999;
    opacity: 1;
}

.site-header .site-search .widget_product_search .search-field:focus {
    border-color: #0062b5;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 98, 181, 0.12);
}

.site-header .site-search .widget_product_search .search-field:hover:not(:focus) {
    border-color: #bbb;
}

.site-header .site-search .widget_product_search button[type="submit"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 768px) {
    .site-header .site-search {
        max-width: 100%;
    }
}

/* ===== END APS CUSTOM SEARCH ===== */

/* ===== APS TOPBAR ===== */
.aps-topbar {
    width: 100%;
    background: #2c2d33;
    border-bottom: 1px solid #3d3e45;
    font-size: 13px;
    line-height: 1;
    position: relative;
    z-index: 1000;
}
.aps-topbar__inner {
    max-width: 71.75rem;
    margin: 0 auto;
    padding: 0 2.617924rem;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.aps-topbar__slogan {
    font-weight: 600;
    color: #b0b2b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aps-topbar__contacts {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 16px;
}
.aps-topbar__contact {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}
.aps-topbar__contact:hover {
    color: #4da3ff;
    text-decoration: none;
}
.aps-topbar__icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: currentColor;
}
.aps-topbar__sep {
    width: 1px;
    height: 16px;
    background: #4a4b52;
    display: inline-block;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .aps-topbar__slogan {
    font-weight: 600;
        display: none;
    }
    .aps-topbar__inner {
        justify-content: flex-end;
        padding: 0 1rem;
    }
    .aps-topbar__text--email {
        display: none;
    }
}
@media (max-width: 480px) {
    .aps-topbar__contacts {
        gap: 8px;
    }
}
/* ===== END APS TOPBAR ===== */

/* ===== APS SEARCH ENHANCED ===== */

/* Header: flexbox row — logo vľavo, search vypĺňa zvyšok */
.site-header .col-full {
    display: flex;
    align-items: center;
}
.site-header .site-branding {
    flex-shrink: 0;
    margin-right: 40px;
}

/* Skryť secondary nav v hlavičke */
.site-header .secondary-navigation {
    display: none;
}

/* Search wrapper: flex row (label + widget) */
.site-header .site-search {
    flex: 1;
    max-width: none;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Label naľavo od search boxu */
.aps-search-label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}

/* Widget zaberie zvyšok priestoru */
.site-header .site-search .widget.woocommerce.widget_product_search {
    flex: 1;
}

/* Form: flex row (input + button vedľa seba) */
.site-header .site-search .widget_product_search,
.site-header .site-search .woocommerce-product-search {
    display: flex !important;
    align-items: stretch;
    width: 100%;
    position: static;
}

/* Input: bez pravého border-radius (button je pripojený) */
.site-header .site-search .widget_product_search .search-field {
    flex: 1;
    border-radius: 6px 0 0 6px;
    border-right: none;
    min-width: 0;
}

/* Button: viditeľný, modrý, s lupou */
.site-header .site-search .widget_product_search button[type="submit"] {
    position: static !important;
    width: 48px !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    border: none !important;
    background: #0062b5 !important;
    border-radius: 0 6px 6px 0 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: background 0.2s ease !important;
    font-size: 0 !important;
}
.site-header .site-search .widget_product_search button[type="submit"]::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
    background-repeat: no-repeat;
    background-size: 18px 18px;
}
.site-header .site-search .widget_product_search button[type="submit"]:hover {
    background: #00509a !important;
}

/* Tablet (768–1024px): label sa skryje */
@media (max-width: 1024px) {
    .aps-search-label {
        display: none;
    }
    .site-header .site-branding {
        margin-right: 24px;
    }
}

/* Mobile: search ide pod logo na celú šírku */
@media (max-width: 767px) {
    .site-header .col-full {
        flex-wrap: wrap;
    }
    .site-header .site-search {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    .site-header .site-branding {
        margin-right: 0;
    }
}
/* ===== END APS SEARCH ENHANCED ===== */

/* ===== APS SEARCH FIX: branding width override ===== */
.site-header .site-branding {
    width: auto !important;
    flex: 0 0 auto !important;
    max-width: none !important;
}
/* ===== END APS SEARCH FIX ===== */

/* ===== APS SEARCH FIX 2: hide escaped WooCommerce Font Awesome magnifier ::before ===== */
/* WooCommerce injects position:absolute ::before (Font Awesome icon) on the form.
   Without a relative-positioned ancestor it escapes to site-header. Fix: hide it
   (we use custom background-image magnifier on the input instead). */
.site-header .site-search .woocommerce-product-search::before {
    display: none !important;
    content: none !important;
}
/* Restore positioning context on widget div so any future absolute children stay contained */
.site-header .site-search .widget_product_search {
    position: relative !important;
}
/* ===== END APS SEARCH FIX 2 ===== */

/* ===== APS SEARCH FIX 3: override clip-path:inset(50%) on submit button ===== */
.site-header .site-search .widget_product_search button[type="submit"] {
    clip-path: none !important;
    overflow: visible !important;
}
/* ===== END APS SEARCH FIX 3 ===== */

/* ===== APS SEARCH PHASE 1 ===== */

/* ZMENA 1: Ohraničiť šírku search na max 560px */
.site-header .site-search {
    flex: 0 1 auto !important;
    max-width: 560px !important;
}

/* ZMENA 2: Farba tlačidla – svetlomodrá z loga AP */
.site-header .site-search .widget_product_search button[type="submit"] {
    background: #1a9fdb !important;
}
.site-header .site-search .widget_product_search button[type="submit"]:hover {
    background: #0d8dd6 !important;
}

/* ZMENA 3: Odstrániť lupu vo vnútri input poľa, upraviť padding */
.site-header .site-search .widget_product_search .search-field {
    background-image: none !important;
    padding-left: 14px !important;
}

/* ===== END APS SEARCH PHASE 1 ===== */

/* APS SEARCH PHASE 1 FIX: správna flex hodnota pre search */
.site-header .site-search {
    flex: 1 1 auto !important;
    max-width: 560px !important;
}

/* ===== APS SEARCH PHASE 2 ===== */

/* ZMENA 4: Výraznejší label */
.aps-search-label {
    color: #222 !important;
    font-weight: 400 !important;
    font-size: 15px !important;
}

/* ZMENA 5: Väčšie zaoblenie + tieň + konzistentná výška 44px */
.site-header .site-search .widget_product_search {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.site-header .site-search .widget_product_search .search-field {
    border-radius: 8px 0 0 8px !important;
    height: 44px !important;
    box-sizing: border-box !important;
}
.site-header .site-search .widget_product_search button[type="submit"] {
    border-radius: 0 8px 8px 0 !important;
    height: 44px !important;
    width: 52px !important;
}

/* ===== END APS SEARCH PHASE 2 ===== */

/* ===== APS SEARCH RIGHT-ALIGN ===== */
.site-header .site-search {
    flex: 0 1 560px !important;
    margin-left: auto !important;
}
@media (max-width: 767px) {
    .site-header .site-search {
        flex: 1 1 auto !important;
        margin-left: 0 !important;
        width: 100% !important;
    }
}
/* ===== END APS SEARCH RIGHT-ALIGN ===== */

/* === UVP cenové zobrazenie (§ 7 compliant) === */
.mipo-uvp-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0;
}

.mipo-uvp-label {
    font-size: 12px;
    color: #888;
    line-height: 1.3;
}

.mipo-uvp-price {
    color: #888;
    font-weight: 400;
    text-decoration: none;
}

.mipo-our-price {
    font-size: 28px;
    font-weight: 600;
    color: #c0392b;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.mipo-our-price .woocommerce-price-suffix,
.mipo-suffix {
    font-size: 12px;
    color: #999;
    font-weight: 400;
    margin-left: 6px;
    letter-spacing: 0;
}

.mipo-savings {
    display: inline-block;
    align-self: flex-start;
    font-size: 12px;
    color: #1e7e34;
    font-weight: 600;
    background: #e8f5e9;
    padding: 3px 10px;
    border-radius: 4px;
    margin-top: 2px;
}

/* Na karte v loop-e mierne menšie kvôli priestoru */
.products .mipo-our-price,
ul.products .mipo-our-price {
    font-size: 22px;
}
.products .mipo-uvp-label,
ul.products .mipo-uvp-label {
    font-size: 11px;
}
.products .mipo-savings,
ul.products .mipo-savings {
    font-size: 11px;
    padding: 2px 8px;
}

/* V loop-e centrujeme cenový blok so zvyškom karty */
.products .mipo-uvp-box,
ul.products .mipo-uvp-box {
    align-items: center;
    text-align: center;
}

.products .mipo-savings,
ul.products .mipo-savings {
    align-self: center;
}

/* === Hero pás pre kategóriu === */
.mipo-hero {
    background: #0062b5;
    padding: 16px 0;
    margin: 0 0 16px 0;
    width: 100%;
}
.mipo-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}
.mipo-hero-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}
.mipo-hero-title-lg {
    font-size: 28px;
}
.mipo-hero-title-md {
    font-size: 24px;
}
.mipo-hero-title-sm {
    font-size: 20px;
}
.mipo-hero-subtitle {
    color: #DCEDFB;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
    letter-spacing: 0.01em;
}
@media (max-width: 768px) {
    .mipo-hero {
        padding: 12px 0;
        margin-bottom: 10px;
    }
    .mipo-hero-title {
        font-size: 22px;
    }
    .mipo-hero-title-lg {
        font-size: 22px;
    }
    .mipo-hero-title-md {
        font-size: 19px;
    }
    .mipo-hero-title-sm {
        font-size: 16px;
    }
    .mipo-hero-subtitle {
        font-size: 14px;
    }
}
