/**
 * PyziTheme - cart.css - CLEAN & MINIMAL
 * @version 3.3.0
 */

/* Ukryj nagłówek strony */
.page-header.page-header-minimal,
.page-header-minimal {
    display: none !important;
}

.pyzitheme-cart-wrapper {
    padding: 10px 0 60px;
    background: #FAFAFA;
    min-height: 60vh;
}

.cart-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   KOMUNIKATY
   ======================================== */

.woocommerce-message {
    background: #E8F5E9;
    border-left: 4px solid #4CAF50;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #2E7D32;
    display: flex;
    align-items: center;
    gap: 10px;
}

.woocommerce-message::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    flex-shrink: 0;
}

.woocommerce-message a {
    color: #D2691E;
    font-weight: 600;
    text-decoration: none;
    margin-left: auto;
}

.woocommerce-message a:hover {
    text-decoration: underline;
}

.woocommerce-error {
    background: #FFEBEE;
    border-left: 4px solid #F44336;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #C62828;
}

.woocommerce-info {
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #1565C0;
}

/* ========================================
   PRODUKTY - DELIKATNY HEADER
   ======================================== */

.cart-items {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.cart-items-header {
    padding: 20px 25px 15px;
    border-bottom: 2px solid #D2691E;
}

.cart-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4A3828;
    margin: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 90px 1fr 120px 100px 120px 35px;
    gap: 20px;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #F0EDE8;
}

.cart-item:hover {
    background: #FAFAFA;
}

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

.cart-item-image img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #E0E0E0;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #4A3828;
    margin: 0;
    line-height: 1.4;
}

.cart-item-name a {
    color: inherit;
    text-decoration: none;
}

.cart-item-name a:hover {
    color: #D2691E;
}

/* ========================================
   META - PROSTY TEKST
   ======================================== */

.cart-item-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 5px;
}

.cart-item-meta dl.variation,
.cart-item-meta .wc-item-meta {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cart-item-meta dl.variation > dt,
.cart-item-meta .wc-item-meta-label {
    display: none;
}

.cart-item-meta dl.variation > dd,
.cart-item-meta .wc-item-meta-value,
.cart-item-meta p {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    color: #666 !important;
    line-height: 1.5 !important;
}

.cart-item-meta dl.variation > dd::before {
    content: none !important;
}

.cart-item-price-mobile {
    display: none;
}

.cart-item-price,
.cart-item-subtotal {
    font-size: 1rem;
    font-weight: 600;
    color: #4A3828;
    text-align: right;
}

.cart-item-quantity {
    display: flex;
    justify-content: center;
}

.cart-item-quantity input {
    width: 60px;
    padding: 8px;
    text-align: center;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4A3828;
}

.cart-item-quantity input:focus {
    outline: none;
    border-color: #D2691E;
}

.cart-item-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 1.3rem;
    color: #CCC;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.cart-item-remove a:hover {
    background: #FFE5E5;
    color: #DC3545;
}

/* ========================================
   AKCJE
   ======================================== */

.cart-actions-row {
    display: flex;
    justify-content: flex-end;
    padding: 20px 25px;
    background: #F8F8F8;
    border-radius: 0 0 12px 12px;
}

.btn-update-cart {
    padding: 10px 24px;
    background: #4A3828;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-update-cart:hover {
    background: #D2691E;
}

.btn-update-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   PODSUMOWANIE - DELIKATNY HEADER
   ======================================== */

.cart-collaterals {
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 0 0;
}

.cart_totals {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.cart_totals h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4A3828;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #D2691E;
}

.cart_totals table {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 20px;
    border-collapse: collapse;
    table-layout: auto;
}

.cart_totals th,
.cart_totals td {
    padding: 12px 5px;
    border-bottom: 1px solid #F0F0F0;
    text-align: left;
    font-size: 0.95rem;
    vertical-align: top;
}

.cart_totals th {
    font-weight: 600;
    color: #4A3828;
    width: 30%;
    padding-right: 15px;
}

.cart_totals td {
    text-align: right;
    font-weight: 600;
    color: #4A3828;
    width: 70%;
    padding-left: 15px;
}

.cart_totals .woocommerce-shipping-totals th,
.cart_totals .woocommerce-shipping-totals td {
    vertical-align: top;
    padding: 15px 5px;
}

.cart_totals .woocommerce-shipping-totals td {
    padding-left: 15px;
    width: 70% !important;
}

.cart_totals .woocommerce-shipping-methods {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
}

.cart_totals .woocommerce-shipping-methods li {
    list-style: none !important;
    margin: 0 !important;
    padding: 12px 15px !important;
    background: #F8F8F8;
    border-radius: 6px;
    border: 1px solid #E0E0E0;
    transition: all 0.2s;
    display: flex !important;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.cart_totals .woocommerce-shipping-methods li::before {
    display: none !important;
    content: none !important;
}

.cart_totals .woocommerce-shipping-methods li:hover {
    border-color: #D2691E;
    background: #FFF8F0;
}

.cart_totals .woocommerce-shipping-methods input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}

.cart_totals .woocommerce-shipping-methods label {
    font-size: 0.9rem;
    color: #4A3828;
    cursor: pointer;
    margin: 0;
    flex: 1;
    display: flex !important;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap !important;
    overflow: visible;
    min-width: 0;
}

.cart_totals .woocommerce-shipping-methods label span {
    white-space: nowrap;
}

.cart_totals .woocommerce-shipping-methods label .woocommerce-Price-amount {
    white-space: nowrap;
    margin-left: auto;
}

.cart_totals .inpost_pl-shipping-method-meta-wrap {
    display: inline-flex;
    align-items: center;
    margin: 0;
    flex-shrink: 0;
}

.cart_totals .inpost_pl-shipping-method-meta-wrap img {
    height: 16px;
    width: auto;
    vertical-align: middle;
    display: block;
    flex-shrink: 0;
}

.cart_totals .woocommerce-shipping-destination {
    margin-top: 10px;
    padding: 10px 12px;
    background: #E8F4FD;
    border-radius: 6px;
    border-left: 3px solid #2196F3;
    font-size: 0.85rem;
    color: #1565C0;
    width: 100%;
    box-sizing: border-box;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
    font-size: 1.3rem;
    font-weight: 700;
    border-top: 2px solid #4A3828;
    border-bottom: none;
    padding-top: 15px;
    color: #D2691E;
}

.cart_totals .order-total .includes_tax {
    display: block;
    font-size: 0.8rem;
    color: #888;
    font-weight: 400;
    margin-top: 4px;
}

.cart_totals .estimated-delivery-info th,
.cart_totals .estimated-delivery-info td {
    border-bottom: none;
    padding-bottom: 5px;
}

.wc-proceed-to-checkout {
    margin-top: 20px;
}

.wc-proceed-to-checkout .checkout-button {
    width: 100%;
    padding: 14px 20px;
    background: #D2691E;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: all 0.2s;
}

.wc-proceed-to-checkout .checkout-button:hover {
    background: #B8591A;
}

/* ========================================
   RESPONSYWNOŚĆ
   ======================================== */

@media (max-width: 992px) {
    .cart-item {
        grid-template-columns: 80px 1fr 90px 80px 100px 30px;
        gap: 15px;
        padding: 18px 20px;
    }

    .cart-item-image img {
        width: 80px;
        height: 80px;
    }

    .cart-item-quantity input {
        width: 55px;
        padding: 6px;
    }
}

@media (max-width: 768px) {
    .cart-container {
        padding: 0 15px;
    }

    .cart-items-header {
        padding: 15px 18px 12px;
    }

    .cart-section-title {
        font-size: 1.1rem;
    }

    .cart-item {
        grid-template-columns: 70px 1fr;
        gap: 12px;
        padding: 15px;
        position: relative;
    }

    .cart-item-image img {
        width: 70px;
        height: 70px;
    }

    .cart-item-name {
        font-size: 0.95rem;
    }

    .cart-item-meta dl.variation > dd,
    .cart-item-meta p {
        font-size: 0.8rem !important;
    }

    .cart-item-price {
        display: none;
    }

    .cart-item-price-mobile {
        display: block;
        font-size: 0.9rem;
        color: #D2691E;
        font-weight: 600;
        margin-top: 5px;
    }

    /* Quantity i subtotal pod nazwą */
    .cart-item-quantity,
    .cart-item-subtotal {
        grid-column: 2;
    }

    .cart-item-quantity {
        justify-content: flex-start;
        margin-top: 10px;
    }

    .cart-item-quantity input {
        width: 50px;
        padding: 6px;
        font-size: 0.9rem;
    }

    .cart-item-subtotal {
        text-align: left;
        font-size: 1rem;
        margin-top: 5px;
    }

    .cart-item-remove {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    .cart-actions-row {
        padding: 15px;
        justify-content: center;
    }

    .btn-update-cart {
        width: 100%;
    }

    .cart_totals {
        padding: 20px 15px;
    }

    .cart_totals h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .cart_totals th,
    .cart_totals td {
        font-size: 0.9rem;
        padding: 10px 0;
    }

    .cart_totals .woocommerce-shipping-methods li {
        padding: 10px;
    }

    .wc-proceed-to-checkout .checkout-button {
        padding: 13px 18px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cart-container {
        padding: 0 12px;
    }

    .cart-items-header {
        padding: 12px 15px 10px;
    }

    .cart-section-title {
        font-size: 1rem;
    }

    .cart-item {
        padding: 12px;
    }

    .cart-item-image img {
        width: 60px;
        height: 60px;
    }

    .cart-item-name {
        font-size: 0.9rem;
    }

    .cart_totals {
        padding: 18px 12px;
    }

    .cart_totals h2 {
        font-size: 1.1rem;
    }
}

/* ========================================
   PUSTY KOSZYK
   ======================================== */

.cart-empty {
    background: #FFF8F0;
    color: #4A3828;
    padding: 50px 30px;
    border-radius: 12px;
    border: 2px dashed #D2691E;
    font-size: 1rem;
    text-align: center;
    margin: 30px 0;
}

.cart-empty::before {
    content: "🛒";
    display: block;
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.return-to-shop {
    margin-top: 20px;
}

.return-to-shop .button {
    background: #D2691E;
    color: #fff;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s;
}

.return-to-shop .button:hover {
    background: #B8591A;
}