.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

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

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #64748b;
    transition: color 0.2s;
}

.close-cart:hover {
    color: #1e293b;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.cart-item-details h3 {
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.cart-item-details p {
    color: #64748b;
    margin: 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-controls button {
    background: #f1f5f9;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    color: #1e293b;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls button:hover {
    background: #e2e8f0;
}

.quantity-controls .quantity {
    min-width: 24px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #64748b;
    align-self: flex-start;
    transition: color 0.2s;
}

.remove-item:hover {
    color: #ef4444;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.subtotal {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.tax-notice {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.checkout-button {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: #2563eb;
    color: white;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 0.75rem;
    transition: background-color 0.2s;
}

.checkout-button:hover {
    background: #1d4ed8;
}

.view-cart-button {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: #f1f5f9;
    color: #1e293b;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.view-cart-button:hover {
    background: #e2e8f0;
}

/* Cart Page Styles */
.cart-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.cart-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.cart-page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
}

.cart-page-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cart-page-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-page-item-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.cart-page-item-price {
    font-size: 1.125rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.cart-page-quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-page-quantity-controls button {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    color: #1e293b;
    font-size: 1.125rem;
    transition: background-color 0.2s;
}

.cart-page-quantity-controls button:hover {
    background: #e2e8f0;
}

.cart-page-quantity-controls .quantity {
    font-size: 1.125rem;
    min-width: 32px;
    text-align: center;
}

.cart-page-item-total {
    text-align: right;
}

.cart-page-item-total .price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.cart-page-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.cart-page-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.cart-page-summary-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.125rem;
}

.cart-page-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: #f1f5f9;
    color: #1e293b;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: #1d4ed8;
}

/* Cart Button Styles */
.cart-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #1e293b;
}

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

.cart-count {
    position: absolute;
    top: -2px;
    right: -8px;
    background: #2d3748 !important;
    color: white !important;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 5;
    line-height: 1;
    margin: 0;
    text-indent: 0;
    text-align: center;
    border: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cart-page-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }

    .cart-page-item-total {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 1rem;
    }

    .cart-page-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .cart-page {
        padding: 1rem;
    }
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3748;
    text-decoration: none;
    position: relative;
    padding: 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    width: auto;
    height: auto;
}

.icon-btn.cart-link {
    width: auto;
    height: auto;
    border-radius: 0;
}

.cart-label {
    margin-left: 4px;
}

.icon-btn.cart-link svg {
    width: 20px;
    height: 20px;
    display: block;
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -8px;
    background: #2d3748 !important;
    color: white !important;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

@media (max-width: 768px) {
    .cart-label {
        display: none;
    }
    
    .cart-link {
        width: 36px;
        height: 36px;
        padding: 0;
    }
} 