/* ===============================================
   TOLEDO INDOOR GARDEN - SHOPPING CART PAGE
   =============================================== */

/* === BREADCRUMB === */
.breadcrumb {
    padding: 16px 0;
    font-size: 14px;
    color: var(--gray);
}
.breadcrumb a {
    color: var(--green);
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb span[aria-hidden] {
    margin: 0 8px;
    color: #ccc;
}

/* === PAGE TITLE === */
.cart-title {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 32px;
}

/* === LOADING STATE === */
.cart-loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray);
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--green);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === EMPTY CART === */
.cart-empty {
    text-align: center;
    padding: 80px 20px;
}
.cart-empty-icon {
    margin-bottom: 24px;
}
.cart-empty h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}
.cart-empty p {
    color: var(--gray);
    margin-bottom: 24px;
    font-size: 16px;
}

/* === LAYOUT: 2-column === */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
    padding-bottom: 60px;
}

/* === CART ITEMS SECTION === */
.cart-header-row {
    display: grid;
    grid-template-columns: 2fr 1fr 140px 1fr 40px;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    background: var(--light-gray);
    border-radius: 8px 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === CART ITEM === */
.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 140px 1fr 40px;
    gap: 16px;
    align-items: center;
    padding: 20px 16px;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.15s;
}
.cart-item:hover {
    background: #fafbfc;
}

/* Product cell */
.cart-item-product {
    display: flex;
    gap: 16px;
    align-items: center;
}
.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--light-gray);
    flex-shrink: 0;
}
.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 4px;
    background: #fff;
}
.cart-item-info {
    min-width: 0;
}
.cart-item-brand {
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}
.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    line-height: 1.3;
}
.cart-item-name a {
    color: inherit;
    text-decoration: none;
}
.cart-item-name a:hover {
    color: var(--green);
}
.cart-item-sku {
    font-size: 12px;
    color: #9ca3af;
}
.cart-item-stock {
    font-size: 12px;
    margin-top: 4px;
}
.stock-in { color: var(--green); }
.stock-low { color: #f59e0b; }
.stock-out { color: #ef4444; }

/* Price cell */
.cart-item-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
}
.cart-item-price .original-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-weight: 400;
    font-size: 13px;
    display: block;
}
.cart-item-price .sale-badge {
    display: inline-block;
    background: #fef2f2;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

/* Quantity controls */
.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}
.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--dark);
    transition: background 0.15s;
}
.qty-btn:hover {
    background: #e5e7eb;
}
.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.qty-input {
    width: 48px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Line total */
.cart-item-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

/* Remove button */
.cart-item-remove {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.15s;
}
.cart-item-remove:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}
.cart-item-remove svg {
    width: 18px;
    height: 18px;
}

/* === CART ACTIONS ROW === */
.cart-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 16px;
    gap: 16px;
}

/* === ORDER SUMMARY SIDEBAR === */
.cart-summary-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
    position: sticky;
    top: 20px;
}
.summary-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
}

/* Free shipping progress */
.free-shipping-banner {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}
.free-shipping-banner p {
    font-size: 13px;
    color: #065f46;
    margin-top: 8px;
}
.free-shipping-banner .reached {
    font-weight: 600;
    color: var(--green);
}
.shipping-progress {
    height: 6px;
    background: #d1fae5;
    border-radius: 3px;
    overflow: hidden;
}
.shipping-progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Summary rows */
.summary-rows {
    margin-bottom: 24px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 15px;
    color: #374151;
}
.summary-row.summary-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    padding: 12px 0 0;
}
.summary-divider {
    height: 1px;
    background: #d1d5db;
    margin: 8px 0;
}
.summary-shipping-free {
    color: var(--green);
    font-weight: 600;
}

/* Checkout button */
.btn-checkout {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--green);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.btn-checkout:hover {
    background: var(--green-dark);
    color: white;
    transform: translateY(-1px);
}
.btn-checkout:active {
    transform: translateY(0);
}

/* Assurances */
.summary-assurances {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.assurance-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
}
.assurance-item svg {
    flex-shrink: 0;
}

/* === BUTTONS === */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: var(--green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-primary:hover { background: var(--green-dark); color: white; }

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    color: var(--dark);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--green); color: var(--green); }

.btn-outline-danger {
    padding: 10px 20px;
    background: white;
    color: #ef4444;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-outline-danger:hover { background: #fef2f2; border-color: #ef4444; }

/* === NOTIFICATION TOAST === */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.notification.show {
    transform: translateY(0);
    opacity: 1;
}
.notification-success { background: var(--green); }
.notification-error { background: #ef4444; }
.notification-warning { background: #f59e0b; }
.notification-info { background: #3b82f6; }

/* === ITEM UPDATING STATE === */
.cart-item.updating {
    opacity: 0.5;
    pointer-events: none;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .cart-summary-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .cart-header-row {
        display: none;
    }

    .cart-item {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 12px;
    }

    .cart-item-product {
        width: 100%;
    }

    .cart-item-image {
        width: 64px;
        height: 64px;
    }

    .cart-item-price {
        order: 3;
    }

    .cart-item-quantity-wrap {
        order: 4;
    }

    .cart-item-total {
        order: 5;
        margin-left: auto;
    }

    .cart-item-remove {
        order: 6;
    }

    .cart-actions-row {
        flex-direction: column;
        gap: 12px;
        padding: 16px 12px;
    }
    .cart-actions-row .btn-secondary,
    .cart-actions-row .btn-outline-danger {
        width: 100%;
        text-align: center;
    }

    .cart-summary-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .cart-item-image {
        width: 56px;
        height: 56px;
    }
    .cart-item-name {
        font-size: 14px;
    }
}
