:root {
    /* Platinum & Slate Theme (Light Mode) for better logo integration */
    --bg-color: #f8fafc;
    /* Slate 50 - Very light grey/white */
    --text-primary: #0f172a;
    /* Slate 900 - Deep dark navy/black for text */
    --text-secondary: #475569;
    /* Slate 600 */
    --card-bg: #ffffff;
    /* Pure white cards */
    --card-border: #e2e8f0;
    /* Slate 200 */
    --accent: #d97706;
    /* Amber 600 - Richer Gold/Bronze */
    --accent-glow: rgba(217, 119, 6, 0.15);
    --navy-secondary: #1e293b;
    /* Slate 800 */
    --gradient-1: #b45309;
    /* Dark Amber */
    --gradient-2: #0f172a;
    /* Slate 900 */
}

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

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    position: relative;
    /* Subtle mesh gradient with geometric pattern for premium feel */
    background-image:
        /* Diagonal lines pattern */
        repeating-linear-gradient(45deg,
            transparent,
            transparent 35px,
            rgba(217, 119, 6, 0.02) 35px,
            rgba(217, 119, 6, 0.02) 70px),
        repeating-linear-gradient(-45deg,
            transparent,
            transparent 35px,
            rgba(15, 23, 42, 0.02) 35px,
            rgba(15, 23, 42, 0.02) 70px),
        /* Soft radial gradients */
        radial-gradient(at 0% 0%, rgba(217, 119, 6, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(15, 23, 42, 0.03) 0px, transparent 50%);
}

/* Background Animations - subtle pulse instead of floating globs */
.background-glob {
    display: none;
    /* Removing the old blobs */
}

.glob-2 {
    display: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    padding: 3rem 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.header-content {
    position: relative;
    width: 100%;
}

.header-actions {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    z-index: 100;
    margin-top: 1.5rem;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #25d366;
    /* WhatsApp Green */
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
    background: #20ba5a;
}

.lang-switch-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    padding: 0.6rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.lang-switch-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.lang-switch-btn i {
    width: 18px;
    height: 18px;
}

.header-contact-links {
    display: flex;
    gap: 1.2rem;
}

.contact-btn {
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.contact-btn:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.contact-btn i {
    width: 22px;
    height: 22px;
}

.whatsapp-btn i {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .whatsapp-btn span {
        display: none;
    }

    header {
        padding-top: 4rem;
        /* Add space for top actions */
    }

    .header-actions {
        position: static;
        justify-content: center;
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        padding: 0 1rem;
        margin-top: 1.5rem;
    }

    .whatsapp-btn {
        padding: 0.6rem 1rem;
        /* Smaller padding */
    }

    .lang-switch-btn {
        padding: 0.6rem 1rem;
    }
}

.brand-logo {
    width: 100px;
    /* Slightly larger */
    height: auto;
    margin-bottom: 1.5rem;
    /* No drop shadow needed if it blends with light background */
    border-radius: 12px;
    /* Soften edges if it is a square */
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, #b45309, #d97706);
    /* Darker Gold Gradient */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes gradient-anim {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
    font-weight: 300;
}

/* loading */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 215, 0, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
    margin-bottom: 1rem;
}

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

/* Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0 4rem;
}

.hidden {
    display: none !important;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    /* Removed padding to let image bleed to edge, will add padding to content */
    padding: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

.card-image-container {
    width: 100%;
    height: 350px;
    background: var(--card-bg);
    /* Match card white */
    overflow: hidden;
    position: relative;
    display: block;
    /* Direct top alignment */
}

.product-image,
video.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill the area */
    object-position: center;
    /* Focus on the center of the product */
    transition: transform 0.5s ease;
}

.product-image.is-doc-preview {
    object-fit: cover;
    /* Fill width like the good image example */
    object-position: top center;
    /* Start from the very first pixel of the PDF/Thumbnail */
    background: #ffffff;
}

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

.card-content {
    padding: 1.5rem 1.5rem 0.5rem;
}

.card-footer {
    padding: 1rem 1.5rem 1.5rem;
    margin-top: auto;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.card-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-arabic-name {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    direction: rtl;
    text-align: right;
    font-weight: 500;
}

.card-category {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(217, 119, 6, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.card-price {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}

/* Base styling fix */
.copy-btn {
    /* Previous styles were good, just ensuring alignment */
    margin-left: auto;
}

/* Animations for entries */
.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Controls & Search */
.controls-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.filter-wrapper,
.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-select {
    padding: 0.8rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
}

.sort-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.sort-select:hover {
    border-color: var(--text-secondary);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 20px;
    height: 20px;
}

#search-input {
    width: 100%;
    padding: 1rem 3rem !important;
    /* Fixed padding for icons on both sides */
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

#search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
    padding: 4px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
    z-index: 2;
}

.search-clear:hover {
    color: var(--accent);
    background: #f1f5f9;
}

.search-clear.visible {
    display: flex;
}

.stats {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Card Actions */
.view-doc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0 !important;
}

.view-doc-btn:hover {
    background: var(--gradient-1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.view-doc-btn i,
.view-doc-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor;
    stroke-width: 2.5;
    display: block;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    border-color: #22c55e;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

/* Error */
.error-message {
    text-align: center;
    color: #ef4444;
    padding: 2rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 500px;
    margin: 2rem auto;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--card-border);
    margin-top: auto;
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }
}

/* Expanded Card Styling */
.card.expanded {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    cursor: default !important;
    border-color: var(--accent);
    box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.1);
}

.expanded-content {
    display: none;
    padding: 2.5rem;
    grid-template-columns: 1fr;
    gap: 2rem;
    background: #ffffff;
    border-top: 1px solid var(--card-border);
    animation: slideDown 0.4s ease-out;
}

.card.expanded .expanded-content {
    display: grid;
}

/* Collapsed View Wrapper */
.collapsed-view {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* Hide collapsed view when expanded */
.card.expanded .collapsed-view {
    display: none !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.expanded-image-container {
    width: 100%;
    height: 480px;
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--card-border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expanded-image,
video.expanded-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

.zoom-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
    pointer-events: auto;
}

body.rtl .zoom-controls {
    right: auto;
    left: 1rem;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--navy-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.zoom-btn:hover {
    background: white;
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.zoom-btn:active {
    transform: translateY(0) scale(0.95);
}

.zoom-btn i {
    width: 18px;
    height: 18px;
}

/* Gallery Styles */
.expanded-gallery {
    display: flex !important;
    gap: 1rem;
    margin: 1.5rem 0 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.gallery-thumb {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px;
    min-height: 80px;
    border-radius: 14px;
    border: 3px solid transparent;
    cursor: pointer;
    overflow: hidden;
    background: #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.gallery-thumb img,
.gallery-thumb video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.gallery-thumb:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--accent);
    box-shadow: 0 10px 15px -3px rgba(217, 119, 6, 0.2);
}

.gallery-thumb.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 10px 15px -3px rgba(217, 119, 6, 0.2);
}

.expanded-info {
    display: flex;
    flex-direction: column;
    position: relative;
}

.expanded-close {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    /* Ensure it stays above everything */
    border: 1px solid var(--card-border);
    color: var(--navy-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.rtl .expanded-close {
    left: auto;
    right: 1.5rem;
}

.expanded-close:hover {
    background: #f1f5f9;
}

.expanded-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    padding-right: 40px;
}

.expanded-arabic-name {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    direction: rtl;
    text-align: right;
    font-weight: 500;
}

.expanded-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
}

.expanded-meta {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.expanded-meta strong {
    color: var(--accent);
    margin-right: 0.4rem;
}

.expanded-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 1.5rem 0;
    font-size: 1rem;
    white-space: pre-wrap;
    /* Preserves line spaces from the original field */
}

.expanded-pricing {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.main-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border: 1px dashed var(--card-border);
    border-radius: 12px;
}

.bulk-price::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--accent);
}

.price-info-block {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.main-price .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 700;
}

.main-price .value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.discount-badge {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotate(3deg);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
    border: 2px solid white;
}

.discount-percent {
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
}

.discount-off {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.bulk-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem 1.5rem;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #fde68a;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.1);
}

.bulk-price .label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #92400e;
    font-weight: 800;
}

.bulk-price .value {
    font-size: 2.2rem;
    font-weight: 900;
    color: #b45309;
    line-height: 1;
    letter-spacing: -0.02em;
}

.bulk-discount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.expanded-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

.modal-footer {
    padding: 1.5rem 1rem;
    padding-bottom: 5rem !important;
    /* Force large spacing */
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #ffffff;
    flex-shrink: 0;
    /* Prevent footer from shrinking */
}

.stock-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    margin-left: 0.5rem;
}

.stock-badge.in-stock {
    color: #059669;
    background: #ecfdf5;
}

.stock-badge.out-stock {
    color: #dc2626;
    background: #fef2f2;
}

.expanded-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.view-doc-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: var(--accent);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.view-doc-btn:hover {
    background: #b45309;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .header-contact-links {
        display: flex;
        justify-content: center;
        gap: 0.8rem;
        margin-top: 0.5rem;
    }

    .header-actions {
        position: static;
        flex-direction: column;
        align-items: center;
        margin-bottom: 1.5rem;
    }

    .search-wrapper {
        min-width: 100%;
    }

    .filter-wrapper,
    .sort-wrapper {
        flex: 1;
        min-width: 140px;
    }

    #category-select,
    .sort-select {
        width: 100%;
        min-width: 0;
    }

    .expanded-content {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

/* Back to Top Button Base */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.back-to-top:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.4);
    background: #b45309;
}

.back-to-top.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
}

.back-to-top i {
    width: 24px;
    height: 24px;
}

/* Available Colors Premium Section */
.colors-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-radius: 20px !important;
    border: 1px solid var(--card-border) !important;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    display: block !important;
}

.colors-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.05) 0%, transparent 70%);
    pointer-events: none;
    animation: colors-glow 8s infinite alternate;
}

@keyframes colors-glow {
    from {
        transform: scale(1);
        opacity: 0.5;
    }

    to {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.colors-title {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.colors-title i {
    color: var(--accent) !important;
}

.color-list {
    display: flex !important;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.color-badge {
    display: flex !important;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1.2rem;
    background: #ffffff !important;
    border: 1px solid var(--card-border) !important;
    border-left: 5px solid var(--badge-color, var(--accent)) !important;
    border-radius: 12px !important;
    font-size: 0.95rem;
    font-weight: 800 !important;
    color: var(--badge-color, var(--text-secondary)) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: color-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

/* Specific visibility for white text on white bg */
.color-badge[style*="white"],
.color-badge[style*="#ffffff"] {
    color: #475569 !important;
    border-left: 5px solid #e2e8f0 !important;
}

@keyframes color-pop {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.color-badge:nth-child(1) {
    animation-delay: 0.1s;
}

.color-badge:nth-child(2) {
    animation-delay: 0.2s;
}

.color-badge:nth-child(3) {
    animation-delay: 0.3s;
}

.color-badge:nth-child(4) {
    animation-delay: 0.4s;
}

.color-badge:nth-child(n+5) {
    animation-delay: 0.5s;
}

.color-badge:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15), 0 0 15px var(--badge-color);
    border-color: var(--badge-color) !important;
    z-index: 2;
}

.color-dot {
    width: 24px !important;
    height: 24px !important;
    border-radius: 6px !important;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.color-badge:hover .color-dot {
    transform: scale(1.2) rotate(-10deg);
}

.color-dot::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 4px;
    width: 35%;
    height: 25%;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
}

.color-badge {
    cursor: pointer !important;
}

.color-badge.selected {
    background: var(--badge-color, var(--accent)) !important;
    border-color: var(--badge-color, var(--accent)) !important;
    color: #ffffff !important;
    transform: scale(1.05);
    box-shadow: 0 8px 20px var(--badge-color, rgba(217, 119, 6, 0.3)) !important;
}

.color-badge.selected .color-dot {
    border: 2px solid #ffffff;
}

.color-badge.selected[style*="white"] .color-dot,
.color-badge.selected[style*="#ffffff"] .color-dot {
    border-color: #94a3b8;
}

.color-badge.selected[style*="white"],
.color-badge.selected[style*="#ffffff"] {
    color: #0f172a !important;
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

/* Mini Add to Cart Button for Tiles */
.add-to-cart-btn-mini {
    background: var(--navy-secondary);
    color: white;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.add-to-cart-btn-mini:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

.add-to-cart-btn-mini.added {
    background: #059669;
}


/* Floating Cart Button */
.floating-cart {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--navy-secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.3);
    z-index: 1001;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.floating-cart:hover {
    transform: scale(1.1) rotate(-10deg);
    background: var(--accent);
    box-shadow: 0 15px 30px rgba(217, 119, 6, 0.4);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

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

.cart-header {
    padding: 2rem;
    background: var(--navy-secondary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.close-cart {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.close-cart:hover {
    transform: rotate(90deg);
}

.clear-cart-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #f87171;
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.clear-cart-btn:hover {
    background: #ef4444;
    color: white;
}

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

.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--card-border);
    animation: fadeIn 0.4s ease forwards;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: #f1f5f9;
    object-fit: cover;
}

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

.cart-item-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

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

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--card-border);
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.remove-item {
    margin-left: auto;
    color: #ef4444;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.cart-footer {
    padding: 2rem;
    background: #f8fafc;
    border-top: 1px solid var(--card-border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 800;
}

.checkout-btn {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.3);
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: #b45309;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(217, 119, 6, 0.4);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1001;
    display: none;
}

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

/* Add to Cart Button in Expanded Card */
.add-to-cart-btn {
    background: var(--navy-secondary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.add-to-cart-btn.added {
    background: #059669;
}

/* Disabled/Out of Stock State */
.add-to-cart-btn.disabled,
.add-to-cart-btn-mini.disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    border: 1px solid #cbd5e1 !important;
    transform: none !important;
    box-shadow: none !important;
}

.add-to-cart-btn.disabled:hover,
.add-to-cart-btn-mini.disabled:hover {
    background: #e2e8f0 !important;
    transform: none !important;
}

@media (max-width: 768px) {
    .floating-cart {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .cart-drawer {
        max-width: 100%;
    }
}

/* Adjusting Back to Top to not overlap */
@media (min-width: 769px) {
    .back-to-top {
        right: 2rem;
        bottom: 7.5rem;
    }
}

/* Custom Modal Styling (Premium - Image Style) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.modal-container {
    background: #ffffff;
    width: 90%;
    max-width: 380px;
    border-radius: 32px;
    text-align: center;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(40px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    padding-bottom: 1.25rem;
    overflow: hidden;
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.05);
    border: none;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(15, 23, 42, 0.1);
    transform: rotate(90deg);
    color: #1e293b;
}

.modal-overlay.open .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.modal-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.modal-header-bg svg {
    width: 100%;
    height: 100%;
}

.modal-icon-wrapper {
    position: relative;
    z-index: 1;
}

.modal-icon-container {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid currentColor;
    background: white;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-icon-container.warning {
    color: #f87171;
    background: #fffafa;
}

.modal-icon-container.success {
    color: #4ade80;
    background: #f0fdf4;
}

.modal-icon-container i {
    width: 45px;
    height: 45px;
    stroke-width: 2.5;
}

/* Decorative Dots (matching image) */
.modal-icon-dots {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.modal-icon-dots span {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
}

.modal-icon-dots span:nth-child(1) {
    top: 15%;
    left: 20%;
    width: 12px;
    height: 12px;
    opacity: 0.3;
}

.modal-icon-dots span:nth-child(2) {
    top: 10%;
    right: 25%;
    width: 6px;
    height: 6px;
}

.modal-icon-dots span:nth-child(3) {
    bottom: 20%;
    left: 10%;
    width: 10px;
    height: 10px;
    opacity: 0.2;
}

.modal-icon-dots span:nth-child(4) {
    bottom: 15%;
    right: 15%;
    width: 14px;
    height: 14px;
    opacity: 0.3;
}

.modal-icon-dots span:nth-child(5) {
    top: 50%;
    right: 5%;
    width: 7px;
    height: 7px;
}

.modal-icon-dots span:nth-child(6) {
    bottom: 40%;
    left: 0%;
    width: 5px;
    height: 5px;
}

.modal-content {
    padding: 0 2.5rem;
}

.modal-content h3 {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #1e293b;
    letter-spacing: -0.02em;
}

.modal-content p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    font-weight: 400;
}

.modal-footer {
    padding: 0 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-btn {
    padding: 1.1rem 2.5rem;
    border-radius: 100px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    width: 100%;
}

.modal-btn.primary {
    background: #f87171;
    color: white;
    box-shadow: 0 12px 24px -6px rgba(248, 113, 113, 0.5);
}

.modal-btn.primary.success-btn {
    background: #4ade80;
    box-shadow: 0 12px 24px -6px rgba(74, 222, 128, 0.5);
}

.modal-btn.primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 30px -8px rgba(248, 113, 113, 0.6);
}

.modal-btn.primary.success-btn:hover {
    box-shadow: 0 20px 30px -8px rgba(74, 222, 128, 0.6);
}

.modal-btn.secondary {
    background: #f1f5f9;
    color: #64748b;
}

.modal-btn.secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-2px);
}

@media (min-width: 480px) {
    /* If we have two buttons, we might want them side-by-side or stacked. 
       The image shows a single 'Ok' button. 
       For confirmation, we'll keep them stacked for that modern 'mobile first' feel 
       OR side-by-side if there's space. Let's stick to stacked for the aesthetic. */
}

/* Arabic RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .header-actions {
    right: auto;
    left: 0;
}

body.rtl .search-wrapper #search-input {
    padding: 1rem 3rem !important;
}

body.rtl .search-clear {
    right: auto;
    left: 1rem;
}

body.rtl .search-icon {
    left: auto;
    right: 1rem;
}

body.rtl .filter-wrapper label,
body.rtl .sort-wrapper label {
    margin-right: 0;
    margin-left: 0.5rem;
}

body.rtl .card-category {
    flex-direction: row-reverse;
}

body.rtl .card-price {
    flex-direction: row-reverse;
}

body.rtl .stock-badge {
    margin-left: 0;
    margin-right: 0.5rem;
}

body.rtl .expanded-close {
    left: auto;
    right: 1rem;
}

body.rtl .expanded-title {
    padding-right: 0;
    padding-left: 40px;
}

body.rtl .expanded-meta strong {
    margin-right: 0;
    margin-left: 0.4rem;
}

body.rtl .main-price::before {
    left: auto;
    right: 0;
}

body.rtl .floating-cart {
    right: auto;
    left: 2rem;
}

body.rtl .cart-drawer {
    right: auto;
    left: 0;
    transform: translateX(-110%);
    box-shadow: 10px 0 50px rgba(0, 0, 0, 0.1);
}

body.rtl .cart-drawer.open {
    transform: translateX(0);
}

body.rtl .cart-item-info {
    text-align: right;
}

body.rtl .lang-switch-btn {
    flex-direction: row-reverse;
}

/* Language Switch Button */
.header-top-btns {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.lang-switch-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.lang-switch-btn:hover {
    background: #f1f5f9;
    border-color: var(--accent);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    #header-wa-text {
        display: none;
    }

    .lang-switch-btn, .whatsapp-btn {
        padding: 0.6rem 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50px;
    }
}

/* Full Image Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-secondary);
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1) rotate(90deg);
    color: var(--accent);
}

.lightbox-caption {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

/* Checkout Modal Styles */
#checkout-modal {
    z-index: 3000;
}

#checkout-modal.open {
    opacity: 1 !important;
    visibility: visible !important;
}

.checkout-container {
    padding: 0;
    overflow: hidden;
    max-width: 500px;
    height: 85vh;
    display: flex;
    flex-direction: column;
}

.checkout-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.whatsapp-direct-btn {
    width: 100%;
    margin-top: 2rem;
    background: #25D366;
    /* WhatsApp Green */
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(37, 211, 102, 0.2);
}

.whatsapp-direct-btn:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 211, 102, 0.3);
}

.checkout-progress {
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--card-border);
}

.step {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
    color: var(--accent);
}

.checkout-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.checkout-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.checkout-step.active {
    display: block;
}

.checkout-step h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

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

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

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
}

.phone-input-wrapper .country-code {
    background: #f1f5f9;
    padding: 0.8rem 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-right: 1px solid var(--card-border);
}

.phone-input-wrapper input {
    border: none;
    border-radius: 0;
}

.phone-input-wrapper input:focus {
    box-shadow: none;
}

.selection-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.8rem;
}

.selection-card:hover {
    border-color: var(--accent);
    background: #fffcf7;
}

.selection-card.selected {
    border-color: var(--accent);
    background: #fff7ed;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.1);
}

.card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    color: var(--accent);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.card-info {
    flex: 1;
}

.card-info h5 {
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.card-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.radio-circle {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

.selection-card.selected .radio-circle {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 3px white;
}

.company-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s ease;
}

.company-option:last-child {
    border-bottom: none;
}

.company-option:hover {
    background: #f8fafc;
}

.company-option input[type="radio"] {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.summary-box {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.summary-row.total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0;
}

/* Preference Modal Styles */
.pref-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.pref-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.pref-options {
    display: flex;
    gap: 0.8rem;
}

.pref-btn {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--card-border);
    background: var(--bg-color);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.pref-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pref-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 6px var(--accent-glow);
}

/* Loading Spinner for AI Analysis */
.ai-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(249, 115, 22, 0.3);
    /* Orange with opacity */
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 10px;
}

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

/* Shipping Item Selector Tiles */
.product-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    min-width: 100px;
    max-width: 110px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: transparent;
}
.product-tile:hover {
    background: rgba(0,0,0,0.02);
}
.product-tile.selected {
    border-color: var(--accent);
    background: var(--accent-glow);
}
.product-tile-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.product-tile-name {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}
.product-tile-no {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    text-align: center;
}