/* View Cart (Review & Checkout) Page Enhancements - CORRECT VERSION */

/* ===== MODERN CART TABLE ===== */

.view-cart-items-header {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    color: white;
    padding: 18px 25px;
    border-radius: 12px 12px 0 0;
    font-weight: 600;
    font-size: 15px;
    margin-top: 30px;
    border: 2px solid #495057;
    border-bottom: none;
}

.view-cart-items {
    background: white;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.view-cart-items .item {
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.view-cart-items .item:hover {
    background: #f8fff9;
}

.view-cart-items .item:nth-child(even) {
    background: #fcfcfc;
}

.view-cart-items .item:nth-child(even):hover {
    background: #f8fff9;
}

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

/* Item Details */
.item-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
    line-height: 1.25;
}

.item-group {
    display: block;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 3px;
}

.item-domain {
    display: block;
    color: #0b7285;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 0;
    word-break: break-word;
}

.item-price {
    text-align: right;
    padding-top: 4px;
}

.item-price span:first-child {
    font-size: 36px;
    font-weight: 700;
    color: #28a745;
    display: block;
    margin-bottom: 2px;
    line-height: 1;
}

.item-price .cycle {
    display: block;
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* Edit & Remove Buttons */
.view-cart-items .btn-link.btn-xs {
    color: #0d6efd;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    margin-left: 6px;
    border-radius: 999px;
    border: 1px solid #cfe2ff;
    background: #f8fbff;
    text-decoration: none !important;
}

.view-cart-items .btn-link.btn-xs:hover {
    color: #084298;
    border-color: #9ec5fe;
    background: #eef5ff !important;
}

.view-cart-items .btn-remove-from-cart {
    color: #dc3545 !important;
    font-size: 16px;
    padding: 4px 9px !important;
    margin-left: 4px;
    border-radius: 999px;
    border: 1px solid #f5c2c7 !important;
    background: #fff5f5 !important;
    transition: all 0.2s ease;
}

.view-cart-items .btn-remove-from-cart:hover {
    color: #c82333 !important;
    border-color: #ea868f !important;
    background: #ffe9eb !important;
    transform: translateY(-1px);
}

/* ===== HIDE THE DUPLICATE TABS/PROMO SECTION ===== */

.view-cart-tabs {
    display: none !important;
}

/* ===== EMPTY CART BUTTON ===== */

.btn-empty-cart,
button.btn-empty-cart {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    border: none !important;
    color: white !important;
    padding: 12px 28px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-empty-cart:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4) !important;
    color: white !important;
}

.btn-empty-cart i {
    font-size: 16px;
}

/* ===== CART ACTIONS BAR (Checkout + Continue Shopping) ===== */

.cart-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 30px 0;
    padding: 25px 30px;
    background: linear-gradient(135deg, #f8fff9 0%, #eafbef 100%);
    border: 2px solid #c3e6cb;
    border-radius: 12px;
}

.cart-actions-bar .btn-checkout {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border: none !important;
    color: white !important;
    padding: 16px 45px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    width: auto !important;
    display: inline-block !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.cart-actions-bar .btn-checkout:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
}

.cart-actions-bar .btn-continue-shopping {
    color: #6c757d;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cart-actions-bar .btn-continue-shopping:hover {
    color: #28a745;
    text-decoration: none;
}

.cart-actions-bar .btn-continue-shopping i {
    margin-right: 5px;
}

@media (max-width: 767px) {
    .cart-actions-bar {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }
    
    .cart-actions-bar .btn-checkout {
        width: 100% !important;
        padding: 16px 20px !important;
    }
}

/* ===== ORDER SUMMARY - FULL WIDTH LAYOUT ===== */

.secondary-cart-sidebar .order-summary {
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.secondary-cart-sidebar .order-summary h2 {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    color: white;
    font-size: 20px;
    font-weight: 700;
    padding: 18px 25px;
    margin: 0;
}

.secondary-cart-sidebar .summary-container {
    padding: 25px;
}

/* Subtotal row */
.secondary-cart-sidebar .subtotal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 20px;
    align-items: center;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.secondary-cart-sidebar .subtotal .float-right {
    font-weight: 700;
    color: #212529;
}

/* Tax / discount rows */
.secondary-cart-sidebar .bordered-totals {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.secondary-cart-sidebar .bordered-totals .clearfix {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 20px;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #6c757d;
}

.secondary-cart-sidebar .bordered-totals .float-right {
    font-weight: 600;
    color: #495057;
}

.secondary-cart-sidebar .bordered-totals .float-left,
.secondary-cart-sidebar .recurring-totals .float-left {
    color: #495057;
    font-weight: 600;
}

/* Recurring totals */
.secondary-cart-sidebar .recurring-totals {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 20px;
    align-items: start;
}

.secondary-cart-sidebar .recurring-totals .clearfix {
    display: contents;
}

.secondary-cart-sidebar .recurring-charges .cost {
    font-weight: 600;
    color: #495057;
}

.secondary-cart-sidebar .summary-container,
.secondary-cart-sidebar .summary-container * {
    text-shadow: none;
}

.secondary-cart-sidebar .subtotal .float-left,
.secondary-cart-sidebar .bordered-totals .float-left,
.secondary-cart-sidebar .recurring-totals .float-left {
    margin: 0;
    min-width: 0;
}

.secondary-cart-sidebar .subtotal .float-right,
.secondary-cart-sidebar .bordered-totals .float-right,
.secondary-cart-sidebar .recurring-totals .float-right,
.secondary-cart-sidebar .recurring-charges {
    justify-self: end;
    text-align: right;
    margin: 0;
}

/* Total due today - big green box */
.secondary-cart-sidebar .total-due-today {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
}

.secondary-cart-sidebar .total-due-today .amt {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.secondary-cart-sidebar .total-due-today span:last-child {
    font-size: 14px;
    opacity: 0.9;
}

/* ===== CHECKOUT BUTTON GLOBAL STYLE ===== */

.btn-checkout,
#checkout {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border: none !important;
    color: white !important;
    padding: 16px 45px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.btn-checkout:hover,
#checkout:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%) !important;
    color: white !important;
}

.btn-checkout i {
    margin-left: 8px;
}

/* Continue Shopping Link */
.continue-shopping-link {
    text-align: center;
    padding: 15px;
}

.continue-shopping-link a {
    color: #6c757d;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.continue-shopping-link a:hover {
    color: #28a745;
    text-decoration: none;
}

/* ===== QTY INPUT STYLING ===== */

.item-qty input[type="number"] {
    width: 80px;
    text-align: center;
    margin-bottom: 8px;
    padding: 8px;
    border: 2px solid #ced4da;
    border-radius: 6px;
}

.item-qty .btn {
    font-size: 12px;
    padding: 6px 12px;
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
    width: 100%;
}

.item-qty .btn:hover {
    background: #218838 !important;
    border-color: #1e7e34 !important;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 767px) {
    .view-cart-items-header {
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .view-cart-items .item {
        padding: 16px 14px;
    }
    
    .item-title {
        font-size: 16px;
    }
    
    .item-price span:first-child {
        font-size: 30px;
    }
    
    .btn-empty-cart {
        width: 100%;
        justify-content: center;
    }
    
    .btn-checkout,
    #checkout {
        font-size: 16px !important;
        padding: 16px 20px !important;
    }
}

/* ===== ADDONS IN CART ===== */

.view-cart-items .item.addon-item {
    background: #f8f9fa;
    padding-left: 45px;
}

.addon-item .item-title {
    font-size: 16px;
}

/* ===== PROMO CODE SUCCESS ===== */

.promo-code-success,
.alert-success {
    background: #d4edda !important;
    border: 2px solid #c3e6cb !important;
    border-radius: 8px !important;
    padding: 15px 20px !important;
    margin: 15px 0 !important;
    color: #155724 !important;
    font-weight: 600 !important;
}

/* ===== FIX ALERT STYLING IN CART ===== */

.secondary-cart-body .alert {
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
