/*
 Theme Name:   Astra Child - IKO B2B
 Theme URI:    https://wpastra.com/
 Description:  Motyw potomny Astra dla sklepu B2B IKO
 Author:       IKO
 Author URI:   https://iko.pl/
 Template:     astra
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  astra-child
*/

/* ── WooCommerce – białe tło strony ── */
body.woocommerce,
body.woocommerce-page,
body.tax-product_cat,
body.post-type-archive-product {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    font-family: 'Outfit', sans-serif;
}
body.woocommerce h1,
body.woocommerce h2,
body.woocommerce h3,
body.woocommerce p,
body.woocommerce-page h1,
body.woocommerce-page h2,
body.woocommerce-page p,
body.tax-product_cat h1,
body.tax-product_cat p {
    color: #1a1a1a !important;
}

/* ── Granatowy header sklepu ── */
body.woocommerce .site-header,
body.woocommerce-page .site-header,
body.tax-product_cat .site-header,
body.post-type-archive-product .site-header {
    background-color: #0b1220 !important;
}
body.woocommerce .site-header a,
body.woocommerce .site-header .site-title,
body.woocommerce-page .site-header a,
body.woocommerce-page .main-header-menu a,
body.tax-product_cat .site-header a {
    color: #ffffff !important;
}
body.woocommerce .site-header .main-header-menu a:hover,
body.woocommerce-page .main-header-menu a:hover {
    color: #2e6bc6 !important;
}

/* ── Kontener – pełna szerokość ── */
body.woocommerce .ast-container,
body.woocommerce-page .ast-container,
body.tax-product_cat .ast-container {
    max-width: 100% !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

/* ── IKO Shop Layout ── */
.iko-shop-layout {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
}
.iko-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    position: sticky;
    top: 6rem;
}
.iko-sidebar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}
.iko-cat-tree,
.iko-cat-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.iko-cat-tree > li {
    margin-bottom: 2px;
}
.iko-cat-tree > li > a {
    display: block;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0b1220;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.iko-cat-tree > li > a:hover,
.iko-cat-tree > li.active > a {
    background: #eff6ff;
    color: #2e6bc6;
}
.iko-cat-tree ul {
    padding-left: 0.75rem;
    margin-top: 2px;
    display: none;
}
.iko-cat-tree li.active > ul {
    display: block;
}
.iko-cat-tree ul li a {
    display: block;
    padding: 0.3rem 0.65rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 5px;
    transition: color 0.15s, background 0.15s;
}
.iko-cat-tree ul li a:hover,
.iko-cat-tree ul li.active a {
    color: #2e6bc6;
    background: #eff6ff;
}
.iko-shop-content {
    flex: 1;
    min-width: 0;
}

/* ── Breadcrumbs ── */
.woocommerce-breadcrumb {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.8rem !important;
    color: #9ca3af !important;
    margin-bottom: 0.5rem !important;
    padding: 0 !important;
}
.woocommerce-breadcrumb a {
    color: #2e6bc6 !important;
    text-decoration: none;
}
.woocommerce-breadcrumb a:hover {
    color: #1d4ed8 !important;
}

/* ── Tytuł strony ── */
.woocommerce-products-header__title,
.page-title,
.term-description {
    font-family: 'Outfit', sans-serif !important;
}
.woocommerce-products-header__title,
.page-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #0b1220 !important;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem !important;
}

/* ── Sortowanie i count ── */
.woocommerce-result-count,
.woocommerce-ordering select {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #6b7280;
}
.woocommerce-ordering select {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    background: #fff;
}

/* ── Karty produktów ── */
.woocommerce ul.products li.product {
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 1rem !important;
    background: #fff !important;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s !important;
}
.woocommerce ul.products li.product:hover {
    border-color: #2e6bc6 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(46,107,198,0.1) !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #0b1220 !important;
}
.woocommerce ul.products li.product .price {
    color: #2e6bc6 !important;
    font-weight: 700 !important;
}
.woocommerce ul.products li.product .button {
    background: #2e6bc6 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    padding: 10px 20px !important;
    transition: background 0.2s !important;
}
.woocommerce ul.products li.product .button:hover {
    background: #1d4ed8 !important;
}

/* ── Info / brak produktów ── */
.woocommerce-info {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb !important;
    border-left: 4px solid #2e6bc6 !important;
    border-top: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    color: #4b5563 !important;
    font-family: 'Outfit', sans-serif;
    padding: 1rem 1.25rem !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.woocommerce-info::before {
    color: #2e6bc6 !important;
    font-size: 1.2rem;
}

/* ── Kafelki kategorii (fallback) ── */
.iko-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 2rem 0 3rem;
    width: 100%;
}
.iko-cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: #0b1220;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    transition: border-color 0.2s, transform 0.15s;
}
.iko-cat-tile:hover {
    border-color: #2e6bc6;
    color: #2e6bc6;
    transform: translateY(-2px);
}
.iko-cat-tile img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 1rem;
    opacity: 0.6;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    body.woocommerce .ast-container,
    body.woocommerce-page .ast-container,
    body.tax-product_cat .ast-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .iko-shop-layout {
        flex-direction: column;
    }
    .iko-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 1rem;
    }
    .iko-cat-tree {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .iko-cat-tree > li > a {
        font-size: 0.78rem;
        padding: 0.35rem 0.6rem;
    }
    .iko-cat-tree ul {
        display: none !important;
    }
    .woocommerce-products-header__title,
    .page-title {
        font-size: 1.4rem !important;
    }
}
