/* ============================================
   ZARA-STYLE CART PAGE DESIGN
   ============================================ */

:root {
    --zara-black: #000000;
    --zara-white: #ffffff;
    --zara-gray: #f5f5f5;
    --zara-border: #e5e5e5;
    --zara-text: #1a1a1a;
    --zara-text-light: #666666;
    --zara-hover: #fafafa;
}

/* Reset and Base Styles */
body {
    background-color: var(--zara-white);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--zara-text);
    line-height: 1.6;
}

/* Main Container */
section.h-100.gradient-custom {
    background: var(--zara-white) !important;
    margin-top: 0;
    padding: 0;
}

.containerCart {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Heading Section */
.heading {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    margin: 70px 0px 0px 0px;
    padding: 20px 0;
    border-bottom: 1px solid var(--zara-border);
    gap: 15px;
}

.heading h1 {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin: 0;
    color: var(--zara-text);
    text-transform: uppercase;
}

.continue {
    background: transparent;
    border: none;
    color: var(--zara-text);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
    padding: 0;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.continue:hover {
    opacity: 0.7;
    background: transparent;
    padding-left: 0;
}

.continue i {
    font-size: 12px;
}

/* Back Button */
.back-button-container {
    display: flex;
    align-items: center;
}

.back-btn,
.backbutton {
    background-color: transparent;
    color: var(--zara-text, #1a1a1a);
    border: 1px solid var(--zara-border, #e5e5e5);
    padding: 8px 15px;
    border-radius: 0;
    cursor: pointer;
    font-size: 13px;
    /* Increased from 11px */
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "Montserrat", sans-serif;
    margin-bottom: 20px;
}

.back-btn:hover,
.backbutton:hover {
    background-color: var(--zara-gray, #f5f5f5);
    border-color: var(--zara-text, #1a1a1a);
    opacity: 1;
}

.back-btn i {
    font-size: 14px;
}

/* Cart Items Container */
.row.d-flex {
    margin: 0;
}

.col-md-8 {
    padding: 0 15px;
}

.col-md-4 {
    padding: 0 15px;
}

/* Card Styling - Zara Style */
.card {
    background: var(--zara-white);
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.card-header {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--zara-border);
    padding: 20px 0;
    margin-bottom: 0;
}

.card-header h5 {
    font-size: 15px;
    /* Increased from 14px */
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--zara-text);
    margin: 0;
}

.card-body {
    padding: 0;
}

/* Cart Item Row */
.card-body>.row {
    padding: 30px 0;
    border-bottom: 1px solid var(--zara-border);
    margin: 0;
    display: flex;
    align-items: flex-start;
    transition: background-color 0.2s ease;
}

.card-body>.row:hover {
    background-color: var(--zara-hover);
}

.card-body>.row:last-child {
    border-bottom: none;
}

/* Product Image */
.col-lg-3 {
    padding: 0 15px 0 0;
    flex: 0 0 180px;
    max-width: 180px;
}

.bg-image {
    position: relative;
    width: 100%;
    padding-bottom: 120%;
    overflow: hidden;
    background: var(--zara-gray);
}

.bg-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius:20px;
}

.mask {
    display: none;
}

/* Product Details */
.col-lg-5 {
    padding: 0 20px;
    flex: 1;
    min-width: 0;
}

.col-lg-5 p {
    margin: 0 0 8px 0;
    font-size: 15px;
    /* Increased from 14px */
    line-height: 1.5;
}

.col-lg-5 p strong {
    font-weight: 400;
    font-size: 15px;
    /* Increased from 14px */
    letter-spacing: 0.3px;
    color: var(--zara-text);
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.col-lg-5 p strong a {
    color: var(--zara-text);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.col-lg-5 p strong a:hover {
    opacity: 0.7;
}

.col-lg-5>p:not(:first-child) {
    color: var(--zara-text-light);
    font-size: 14px;
    /* Increased from 13px */
}

/* Quantity Controls - Zara Style */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 20px 0 10px 0;
    border: 1px solid var(--zara-border);
    width: fit-content;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--zara-white);
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background-color 0.2s ease;
    color: var(--zara-text) !important;
    padding: 0;
    margin: 0;
}

.quantity-btn:first-child {
    border-right: 1px solid var(--zara-border);
}

.quantity-btn:last-child {
    border-left: 1px solid var(--zara-border);
}

.quantity-btn:hover {
    background: var(--zara-gray);
}

.quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-btn i {
    color: var(--zara-text) !important;
    font-size: 12px;
}

.quantity-input {
    width: 50px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--zara-border);
    border-right: 1px solid var(--zara-border);
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    color: var(--zara-text);
    background: var(--zara-white);
    -webkit-appearance: none;
    appearance: none;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-info {
    font-size: 12px;
    color: var(--zara-text-light);
    margin-top: 8px;
    color: #ff0000;
}

/* Delete Button - Zara Style */
.delete {
    background: transparent;
    border: none;
    color: var(--zara-text);
    padding: 8px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-top: 15px;
    box-shadow: none;
}

.delete:hover {
    opacity: 0.7;
    background: transparent;
}

.delete i {
    font-size: 14px;
    margin-right: 4px;
}

/* Price Section */
.col-lg-4 {
    padding: 0 0 0 20px;
    flex: 0 0 auto;
    text-align: right;
}

.item-price-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.item-total-price {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.3px;
    color: var(--zara-text);
}

.item-unit-price {
    font-size: 13px;
    /* Increased from 12px */
    color: var(--zara-text-light);
    font-weight: 300;
}

/* Divider */
hr.my-4 {
    display: none;
}

/* Summary Card - Zara Style */
.col-md-4 .card {
    position: sticky;
    top: 100px;
}

.col-md-4 .card-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--zara-border);
}

.col-md-4 .card-body {
    padding: 20px 0;
}

/* Summary List */
.list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-group-item {
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid var(--zara-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 14px;
    /* Increased from 13px */
}

.list-group-item:last-child {
    border-bottom: none;
    padding: 20px 0;
    margin-top: 10px;
    border-top: 1px solid var(--zara-border);
}

.summary-item-name {
    flex: 1;
    color: var(--zara-text);
    font-weight: 300;
    line-height: 1.4;
    text-transform: uppercase;
}

.summary-item-qty {
    color: var(--zara-text-light);
    margin-left: 4px;
}

.summary-item-total {
    font-weight: 400;
    color: var(--zara-text);
    font-size: 14px;
    /* Increased from 13px */
}

.list-group-item strong {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.3px;
    color: var(--zara-text);
}

.cart-total {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Checkout Button - Zara Style */
.checkout {
    width: 100%;
    background: var(--zara-black);
    color: var(--zara-white);
    border: none;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-top: 20px;
    border-radius: 0;
}

.checkout:hover {
    opacity: 0.8;
    background: var(--zara-black);
}

.checkout:disabled {
    background: var(--zara-border);
    color: var(--zara-text-light);
    cursor: not-allowed;
    opacity: 1;
}

.checkout.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.checkout .btn-spinner {
    display: inline-block;
    margin-left: 8px;
}

.checkout.loading .btn-text {
    opacity: 0.7;
}

/* Clear Cart Button */
.clearcart {
    width: 100%;
    background: transparent;
    color: var(--zara-text);
    border: 1px solid var(--zara-border);
    padding: 12px 24px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 15px;
    border-radius: 0;
    display: block;
    text-align: center;
}

.clearcart:hover {
    background: var(--zara-gray);
    text-decoration: none;
}

/* Empty Cart */
.text-center {
    text-align: center;
    padding: 80px 20px;
}

.text-center i {
    color: var(--zara-border);
    margin-bottom: 20px;
}

.text-center h3 {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--zara-text);
    margin-bottom: 10px;
}

.text-center .text-muted {
    color: var(--zara-text-light);
    font-size: 14px;
    margin-bottom: 30px;
}

.text-center .btn-primary {
    background: var(--zara-black);
    color: var(--zara-white);
    border: none;
    padding: 14px 28px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.text-center .btn-primary:hover {
    opacity: 0.8;
    background: var(--zara-black);
}

/* Responsive Design */
@media (max-width: 992px) {
    .containerCart {
        padding: 30px 15px;
    }

    .heading {
        flex-direction: row;
        align-items: baseline;
        gap: 15px;
    }

    .heading h1 {
        font-size: 24px;
    }

    .col-lg-3 {
        flex: 0 0 140px;
        max-width: 140px;
    }

    .col-lg-5 {
        padding: 0 15px;
    }

    .col-lg-4 {
        padding: 0 0 0 15px;
    }

    .col-md-4 .card {
        position: static;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .containerCart {
        padding: 20px 10px;
    }

    .back-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .heading h1 {
        font-size: 20px;
    }

    .card-body>.row {
        flex-direction: row-reverse;
        padding: 20px 0;
    }

    .col-lg-3 {
        flex: 0 0 100%;
        max-width: 50%;
        padding: 0 0 15px 0;
    }

    .bg-image {
        padding-bottom: 120%;
        /* Changed from 75% to 120% for vertical shape */
        max-width: 160px;
        margin: 0 auto;
        /* Center the image */
    }

    .col-lg-5 {
        padding: 0px 0px 0px 21px;
        margin-bottom: 15px;
    }

    .col-lg-4 {
        padding: 0;
        text-align: start;
    }

    .item-price-section {
        align-items: flex-start;
    }

    .quantity-controls {
        margin: 15px 0 10px 0;
    }
}

@media (max-width: 576px) {
    .back-btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    .back-btn i {
        font-size: 12px;
    }

    .heading h1 {
        font-size: 18px;
    }

    .card-header h5 {
        font-size: 12px;
    }

    .col-lg-5 p strong {
        font-size: 13px;
    }

    .item-total-price {
        font-size: 15px;
    }

    .checkout {
        padding: 14px 20px;
        font-size: 12px;
    }

    .clearcart {
        padding: 10px 20px;
        font-size: 11px;
    }
}

/* Remove Bootstrap card styling overrides */
.card.mb-4 {
    margin-bottom: 0 !important;
}

.card.mb-4.mb-lg-0 {
    margin-bottom: 0 !important;
}

/* ============================================
   Coupon section - Modern Zen Style
   ============================================ */
.coupon-section {
    padding: 24px 0;
    border-top: 1px solid var(--zara-border);
    margin-top: 10px;
}

.coupon-toggle-btn {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--zara-text);
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s ease;
}

.coupon-toggle-btn:hover {
    opacity: 0.7;
}

.coupon-toggle-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.coupon-toggle-btn.active i {
    transform: rotate(180deg);
}

.coupon-form-container {
    display: none;
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.coupon-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--zara-text-light);
    margin-bottom: 12px;
}

.coupon-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coupon-input-group {
    display: flex;
    gap: 0;
}

.coupon-input {
    flex: 1;
    height: 44px;
    padding: 0 15px;
    border: 1px solid var(--zara-border);
    border-right: none;
    background: var(--zara-white);
    font-size: 14px;
    font-weight: 400;
    color: var(--zara-text);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-radius: 0;
}

.coupon-input:focus {
    outline: none;
    border-color: var(--zara-text);
}

.coupon-apply-btn {
    height: 44px;
    padding: 0 25px;
    background: var(--zara-black);
    color: var(--zara-white);
    border: none;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 0;
}

.coupon-apply-btn:hover {
    background: #333;
}

.coupon-select {
    width: 100%;
    height: 44px;
    padding: 0 15px;
    border: 1px solid var(--zara-border);
    background: var(--zara-white);
    font-size: 13px;
    font-weight: 400;
    color: var(--zara-text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    border-radius: 0;
}

.coupon-select:focus {
    outline: none;
    border-color: var(--zara-text);
}

.coupon-hint {
    font-size: 11px;
    color: var(--zara-text-light);
    margin-top: 8px;
    display: block;
    font-style: italic;
}

.coupon-message {
    font-size: 13px;
    display: block;
}

.coupon-message--error {
    background: #fde8e8;
    color: #c0392b;
    border: 1px solid #e8c4c4;
}

.coupon-message--success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.applied-coupon-box {
    padding: 15px;
    background: #f9f9f9;
    border: 1px dashed var(--zara-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.applied-coupon-text {
    font-size: 13px;
    color: var(--zara-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.applied-coupon-text i {
    color: #27ae60;
}

.coupon-remove-btn {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}

.coupon-remove-btn:hover {
    text-decoration: underline;
}

.coupon-hint {
    font-size: 11px;
    color: var(--zara-text-light);
    letter-spacing: 0.2px;
}

.coupon-section .applied-coupon-text i {
    margin-right: 6px;
    color: var(--zara-text-light);
}

.coupon-section .coupon-remove-btn {
    background: transparent;
    border: none;
    color: var(--zara-text);
    padding: 4px 0;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: underline;
}

.coupon-section .coupon-remove-btn:hover {
    opacity: 0.7;
}

.coupon-section .coupon-remove-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

.coupon-badge {
    display: inline-block;
    font-size: 11px;
    color: var(--zara-text-light);
    margin-left: 4px;
}

.item-original-price {
    margin-right: 6px;
}

/* ============================================
   Coupon section - mobile (better inputs)
   ============================================ */
@media (max-width: 768px) {
    .coupon-section {
        padding: 20px 0;
        border-top: 1px solid var(--zara-border);
        margin-top: 10px;
    }

    .coupon-toggle-btn {
        width: 100%;
        justify-content: space-between;
        padding: 10px 0;
    }

    .coupon-form-container {
        margin-top: 15px;
    }

    .coupon-input-group {
        flex-direction: column;
        gap: 10px;
    }

    .coupon-input {
        border-right: 1px solid var(--zara-border);
        height: 48px;
        font-size: 16px;
        padding: 10px;
        /* Prevents zoom on iOS */
    }

    .coupon-apply-btn {
        width: 100%;
        height: 48px;
    }

    .coupon-select {
        height: 48px;
        font-size: 15px;
    }

    .applied-coupon-box {
        padding: 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .applied-coupon-text {
        font-size: 12px;
    }
}