/* Shopping Cart Sidebar Styles */
:root {
    --gold: #e4d88a;
    --gold-dim: #c5b358;
    --dark-bg: #0a0e14;
    --card-bg: rgba(20, 26, 32, 0.95);
    --text-primary: #e8e8e8;
    --text-secondary: #a8c8c0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cart Toggle in Nav */
.cart-toggle {
    position: relative;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-toggle:hover {
    color: var(--gold);
    transform: translateY(-2px);
}

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

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--gold);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    /* Shown via JS */
    align-items: center;
    justify-content: center;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    /* Initially hidden */
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: var(--dark-bg);
    border-left: 1px solid rgba(228, 216, 138, 0.2);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

/* Header */
.cart-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--gold);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.1em;
}

.close-cart {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--gold);
}

/* Content */
.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

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

.empty-cart-msg {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.cart-item-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #cc3333;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 4px;
}

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

.cart-quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.cart-quantity-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.cart-quantity-controls input {
    width: 32px;
    height: 28px;
    background: none;
    border: none;
    color: var(--gold);
    text-align: center;
    font-size: 0.85rem;
    -moz-appearance: textfield;
    appearance: textfield;
}

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

.cart-item-price {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 0.9rem;
}

/* Footer */
.cart-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-subtotal span:first-child {
    color: var(--text-secondary);
    font-size: 1rem;
}

.cart-subtotal span:last-child {
    color: var(--gold);
    font-size: 1.4rem;
    font-family: 'Cinzel', serif;
}

.checkout-link {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--gold);
    color: #000;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.05em;
    transition: var(--transition);
}

.checkout-link:hover {
    background: #fff;
    transform: translateY(-2px);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .cart-drawer {
        max-width: 100%;
        right: -100%;
    }
}