/* Apple Luxury Store - Black & Gold Theme */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

:root {
    --primary-black: #000000;
    --primary-gold: #D4AF37;
    --dark-gray: #1a1a1a;
    --medium-gray: #333333;
    --light-gray: #b8b8b8;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --gold-light: #f4e5c2;
    --gold-dark: #b8941f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--primary-black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -2px;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

h3 {
    font-size: 1.8rem;
    font-weight: 600;
}

p {
    color: var(--light-gray);
    font-weight: 300;
    margin-bottom: 1rem;
}

a {
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-gold);
}

/* Buttons */
/* Standardized Button Styles */
.btn,
.btn-primary,
.btn-secondary,
.btn-outline-gold,
.btn-whatsapp,
.btn-view,
.btn-danger,
.btn-success {
    padding: 12px 24px;
    height: 48px;
    /* Consistent height */
    border-radius: 10px;
    /* Unified shape: 10px */
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    /* Consistent font-weight */
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    /* Better for centering icon + text */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    /* Reserve space for border to prevent layout shift */
    text-decoration: none;
    line-height: 1;
}

/* Primary Action: WhatsApp (Green) */
.btn-whatsapp {
    background-color: #00D95F !important;
    border-color: #00D95F !important;
    color: #ffffff !important;
}

.btn-whatsapp:hover {
    background-color: #00b34e !important;
    /* Darker green */
    border-color: #00b34e !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 217, 95, 0.3);
}

/* Secondary Action: Add to Cart / Primary Gold (Gold) */
.btn-primary,
.btn-gold {
    background: var(--primary-gold) !important;
    border-color: var(--primary-gold) !important;
    color: var(--primary-black) !important;
}

.btn-primary:hover,
.btn-gold:hover {
    background: var(--gold-dark) !important;
    /* Darker gold */
    border-color: var(--gold-dark) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Tertiary Action: View Details (Outlined) */
.btn-outline-gold,
.btn-view {
    background: transparent !important;
    border-color: var(--primary-gold) !important;
    color: var(--primary-gold) !important;
}

.btn-outline-gold:hover,
.btn-view:hover {
    background: var(--primary-gold) !important;
    color: var(--primary-black) !important;
    transform: translateY(-2px);
}

/* Secondary Button (White Outline) */
.btn-secondary {
    background: transparent !important;
    color: var(--white) !important;
    border-color: var(--white) !important;
}

.btn-secondary:hover {
    background: var(--white) !important;
    color: var(--primary-black) !important;
    transform: translateY(-2px);
}

/* Danger Button (e.g., Remove) */
.btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

.btn-danger:hover {
    background-color: #bb2d3b !important;
    border-color: #bb2d3b !important;
    transform: translateY(-2px);
}

/* Dark Button */
.btn-dark {
    background: var(--dark-gray) !important;
    color: var(--white) !important;
    border-color: var(--dark-gray) !important;
}

.btn-dark:hover {
    background: var(--medium-gray) !important;
    transform: translateY(-2px);
}

/* Small variants */
.btn-sm {
    padding: 8px 16px;
    height: 36px;
    font-size: 0.85rem;
}

/* Large variants */
.btn-lg {
    padding: 14px 32px;
    height: 54px;
    font-size: 1.1rem;
}

/* Navigation */
.navbar {
    background: rgba(0, 0, 0, 0.95);
    /* backdrop-filter removed for Safari performance */
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    will-change: transform;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-gold) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-brand:hover {
    color: var(--gold-light) !important;
}

.navbar-brand img {
    height: 40px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
}

.nav-link {
    color: var(--white) !important;
    margin: 0 15px;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-gold) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-gold);
    transition: transform 0.3s ease;
    transform: scaleX(0);
    transform-origin: left;
    will-change: transform;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--primary-black);
}

.hero-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    background: #000;
}

.hero-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 1;
    /* Ensure visible when playing */
    transition: opacity 1s ease;
}

.hero-mobile-fallback {
    display: none;
    background: url('https://img.youtube.com/vi/ZDd-SkxfK5I/maxresdefault.jpg') center/cover no-repeat;
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

@media (max-width: 991px) {
    .hero-video {
        display: none !important;
    }

    .hero-mobile-fallback {
        display: block;
    }
}

/* Floating Logo */
/* Floating Logo - Removed */

/* Make logo more visible on smaller screens */
@media (max-width: 768px) {
    .floating-logo img {
        height: 45px;
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 1s ease;
}



.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-gold, #d4af37);
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-weight: 300;
    max-width: 700px;
    line-height: 1.4;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) translateZ(0);
        -webkit-transform: translateY(30px) translateZ(0);
    }

    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
        -webkit-transform: translateY(0) translateZ(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0px);
    }

    50% {
        transform: translate(-50%, -50%) translateY(-20px);
    }
}

/* Product Cards */
.product-card {
    background: var(--dark-gray);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.2);
    border-color: var(--primary-gold);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-body {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.product-description {
    color: #ffffff !important;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex: 1;
    opacity: 1 !important;
}

/* Cart */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--dark-gray);
    z-index: 1100;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

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

.cart-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--medium-gray);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1rem;
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

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

/* Forms */
.form-control {
    background: var(--dark-gray);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--white);
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: var(--medium-gray);
    border-color: var(--primary-gold);
    color: var(--white);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
    outline: none;
}

.form-label {
    color: var(--primary-gold);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-select {
    background: var(--dark-gray);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--white);
    border-radius: 10px;
    padding: 12px 20px;
}

/* Footer */
.footer {
    background: var(--dark-gray);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--light-gray);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-gold);
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .navbar-brand {
    flex-direction: row-reverse;
}

[dir="rtl"] .navbar-brand img {
    margin-left: 10px;
    margin-right: 0;
}

[dir="rtl"] .nav-link {
    margin: 0 15px;
}

[dir="rtl"] .cart-sidebar {
    right: auto;
    left: -400px;
}

[dir="rtl"] .cart-sidebar.open {
    left: 0;
}

[dir="rtl"] .cart-item-image {
    margin-left: 1rem;
    margin-right: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .floating-logo img {
        max-height: 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .floating-logo {
        width: 200px;
        height: 200px;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

/* Loading Animation */
.loading {
    display: none !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2), rgba(40, 167, 69, 0.1));
    color: #28a745;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2), rgba(220, 53, 69, 0.1));
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.1));
    color: #ffc107;
    border-left: 4px solid #ffc107;
}

/* Admin Panel Styles */
.admin-sidebar {
    background: var(--dark-gray);
    min-height: 100vh;
    border-right: 1px solid rgba(212, 175, 55, 0.2);
}

.admin-menu {
    list-style: none;
    padding: 1rem 0;
}

.admin-menu li {
    margin-bottom: 0.5rem;
}

.admin-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--light-gray);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: var(--medium-gray);
    color: var(--primary-gold);
    border-left-color: var(--primary-gold);
}

.admin-content {
    background: var(--primary-black);
    min-height: 100vh;
    padding: 2rem;
}

.stats-card {
    background: var(--dark-gray);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-gold);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.stats-label {
    color: var(--light-gray);
    font-weight: 400;
}

/* Table Styles */
.table-dark {
    background: var(--dark-gray);
    color: var(--white);
}

.table-dark th,
.table-dark td {
    border-color: rgba(212, 175, 55, 0.1);
}

.table-dark th {
    background: var(--medium-gray);
    color: var(--primary-gold);
    font-weight: 600;
}

/* Pagination */
.pagination .page-link {
    background: var(--dark-gray);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--white);
}

.pagination .page-link:hover {
    background: var(--medium-gray);
    color: var(--primary-gold);
    border-color: var(--primary-gold);
}

.pagination .page-item.active .page-link {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: var(--primary-black);
}

/* Notification Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
}

.notification.slide-out {
    animation: slideOutRight 0.3s ease;
}

/* Image Loading Styles */
img {
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0.5;
}

.product-image {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.image-placeholder {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: loading 1s linear infinite;
}

@keyframes loading {
    0% {
        background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    }

    100% {
        background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px;
    }
}

/* 
Cart Sidebar Styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--primary-black);
    border-left: 2px solid var(--primary-gold);
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

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

.cart-header {
    padding: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(212, 175, 55, 0.1);
}

.cart-header h5 {
    color: var(--primary-gold);
    margin: 0;
    font-weight: 600;
}

.cart-close {
    background: none;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    gap: 15px;
}

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

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

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

.cart-item-name {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.cart-item-price {
    color: var(--primary-gold);
    font-weight: 600;
    margin: 0 0 8px 0;
    font-size: 0.9rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-quantity button {
    width: 25px;
    height: 25px;
    border: 1px solid var(--primary-gold);
    background: transparent;
    color: var(--primary-gold);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.cart-item-quantity button:hover {
    background: var(--primary-gold);
    color: var(--primary-black);
}

.cart-item-quantity input {
    width: 40px;
    height: 25px;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: rgba(212, 175, 55, 0.1);
    color: var(--white);
    border-radius: 4px;
    font-size: 0.8rem;
}

.remove-from-cart {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.remove-from-cart:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #ff4757;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.05);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-gold);
}

.cart-discount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #28a745;
    font-size: 0.9rem;
}

.coupon-form {
    margin-bottom: 15px;
}

.coupon-form .input-group {
    border-radius: 6px;
    overflow: hidden;
}

.coupon-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--white);
    font-size: 0.9rem;
}

.coupon-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.coupon-form .btn {
    border-color: var(--primary-gold);
    color: var(--primary-gold);
    font-size: 0.9rem;
    padding: 8px 15px;
}

.coupon-form .btn:hover {
    background: var(--primary-gold);
    color: var(--primary-black);
}

.cart-footer .btn-primary {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: var(--primary-black);
    font-weight: 600;
    padding: 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.cart-footer .btn-primary:hover {
    background: #c9a96e;
    border-color: #c9a96e;
    transform: translateY(-1px);
}

.remove-coupon {
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* Empty cart message */
.cart-items p {
    color: var(--light-gray);
    text-align: center;
    margin: 40px 0;
    font-style: italic;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100vw;
        right: -100vw;
    }

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

/* Cart overlay for mobile */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Ca
rt Sidebar Styles */
.cart-sidebar {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
}

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

.cart-sidebar__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    /* backdrop-filter removed for Safari */
}

.cart-sidebar__panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 400px;
    max-width: 100vw;
    background: var(--primary-black);
    border-left: 2px solid var(--primary-gold);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.cart-sidebar__header {
    padding: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-sidebar__title {
    color: var(--primary-gold);
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.cart-sidebar__close {
    background: none;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.cart-sidebar__close:hover {
    background: var(--primary-gold);
    color: var(--primary-black);
}

.cart-sidebar__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--light-gray);
}

.cart-loading p {
    margin-top: 15px;
    color: var(--light-gray);
}

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

.cart-empty i {
    font-size: 3rem;
    color: var(--primary-gold);
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    gap: 12px;
}

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

.cart-item__image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    flex-shrink: 0;
}

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

.cart-item__title {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 5px 0;
    line-height: 1.3;
    overflow: hidden;

    /* Webkit browsers (Chrome, Safari, Edge) */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    /* Standard property for compatibility */
    line-clamp: 2;
}

.cart-item__price {
    color: var(--primary-gold);
    font-weight: 600;
    margin: 0 0 8px 0;
    font-size: 0.9rem;
}

.cart-item__price.discounted {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item__price .original-price {
    color: var(--light-gray);
    text-decoration: line-through;
    font-size: 0.8rem;
    font-weight: normal;
}

.cart-item__controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cart-item__qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item__qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--primary-gold);
    background: transparent;
    color: var(--primary-gold);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.cart-item__qty-btn:hover:not(:disabled) {
    background: var(--primary-gold);
    color: var(--primary-black);
}

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

.cart-item__qty {
    color: var(--white);
    font-weight: 500;
    min-width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.cart-item__remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.cart-item__remove:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #ff4757;
}

.cart-item__subtotal {
    color: var(--primary-gold);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: right;
    flex-shrink: 0;
    min-width: 60px;
}

.cart-sidebar__footer {
    padding: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.05);
}

.cart-summary {
    margin-bottom: 20px;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: var(--white);
}

.cart-summary__total {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-gold);
    padding-top: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    margin-top: 8px;
}

.cart-security-note {
    text-align: center;
    margin-top: 15px;
}

.cart-security-note small {
    color: var(--light-gray);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cart-sidebar__panel {
        width: 100vw;
    }

    .cart-sidebar__header {
        padding: 15px;
    }

    .cart-sidebar__body {
        padding: 15px;
    }

    .cart-sidebar__footer {
        padding: 15px;
    }

    .cart-item {
        padding: 12px 0;
    }

    .cart-item__image {
        width: 50px;
        height: 50px;
    }
}

/* Loading and Error States */
.cart-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
}

.cart-error i {
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Accessibility */
.cart-sidebar__panel:focus {
    outline: none;
}

.cart-sidebar__close:focus,
.cart-item__qty-btn:focus,
.cart-item__remove:focus {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

/* Animation for cart count badge */
.cart-badge {
    transition: all 0.3s ease;
}

.cart-badge.updated {
    animation: cartBadgePulse 0.6s ease;
}

@keyframes cartBadgePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}