/* Shopping Cart Page Styles */

body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#cart-main {
    padding: 40px 0;
    min-height: 80vh;
}

.cart-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
}

/* ── Cart Item Cards ───────────────────────────────────────────────────────── */
.cart-items-section {
    background-color: white;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(82, 58, 40, 0.08);
    overflow: hidden;
}

#cart-items-body {
    padding: 0 4px;
}

.cart-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 12px;
    border-bottom: 1px solid #f0ebe5;
    transition: background 0.15s;
}

.cart-card:last-child {
    border-bottom: none;
}

.cart-card:hover {
    background: #fdf8f5;
}

.cart-card-check {
    flex: 0 0 22px;
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.cart-card-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #523A28;
    cursor: pointer;
}

.cart-card-img {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e8ddd5;
}

.cart-card-info {
    flex: 1 1 0;
    min-width: 0;
}

.cart-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #2c1e14;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #7a5c45;
    margin-bottom: 6px;
}

.cart-card-specs {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 6px;
}

.cart-card-room {
    display: inline-block;
    padding: 2px 6px;
    background: #e8f4ed;
    color: #2c5e3d;
    border: 1px solid #d1e6db;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.cart-card-room i {
    font-size: 10px;
    margin-right: 2px;
}

/* Actions column (price + qty + subtotal + remove) */
.cart-card-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 110px;
}

.cart-card-price {
    font-size: 12px;
    color: #9a7a6a;
}

.cart-card-subtotal {
    font-size: 15px;
    font-weight: 700;
    color: #2c1e14;
}

/* ── Batch Toolbar ─────────────────────────────────────────────────────────── */

.cart-batch-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #faf6f2;
    border: 1px solid #c8b4a0;
    border-radius: 8px;
    padding: 10px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(82, 58, 40, 0.08);
}

.batch-toolbar-info {
    font-size: 14px;
    color: #7a5c45;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.batch-toolbar-info i {
    color: #8B5E52;
    font-size: 16px;
}

.batch-toolbar-delete-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background-color: #8B5E52;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(82, 58, 40, 0.2);
}

.batch-toolbar-delete-btn:hover {
    background-color: #6d4a40;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(82, 58, 40, 0.3);
}

.batch-toolbar-delete-btn i {
    font-size: 13px;
}

#cart-items-table tbody td {
    padding: 20px 10px;
    vertical-align: middle;
}

.cart-item-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.cart-item-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.cart-item-options {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.cart-item-options div {
    margin-bottom: 3px;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ced4da;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background-color: #523A28;
    color: white;
    border-color: #523A28;
}

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

.quantity-input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

/* Remove Button */
.remove-btn {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 16px;
    padding: 5px 10px;
    transition: all 0.2s;
    border-radius: 4px;
}

.remove-btn:hover {
    color: #8B5E52;
    background: #f5ede8;
    transform: scale(1.1);
}

/* Price Display */
.cart-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #523A28;
}

.cart-item-subtotal {
    font-size: 18px;
    font-weight: 600;
    color: #523A28;
}

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

.empty-cart-message i {
    font-size: 80px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-cart-message h3 {
    color: #666;
    font-size: 24px;
    margin-bottom: 10px;
}

.empty-cart-message p {
    color: #999;
    font-size: 16px;
    margin-bottom: 30px;
}

.continue-shopping-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    background-color: #523A28;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(82, 58, 40, 0.25);
    font-family: Arial, sans-serif;
}

.continue-shopping-btn:hover {
    background-color: #3b2314;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(82, 58, 40, 0.35);
}

.continue-shopping-btn i {
    font-size: 13px;
    transition: transform 0.2s;
}

.continue-shopping-btn:hover i {
    transform: translateX(-3px);
}

.continue-shopping-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    background-color: #523A28;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(82, 58, 40, 0.25);
    font-family: Arial, sans-serif;
    vertical-align: middle;
}

/* Fix #1: ensure Bootstrap outline-secondary also aligns icon + text */
.btn-outline-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #523A28;
    border-color: #523A28;
}

.cart-summary {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {

    /* position:sticky MUST be on the column itself, not the inner card.
       align-self:flex-start lets the column be shorter than the left side,
       so the column scrolls independently inside the taller flex row. */
    #cart-summary-section {
        align-self: flex-start;
        position: sticky;
        top: 90px;
    }
}


.cart-summary h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 16px;
    color: #666;
}

.summary-row.total {
    font-size: 20px;
    color: #333;
    padding-top: 15px;
}

.cart-summary hr {
    margin: 15px 0;
    border-color: #dee2e6;
}

.shipping-notice {
    text-align: center;
    color: #666;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.shipping-notice i {
    margin-right: 5px;
    color: #523A28;
}

/* Buttons */
.btn-primary {
    background-color: #523A28;
    border-color: #523A28;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #3d2b1e;
    border-color: #3d2b1e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 58, 40, 0.3);
}

.btn-outline-secondary {
    color: #523A28;
    border-color: #523A28;
}

.btn-outline-secondary:hover {
    background-color: #523A28;
    border-color: #523A28;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    #cart-items-table {
        font-size: 14px;
    }

    #cart-items-table thead {
        display: none;
    }

    #cart-items-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 15px;
    }

    #cart-items-table tbody td {
        display: block;
        text-align: left;
        padding: 8px 0;
        border: none;
    }

    #cart-items-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
        color: #666;
    }

    .cart-item-product {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item-image {
        width: 100%;
        height: auto;
        max-width: 200px;
    }

    .quantity-controls {
        justify-content: flex-start;
    }

    .cart-summary-section {
        margin-top: 30px;
    }

    .cart-title {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .cart-items-section {
        padding: 15px;
    }

    .cart-summary {
        padding: 20px;
    }

    .empty-cart-message {
        padding: 40px 15px;
    }

    .empty-cart-message i {
        font-size: 60px;
    }

    .empty-cart-message h3 {
        font-size: 20px;
    }
}