/**
 * Custom Cart Page Styles - Scoped to avoid global conflicts
 * All classes are prefixed with 'custom-cart-' or wrapped in .custom-cart-container
 */

/* Import Rubik Font */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');

/* Root variables scoped to custom cart */
.custom-cart-container {
    all: unset;
    display: block;
    --cc-primary-text: #1c1c1c;
    --cc-secondary-text: #666;
    --cc-border-color: #eee;
    --cc-green-bg: #d4f7e6;
    --cc-green-text: #1f8b57;
    --cc-dark-btn: #232f3e;
    --cc-bg-color: #f8f8f8;
}

/* Reset all elements within the container */
.custom-cart-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rubik', sans-serif;
}

/* Container */
.custom-cart-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--cc-bg-color);
    color: var(--cc-primary-text);
    padding: 40px;
}

.custom-cart-page-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #222;
    font-family: 'Rubik', sans-serif;
}

/* Layout Grid */
.custom-cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* --- Left Column --- */

/* Green Promo Banner */
.custom-cart-promo-banner {
    background-color: var(--cc-green-bg);
    color: var(--cc-green-text);
    padding: 15px 20px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
    font-weight: 500;
}

.custom-cart-coupon-badge {
    border: 1px dashed var(--cc-green-text);
    padding: 5px 15px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
}

/* Cart Table Headers */
.custom-cart-header {
    display: grid;
    grid-template-columns: 4fr 1fr 1.5fr 1fr;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--cc-border-color);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 20px;
}

/* Product Row */
.custom-cart-item {
    display: grid;
    grid-template-columns: 4fr 1fr 1.5fr 1fr;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--cc-border-color);
    margin-bottom: 20px;
}

.custom-cart-product-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.custom-cart-remove-icon {
    color: #ff4d4f;
    cursor: pointer;
    margin-right: 10px;
    font-size: 14px;
}

.custom-cart-product-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.custom-cart-product-name {
    font-weight: 500;
    color: #333;
    font-size: 15px;
}

.custom-cart-price,
.custom-cart-subtotal {
    font-weight: 500;
    color: #333;
}

/* Quantity Selector */
.custom-cart-qty-selector {
    display: inline-flex;
    background-color: #eee;
    padding: 8px 15px;
    border-radius: 2px;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

.custom-cart-qty-btn {
    cursor: pointer;
    user-select: none;
}

/* Coupon & Update Actions */
.custom-cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.custom-cart-coupon-input-group {
    display: flex;
    gap: 10px;
}

.custom-cart-coupon-input-group input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
    outline: none;
    font-family: 'Rubik', sans-serif;
}

.custom-cart-coupon-input-group button {
    padding: 10px 20px;
    background-color: #e0e0e0;
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Rubik', sans-serif;
}

.custom-cart-coupon-input-group button:hover {
    background-color: #232f3e;
}

.custom-cart-update-link {
    color: #333;
    text-decoration: underline;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
}

/* Trust Badges Grid (3 boxes at bottom left) */
.custom-cart-trust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.custom-cart-trust-item {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

.custom-cart-trust-icon {
    font-size: 24px;
    margin-bottom: 15px;
    color: #4a5568;
}

.custom-cart-trust-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #4a5568;
    font-size: 14px;
}

.custom-cart-trust-desc {
    font-size: 12px;
    color: #777;
    line-height: 1.5;
}

/* --- Right Column (Totals) --- */
.custom-cart-totals {
    background: white;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.custom-cart-totals-header {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    font-family: 'Rubik', sans-serif;
}

.custom-cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
}

.custom-cart-shipping-section {
    margin-bottom: 20px;
}

.custom-cart-shipping-title {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 15px;
}

.custom-cart-shipping-option {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
    align-items: center;
}

.custom-cart-shipping-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.custom-cart-shipping-destination {
    margin-top: 20px;
    font-size: 13px;
    color: #333;
}

.custom-cart-change-address {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #555;
    text-decoration: underline;
    margin-top: 5px;
    cursor: pointer;
}

.custom-cart-final-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-bottom: 20px;
}

.custom-cart-checkout-btn {
    width: 100%;
    background-color: var(--cc-dark-btn);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 30px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 20px;
    font-family: 'Rubik', sans-serif;
}

.custom-cart-checkout-btn:hover {
    background-color: #1a252f;
}

.custom-cart-secure-text {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.custom-cart-payment-icons {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.custom-cart-payment-icons img {
    height: 20px;
}

/* Utilities */
.custom-cart-text-right {
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-cart-layout {
        grid-template-columns: 1fr;
    }

    .custom-cart-header {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        font-size: 12px;
    }

    .custom-cart-item {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .custom-cart-trust-grid {
        grid-template-columns: 1fr;
    }

    .custom-cart-promo-banner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}
