/**
 * Style dla ikon WooCommerce w headerze
 */

.header-woocommerce-icons {
    float: right;
    display: flex;
    align-items: center;
    gap: 25px; /* Zwiększono z 15px do 25px */
    margin-right: 15px;
    margin-left: 30px; /* Margines między menu a ikoną konta */
    margin-top: 22.5px;
    height: 30px;
    line-height: 30px;
}

.header-icon {
    display: inline-block;
    color: #000;
    font-size: 20px;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.header-icon:hover {
    color: #078521;
}

.header-sticky .header-icon {
    color: #fff;
}

.header-sticky .header-icon:hover {
    color: #078521;
}

.header-cart-wrapper {
    position: relative;
}

.header-cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #078521;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.header-sticky .cart-count {
    background-color: #078521;
}

/* Mini Cart Popup - jak na kaiko.shop */
.header-mini-cart {
    position: fixed;
    top: 0;
    right: -400px;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #e0e0e0;
    box-shadow: -4px 0 12px rgba(0,0,0,0.15);
    width: 400px;
    max-width: 90vw;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease-in-out;
    overflow: hidden;
}

.header-mini-cart.open {
    right: 0;
}

/* Blokuj scroll gdy koszyk jest otwarty */
body.mini-cart-active {
    overflow: hidden;
}

/* Overlay do przyciemnienia tła */
.mini-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.mini-cart-overlay.open {
    display: block;
    opacity: 1;
}

/* Lista produktów w koszyku */
.header-mini-cart .woocommerce-mini-cart {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Footer koszyka - przyklejony do dołu */
.mini-cart-footer {
    margin-top: auto;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

/* Nagłówek koszyka z przyciskiem X */
.mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    margin: 0;
    margin-bottom: 40px;
    flex-shrink: 0;
}

.mini-cart-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-cart-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.mini-cart-close:hover {
    color: #000;
}

.header-mini-cart .woocommerce-mini-cart__empty-message {
    padding: 60px 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

.header-mini-cart .woocommerce-mini-cart-item {
    padding: 30px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 15px;
    position: relative;
    align-items: flex-start;
}

.header-mini-cart .woocommerce-mini-cart-item:last-child {
    border-bottom: none;
}

/* Zdjęcie produktu */
.header-mini-cart .mini-cart-item-image {
    flex-shrink: 0;
    width: 100px;
    height: auto;
    min-height: 0;
    border: none !important;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-mini-cart .mini-cart-item-image img {
    width: 100% !important;
    height: auto !important;
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    display: block;
    border: none !important;
    padding: 0;
    margin: 0;
}

.header-mini-cart .mini-cart-item-image a {
    display: block;
    width: 100%;
    height: 100%;
    border: none !important;
    padding: 0;
    margin: 0;
}

/* Informacje o produkcie */
.header-mini-cart .mini-cart-item-details {
    flex: 1;
    min-width: 0;
}

.header-mini-cart .mini-cart-item-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.4;
    text-transform: uppercase;
}

.header-mini-cart .mini-cart-item-name a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.header-mini-cart .mini-cart-item-name a:hover {
    color: #078521;
}

.header-mini-cart .mini-cart-item-details .quantity {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    display: none; /* Ukrywamy domyślny display ilości */
}

/* Kontrolki ilości produktu */
.mini-cart-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.mini-cart-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.mini-cart-quantity-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    padding: 0;
    line-height: 1;
}

.mini-cart-quantity-btn:hover {
    background: #078521;
    color: #fff;
    border-color: #078521;
}

.mini-cart-quantity-display {
    font-size: 14px;
    font-weight: 500;
    min-width: 30px;
    text-align: center;
}

.mini-cart-price-separator {
    font-size: 14px;
    color: #666;
    padding-left: 20px;
}

.mini-cart-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding-left: 5px;
}

/* Ukryj dodatkowe meta dane produktu */
.header-mini-cart .woocommerce-mini-cart-item dl {
    display: none;
}

/* Przycisk usuwania - w linii z kontrolkami ilości */
.header-mini-cart .woocommerce-mini-cart-item .remove {
    position: static;
    font-size: 18px;
    color: #999;
    text-decoration: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
}

.header-mini-cart .woocommerce-mini-cart-item .remove:hover {
    color: #fff;
    background: #d9534f;
    border-color: #d9534f;
}

.header-mini-cart .woocommerce-mini-cart__total {
    padding: 20px;
    border-top: none;
    margin: 0;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-mini-cart .woocommerce-mini-cart__total strong {
    font-weight: 600;
}

.header-mini-cart .woocommerce-mini-cart__buttons {
    margin: 0;
    padding: 0 20px 30px 20px;
    border-top: none;
    display: block;
}

/* Ukryj przycisk "Zobacz koszyk" */
.header-mini-cart .woocommerce-mini-cart__buttons .button:first-child {
    display: none;
}

/* Przycisk "Zamów" w stylu kaiko.shop */
.header-mini-cart .woocommerce-mini-cart__buttons .button.checkout {
    display: block;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    line-height: 30px;
    color: #fff !important;
    padding: 12px 30px;
    background-color: #078521 !important;
    border: none !important;
    border-radius: 0 !important;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.header-mini-cart .woocommerce-mini-cart__buttons .button.checkout:hover {
    background-color: #000 !important;
    color: #fff !important;
}

/* Ikony w menu hamburgerowym */
.nav-menu-woocommerce-icons {
    padding: 20px 30px;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.nav-menu-icon {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 12px 0;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-menu-icon:hover {
    color: #078521;
}

.nav-menu-icon i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.nav-cart-count {
    color: #078521;
    font-weight: bold;
}

/* Responsywność */
@media (max-width: 768px) {
    .header-woocommerce-icons {
        margin-right: 10px;
        gap: 20px; /* Zwiększono z 10px do 20px */
    }
    
    .header-icon {
        font-size: 18px;
    }
    
    .header-mini-cart {
        width: 100%;
        max-width: 100vw;
        right: -100%;
    }
    
    .header-mini-cart.open {
        right: 0;
    }
}

/* Ukryj komunikat "Zobacz koszyk" po dodaniu produktu */
/* Wyklucz pole kuponu na checkout - musi być widoczne */
.woocommerce-message,
.woocommerce-error,
a.added_to_cart,
.added_to_cart {
    display: none !important;
}

/* Ukryj .woocommerce-info, ale NIE na checkout (dla pola kuponu) */
.woocommerce-info:not(.woocommerce-form-coupon-toggle .woocommerce-info) {
    display: none !important;
}

/* Poprawka przycisku ZAMÓW w mini koszyku - dopasowanie do .w-button */
.header-mini-cart .woocommerce-mini-cart__buttons .button.checkout {
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    line-height: 30px;
    color: #fff !important;
    padding: 12px 30px;
    background-color: #078521 !important;
    border: none !important;
    border-radius: 0 !important;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 400 !important; /* Taka sama grubość jak .w-button */
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}

.header-mini-cart .woocommerce-mini-cart__buttons .button.checkout:hover {
    background-color: #000 !important;
    color: #fff !important;
}

