/* ==================== SHOPPING CART ==================== */

/* Cart Toggle Button */
.cart-toggle-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 20px rgba(168, 138, 138, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cart-toggle-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 30px rgba(168, 138, 138, 0.5);
}

.cart-toggle-btn svg {
    width: 24px;
    height: 24px;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #e74c3c;
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Cart Panel */
.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 420px;
    background-color: var(--white);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 30px rgba(0,0,0,0.1);
}

.cart-panel.open {
    transform: translateX(0);
}

.cart-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.cart-panel-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.cart-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-empty-btn {
    background: none;
    border: none;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.cart-empty-btn:hover {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.08);
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-medium);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.cart-close:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.cart-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.cart-empty svg {
    stroke: var(--primary-light);
    margin-bottom: 16px;
}

.cart-empty p {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-bottom: 6px;
}

.cart-empty-hint {
    font-size: 0.9rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    background-color: var(--bg-light);
    border-radius: 12px;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

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

.cart-item-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.cart-item-meta {
    font-size: 0.82rem;
    color: var(--text-medium);
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-item-delete {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.cart-item-delete:hover {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.08);
}

.cart-item-total {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    white-space: nowrap;
    padding-top: 2px;
}

.cart-panel-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background-color: var(--white);
}

.cart-delivery-note {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.4;
}

.cart-delivery-estimate {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
}

.cart-estimated {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 1rem;
}

.cart-total {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

.cart-back-btn {
    width: 100%;
    padding: 12px 20px;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.cart-back-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.checkout-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.checkout-btn:disabled {
    background-color: var(--primary-light);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Quantity Stepper */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 32px;
    height: 32px;
    background-color: var(--bg-light);
    border: none;
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    user-select: none;
}

.qty-btn:hover {
    background-color: #eee;
}

.qty-value {
    width: 36px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}
