/* ========================================
   CART POPUP MODAL
   ======================================== */
#vyvy-cart-popup .modal-header {
    border-bottom: 3px solid #f5a623;
    padding: 1rem 1.5rem;
}
#vyvy-cart-popup .modal-title {
    font-family: inherit;
    font-size: 1.4rem;
    color: #333;
}
#vyvy-cart-popup .modal-footer {
    border-top: 2px solid #eee;
    padding: 1rem 1.5rem;
}

.vyvy-cart-table {
    border-collapse: collapse;
}
.vyvy-cart-table thead th {
    background: #f8f8f8;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #eee;
    text-align: left;
}
.vyvy-cart-table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}
.vyvy-cart-table .vyvy-popup-remove {
    font-size: 0.8rem;
    text-decoration: none;
}
.vyvy-cart-total-price {
    font-size: 1.3rem;
}

/* Loading state for add to cart */
.vyvy-add-to-cart.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}
.vyvy-add-to-cart.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   CHECKOUT PAGE - Uses original CSS classes
   All main styling is in main.css already:
   .title-cart, .title-giohang, .title-thongtin, .title-phuongthuc, .title-tomtat
   .box_dammay, .button_thanhtoan, .payments-cart, .payments-label, .payments-info
   .procart, .pic-procart2, .info-procart2, .box_thongtin_cart, .input_tt_cart
   ======================================== */

/* Coupon section */
.vyvy-apply-coupon {
    background: var(--background-static, #f7c827) !important;
    border: none;
    font-weight: bold;
}
.vyvy-apply-coupon:hover {
    opacity: 0.85;
}

/* Submit button inside cloud - ensure clickable */
.button_thanhtoan .thanhtoan {
    background: none;
    border: none;
    color: #fff;
    font-family: "FOR";
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}
.button_thanhtoan:hover {
    transform: scale(1.05);
    transition: transform 0.3s;
}

/* ========================================
   RESPONSIVE FIXES
   ======================================== */
@media (max-width: 991px) {
    .vyvy-checkout-page .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    .vyvy-summary-cloud {
        padding: 1.5rem;
    }
}

@media (max-width: 767px) {
    #vyvy-cart-popup .modal-dialog {
        margin: 0.5rem;
    }
    .vyvy-cart-table thead {
        display: none;
    }
    .vyvy-cart-table tbody td {
        display: block;
        text-align: left;
        padding: 6px 12px;
    }
    .vyvy-cart-table tbody td:first-child {
        text-align: center;
        padding-top: 12px;
    }
    .vyvy-cart-table tbody tr {
        border-bottom: 2px solid #eee;
        margin-bottom: 8px;
    }
}

/* ========================================
   WooCommerce overrides
   ======================================== */
.woocommerce-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    gap: 4px;
}
.woocommerce-pagination .page-numbers li a,
.woocommerce-pagination .page-numbers li span {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}
.woocommerce-pagination .page-numbers li span.current,
.woocommerce-pagination .page-numbers li a:hover {
    background: #f5a623;
    color: #fff;
    border-color: #f5a623;
}

/* Fix WooCommerce notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.woocommerce-message {
    background: #d4edda;
    border-left: 4px solid #28a745;
}
.woocommerce-error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}
