/* ============================================
   ORDER SUMMARY PAGE STYLES
   SAGA - Your Cart
   ============================================ */

/* Cart Header */
.cart-header {
    background: linear-gradient(135deg, #81C408 0%, #6aa106 100%);
    padding: 3rem 0;
    margin-bottom: 0;
}

.cart-header h1 {
    color: white;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cart-header .cart-count {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
}

/* Cart Container */
.cart-container {
    background: #f8f9fa;
    min-height: 60vh;
    padding: 2rem 0;
}

/* ============================================
   CART ITEM CARD
   ============================================ */
.cart-item-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.cart-item-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Product Image */
.product-image-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-image-wrapper img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Product Info */
.product-info {
    flex: 1;
    min-width: 0;
}

.product-category {
    font-size: 0.75rem;
    color: #81C408;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-size {
    font-size: 0.85rem;
    color: #666;
}

/* Store Badge */
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f0f0f0;
    border-radius: 20px;
    margin-top: 8px;
}

.store-badge img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.store-badge span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #555;
    text-transform: capitalize;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    background: white;
}

.action-btn-info {
    border-color: #81c408;
    color: #81c408;
}

.action-btn-info:hover {
    background: #81c408;
    color: white;
    transform: scale(1.1);
}

.action-btn-refresh {
    border-color: #81c408;
    color: #81c408;
}

.action-btn-refresh:hover {
    background: #81c408;
    color: white;
    transform: scale(1.1);
}

.action-btn-search {
    border-color: #81c408;
    color: #81c408;
}

.action-btn-search:hover {
    background: #81c408;
    color: white;
    transform: scale(1.1);
}

.action-btn-delete {
    border-color: #dc3545;
    color: #dc3545;
}

.action-btn-delete:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

/* Action Labels (tooltips) */
.action-with-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.action-label {
    font-size: 0.65rem;
    color: #81c408;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.action-with-label:has(.action-btn-delete) .action-label {
    color: #dc3545;
}

/* ============================================
   QUANTITY CONTROLS
   ============================================ */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 25px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.qty-btn:hover {
    background: #81C408;
    color: white;
}

.qty-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

/* ============================================
   PRICE DISPLAY
   ============================================ */
.item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.item-total {
    font-size: 0.85rem;
    color: #666;
}

.savings-badge {
    background: linear-gradient(135deg, #81C408 0%, #6aa106 100%);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* ============================================
   CART SUMMARY CARD
   ============================================ */
.cart-summary-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    position: sticky;
    top: 170px;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-title i {
    color: #81C408;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-row:last-of-type {
    border-bottom: none;
}

.summary-row.total {
    border-top: 2px solid #81C408;
    margin-top: 1rem;
    padding-top: 1rem;
}

.summary-label {
    color: #666;
    font-size: 0.95rem;
}

.summary-value {
    font-weight: 600;
    color: #333;
}

.summary-total-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.summary-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #81C408;
}

.discount-row {
    color: #388e3c;
}

.discount-row .summary-value {
    color: #388e3c;
}

/* ============================================
   CHECKOUT BUTTON
   ============================================ */
.checkout-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #81C408 0%, #6aa106 100%);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(129, 196, 8, 0.4);
    color: white;
}

.checkout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ============================================
   COUNTDOWN TIMER
   ============================================ */
.countdown-section {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 1.5rem;
    border: 1px solid #FFB524;
}

.countdown-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.countdown-timer {
    font-size: 2rem;
    font-weight: 700;
    color: #FFB524;
    font-family: 'Courier New', monospace;
}

.delivery-day {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    margin-top: 4px;
}

/* ============================================
   REPLACEMENT PREFERENCE
   ============================================ */
.replacement-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.replacement-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.replacement-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
}

.replacement-option input[type="radio"] {
    accent-color: #81C408;
    width: 18px;
    height: 18px;
}

.replacement-option label {
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    margin-bottom: 0;
}

/* ============================================
   CLEAR CART BUTTON
   ============================================ */
.clear-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #dc3545;
    color: #dc3545;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
}

.clear-cart-btn:hover {
    background: #dc3545;
    color: white;
}

/* ============================================
   EMPTY CART STATE
   ============================================ */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-cart-icon {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 1.5rem;
}

.empty-cart h3 {
    color: #666;
    margin-bottom: 1rem;
}

.empty-cart p {
    color: #999;
    margin-bottom: 1.5rem;
}

.shop-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #81C408 0%, #6aa106 100%);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.shop-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(129, 196, 8, 0.4);
    color: white;
    text-decoration: none;
}

/* ============================================
   REASON POPOVER
   ============================================ */
.reason-popover {
    max-width: 300px;
}

/* ============================================
   MODAL STYLES
   ============================================ */
.regen-modal .modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
}

.regen-modal .modal-header {
    background: linear-gradient(135deg, #81C408 0%, #6aa106 100%);
    color: white;
    border: none;
    padding: 1.25rem 1.5rem;
}

.regen-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.regen-modal .modal-body {
    padding: 1.5rem;
}

.store-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 1rem;
}

.store-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.store-checkbox-item:hover {
    background: #e8f5e9;
}

.store-checkbox-item input {
    accent-color: #81C408;
    width: 18px;
    height: 18px;
}

.regen-modal .modal-footer {
    border: none;
    padding: 1rem 1.5rem 1.5rem;
}

.modal-submit-btn {
    background: linear-gradient(135deg, #81C408 0%, #6aa106 100%);
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
}

.modal-submit-btn:hover {
    transform: scale(1.02);
    color: white;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 991px) {
    .cart-summary-card {
        position: relative;
        top: 0;
        margin-top: 2rem;
    }
    
    .cart-item-card {
        padding: 1rem;
    }
    
    .product-image-wrapper {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 576px) {
    .cart-item-actions {
        flex-wrap: wrap;
        gap: 8px !important;
    }
    
    .item-price {
        font-size: 1.1rem;
    }

    /* Mobile: 2-column action buttons with quantity below */
    .cart-item-actions-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    .cart-item-actions-row .cart-item-actions {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        justify-items: center !important;
    }

    .cart-item-actions-row .action-with-label {
        flex-direction: row !important;
        gap: 8px !important;
        align-items: center !important;
        border-radius: 10px;
        padding: 8px 12px;
        width: 100%;
        justify-content: flex-start;
    }

    .cart-item-actions-row .action-btn {
        flex-shrink: 0;
    }

    .cart-item-actions-row .action-label {
        font-size: 0.75rem !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
    }

    .cart-item-actions-row .quantity-controls {
        justify-content: center !important;
        width: 100%;
        border-radius: 25px;
        padding: 8px 16px;
    }
}

/* ============================================
   SUBSCRIPTION CART ITEM
   ============================================ */
.subscription-cart-item {
    background: linear-gradient(135deg, rgba(129, 196, 8, 0.05) 0%, rgba(255, 193, 7, 0.05) 100%);
    border: 2px solid #81c408;
}

.subscription-icon-wrapper {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.subscription-icon-container {
    width: 130px;
    height: 130px;
    background: linear-gradient(135deg, #ffc107 0%, #ffca28 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.subscription-cart-item .billing-cycle-badge {
    display: inline-flex;
    align-items: center;
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #495057;
    font-weight: 500;
}

.subscription-cart-item .monthly-equivalent {
    margin-top: 2px;
}

.subscription-features-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.subscription-features-mini .feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.subscription-features-mini .feature-tag i {
    font-size: 0.6rem;
}

/* Subscription row in summary */
.summary-row.subscription-row {
    background: rgba(129, 196, 8, 0.05);
    margin: 0 -1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.summary-row.subscription-row .summary-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-row.subscription-row .summary-label small {
    font-size: 0.7rem;
}
