/* ===================================
   Classic Cart Page Styles
   =================================== */

/* Cart Container */
.woocommerce-cart .woocommerce {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0px;
}

/* Cart Layout - Two Sections */
.woocommerce-cart .woocommerce {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
}

.woocommerce-cart .woocommerce-cart-form {
    flex: 1;
    min-width: 0;
}

.woocommerce-cart .cart-collaterals {
    width: 350px;
    flex-shrink: 0;
}

.woocommerce-cart .woocommerce-notices-wrapper:not(:has(.cart-empty)) {
    display: none;
}

/* Show notices wrapper when it contains empty cart message */
.woocommerce-cart .woocommerce-notices-wrapper:has(.cart-empty) {
    display: block;
    width: 100%;
}

/* ===================================
   Cart Table
   =================================== */
.woocommerce-cart table.shop_table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

/* Table Header */
.woocommerce-cart table.shop_table thead th {
    background: var(--bg-light);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

/* Hide unnecessary headers */
.woocommerce-cart table.shop_table thead th.product-remove {
    width: 40px;
    padding: 14px 8px;
}

.woocommerce-cart table.shop_table thead th.product-thumbnail {
    width: 80px;
    padding: 14px 8px;
}

/* Table Body Rows */
.woocommerce-cart table.shop_table tbody td {
    padding: 20px 16px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.woocommerce-cart table.shop_table tbody tr:last-child td {
    border-bottom: none;
}

.woocommerce-cart table.shop_table tbody tr:hover {
    background: #fafafa;
}

/* Remove Button */
.woocommerce-cart table.shop_table .product-remove {
    width: 40px;
    text-align: center;
}

.woocommerce-cart table.shop_table .product-remove a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    color: transparent !important;
    font-size: 0;
    text-decoration: none;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8a0a0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6'/%3E%3Cpath d='M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E");
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

.woocommerce-cart table.shop_table .product-remove a.remove:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e53935' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6'/%3E%3Cpath d='M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E");
}

/* Product Thumbnail */
.woocommerce-cart table.shop_table .product-thumbnail {
    width: 80px;
}

.woocommerce-cart table.shop_table .product-thumbnail a {
    width: 80px;
    height: 80px;
    display: block;
}

.woocommerce-cart table.shop_table .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

/* Product Name */
.woocommerce-cart table.shop_table .product-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.woocommerce-cart table.shop_table .product-name a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.woocommerce-cart table.shop_table .product-name a:hover {
    color: var(--primary-color);
}

/* Product Price */
.woocommerce-cart table.shop_table .product-price {
    color: #666;
    font-size: 0.95rem;
}

/* Quantity Selector with +/- buttons */
.woocommerce-cart table.shop_table .product-quantity {
    width: 140px;
}

.woocommerce-cart table.shop_table .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.woocommerce-cart table.shop_table .quantity .qty-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.woocommerce-cart table.shop_table .quantity .qty-btn:hover {
    background: var(--primary-color);
    color: white;
}

.woocommerce-cart table.shop_table .quantity input.qty {
    width: 45px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    font-size: 0.95rem;
    font-weight: 600;
    -moz-appearance: textfield;
    appearance: textfield;
}

.woocommerce-cart table.shop_table .quantity input.qty::-webkit-outer-spin-button,
.woocommerce-cart table.shop_table .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Product Subtotal */
.woocommerce-cart table.shop_table .product-subtotal {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
}

/* ===================================
   Actions Row (Coupon & Update)
   =================================== */
.woocommerce-cart table.shop_table tbody td.actions {
    padding: 20px 16px;
    background: var(--bg-light);
    border-top: 1px solid #e0e0e0;
}

.woocommerce-cart .coupon {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.woocommerce-cart .coupon label {
    display: none;
}

.woocommerce-cart .coupon input#coupon_code {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    width: 180px;
}

.woocommerce-cart .coupon input#coupon_code:focus {
    outline: none;
    border-color: var(--primary-color);
}

.woocommerce-cart .coupon button {
    padding: 10px 18px;
    background: #666;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.woocommerce-cart .coupon button:hover {
    background: #555;
}

.woocommerce-cart button[name="update_cart"] {
    float: right;
    padding: 10px 20px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.woocommerce-cart button[name="update_cart"]:hover {
    background: var(--primary-color);
    color: white;
}

.woocommerce-cart button[name="update_cart"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================================
   Cart Totals
   =================================== */
.woocommerce-cart .cart_totals {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.woocommerce-cart .cart_totals>h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 20px 0;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--primary-color);
}

.woocommerce-cart .cart_totals table.shop_table {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.woocommerce-cart .cart_totals table tr {
    vertical-align: top;
}

.woocommerce-cart .cart_totals table.shop_table th,
.woocommerce-cart .cart_totals table.shop_table td {
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #f0f0f0;
}

.woocommerce-cart .cart_totals table.shop_table .woocommerce-shipping-totals {
    display: none;
}

.woocommerce-cart .cart_totals table.shop_table th {
    font-weight: 500;
    color: var(--text-dark);
    background: transparent;
    text-align: left;
    font-size: 0.9rem;
}

.woocommerce-cart .cart_totals table.shop_table td {
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
}

.woocommerce-cart .cart_totals table.shop_table tr.order-total th,
.woocommerce-cart .cart_totals table.shop_table tr.order-total td {
    border-bottom: none;
    padding-top: 16px;
    font-size: 1.1rem;
    font-weight: 700;
}

.woocommerce-cart .cart_totals table.shop_table tr.order-total td .woocommerce-Price-amount {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Checkout Button */
.woocommerce-cart .wc-proceed-to-checkout {
    margin-top: 20px;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ===================================
   Empty Cart - Clean Minimalist Design
   =================================== */

/* Container wrapper for empty cart */
.woocommerce-cart .woocommerce:has(.cart-empty) {
    padding: 0;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Empty Cart Container */
.woocommerce-cart .cart-empty.woocommerce-info {
    text-align: center;
    padding: 60px 40px 20px;
    border-radius: 0;
    margin: 0;
    max-width: 100%;
    width: 100%;
    border: none;
    box-shadow: none;
    position: relative;
}

/* Hide the default icon */
/* .woocommerce-cart .cart-empty.woocommerce-info::before {
    display: none;
} */

/* Custom Cart Icon */
.woocommerce-cart .cart-empty.woocommerce-info::before {
    content: '';
    display: block;
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
    background-image: url('../images/empty-cart-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Empty Cart Title */
.woocommerce-cart .cart-empty.woocommerce-info {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    letter-spacing: -0.02em;
    line-height: 1.4;
}

/* Return to Shop Container */
.woocommerce-cart .return-to-shop {
    text-align: center;
    padding: 0 40px 80px;
    margin: 0;
    width: 100%;
}

/* Subtitle text */
.woocommerce-cart .cart-empty.woocommerce-info::after {
    content: 'Sepertinya kamu belum menambahkan apapun ke keranjang.';
    display: block;
    font-size: 1rem;
    color: #718096;
    margin-top: 10px;
    font-weight: 400;
    line-height: 1.6;
}

/* CTA Button */
.woocommerce-cart .return-to-shop a.button {
    display: inline-block;
    padding: 14px 36px;
    background: var(--primary-color, #F46A8C);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 106, 140, 0.3);
}

.woocommerce-cart .return-to-shop a.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 106, 140, 0.4);
    background: var(--secondary-color, #e85a7b);
}

/* Remove additional decorative elements */
.woocommerce-cart .return-to-shop::after {
    display: none;
}

.woocommerce-cart .return-to-shop a.button::before,
.woocommerce-cart .return-to-shop a.button::after {
    display: none;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 991px) {
    .woocommerce-cart .cart-collaterals {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .woocommerce-cart .woocommerce {
        padding: 20px 16px;
        gap: 24px;
    }

    /* Stack table on mobile */
    .woocommerce-cart table.shop_table,
    .woocommerce-cart table.shop_table thead,
    .woocommerce-cart table.shop_table tbody,
    .woocommerce-cart table.shop_table th,
    .woocommerce-cart table.shop_table td,
    .woocommerce-cart table.shop_table tr {
        display: block;
    }

    .woocommerce-cart table.shop_table thead {
        display: none;
    }

    .woocommerce-cart table.shop_table tbody tr {
        background: white;
        border-radius: 10px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .woocommerce-cart table.shop_table tbody td {
        padding: 0;
        border: none;
    }

    .woocommerce-cart table.shop_table tbody td.product-remove {
        position: absolute;
        right: 16px;
        top: 16px;
    }

    .woocommerce-cart table.shop_table tbody td.product-thumbnail {
        width: 60px;
    }

    .woocommerce-cart table.shop_table tbody td.product-thumbnail img {
        width: 60px;
        height: 60px;
    }

    .woocommerce-cart table.shop_table tbody td.product-name {
        flex: 1;
        min-width: calc(100% - 80px);
    }

    .woocommerce-cart table.shop_table tbody td.product-price {
        display: none;
    }

    .woocommerce-cart table.shop_table tbody td.product-quantity {
        flex: 1;
    }

    .woocommerce-cart table.shop_table tbody td.product-subtotal {
        text-align: right;
    }

    .woocommerce-cart table.shop_table tbody td.product-subtotal::before {
        content: 'Total: ';
        font-weight: 400;
        color: #666;
    }

    /* Actions row */
    .woocommerce-cart table.shop_table tbody td.actions {
        width: 100%;
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .woocommerce-cart .coupon {
        width: 100%;
        flex-direction: column;
    }

    .woocommerce-cart .coupon input#coupon_code {
        width: 100%;
    }

    .woocommerce-cart .coupon button {
        width: 100%;
    }

    .woocommerce-cart button[name="update_cart"] {
        float: none;
        width: 100%;
    }

    .woocommerce-cart .cart_totals {
        padding: 20px;
    }

    /* Empty Cart Mobile Styles */
    .woocommerce-cart .cart-empty.woocommerce-info {
        padding: 40px 20px 15px;
        margin: 0;
        border-radius: 0;
    }

    .woocommerce-cart .cart-empty.woocommerce-info {
        font-size: 1.25rem;
    }

    .woocommerce-cart .return-to-shop {
        padding: 0 20px 60px;
        margin: 0;
    }

    .woocommerce-cart .return-to-shop::before {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }

    .woocommerce-cart .return-to-shop a.button {
        padding: 12px 28px;
        font-size: 0.9rem;
        width: auto;
    }
}