/*
Theme Name: Promo Sklep Theme
Theme URI: https://promosklep.pl
Author: Promo Sklep Team
Author URI: https://promosklep.pl
Description: Nowoczesny motyw dla sklepu WooCommerce z unikalnym designem.
Version: 1.0.0
Text Domain: promo-sklep-theme
*/

/* --- ZMIENNE KOLORYSTYCZNE --- */
:root {
    --primary-color: #233a95;
    /* Niebieski */
    --secondary-color: #F8C519;
    /* Żółty */
    --text-color: #000000;
    --text-light: #555555;
    --bg-gray: #f5f5f5;
    --border-color: #e5e5e5;
    --white: #ffffff;
}

/* --- OGÓLNE --- */
.woocommerce {
    font-family: "Inter", sans-serif;
    color: var(--text-color);
}

.woocommerce a {
    color: var(--text-color);
    transition: color 0.2s;
}

.woocommerce a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* --- PRZYCISKI (Buttons) --- */
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    border-radius: 50px !important;
    /* Tabletka */
    padding: 12px 30px !important;
    font-weight: 600 !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover {
    background-color: #1a2b75 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(35, 58, 149, 0.3);
}

.woocommerce a.button.alt {
    background-color: var(--secondary-color) !important;
    color: var(--text-color) !important;
}

.woocommerce a.button.alt:hover {
    background-color: #e0b115 !important;
}

/* --- SALE BADGE --- */
.woocommerce span.onsale {
    background-color: var(--secondary-color) !important;
    color: var(--text-color) !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    padding: 5px 12px !important;
    min-height: auto !important;
    line-height: 1.2 !important;
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    right: auto !important;
    font-size: 14px !important;
    z-index: 9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- SIATKA PRODUKTÓW (Shop Archive) --- */
.woocommerce ul.products li.product {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.3s ease;
    text-align: center;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.woocommerce ul.products li.product img {
    border-radius: 4px;
    margin-bottom: 15px !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px;
    font-weight: 600;
    padding: 10px 0 5px;
    color: var(--text-color);
}

.woocommerce ul.products li.product .price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
    display: block;
    margin-bottom: 15px;
}

.woocommerce ul.products li.product .price del {
    color: #999;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.7;
}

.woocommerce ul.products li.product .button {
    width: 100%;
    margin-top: auto;
    background-color: var(--secondary-color) !important;
    color: var(--text-color) !important;
}

.woocommerce ul.products li.product .button:hover {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
}

/* --- POJEDYNCZY PRODUKT (Single Product) --- */

/* Base Styles (Desktop default usually, but we will be specific) */
.woocommerce div.product .product_title {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.woocommerce div.product p.price {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 20px;
}

.woocommerce div.product p.price ins {
    text-decoration: none;
    font-weight: 700;
    color: #000;
    background: var(--secondary-color);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Custom Quantity Wrapper Styling */
.quantity-wrapper-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.qty-select-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.qty-select-btn:hover,
.qty-select-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Fix for Input Wrapper */
.custom-qty-input {
    display: inline-flex;
    width: auto;
}



.qty-suffix {
    font-weight: 600;
    color: #555;
    margin-left: 2px;
    font-size: 14px;
}

/* DESKTOP (min-width: 769px) - Left Align */
@media (min-width: 769px) {

    .woocommerce div.product .product_title,
    .woocommerce div.product p.price {
        text-align: left;
    }

    .quantity-wrapper-custom {
        justify-content: flex-start;
    }

    .woocommerce div.product form.cart {
        text-align: left;
        display: block;
        /* Standard block layout */
    }

    .woocommerce div.product form.cart button.button {
        /* Keep button width auto or fixed if needed, but left aligned */
        margin-left: 0;
    }
}

/* MOBILE / TABLET (max-width: 768px) - Center Align */
@media (max-width: 768px) {

    .woocommerce div.product .product_title,
    .woocommerce div.product p.price {
        text-align: center;
    }

    .quantity-wrapper-custom {
        justify-content: center;
    }

    .woocommerce div.product form.cart {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Make Add to Cart button full width or centered wide */
    .woocommerce div.product form.cart .button {
        width: 100%;
        max-width: 300px;
        /* Optional cap */
        justify-content: center;
    }

    .grocery-product-summary .quantity input.qty-visible {
        width: 90px;
        font-size: 16px;
    }
}

/* Karty (Tabs - Opis, Opinie) */
.woocommerce div.product .woocommerce-tabs ul.tabs li {
    border: 1px solid var(--border-color);
    background-color: var(--bg-gray);
    border-radius: 8px 8px 0 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    background-color: var(--white);
    border-bottom-color: var(--white);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    color: var(--text-color);
    font-weight: 600;
}

/* --- KOSZYK (Cart) --- */
.woocommerce-cart .woocommerce {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.woocommerce table.shop_table {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color) !important;
}

.woocommerce table.shop_table thead {
    background-color: var(--primary-color);
    color: var(--white);
}

.woocommerce table.shop_table th {
    padding: 15px !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

.woocommerce-cart table.cart img {
    width: 60px;
    border-radius: 4px;
}

/* Podsumowanie koszyka */
.cart-collaterals .cart_totals {
    background-color: var(--bg-gray);
    padding: 20px;
    border-radius: 8px;
}

.cart-collaterals .cart_totals h2 {
    font-size: 20px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Wiadomości (Alerty) */
.woocommerce-message,
.woocommerce-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    border: none;
    border-left: 4px solid #22c55e;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    color: #15803d;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 12px rgba(34, 197, 94, 0.1);
    animation: wc-msg-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5em;
    line-height: 1.5;
}

.woocommerce-error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
    color: #b91c1c;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.1);
}

.woocommerce-message::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.woocommerce-error::before {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.woocommerce-message a.button.wc-forward {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 8px 22px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 2px 8px rgba(35, 58, 149, 0.2);
    margin-left: auto;
    order: 2;
    white-space: nowrap;
}

.woocommerce-message a.button.wc-forward:hover {
    background: #1a2b75 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(35, 58, 149, 0.3);
}

@keyframes wc-msg-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {

    .woocommerce-message,
    .woocommerce-error {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 10px;
        border-left: none;
        border-top: 4px solid #22c55e;
        margin-left: 10px !important;
        margin-right: 10px !important;
        margin-bottom: 1.2em;
        width: auto !important;
        box-sizing: border-box;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .woocommerce-error {
        border-top-color: #ef4444;
    }

    .woocommerce-message::before,
    .woocommerce-error::before {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 13px;
        margin-right: 0;
        margin-bottom: 4px;
    }

    .woocommerce-message a.button.wc-forward {
        width: 100% !important;
        text-align: center !important;
        margin-left: 0;
        padding: 10px 20px !important;
        font-size: 14px !important;
        border-radius: 50px !important;
    }
}

@media (max-width: 480px) {

    .woocommerce-message,
    .woocommerce-error {
        padding: 12px 14px;
        font-size: 13px;
        gap: 10px;
        border-radius: 8px;
        margin: 0 8px 1em 8px;
    }

    .woocommerce-message::before,
    .woocommerce-error::before {
        width: 22px;
        height: 22px;
        min-width: 22px;
        font-size: 11px;
    }
}

/* --- CUSTOM FILTERS & GRID (MPF Shortcode) --- */



a.woocommerce-remove-coupon {
    font-weight: bold;
}

input#coupon_code {
    width: auto;
    padding: 12px 30px;
    border-radius: 50px;
    border: 1px solid #ccc;
    font-style: italic;
    font-size: 14px;
}


@media only screen and (max-width: 768px) {
    input#coupon_code {
        width: 100%;
        padding: 12px 30px;
        border-radius: 50px;
        border: 1px solid #ccc;
        font-style: italic;
        font-size: 14px;
        margin: 0 0 0.5rem 0;
    }
}

@media only screen and (max-width: 768px) {
    .woocommerce table.cart td.actions .coupon .input-text+.button {
        width: 100%;
    }
}

@media only screen and (max-width: 768px) {
    .woocommerce-page table.cart .product-thumbnail {
        display: block;
    }
}

@media only screen and (max-width: 768px) {
    .woocommerce td.product-thumbnail::before {
        content: none !important;
    }
}

@media only screen and (max-width: 768px) {
    .woocommerce-cart table.cart img {
        display: block;
        margin: 0 auto;
    }
}

.woocommerce .quantity .qty {
    border-radius: 50px;
    border: 1px solid #ccc;
    font-size: 14px;
    width: 3.631em;
    text-align: center;
}

a.showcoupon {
    text-decoration: underline !important;
}

.woocommerce table.shop_table thead th {
    color: white !important;
}

.woocommerce-info {
    /* Aktywne style */
    margin: 0 0 2em;
    position: relative;
    background-color: #f6f5f8;
    color: #515151;
    list-style: none outside;
    width: auto;
    word-wrap: break-word;

    /* Reset wszystkiego, co było zakomentowane */
    border: none;
    padding: 0;
    border-radius: 0;
}

.woocommerce-info::before {
    content: none !important;
}

/* --- Karuzela Produktów CSS --- */

/* 1. Ustawienie listy w jednej linii (Flexbox) */
ul.products.custom-carousel-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    /* Blokuje łamanie do nowej linii */
    overflow-x: auto;
    /* Włącza przewijanie poziome */
    gap: 20px;
    /* Odstęp między produktami */
    padding-bottom: 20px;
    /* Miejsce na cień/hover */
    scroll-snap-type: x mandatory;
    /* Efekt przyciągania (magnetyczny scroll) */
    -webkit-overflow-scrolling: touch;
    /* Płynne przewijanie na iOS */
    margin-bottom: 0 !important;
    cursor: grab;
    user-select: none;
    scroll-behavior: smooth;
}

ul.products.custom-carousel-list:active {
    cursor: grabbing;
}

/* 2. Stylizacja pojedynczego produktu (elementu listy) */
ul.products.custom-carousel-list li.product {
    flex: 0 0 calc(25% - 15px);
    /* KOMPUTER: 4 produkty (25% minus odstępy) */
    width: calc(25% - 15px);
    margin: 0 !important;
    /* Reset marginesów motywu */
    float: none !important;
    /* Reset stylów starego typu */
    scroll-snap-align: start;
    /* Produkt "przykleja się" do lewej krawędzi */
}

/* 3. Ukrywanie paska przewijania (Scrollbar) - opcjonalne */
ul.products.custom-carousel-list::-webkit-scrollbar {
    height: 6px;
    /* Możesz ustawić 0px, żeby całkiem ukryć */
}

ul.products.custom-carousel-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

ul.products.custom-carousel-list {
    scrollbar-width: thin;
    /* Firefox */
}

/* --- RESPONSYWNOŚĆ (RWD) --- */

/* Tablet (ekrany mniejsze niż 1024px) - 3 produkty */
@media (max-width: 1024px) {
    ul.products.custom-carousel-list li.product {
        flex: 0 0 calc(33.333% - 14px);
        width: calc(33.333% - 14px);
    }
}

/* Duży Telefon (ekrany mniejsze niż 768px) - 2 produkty */
@media (max-width: 768px) {
    ul.products.custom-carousel-list li.product {
        flex: 0 0 calc(50% - 10px);
        width: calc(50% - 10px);
    }
}

/* Mały Telefon (ekrany mniejsze niż 480px) - 1.5 produktu (żeby zachęcić do scrollowania) */
@media (max-width: 480px) {
    ul.products.custom-carousel-list li.product {
        /* Ustawiamy np. 70%, żeby było widać kawałek następnego produktu */
        flex: 0 0 70%;
        width: 70%;
    }
}

/* =========================================
   1. STYL DLA KOMPUTERÓW (Powyżej 768px)
   ========================================= */
@media (min-width: 769px) {

    /* Siatka produktów - szerokość i centrowanie */
    .woocommerce ul.products.columns-3 {
        max-width: 1200px;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 20px;
        float: none;
        width: 100%;
    }

    /* Licznik wyników - dopasowanie do krawędzi siatki */
    .woocommerce .woocommerce-result-count {
        margin-left: calc((100% - 1200px) / 2 + 20px) !important;
    }

    /* Sortowanie - dopasowanie do krawędzi siatki */
    .woocommerce .woocommerce-ordering {
        margin-right: calc((100% - 1200px) / 2 + 20px) !important;
    }
}

/* Bezpiecznik dla mniejszych laptopów */
@media (min-width: 769px) and (max-width: 1240px) {
    .woocommerce .woocommerce-result-count {
        margin-left: 20px !important;
    }

    .woocommerce .woocommerce-ordering {
        margin-right: 20px !important;
    }
}

/* =========================================
   2. STYL DLA TELEFONÓW (Poniżej 769px)
   ========================================= */
@media (max-width: 768px) {

    .woocommerce .woocommerce-result-count,
    .woocommerce .woocommerce-ordering {
        float: none !important;
        width: 100% !important;
        text-align: center !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
        display: block;
    }

    .woocommerce .woocommerce-ordering select {
        margin: 0 auto !important;
        display: inline-block;
        width: auto;
        /* Aby nie był za szeroki na mobile, chyba że wolisz 100% */
        min-width: 200px;
    }
}

/* =========================================
   3. STYLOWANIE SELEKTORA (Ordering)
   ========================================= */
/* Stosujemy Twoje style .mpf-input do selecta w WooCommerce */
.woocommerce .woocommerce-ordering select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* Tło i ikona strzałki */
    background-color: #f5f5f5;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;

    /* Ramka i kształt */
    box-sizing: border-box;
    padding: 10px 35px 10px 15px;
    /* Większy prawy padding na strzałkę */
    border: 1px solid #e5e5e5;
    border-radius: 50px;

    /* Typografia */
    font-size: 14px;
    color: #000;
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
}

.woocommerce .woocommerce-ordering select:focus {
    border-color: #bbb;
    /* Delikatna zmiana przy kliknięciu */
}


.woocommerce .woocommerce-result-count {
    margin: 1em 0 1em;
}

.woocommerce .woocommerce-ordering {
    margin: 1em 0 1em;
}

/* ==========================================================================
   STYLES EXTRACTED FROM PHP FILES
   ========================================================================== */

/* --- FROM HEADER.PHP --- */

/* --- 1. FONTY I BAZA --- */
body {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    color: var(--text-color);
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

button {
    font-family: inherit;
}

/* --- 2. PASEK MARQUEE --- */
.promo-marquee-wrapper {
    background-color: var(--secondary-color);
    color: var(--text-color);
    overflow: hidden;
    padding: 10px 0;
    font-size: 14px;
}

.promo-marquee-content {
    display: flex;
    gap: 200px;
    width: max-content;
    animation: scroll-left 60s linear infinite;
}

.promo-item {
    white-space: nowrap;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* --- 3. GŁÓWNY HEADER --- */
.site-header-main {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 20px;
    position: relative;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    min-height: 50px;
}

/* --- LOGO (Centrowanie Absolutne) --- */
.site-branding {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.site-branding svg {
    width: 70px;
    height: auto;
    display: block;
}

.site-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    pointer-events: auto;
}

/* --- 4. HAMBURGER I MENU (Fix: Używamy ID #site-nav-container dla siły przebicia) --- */

/* Checkbox sterujący */
#mobile-menu-toggle {
    display: none;
}

/* Ikona Hamburgera */
.nav-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-color);
    user-select: none;
    height: 44px;
    width: 44px;
    position: relative;
    z-index: 50;
}

/* Kontener Menu (Drawer) - Używamy ID, aby nadpisać klasy WP */
#site-nav-container {
    /* FIX: Wymuszenie fixed i tła niezależnie od szerokości ekranu (do 900px) */
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    z-index: 999999 !important;
    padding: 0;
    display: flex;
    flex-direction: column;

    /* FIX: Twarde wymuszenie białego tła */
    background-color: #ffffff !important;
    color: var(--text-color) !important;

    /* Stan domyślny: Ukryte */
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

/* LOGIKA OTWIERANIA (CSS) */
#mobile-menu-toggle:checked~#site-nav-container {
    transform: translateX(0);
    visibility: visible;
}

/* Overlay (Tło przyciemniające) */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    backdrop-filter: blur(2px);
}

#mobile-menu-toggle:checked~.menu-overlay {
    opacity: 1;
    visibility: visible;
}

/* Nagłówek Drawera */
.drawer-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.menu-title-mobile {
    font-weight: 700;
    font-size: 18px;
    color: #333;
    margin-left: 10px;
}

.nav-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #333;
    display: block;
}

/* Lista Menu */
.menu-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 10px 0;
}

.menu-item {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f9f9f9;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item>a {
    font-size: 16px;
    font-weight: 600;
    flex-grow: 1;
    color: var(--text-color);
    display: block;
    order: 1;
    padding: 14px 16px;
    font-family: 'Inter', sans-serif;
}

/* Przycisk Dropdown (Mobile) */
.dropdown-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px 16px;
    margin: 0;
    min-width: 50px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    border-left: 1px solid #f5f5f5;
    order: 2;
    flex-shrink: 0;
}

.dropdown-toggle-btn svg {
    transition: transform 0.3s ease;
    stroke: #000000;
    transform-origin: center;
    display: block;
}

.menu-item.is-open>.dropdown-toggle-btn svg {
    transform: rotate(180deg);
}

/* Podmenu (Mobile) */
.sub-menu {
    width: 100%;
    display: none;
    background: #fafafa;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    order: 3;
    flex-basis: 100%;
}

.sub-menu .menu-item {
    border-bottom: 1px solid #eee;
    padding-left: 0;
}

.sub-menu .menu-item>a {
    font-weight: 600;
    font-size: 15px;
    color: #555;
    padding: 14px 16px 14px 35px;
    font-family: 'Inter', sans-serif;
}

.menu-item.is-open>.sub-menu {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- DESKTOP (Powyżej 900px) --- */
@media (min-width: 900px) {

    .nav-toggle-btn,
    .drawer-header,
    .menu-overlay {
        display: none !important;
    }

    /* Reset stylów mobilnych na desktopie za pomocą ID */
    #site-nav-container {
        position: static !important;
        display: block;
        background: none !important;
        padding: 0;
        width: auto;
        height: auto;
        max-width: none;
        overflow: visible;
        transform: none;
        visibility: visible;
        box-shadow: none;
        border: none;
        z-index: auto !important;
    }

    /* LOGO DESKTOP */
    .site-branding {
        pointer-events: auto;
    }

    .site-branding svg {
        height: 70px;
    }

    .site-title {
        font-size: 24px;
    }

    .menu-list {
        flex-direction: row;
        gap: 30px;
        align-items: center;
        border: none;
        padding: 0;
        overflow: visible;
    }

    .menu-item {
        border: none;
        flex-wrap: nowrap;
        padding: 0;
        margin: 0;
    }

    .menu-item>a {
        font-size: 16px;
        font-weight: 500;
        position: relative;
    }

    .dropdown-toggle-btn {
        display: none;
    }

    /* Strzałka Desktopowa (CSS) */
    .menu-item-has-children>a {
        padding-right: 20px;
    }

    .menu-item-has-children>a::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--text-color);
        border-bottom: 2px solid var(--text-color);
        transform: translateY(-60%) rotate(45deg);
        transition: transform 0.2s, border-color 0.2s;
    }

    .menu-item-has-children:hover>a::after {
        border-color: var(--primary-color);
        transform: translateY(-60%) rotate(225deg);
    }

    /* Dropdown Desktop */
    .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: #ffffff;
        min-width: 240px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
        border: 1px solid #eaeaea;
        border-top: 3px solid var(--primary-color);
        border-radius: 0 0 4px 4px;
        padding: 10px 0;
        z-index: 200;
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px);
        transition: all 0.25s cubic-bezier(0.2, 0.6, 0.3, 1);
        order: unset;
        flex-basis: auto;
    }

    .menu-item:hover>.sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .sub-menu .menu-item {
        padding: 0;
        display: block;
        border-bottom: none;
    }

    .sub-menu .menu-item>a {
        padding: 12px 25px;
        width: 100%;
        font-size: 15px;
        color: #444;
        transition: all 0.2s;
        border-bottom: 1px solid #f5f5f5;
    }

    .sub-menu .menu-item>a:hover {
        background-color: #f8f9fa;
        color: var(--primary-color);
        padding-left: 30px;
    }

    .sub-menu .sub-menu {
        top: -3px;
        left: 100%;
        margin-left: 0;
        border-top: 3px solid var(--primary-color);
    }
}

/* --- WYSZUKIWARKA + TELEFON --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.header-search {
    position: relative;
    max-width: 240px;
}

@media(min-width: 900px) {
    .header-actions {
        max-width: 50%;
    }

    .header-search {
        width: 200px;
    }
}


.search-input {
    width: 100%;
    padding: 8px 40px 8px 15px;
    border-radius: 50px;
    border: 1px solid #ccc;
    font-style: italic;
    font-size: 14px;
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    color: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* --- TOP BAR (TELEFON) --- */
.header-phone-bar {
    background: var(--primary-color);
    color: #ffffff;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
}

.header-phone-bar a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.header-phone-bar a:hover {
    opacity: 0.9;
    text-decoration: underline;
}

.header-phone-bar strong {
    font-weight: 700;
    margin-left: 5px;
}



/* --- KOSZYK --- */
.header-cart {
    position: relative;
    z-index: 50;
    /* Tak samo wysoko jak hamburger */
}

.header-cart a {
    position: relative;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .header-inner {
        flex-wrap: wrap;
        min-height: 60px;
    }

    .header-actions {
        order: 3;
        width: 100%;
        margin-top: 10px;
        gap: 6px;
        flex-wrap: wrap;
    }

    .header-search {
        width: 100%;
        max-width: none;
    }

    .header-phone-btn {
        width: 100%;
        justify-content: center;
    }

    .site-branding {
        top: 0;
        transform: translateX(-50%);
    }

    .site-branding svg {
        width: 60px !important;
        height: auto !important;
    }
}

/* --- FROM FOOTER.PHP --- */

/* Reset i podstawowe ustawienia kontenera stopki */
.site-footer-wrapper {
    font-family: "Inter", "Public Sans", sans-serif;
    background-color: #f7f8fd;
    color: #242424;
    font-size: 16px;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

.site-footer-wrapper *,
.site-footer-wrapper *::before,
.site-footer-wrapper *::after {
    box-sizing: border-box;
}

/* Układ główny */
.footer-main-section {
    padding: 80px 20px;
    max-width: 1260px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

/* Kolumny */
.footer-col-left {
    flex: 1 1 250px;
    max-width: 300px;
}

.footer-col-right {
    flex: 2 1 500px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: flex-end;
}

/* Lewa kolumna: Logo i Sociale */
.footer-site-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #242424;
}

.footer-site-title a {
    text-decoration: none;
    color: inherit;
}

.footer-tagline {
    font-size: 15px;
    font-weight: 500;
    color: #242424;
    margin-bottom: 24px;
}

/* Ikony Social Media */
.footer-socials {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #242424;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.footer-social-link:hover {
    transform: scale(1.1);
}

.footer-social-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Prawa sekcja: Menu i Kontakt */
.footer-menu-column {
    flex: 1 1 150px;
}

.footer-contact-column {
    flex: 1 1 300px;
    max-width: 350px;
}

/* Menu WordPress (wp_nav_menu) */
.footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu ul li {
    margin-bottom: 10px;
}

.footer-menu ul li a {
    padding: 8px 0;
    text-decoration: none;
    color: #4C4C4C;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.footer-menu ul li a:hover {
    color: var(--primary-color);
}

/* Nagłówki sekcji */
.footer-heading {
    font-size: 16px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: #242424;
}

/* Tekst kontaktowy */
.footer-address {
    font-size: 15px;
    font-weight: 500;
    color: #242424;
    margin-bottom: 30px;
}

.footer-address a {
    color: inherit;
    text-decoration: none;
}

/* Box Infolinii */
.hotline-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.hotline-icon img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.hotline-text small {
    display: block;
    font-size: 12px;
    color: #4C4C4C;
    font-weight: 400;
}

.hotline-text strong {
    display: block;
    font-size: 16px;
    color: #242424;
    font-weight: 600;
}

/* Dolny pasek (Copyright) */
.site-footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #f7f8fd;
    padding: 24px 20px;
}

.footer-bottom-container {
    max-width: 1260px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.copyright-text {
    font-size: 15px;
    color: #4C4C4C;
    margin: 0;
}

.payment-icons img {
    height: 25px;
    width: auto;
}

/* Responsywność */
@media (max-width: 768px) {
    .footer-main-section {
        flex-direction: column;
        padding: 40px 20px;
    }

    .footer-col-right {
        justify-content: flex-start;
    }

    .footer-bottom-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-col-left {
        flex: 1 1;
        max-width: 300px;
    }

}

/* --- FROM SINGLE-PRODUCT.PHP --- */

/* ====================================
   POWIADOMIENIA (TOAST)
==================================== */
.grocery-toast-notices {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    width: 100%;
    max-width: 400px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.grocery-toast-notices .woocommerce-message::before,
.grocery-toast-notices .woocommerce-info::before,
.grocery-toast-notices .woocommerce-error::before {
    display: none !important;
    content: none !important;
}

.grocery-toast-notices .woocommerce-message,
.grocery-toast-notices .woocommerce-info,
.grocery-toast-notices .woocommerce-error {
    pointer-events: auto;
    background-color: #fff;
    color: #333;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: none;
    border-left: 5px solid var(--primary-color);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    animation: grocerySlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 0 !important;
}

@keyframes grocerySlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.grocery-toast-notices .woocommerce-error {
    border-left-color: #d32f2f;
}

.grocery-toast-notices .button {
    margin-left: 15px !important;
    background-color: #f5f5f5 !important;
    color: var(--primary-color) !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    border: 1px solid #eee !important;
    text-transform: none !important;
}

.grocery-toast-notices .button:hover {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

/* ====================================
   LAYOUT GŁÓWNY
==================================== */
.grocery-product-page-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Inter', sans-serif;
    color: #333;
}

/* Breadcrumbs */
.grocery-breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
    color: #777;
}

.grocery-breadcrumbs a {
    color: #555;
    text-decoration: none;
}

.grocery-breadcrumbs a:hover {
    color: var(--primary-color);
}

/* Grid Layout - Desktop */
.grocery-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Fix szerokości zdjęcia */
.woocommerce div.product div.images,
.woocommerce-page div.product div.images {
    float: none !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

.woocommerce div.product div.summary,
.woocommerce-page div.product div.summary {
    float: none !important;
    width: 100% !important;
}

/* ====================================
   GALERIA
==================================== */
.grocery-product-gallery {
    position: relative;
}

.woocommerce-product-gallery img {
    border-radius: 16px;
    width: 100%;
    height: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.grocery-product-gallery .onsale {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    background-color: var(--secondary-color);
    color: #000;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(248, 197, 25, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ====================================
   SUMMARY (PRAWA KOLUMNA) - DESKTOP
==================================== */
.grocery-product-summary {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

/* Tytuł produktu */
.grocery-product-summary .product_title {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 15px 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

/* Cena */
.grocery-product-summary .price {
    font-size: 32px;
    color: var(--primary-color);
    font-weight: 700;
    display: block;
    padding: 0;
    margin: 0;
}

.grocery-product-summary .price ins {
    text-decoration: none;
    color: #d32f2f;
}

.grocery-product-summary .price del {
    color: #aaa;
    font-size: 20px;
    margin-right: 12px;
    font-weight: 400;
}

/* ====================================
   FORMULARZ KOSZYKA - DESKTOP
==================================== */
.grocery-product-summary .summary.entry-summary {
    width: 100%;
}

.grocery-product-summary form.cart {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin: 0;
    border-radius: 16px;
}

/* Sekcja ilości */

.grocery-product-summary .quantity input.qty {
    width: 60px;
    height: 100%;
    border: 2px solid var(--border-color) !important;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    background: transparent;
    appearance: textfield;
    -moz-appearance: textfield;
    padding: 0;
    margin: 0;
}

.grocery-product-summary .quantity input.qty::-webkit-outer-spin-button,
.grocery-product-summary .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Przycisk Dodaj do koszyka - Desktop */
.grocery-product-summary button.single_add_to_cart_button {
    min-width: 250px;
    flex-grow: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a2d75 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0 35px;
    height: 54px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(35, 58, 149, 0.35);
    text-transform: none;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.grocery-product-summary button.single_add_to_cart_button:hover {
    background: linear-gradient(135deg, #1a2d75 0%, #0f1d4d 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(35, 58, 149, 0.45);
}

.grocery-product-summary button.single_add_to_cart_button:active {
    transform: translateY(0);
}

/* ====================================
   SEKCJA OPISU / TABS
==================================== */
.grocery-product-tabs {
    margin-bottom: 60px;
    border-top: 1px solid #eee;
}

.section-heading {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 700;
}

.product-description {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
}

/* ====================================
   PRODUKTY POWIĄZANE
==================================== */
.custom-products-wrapper {
    margin-top: 60px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.custom-products-wrapper .section-heading {
    margin-top: 0;
    margin-bottom: 30px;
}

/* ====================================
   RESPONSYWNOŚĆ - TABLET
==================================== */
@media (max-width: 992px) {
    .grocery-product-grid {
        gap: 40px;
    }

    .grocery-product-summary .product_title {
        font-size: 24px;
    }

    .grocery-product-summary .price {
        font-size: 28px;
    }
}

/* ====================================
   RESPONSYWNOŚĆ - MOBILE
==================================== */
@media (max-width: 768px) {
    .grocery-product-page-wrapper {
        margin: 20px auto;
        padding: 0 15px;
    }

    .grocery-product-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Galeria na mobile */
    .woocommerce-product-gallery img {
        border-radius: 12px;
    }

    /* Summary na mobile - wycentrowane */
    .grocery-product-summary {
        text-align: center;
        padding: 0;
    }

    .grocery-product-summary .product_title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .grocery-product-summary .price {
        font-size: 26px;
        display: flex;
        justify-content: center;
        align-items: baseline;
        gap: 8px;
    }

    .grocery-product-summary .price del {
        font-size: 16px;
    }

    /* Formularz na mobile - pionowy układ, wycentrowany */
    .grocery-product-summary form.cart {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        border-radius: 12px;
    }

    /* Ilość na mobile */


    .grocery-product-summary .quantity input.qty {
        width: 50px;
        font-size: 16px;
    }

    /* Przycisk na mobile - pełna szerokość, wycentrowany */
    .grocery-product-summary button.single_add_to_cart_button {
        width: 100%;
        max-width: 300px;
        height: 52px;
        font-size: 15px;
        border-radius: 10px;
        padding: 0 25px;
    }

    /* Toast na mobile */
    .grocery-toast-notices {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
        width: auto;
    }

    .grocery-toast-notices .woocommerce-message,
    .grocery-toast-notices .woocommerce-info,
    .grocery-toast-notices .woocommerce-error {
        font-size: 13px;
        padding: 12px 15px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        border-left: none;
        border-top: 4px solid var(--primary-color);
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        word-break: break-word;
    }

    .grocery-toast-notices .button {
        margin-left: 0 !important;
        width: 100% !important;
        text-align: center !important;
        padding: 10px 16px !important;
        border-radius: 50px !important;
        font-size: 13px !important;
        background-color: var(--primary-color) !important;
        color: #fff !important;
        border: none !important;
    }

    /* Sekcje dolne na mobile */
    .grocery-product-tabs {
        margin-bottom: 40px;
    }

    .section-heading {
        font-size: 20px;
        text-align: center;
    }

    .custom-products-wrapper {
        margin-top: 40px;
        padding-top: 30px;
    }
}

/* ====================================
   RESPONSYWNOŚĆ - MAŁE TELEFONY
==================================== */
@media (max-width: 480px) {
    .grocery-product-page-wrapper {
        padding: 0 12px;
    }

    .grocery-product-summary .product_title {
        font-size: 20px;
    }

    .grocery-product-summary .price {
        font-size: 24px;
    }


    .grocery-product-summary button.single_add_to_cart_button {
        max-width: 100%;
        height: 48px;
        font-size: 14px;
    }
}

/* ====================================
   DODATKOWE POPRAWKI WOOCOMMERCE
==================================== */
/* Reset domyślnych stylów WooCommerce */
.woocommerce div.product form.cart div.quantity {
    float: none !important;
    margin: 0 !important;
}

.woocommerce div.product form.cart .button {
    float: none !important;
}

/* Ukrycie ewentualnych dodatkowych elementów */
.grocery-product-summary .woocommerce-variation-add-to-cart {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    width: 100%;
}

@media (max-width: 768px) {
    .grocery-product-summary .woocommerce-variation-add-to-cart {
        flex-direction: column;
        align-items: center;
    }
}

/* --- FROM CHECKOUT/FORM-CHECKOUT.PHP --- */

/* --- BAZA I FONTY --- */
.grocery-checkout-wrapper {
    font-family: "Inter", sans-serif;
    color: #333;
    background-color: #fff;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Nagłówek */
.grocery-checkout-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    /* Primary Blue */
    margin-bottom: 30px;
    border-bottom: 2px solid #f5f5f5;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grocery-checkout-header .icon {
    font-size: 24px;
}

/* Układ Siatki (Grid/Flex) */
.grocery-checkout-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

/* Lewa kolumna (Formularze) */
.grocery-checkout-left {
    flex: 1 1 60%;
    /* 60% szerokości */
    min-width: 320px;
}

/* Prawa kolumna (Sticky) */
.grocery-checkout-right {
    flex: 1 1 35%;
    /* 35% szerokości */
    min-width: 300px;
    position: sticky;
    top: 20px;
    /* Przyklejanie do góry ekranu */
    z-index: 10;
}

/* Box prawej kolumny */
.grocery-order-review-box {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* --- TYPOGRAFIA FORMULARZA --- */
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3,
#order_review_heading {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Inputy i Etykiety */
.form-row {
    margin-bottom: 20px;
    padding: 0;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

.form-row .required {
    color: #d32f2f;
    text-decoration: none;
    margin-left: 4px;
}

.input-text,
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    /* Zaokrąglenie */
    font-size: 15px;
    color: #333;
    background-color: #fcfcfc;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-text:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(35, 58, 149, 0.1);
}

/* --- TABELA PODSUMOWANIA (Review Order) --- */
.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}

/* Nagłówek tabeli */
.woocommerce-checkout-review-order-table thead th {
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Nazwa produktu i ilość */
.woocommerce-checkout-review-order-table .product-name {
    color: #333;
    font-weight: 500;
}

.woocommerce-checkout-review-order-table .product-name strong {
    color: var(--primary-color);
    /* Kolor ilości */
}

/* Sumy */
.woocommerce-checkout-review-order-table tfoot th {
    font-weight: 600;
    color: #555;
}

.woocommerce-checkout-review-order-table tfoot td {
    text-align: right;
    font-weight: 700;
    color: #333;
}

/* Suma końcowa */
.woocommerce-checkout-review-order-table .order-total th {
    border-bottom: none;
    padding-top: 15px;
    font-size: 16px;
    color: #000;
}

.woocommerce-checkout-review-order-table .order-total td {
    border-bottom: none;
    padding-top: 15px;
    text-align: right;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
}

/* --- METODY PŁATNOŚCI --- */
#payment {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

#payment ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #eee;
}

#payment ul.payment_methods li {
    margin-bottom: 10px;
}

#payment ul.payment_methods li label {
    cursor: pointer;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Chmurka z opisem płatności */
#payment div.payment_box {
    position: relative;
    background-color: #eef2ff;
    color: var(--primary-color);
    padding: 12px;
    margin: 10px 0 15px;
    font-size: 13px;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

#payment div.payment_box::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 20px;
    border: 8px solid transparent;
    border-bottom-color: #eef2ff;
    display: block;
}

/* Przycisk "Kupuję i płacę" */
#place_order {
    width: 100%;
    background-color: var(--primary-color) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 16px !important;
    border-radius: 50px !important;
    /* Tabletka */
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(35, 58, 149, 0.3);
    margin-top: 10px;
}

#place_order:hover {
    background-color: #1a2b75 !important;
    transform: translateY(-2px);
}

/* Linki (Regulamin itp.) */
.woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 15px;
    font-size: 12px;
    color: #666;
}

.woocommerce-terms-and-conditions-wrapper a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .grocery-checkout-grid {
        flex-direction: column;
    }

    .grocery-checkout-left,
    .grocery-checkout-right {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .grocery-checkout-right {
        position: static;
        /* Wyłącz sticky na mobile */
    }

    .grocery-order-review-box {
        padding: 20px;
        /* Mniejszy padding na mobile */
    }
}

/* --- INLINE STYLES FROM FUNCTIONS/WOOCOMMERCE --- */
.grocery-wrapper-main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* --- SHOP ARCHIVE PAGE (STYLES FROM MPF ADAPTED) --- */

/* layout */
.shop-archive-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    font-family: "Inter", sans-serif;
    color: var(--text-color);
    margin-bottom: 40px;
}

.shop-archive-sidebar {
    width: 280px;
    flex: 0 0 280px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.shop-archive-products {
    flex: 1;
    position: relative;
    margin: 0 auto;
}

.shop-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* dropdown */
.shop-archive-dropdown {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    padding-bottom: 15px;
    background: transparent;
    border-radius: 0;
}

.shop-archive-dropdown:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.shop-archive-dropdown summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    padding-right: 20px;
    outline: none;
    background: transparent;
    border: none;
    padding-left: 0;
}

.shop-archive-dropdown summary::-webkit-details-marker {
    display: none;
}

.shop-archive-dropdown summary::after {
    content: "";
    position: absolute;
    right: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.shop-archive-dropdown[open] summary::after {
    transform: rotate(225deg);
    top: 10px;
}

.shop-archive-dropdown-inner {
    padding-top: 15px;
}

/* inputs */
.shop-archive-input {
    box-sizing: border-box;
    padding: 10px 15px;
    width: 100%;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-gray);
    font-size: 14px;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

.shop-archive-input:focus {
    border-color: var(--primary-color);
    background: var(--white);
}

select.shop-archive-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

input.shop-archive-input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: var(--primary-color);
    vertical-align: middle;
    border-radius: 4px;
    margin-bottom: 0;
}

/* categories */
.shop-archive-cat-list,
.shop-archive-cat-children {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.shop-archive-cat-list li {
    margin-bottom: 8px;
}

.shop-archive-cat-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
}

.shop-archive-cat-children {
    margin-left: 25px;
    margin-top: 5px;
    border-left: 2px solid var(--bg-gray);
    padding-left: 10px;
}

/* actions */
.shop-archive-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.shop-archive-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s;
}

#shop-archive-apply {
    background: var(--primary-color);
    color: var(--white);
}

#shop-archive-apply:hover {
    background: #1a2b75;
    transform: translateY(-1px);
}

#shop-archive-clear {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

#shop-archive-clear:hover {
    background: var(--bg-gray);
    color: var(--text-color);
}

/* pagination */
.shop-archive-pagination {
    margin-top: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.shop-archive-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.shop-archive-pagination .page-numbers.current,
.shop-archive-pagination .page-numbers:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* loader */
.shop-archive-loader {
    position: absolute;
    left: 50%;
    top: 100px;
    transform: translate(-50%, 0);
    background: var(--white);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 600;
    z-index: 10;
}

/* product grid style overwrite */
.shop-archive-grid li.product {
    width: auto;
    margin: 0;
    float: none;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.shop-archive-grid li.product:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.shop-archive-grid li.product img {
    border-radius: 4px;
    margin-bottom: 15px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.shop-archive-grid li.product .woocommerce-loop-product__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 10px 0 5px;
    padding: 0;
}

.shop-archive-grid li.product .price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
    display: block;
    margin-bottom: 15px;
}

.shop-archive-grid li.product .price del {
    color: #999;
    font-size: 14px;
    opacity: 0.7;
    font-weight: 400;
    margin-right: 5px;
}

.shop-archive-grid li.product .button {
    width: 100%;
    margin-top: auto;
    background: var(--secondary-color);
    color: var(--text-color);
    border-radius: 50px;
    padding: 10px 0;
    display: block;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    line-height: 1.5;
    font-size: small;
}

.shop-archive-grid li.product .button:hover {
    background: var(--primary-color);
    color: var(--white);
}

.shop-archive-grid li.product .onsale {
    background: var(--secondary-color);
    color: var(--text-color);
    font-weight: 700;
    border-radius: 4px;
    padding: 4px 10px;
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 13px;
    z-index: 9;
    min-height: auto;
    line-height: normal;
    right: auto;
    margin: 0;
}

/* responsive */
@media (max-width:900px) {
    .shop-archive-container {
        flex-direction: column;
    }

    .shop-archive-sidebar {
        width: 100%;
        flex: none;
    }

    .shop-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- CUSTOM CART REMOVE BUTTON STYLES --- */
.product-thumbnail-wrapper-custom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-thumbnail-wrapper-custom a.remove {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 0px;
    color: #333 !important;
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: normal;
    margin-left: auto;
    /* Pushes X to the right if flex container allows */
}

.product-thumbnail-wrapper-custom a.remove:hover {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color);
}

.woocommerce-cart table.cart .product-thumbnail {
    width: auto;
    min-width: 100px;
    /* Ensure enough space */
}

@media only screen and (max-width: 768px) {
    .product-thumbnail-wrapper-custom {
        justify-content: center;
    }

    .product-thumbnail-wrapper-custom a.remove {
        position: absolute;
        /* On mobile standard woo makes thumbnail block/absolute sometimes */
        top: 0;
        right: 0;
        /* Verify mobile view if standard woo styles interfere */
        position: static;
        /* Let's keep it static for now as per user request 'one line' */
        margin-left: 15px;
    }
}


/* Mobile: zmień breakpoint jeśli chcesz (768px lub 600px) */
@media (max-width: 768px) {

    /* kontener z miniaturką i linkiem Usuń */
    .product-thumbnail-wrapper-custom {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        /* obrazek left, remove right */
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    /* miniatura - utrzymuje proporcje i ma ustaloną szerokość */
    .product-thumbnail-wrapper-custom>a:first-child img {
        width: 56px;
        /* rozmiar miniatury na telefonie */
        height: auto;
        max-width: none;
        display: block;
        border-radius: 4px;
    }

    /* link Usuń po prawej, większy obszar dotyku */
    .product-thumbnail-wrapper-custom .remove {
        margin-left: 12px;
        flex: 0 0 auto;
        text-decoration: none;
        font-size: 20px;
        /* znak × większy i czytelny */
        line-height: 1;
        padding: 8px 10px;
        /* powiększony obszar dotyku */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* jeśli tabela ma ciasne paddingi */
    td.product-thumbnail {
        padding: 8px 12px;
    }
}

/* mobile / domyślnie */
.woocommerce .quantity .qty {
    border-radius: 50px;
    border: 1px solid #ccc;
    font-size: 14px;
    width: 3.631em;
    text-align: center;
}

/* na komputerach (desktop) — zmień breakpoint jeśli chcesz inny próg */
@media (min-width: 1024px) {
    .woocommerce .quantity .qty {
        width: 5em;
    }
}


/* tylko na telefonach */
@media (max-width: 767px) {
    .woocommerce-cart table.cart .product-thumbnail {
        border-top: 1px solid;
        /* dopasuj kolor jeśli trzeba */
    }
}

/* --- QUANTITY BUTTONS (SELECTABLE) --- */
.quantity-wrapper-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.qty-select-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 90px;
    height: 44px !important;
    padding: 0 20px !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 50px !important;
    background-color: var(--white) !important;
    color: var(--text-color) !important;
    font-size: 14px !important;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer !important;
    transition: all 0.2s;
    text-align: center;
    position: relative;
    z-index: 2;
    pointer-events: auto !important;
}

.custom-qty-input .qty-visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 44px !important;
    padding: 0 20px !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 50px !important;
    background-color: var(--white) !important;
    color: var(--text-color) !important;
    font-size: 14px !important;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    outline: none !important;
}

/* Hover State */
.qty-select-btn:hover,
.custom-qty-input .qty-visible:hover {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

/* Active State (Selected) */
.qty-select-btn.active,
.custom-qty-input .qty-visible:focus,
.custom-qty-input.active .qty-visible {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    border-color: var(--primary-color) !important;
}

/* Fix for Input Wrapper */
.custom-qty-input {
    display: inline-flex;
    width: 90px;
}

/* Ukryj standardowe przyciski +/- z motywu jeśli są */
.quantity .plus,
.quantity .minus {
    display: none !important;
}

@media (max-width: 767px) {
    .quantity-wrapper-custom {
        margin-bottom: 0;
    }
}

.price del {
    text-decoration-line: line-through;
}

.price ins {
    text-decoration-line: none;
}

/* --- DISABLE PRODUCT IMAGE CLICK --- */
.woocommerce-product-gallery__image a,
.woocommerce-product-gallery__image img {
    pointer-events: none !important;
    cursor: default !important;
}

.woocommerce-product-gallery__trigger {
    display: none !important;
}