/* Cart Styles */

/* Cart Icon in Navigation */
.nav-cart {
    position: relative;
    margin-left: auto;
}

.cart-icon {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-icon:hover {
    color: var(--primary-blue);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--vibrant-orange);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Cart Feedback Animation */
.cart-feedback {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.cart-feedback.show {
    transform: translateX(0);
}

.cart-feedback-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-feedback-icon {
    color: var(--success-green, #10b981);
    flex-shrink: 0;
}

.cart-feedback-text {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.25rem;
}

.cart-feedback-title {
    font-size: 0.875rem;
    color: var(--text-light);
    display: block;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2500;
    display: none;
}

.cart-sidebar.active {
    display: block;
}

.cart-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.cart-sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 90vw;
    background: white;
    display: flex;
    flex-direction: column;
    animation: slide-in-right 0.3s ease;
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.cart-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.cart-sidebar-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-sidebar-close:hover {
    color: var(--text-dark);
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
}

.cart-empty p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    align-items: center;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.cart-item-meta {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0 0 0.5rem 0;
}

.cart-item-price {
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-light);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.quantity-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.cart-item-remove {
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: var(--error-red, #ef4444);
}

.cart-sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    background: white;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-checkout {
    width: 100%;
    margin-bottom: 0.75rem;
}

.continue-shopping {
    width: 100%;
}

/* Enhanced Lightbox Metadata */
.lightbox-price-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.lightbox-price {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0;
}

.lightbox-availability {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.lightbox-availability.available {
    background: var(--success-bg, #d1fae5);
    color: var(--success-text, #065f46);
}

.lightbox-availability.sold-out {
    background: var(--error-bg, #fee2e2);
    color: var(--error-text, #991b1b);
}

.lightbox-metadata {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.metadata-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.metadata-row:last-child {
    border-bottom: none;
}

.metadata-label {
    font-weight: 500;
    color: var(--text-light);
}

.metadata-value {
    color: var(--text-dark);
}

.lightbox-description-section {
    margin: 1.5rem 0;
}

.description-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.lightbox-cart-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 1rem;
}

.btn-add-cart {
    flex: 1;
}

.btn-add-cart.added {
    background: var(--success-green, #10b981);
}

.sold-out-message {
    color: var(--text-light);
    font-style: italic;
    margin: 0;
}

/* Checkout Page */
.checkout-page {
    padding: 100px 0 3rem;
    min-height: 100vh;
}

.checkout-title {
    font-family: var(--font-accent);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
}

.checkout-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.subsection-title {
    font-size: 1.125rem;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
}

.checkout-form {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.payment-placeholder {
    text-align: center;
    padding: 2rem;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.placeholder-text {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.btn-large {
    font-size: 1.125rem;
    padding: 1rem 2rem;
}

/* Order Summary */
.order-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-details {
    flex: 1;
}

.order-item-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
}

.order-item-details p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-light);
}

.item-quantity {
    margin-top: 0.25rem;
}

.order-item-price {
    font-weight: 600;
    white-space: nowrap;
}

.order-totals {
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.total-row.total-final {
    font-size: 1.25rem;
    font-weight: 600;
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.summary-footer {
    margin-top: 1.5rem;
}

.summary-footer .btn {
    width: 100%;
}

.empty-cart {
    text-align: center;
    color: var(--text-light);
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .checkout-content {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: relative;
        top: 0;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .cart-sidebar-content {
        width: 100%;
        max-width: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .lightbox-cart-section {
        flex-direction: column;
    }

    .cart-item {
        grid-template-columns: 60px 1fr;
        gap: 0.75rem;
    }

    .cart-item-quantity,
    .cart-item-remove {
        grid-column: 2;
    }
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: #9ca3af;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* Utility Variables */
:root {
    --success-green: #10b981;
    --success-bg: #d1fae5;
    --success-text: #065f46;
    --error-red: #ef4444;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
    --gray-50: #f9fafb;
}