﻿/* === Style Block 1 (was lines 48-170) === */
/* Hide download button - images are auto-uploaded with orders */
.btn-download {
    display: none !important;
}

/* Increase thickness of Add to Cart buttons */
.add-to-cart-btn {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    letter-spacing: 0.5px !important;
}

/* Forced override to squash the gap between Size and Cart */
#gen-size-selector {
    margin-bottom: 0px !important;
}

.gen-size-wrapper {
    margin-bottom: 5px !important;
}

.sticky-mobile-cart-wrapper {
    margin-top: 0px !important;
    padding-top: 0px !important;
}

#gen-add-cart-btn {
    margin-top: 0px !important;
}

/* Fix the global select margin if any */
select.size-select {
    margin-bottom: 0px !important;
}

/* --- NEW ADMIN DASHBOARD SPECIFIC --- */
#admin-dashboard-view .admin-nav-item {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
    margin-bottom: 5px;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-sidebar {
    width: 200px !important;
}

.admin-main-content {
    padding: 20px 15px !important;
    height: auto !important;
}

#admin-dashboard-view .admin-nav-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

#admin-dashboard-view .admin-nav-item.active {
    background: #111;
    color: #fff;
}

#admin-dashboard-view .admin-kpi-card {
    transition: transform 0.2s;
}

#admin-dashboard-view .admin-kpi-card:hover {
    transform: translateY(-5px);
}

#admin-dashboard-view .admin-tab {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pill.completed {
    background: #dcfce7;
    color: #166534;
}

.status-pill.pending {
    background: #fef9c3;
    color: #854d0e;
}

.status-pill.processing {
    background: #e0e7ff;
    color: #3730a3;
}

.status-pill.canceled {
    background: #fee2e2;
    color: #991b1b;
}

.status-select {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px;
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

/* === Style Block 2 (was lines 172-3901) === */
:root {
    --primary: #0a0a0a;
    --accent-green: #32CD32;
    --sale-red: #ff3333;
    --gray-light: #f5f5f7;
    --gray-border: #eaeaea;
    --text-muted: #888;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-ar: 'Cairo', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    overflow-x: hidden;
}

body {
    background: #fff;
    color: var(--primary);
    line-height: 1.6;
    font-family: var(--font-main);
    max-width: 100vw;
}

/* ARABIC OVERRIDES */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: var(--font-ar);
}

body.rtl .nav-links {
    margin-left: unset;
    margin-right: auto;
    gap: 25px;
    /* Increased gap for better Arabic readability */
}

/* WhatsApp button removed */

/* --- NAVIGATION --- */
.nav-container {
    display: flex;
    align-items: center;
    padding: 0 5%;
    height: 100px;
    border-bottom: 1px solid #222;
    background: #000;
    position: sticky;
    top: 0;
    z-index: 100;
    max-width: 100%;
    box-sizing: border-box;
}

.logo {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.logo img {
    height: 35px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* --- NAV SEARCH --- */
.nav-search-container {
    position: relative;
    width: 350px;
    margin: 0 40px;
    display: flex;
    align-items: center;
}

.nav-search-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    background: #222;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.nav-search-input::placeholder {
    color: #888;
}

.nav-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    margin-top: 10px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    gap: 15px;
    transition: background 0.2s;
    color: #000;
    text-decoration: none;
}

.search-result-item:hover {
    background: #fff;
}

.search-result-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: #f9f9f9;
}

.search-result-info {
    display: flex;
    flex-direction: column;
}

.search-result-title {
    font-weight: 700;
    font-size: 13px;
}

.search-result-price {
    font-size: 12px;
    color: #666;
}

/* --- MOBILE SPECIFIC SEARCH DROPDOWN STYLING --- */
#mobile-search-dropdown {
    background: #1a1a1a !important;
    border-radius: 8px !important;
    margin-top: 5px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
    max-height: 250px !important;
    overflow-y: auto;
}

#mobile-search-dropdown .search-result-item {
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    color: #fff;
}

#mobile-search-dropdown .search-result-item:hover {
    background: #2a2a2a;
}

#mobile-search-dropdown .search-result-img {
    width: 35px;
    height: 35px;
    background: #111;
}

#mobile-search-dropdown .search-result-title {
    color: #fff;
    font-size: 12px;
}

#mobile-search-dropdown .search-result-price {
    color: #aaa;
    font-size: 11px;
}

#mobile-search-dropdown div {
    color: #aaa !important;
    /* For the "No results found" text in mobile */
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}

.nav-links a:hover {
    text-decoration: underline;
    color: #fff;
}

.nav-links a[data-i18n="navAI"] {
    color: var(--sale-red) !important;
}

.nav-links a[data-i18n="navAI"] {
    color: var(--sale-red) !important;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #222;
    padding: 8px 16px;
    border-radius: 30px;
    transition: background 0.2s;
    color: #fff;
}

.cart-link:hover {
    background: #333;
    text-decoration: none !important;
}

.cart-count-badge {
    background: #fff;
    color: #000;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CART STYLE FOR OTHER BUTTONS */
.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    border: none;
    color: #fff;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 30px;
    transition: background 0.2s;
}

.lang-btn:hover {
    background: #333;
}

body.rtl .lang-btn {
    margin-left: 0;
    margin-right: 0px;
}

/* --- SHOP VIEW --- */
#shop-view,
#detail-view,
#generator-view {
    display: none;
}

#shop-view {
    display: block;
}

.header-section {
    text-align: center;
    padding: 40px 0 0px 0;
    max-width: 100%;
    overflow: hidden;
}

.header-title {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -0.5px;
    padding: 5px 0 10px 0;
    text-transform: uppercase;
}

.sale-banner {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 40px 20px;
    margin: 0px 5% 20px 5%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    max-width: 90%;
}

.sale-banner h2 {
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 8px;
}

.sale-banner p {
    font-size: 15px;
    color: #a0a0a0;
    font-weight: 500;
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 30px 5%;
    border-bottom: 1px solid var(--gray-border);
    flex-wrap: wrap;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.filter-btn {
    padding: 10px 20px;
    border: 1px solid var(--gray-border);
    background: var(--gray-light);
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    font-family: inherit;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.filter-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-select {
    padding: 10px 20px;
    border: 1px solid var(--gray-border);
    background: var(--gray-light);
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1em top 50%;
    background-size: .65em auto;
    padding-right: 3em;
    font-family: inherit;
    transition: border-color 0.2s;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--primary);
    outline: none;
}

body.rtl .filter-select {
    background-position: left .7em top 50%;
    padding-right: 16px;
    padding-left: 2.5em;
}

.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 40px 2%;
    max-width: 2000px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    scroll-margin-top: 120px;
}

.related-grid {
    display: flex;
    gap: 25px;
    padding: 40px 0;
    margin: 0 auto;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    padding-left: 5%;
    padding-right: 5%;
}

.related-grid::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.carousel-viewport {
    overflow: hidden;
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    position: relative;
    padding: 0 60px;
    /* Space for arrows */
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: #fff;
    border: 1px solid #111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover {
    background: #000;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 5px;
}

.carousel-nav.next {
    right: 5px;
}

/* RTL Arrow Fixes */
body.rtl .carousel-nav.prev {
    left: auto;
    right: 5px;
    transform: translateY(-50%) rotate(180deg);
}

body.rtl .carousel-nav.next {
    right: auto;
    left: 5px;
    transform: translateY(-50%) rotate(180deg);
}

.product-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: opacity 0.3s ease;

    /* PERFORMANCE BOOST: Skip rendering off-screen cards */
    content-visibility: auto;
    contain-intrinsic-size: auto 350px;
}

/* Image fading in smoothly once observed via JS IntersectionObserver */
.product-img {
    transition: opacity 0.5s ease-in-out;
}

.product-img.fade-in {
    opacity: 1;
}

.related-grid .product-card {
    flex: 0 0 295px !important;
    width: 295px !important;
    min-width: 295px !important;
}

.frame-container {
    position: relative;
    background: #fff;
    padding: 5.5%;
    border: none;
    box-shadow: none;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-bottom: 8px;
    width: 100%;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 4px;
    /* Slight softening of the outer paper edge */
}

.frame-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('frame_black.png');
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
    transition: background-image 0.3s ease;
}

.frame-container[data-frame="white"]::after {
    background-image: url('frame_white.png');
}

.frame-container[data-frame="oak"]::after {
    background-image: url('frame_oak.png');
}

.frame-container[data-frame="black"]::after {
    background-image: url('frame_black.png');
}

.product-card:hover .frame-container {
    transform: scale(1.03);
    /* Premium subtle zoom, no shadow change */
}

.frame-container img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 101% !important;
    height: 101% !important;
    transform: translate(-50%, -50%);
    object-fit: cover !important;
    display: block;
}

.sticker-badge {
    position: absolute;
    top: 6px;
    /* Positioned precisely on the top-left of the thick black frame */
    left: 6px;
    background: #fff;
    border: 1px solid #000;
    font-size: 8.5px;
    /* Significant reduction in size per reference */
    font-weight: 700;
    padding: 1.5px 4px;
    z-index: 5;
    display: flex;
    gap: 4px;
    text-transform: uppercase;
    box-shadow: none;
    letter-spacing: 0.2px;
}

body.rtl .sticker-badge {
    left: auto;
    right: 6px;
}

body.rtl .wishlist-btn {
    right: auto;
    left: 4px;
}

/* Admin Buttons on Card */
.admin-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    display: flex;
    gap: 5px;
}

.admin-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
}

.edit-btn {
    background: #fff;
    color: #000;
}

.delete-btn {
    background: #ff4500;
    color: #fff;
    border-color: #ff4500;
}

.product-info {
    text-align: center;
    width: 100%;
    padding: 0 10px;
}

.product-title {
    font-size: 15px;
    font-weight: 900;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
    color: var(--primary);
    line-height: 1.2;
}

.product-artist {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.product-price {
    font-size: 14px;
    color: var(--primary);
    font-weight: 700;
}

/* --- DETAIL VIEW --- */
.back-btn {
    display: inline-block;
    margin: 20px 5%;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: #000;
    text-transform: uppercase;
    border-bottom: 2px solid #000;
    width: fit-content;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
    padding: 0 5%;
    max-width: 1300px;
    margin: 0 auto 80px;
}

.main-image-wrapper {
    position: relative;
    background: #fff;
    /* Pure white to blend with site */
    padding: 0;
    /* Remove padding to fill space */
    display: flex;
    justify-content: center;
    align-items: center;
}

.detail-frame {
    position: relative;
    box-shadow: none;
    transition: all 0.3s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
    width: 100%;
    max-width: 850px;
    aspect-ratio: 3/4;
    box-sizing: border-box;
    /* Necessary for padding transitions */
}

.detail-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 100% 100%;
    background-image: var(--dynamic-frame-img, none);
    pointer-events: none;
    z-index: 2;
}

/* Fallback / legacy Frame overlay assets */
.detail-frame[data-frame-type="black"]::after {
    background-image: var(--dynamic-frame-img, url('frame_black.png'));
}

.detail-frame[data-frame-type="white"]::after {
    background-image: var(--dynamic-frame-img, url('frame_white.png'));
}

.detail-frame[data-frame-type="oak"]::after {
    background-image: var(--dynamic-frame-img, url('frame_oak.png'));
}

/* Hardened matting effect: padding on the container instead of img */
.detail-frame {
    padding: 6%;
    background: #fff;
}

.detail-frame img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 101% !important;
    height: 101% !important;
    transform: translate(-50%, -50%);
    object-fit: cover !important;
    display: block;
}

@media (max-width: 768px) {

    .detail-frame[data-frame-type="black"],
    .detail-frame[data-frame-type="white"],
    .detail-frame[data-frame-type="oak"] {
        padding: 8%;
        /* Adjusted for mobile view */
    }
}

.detail-frame[data-frame-type="none"] img {
    padding: 0;
}

.detail-info h1 {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 12px;
    letter-spacing: -1px;
    text-transform: uppercase;
    color: var(--primary);
}

.artist-link {
    font-size: 15px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 25px;
    display: inline-block;
    font-weight: 500;
    transition: color 0.2s;
}

.artist-link:hover {
    color: var(--primary);
}

.price-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-border);
    flex-wrap: wrap;
}

.price-old {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 500;
}

.price-new {
    color: var(--sale-red);
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.discount-tag {
    background: #39d339;
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border: 1px solid #000;
    text-transform: uppercase;
}

.selector-label {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
    align-items: center;
}

.material-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 25px;
}

.material-card {
    border: 2px solid var(--gray-light);
    padding: 15px;
    cursor: pointer;
    position: relative;
    text-align: center;
    border-radius: 12px;
    background: var(--gray-light);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 110px;
    justify-content: center;
}

.material-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.material-card.active {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.material-preview-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #f0f0f0;
    background: #fff;
}

.premium-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #5c6c5c;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    z-index: 2;
}

select.size-select {
    width: 100%;
    padding: 16px 20px;
    font-size: 15px;
    border: 2px solid var(--gray-border);
    border-radius: 12px;
    margin-bottom: 30px;
    background: var(--gray-light);
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--primary);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2em top 50%;
    background-size: .8em auto;
}

body.rtl select.size-select {
    background-position: left 1.2em top 50%;
    direction: rtl;
    text-align: right;
}

select.size-select:focus {
    border-color: var(--primary);
    outline: none;
    background: #fff;
}

.frame-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.frame-option {
    border: 2px solid var(--gray-light);
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    position: relative;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: var(--gray-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: unset;
    justify-content: flex-end;
    width: 100%;
}

.frame-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.frame-option.active {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.frame-preview-box {
    height: 85px;
    width: 100%;
    border-radius: 8px 8px 0 0;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.frame-vis-black {
    background-color: #111;
}

.frame-vis-white {
    background-color: #fdfdfd;
    border: 1px solid #eee;
}

.frame-vis-oak {
    background-color: #c8ad7f;
}

.frame-vis-none {
    border: 1px dashed #ccc;
    background-color: #fff;
}

.popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #000 !important;
    color: #fff !important;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #fff;
}

.color-swatch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 25px;
    display: none;
}

.color-swatch {
    cursor: pointer;
    text-align: center;
}

.swatch-box {
    height: 40px;
    width: 100%;
    border: 1px solid #ddd;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: transform 0.2s;
    position: relative;
}

.color-swatch.active .swatch-box {
    box-shadow: 0 0 0 2px #000;
    transform: scale(1.05);
    z-index: 2;
    border-color: #000;
}

/* --- FRAME/COLOR SELECTOR IN FILTERS --- */
.color-filter-swatches {
    display: none !important;
    /* User requested removal to close the gap */
    align-items: center;
    gap: 20px;
    margin-left: 15px;
    padding: 0 10px;
}

.color-filter-swatches span {
    font-size: 18px !important;
    font-weight: 700;
    color: #333;
}

.filter-swatch {
    width: 100px;
    /* Increased to 100px */
    height: 100px;
    /* Increased to 100px */
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #e5e5e5;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #fff;
    transition: all 0.2s ease;
}

.filter-swatch:hover {
    border-color: #999;
    transform: scale(1.05);
}

.filter-swatch.active {
    box-shadow: 0 0 0 3px #000;
    /* Slightly thicker ring for 100px size */
    z-index: 2;
    border-color: #fff;
    transform: scale(1.05);
}

.filter-swatch[data-frame="black"] {
    background-image: url('media__1772299425996.png');
}

.filter-swatch[data-frame="white"] {
    background-image: url('media__1772299425992.png');
}

.filter-swatch[data-frame="oak"] {
    background-image: url('media__1772299426043.png');
}

.add-to-cart-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 18px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 25px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.add-to-cart-btn:hover {
    background: #000;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.promo-box {
    background: #39d339;
    padding: 14px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
    border: 1.5px solid #000;
    border-radius: 6px;
}

.trust-row {
    display: flex;
    justify-content: space-between;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    margin-bottom: 20px;
}

.trust-item {
    flex: 1;
    font-size: 12px;
    color: #000;
    font-weight: 600;
}

.trust-item i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

/* --- GENERATOR --- */
.generator-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 5%;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    min-height: 80vh;
    align-items: start;
}

.gen-controls {
    background: #fff;
    padding-right: 0;
}

body.rtl .gen-controls {
    padding-right: 0;
    padding-left: 0;
}

.gen-title {
    font-size: 48px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 12px;
    line-height: 1.0;
    letter-spacing: -0.5px;
}

.gen-subtitle {
    color: #777;
    margin-bottom: 40px;
    font-size: 16px;
    line-height: 1.5;
    max-width: 480px;
}

.gen-input-group {
    margin-bottom: 25px;
}

.gen-label {
    display: block;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

textarea.gen-prompt {
    width: 100%;
    height: 130px;
    padding: 18px;
    border: 3px solid #000;
    font-family: inherit;
    font-size: 16px;
    resize: none;
    margin-bottom: 25px;
    border-radius: 4px;
    transition: all 0.2s;
}

textarea.gen-prompt::placeholder {
    color: #999;
    font-size: 14px;
}

/* Thickness Options Styling */
.thickness-opt {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    border: 2px solid #eee;
    text-align: center;
    user-select: none;
}

.thickness-opt:hover {
    border-color: #999;
    background: #fafafa;
}

.thickness-opt.selected {
    border-color: #111 !important;
    background: #111 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

textarea.gen-prompt:focus {
    outline: none;
    border-color: #000;
    background: #fafafa;
}

.ratio-options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.ratio-btn {
    flex: 1;
    padding: 14px 10px;
    border: 1px solid #f0f0f0;
    background: #fff;
    cursor: pointer;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    font-family: inherit;
    border-radius: 4px;
    letter-spacing: 0.5px;
    color: #000;
}

.ratio-btn:hover {
    border-color: #000;
}

.ratio-btn.active {
    border-color: #000;
    background: #000;
    color: #fff;
}

.btn-generate {
    width: 100%;
    background: #22c55e;
    color: #fff;
    padding: 18px;
    border: none;
    border-radius: 6px;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    font-family: inherit;
    transition: all 0.2s ease;
    letter-spacing: 1px;
}

.btn-generate:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.btn-download {
    width: 100%;
    background: #fff;
    color: #000;
    padding: 15px;
    border: 2px solid #000;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    display: none;
    margin-top: 10px;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-download:hover {
    background: #000;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-inspire {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    color: #000;
}

.btn-inspire:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.or-divider {
    text-align: center;
    margin: 40px 0;
    position: relative;
    font-size: 11px;
    font-weight: 800;
    color: #bbb;
    text-transform: uppercase;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e0e0e0;
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

.file-upload-box {
    border: 1.5px dashed #ddd;
    padding: 40px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    background: #fdfdfd;
}

.file-upload-box:hover {
    border-color: #000;
    background: #f6f6f6;
}

.hidden-input {
    display: none;
}

.gen-preview-area {
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    width: 100%;
    margin: 0 auto;
}

#gen-frame {
    position: relative;
    width: 100%;
    margin: 0 auto 15px;
    background: white;
    padding: 0;
    box-shadow: none !important;
    transition: width 0.3s ease, aspect-ratio 0.3s ease;
    aspect-ratio: 3/4;
    max-width: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-repeat: repeat;
}

/* Realistic 3D Overlays for AI Generator */
#gen-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

#gen-frame[data-frame-type="black"]::after {
    background-image: url('frame_black.png');
}

#gen-frame[data-frame-type="white"]::after {
    background-image: url('frame_white.png');
}

#gen-frame[data-frame-type="oak"]::after {
    background-image: url('frame_oak.png');
}

#gen-frame[data-frame-type="black"],
#gen-frame[data-frame-type="white"],
#gen-frame[data-frame-type="oak"] {
    padding: 6%;
    background: #fff;
}

#gen-frame img#gen-result-img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 101% !important;
    height: 101% !important;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}


#gen-result-img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 101% !important;
    height: 101% !important;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Frame Selector Refinement (Pixel Perfect) */
.frame-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.frame-option {
    border: 1px solid #f0f0f0;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    background: #fff;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-height: unset;
    position: relative;
}

.frame-option:hover {
    border-color: #ccc;
}

.frame-option.active {
    border: 1.5px solid #000;
    /* No padding adjustment needed as it's 0 now */
}

.frame-preview-box {
    width: 100%;
    height: 85px;
    background-size: cover;
    background-position: center;
    border-radius: 4px 4px 0 0;
    /* Match parent's top corners */
    margin-bottom: 0;
}

.frame-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    color: #000;
    padding: 4px 0 10px 0;
}

/* Purchase Button */
.generator-container .add-to-cart-btn {
    width: 100%;
    background: #000;
    color: #fff;
    padding: 16px 12px;
    border: none;
    border-radius: 4px;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    margin-top: 10px;
}

.generator-container .add-to-cart-btn:hover {
    background: #222;
    transform: translateY(-1px);
}

.loading-spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid #000;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.reviews-section {
    padding-top: 60px;
    border-top: 2px solid #000;
    margin-top: 60px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.reviews-header {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.reviews-stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
    align-items: start;
}

.overall-rating-block {
    text-align: center;
    margin-bottom: 40px;
}

.big-rating {
    font-size: 60px;
    font-weight: 900;
    line-height: 1;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.review-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
}

.verified-badge {
    color: #2ecc71;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.faq-section {
    padding: 60px 5%;
    background: #f8f8f8;
    border-top: 2px solid #000;
}

.faq-header {
    text-align: center;
    margin-bottom: 40px;
}

.faq-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.faq-item {
    border-bottom: 1px solid #ccc;
    background: transparent;
}

.faq-question {
    padding: 20px 0;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: #555;
}

.faq-answer.open {
    max-height: 200px;
    padding-bottom: 20px;
}

/* FOOTER STYLES MATCHING IMAGE */
.footer-newsletter {
    background: #f2f2f2;
    color: #000;
    padding: 60px 20px;
    text-align: center;
}

.footer-newsletter h2 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 10px;
}

.newsletter-form {
    max-width: 400px;
    margin: 20px auto 0;
    display: flex;
    gap: 0;
}

.newsletter-input {
    padding: 15px;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    font-size: 14px;
    outline: none;
    flex-grow: 1;
}

.newsletter-btn {
    background: #000;
    color: #fff;
    padding: 15px 30px;
    border: none;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    text-transform: uppercase;
}

.features-bar {
    background: #000;
    color: #fff;
    padding: 40px 5%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.feature-item i {
    font-size: 24px;
    margin-bottom: 15px;
    display: block;
}

.feature-item h4 {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.feature-item p {
    font-size: 12px;
    color: #ccc;
    margin: 0;
    line-height: 1.4;
}

.footer-links {
    padding: 60px 5%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    font-size: 13px;
    background: #fff;
    color: #000;
}

.footer-col h4 {
    font-weight: 800;
    margin-bottom: 20px;
    font-size: 14px;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    text-decoration: none;
    color: #000;
    font-weight: 400;
}

.footer-col a:hover {
    text-decoration: underline;
}

/* ANALYTICS FAB */
.fab-analytics {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: #fff;
    color: #000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border: 2px solid #000;
}

.fab-analytics:hover {
    transform: scale(1.1);
}

body.rtl .fab-analytics {
    right: auto;
    left: 30px;
}

.fab-add {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #000;
    color: var(--accent-green);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border: 2px solid var(--accent-green);
}

.fab-add:hover {
    transform: scale(1.1);
}

body.rtl .fab-add {
    right: auto;
    left: 30px;
}


/* TOAST */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #000;
    color: #fff;
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 100002;
    display: none;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SLIDE OUT CART DRAWER */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    /* Hidden off screen */
    width: 400px;
    max-width: 100vw;
    height: 100%;
    background: #fff;
    z-index: 1001;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-overlay.open {
    display: block;
    opacity: 1;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.cart-header h2 {
    font-size: 20px;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
}

.cart-close-btn {
    font-size: 24px;
    cursor: pointer;
    border: none;
    background: none;
    font-weight: bold;
    color: #999;
}

.cart-close-btn:hover {
    color: #000;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.cart-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    gap: 15px;
}

.form-group label {
    display: block;
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #000;
}

.btn-submit {
    background: #000;
    color: #fff;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.2s, transform 0.1s;
    margin-top: 10px;
}

.btn-submit:hover {
    background: #222;
}

.btn-submit:active {
    transform: scale(0.98);
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #eee;
    padding: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.cart-item-img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
}

body.rtl .cart-item-img {
    margin-right: 0;
    margin-left: 15px;
}

.cart-item-details-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
}

.cart-item-info div {
    margin-bottom: 2px;
}

.btn-remove {
    color: red;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    margin-left: 10px;
}

body.rtl .btn-remove {
    margin-left: 0;
    margin-right: 10px;
}

.cart-total {
    font-size: 18px;
    font-weight: 900;
    text-align: right;
    margin-bottom: 20px;
}

body.rtl .cart-total {
    text-align: left;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    width: 100%;
    padding: 15px;
    border: none;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

/* Material Guide Modal Specifics */
.mat-guide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* RELATED PRODUCTS SLIDER */
.related-products-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.related-title {
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 40px;
    /* Increased from 25px */
    text-align: center;
}

/* Consolidated slider styles moved to top */

.related-grid .product-card {
    min-width: 220px;
    /* Force items to be side-by-side and scrollable on small screens */
    flex: 0 0 220px;
}

.product-card {
    cursor: pointer;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.product-img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    margin-bottom: 15px;
    background: #fff;
    transition: transform 0.4s ease;
    /* Smooth transition for zoom */
}

/* Removed zoom on hover per user request */

.mat-guide-col {
    text-align: center;
}

.mat-guide-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

.mat-guide-title {
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.mat-guide-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.info-icon {
    cursor: pointer;
    color: #999;
    font-size: 14px;
    transition: color 0.2s;
}

.info-icon:hover {
    color: #000;
}


/* --- AUTH MODERN DESIGN --- */
.auth-card {
    background: #fff;
    width: 100%;
    max-width: 420px;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 10;
}

.auth-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 30px;
    text-align: center;
    color: #111;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.auth-input-group {
    margin-bottom: 20px;
    text-align: left;
}

body.rtl .auth-input-group {
    text-align: right;
}

.auth-input-group label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 8px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #eee;
    border-radius: 14px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
    font-family: inherit;
    font-weight: 600;
    color: #111;
}

.auth-input:focus {
    outline: none;
    border-color: #111;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.btn-auth-primary {
    background: #111;
    color: var(--accent-green);
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.btn-auth-primary:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-auth-secondary {
    background: #fff;
    color: #111;
    border: 2px solid #eaeaea;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    font-weight: 700;
    padding: 16px;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-auth-secondary:hover {
    border-color: #111;
    background: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-auth-secondary:active {
    transform: translateY(0);
}

/* --- MOBILE MENU --- */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: #111;
    z-index: 10001;
    padding: 30px 20px;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-panel.open {
    right: 0;
}

body.rtl .mobile-menu-panel {
    right: auto;
    left: -300px;
    transition: left 0.3s ease;
}

body.rtl .mobile-menu-panel.open {
    left: 0;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
}

body.rtl .mobile-menu-close {
    right: auto;
    left: 15px;
}

.mobile-menu-panel a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid #222;
    cursor: pointer;
}

.mobile-menu-panel a:hover {
    color: var(--accent-green);
}

/* --- TABLET BREAKPOINT (768px) --- */
@media(max-width: 900px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 20px !important;
    }

    .generator-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px;
    }

    #gen-frame {
        width: 100% !important;
        max-width: 100% !important;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-bar {
        grid-template-columns: repeat(3, 1fr) !important;
        padding: 20px 10px !important;
        gap: 5px !important;
    }

    .feature-item {
        padding: 10px 5px !important;
    }

    .feature-item i {
        font-size: 18px !important;
        margin-bottom: 5px !important;
    }

    .feature-item h4 {
        font-size: 9px !important;
    }

    .feature-item p {
        font-size: 7px !important;
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr) !important;
        padding: 25px 10px !important;
        gap: 10px !important;
    }

    .footer-col h4 {
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }

    .footer-col a {
        font-size: 10px !important;
    }

    .footer-col li {
        margin-bottom: 6px !important;
    }

    /* STICKY MOBILE ADD TO CART - DROOL-inspired */
    .sticky-mobile-cart-wrapper {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 12px 15px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
        z-index: 900;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .sticky-mobile-cart-wrapper .add-to-cart-btn {
        margin: 0;
        border-radius: 50px !important;
        padding: 16px 20px !important;
        font-size: 15px !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px;
    }

    #detail-view {
        padding-bottom: 130px;
    }
}

/* --- MOBILE BREAKPOINT (768px) --- */
@media(max-width: 768px) {

    /* Navbar */
    .nav-container {
        height: 65px;
        padding: 0 15px;
        justify-content: space-between;
        position: relative;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .logo img {
        height: 25px !important;
    }

    .nav-search-container {
        display: none;
    }

    .nav-links>a:not(.cart-link) {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        order: 1;
        font-size: 20px;
        padding: 0;
    }

    .mobile-menu-btn.search-icon-btn {
        display: flex !important;
        order: 2;
        font-size: 18px;
        margin-inline-start: 10px;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        gap: 14px;
    }

    body.rtl .nav-links {
        margin-left: 0;
        margin-right: auto;
        flex-direction: row-reverse;
    }

    #nav-wishlist-link,
    #nav-ai-link,
    #nav-admin-link {
        display: none !important;
    }

    .lang-btn {
        display: flex !important;
        order: 4;
        margin: 0 !important;
        padding: 0 10px !important;
        background: transparent !important;
        color: #fff !important;
        font-size: 16px;
        border: none;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    .nav-links::before {
        content: '';
        flex: 1 1 auto;
        order: 3;
    }

    #nav-profile-link,
    #nav-login-link {
        /* We don't force display: flex so JS can toggle between them, 
                   but we ensure when they DO display, they look like this: */
        order: 4;
        margin-left: 0 !important;
        border: none !important;
        padding: 0 !important;
        font-size: 18px;
        background: transparent !important;
        color: #fff !important;
    }

    .cart-link[onclick="openCart()"] {
        display: flex !important;
        order: 5;
        border: none !important;
        padding: 0 !important;
        background: transparent !important;
        font-size: 18px;
        color: #fff !important;
    }

    .cart-count-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        font-size: 9px;
        width: 16px;
        height: 16px;
        padding: 0;
    }

    /* Hide some icons on very small screens to prevent overlap */
    @media(max-width: 400px) {
        .nav-links .cart-link:not(:last-of-type) {
            display: none;
        }
    }

    /* Banner */
    .sale-banner {
        padding: 20px 15px;
    }

    .sale-banner h2 {
        font-size: 22px;
    }

    .sale-banner p {
        font-size: 12px;
    }

    /* Filter Bar - wrap to show all options */
    .filter-bar {
        padding: 10px 15px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    /* Hide product count, FRAMES btn, STYLE filter, Color swatches on mobile */
    #product-count-label,
    .filter-btn,
    #style-filter {
        display: none !important;
    }

    .color-filter-swatches {
        display: flex !important;
        width: auto !important;
        margin-left: 10px !important;
        padding: 0 !important;
        justify-content: flex-end !important;
        gap: 8px !important;
        order: 2;
    }

    .color-filter-swatches span {
        display: none !important;
    }

    .filter-swatch {
        width: 35px !important;
        height: 35px !important;
    }

    /* ALL COLLECTIONS + SWATCHES on first row */
    #collection-filter {
        flex: 1 !important;
        width: auto !important;
        order: 1;
    }

    /* SIZE + SORT side by side on second row */
    #size-filter {
        flex: 1 1 calc(50% - 4px) !important;
        width: auto !important;
        order: 3 !important;
    }

    #sort-filter {
        flex: 1 1 calc(50% - 4px) !important;
        width: auto !important;
        order: 4 !important;
    }

    .price-filter-container {
        order: 5 !important;
        width: 100% !important;
        margin-left: 0 !important;
        justify-content: center !important;
        border-top: 1px solid #eee;
        padding-top: 10px;
        margin-top: 5px;
    }

    body.rtl .filter-bar {
        direction: rtl;
    }

    .filter-bar::-webkit-scrollbar {
        display: none;
    }

    .filter-select,
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 11px;
        padding: 6px 12px;
    }

    /* Products */
    .products {
        gap: 20px 15px;
        padding: 20px 15px;
        scroll-margin-top: 80px;
        /* Adjusted for mobile navbar height 65px */
    }

    #detail-view,
    #generator-view,
    #wishlist-view,
    #profile-view {
        scroll-margin-top: 80px;
    }

    .product-info {
        font-size: 12px;
    }

    .product-title {
        font-size: 13px;
    }

    /* Header */
    .header-section {
        padding: 5px 0 0 0;
    }

    .header-title {
        font-size: 18px;
    }

    /* Footer */
    .footer-links {
        grid-template-columns: repeat(3, 1fr) !important;
        text-align: left;
    }

    .newsletter-section {
        padding: 30px 15px;
    }

    .features-bar {
        padding: 20px 15px;
    }

    /* Cart Drawer */
    .cart-drawer {
        width: 100% !important;
    }

    /* Admin Dashboard */
    #admin-dashboard {
        flex-direction: column !important;
    }

    #admin-dashboard>div:first-child {
        width: 100% !important;
        flex-direction: row !important;
        padding: 15px !important;
        overflow-x: auto;
        height: auto !important;
    }

    #admin-dashboard>div:first-child .logo {
        display: none;
    }

    #admin-dashboard .admin-nav-item {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 13px;
    }

    .admin-main-content {
        padding: 20px 15px !important;
        height: auto !important;
    }

    /* Admin KPI Grid */
    #admin-tab-overview>div:first-child {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Admin charts grid */
    #admin-tab-overview>div:nth-child(2) {
        grid-template-columns: 1fr !important;
    }

    /* Profile View */
    #profile-view>div>div {
        flex-direction: column !important;
    }

    #profile-view>div>div>div:first-child {
        width: 100% !important;
    }

    /* Checkout */
    #checkout-view>div:nth-child(2) {
        flex-direction: column !important;
    }

    /* WhatsApp button removed */
}

/* --- SMALL PHONE BREAKPOINT (480px) --- */
@media(max-width: 480px) {
    .nav-container {
        height: 55px;
        padding: 0 10px;
    }

    .logo img {
        height: 22px !important;
    }

    .nav-links {
        gap: 6px;
    }

    .cart-link {
        padding: 6px 10px;
        font-size: 12px;
    }

    .lang-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .cart-count-badge {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }

    .sale-banner h2 {
        font-size: 18px;
    }

    .products {
        gap: 15px 10px;
        padding: 15px 10px;
    }

    .sticker-badge {
        font-size: 9px;
        padding: 3px 6px;
    }

    .auth-card {
        padding: 30px 20px;
    }
}

/* WISHLIST BUTTON */
.wishlist-btn {
    position: absolute;
    top: 4px;
    /* Mounted neatly on the top-right corner of the frame */
    right: 4px;
    background: transparent;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    z-index: 10;
    color: #111;
    font-size: 15px;
    /* Smaller heart icon */
    transition: transform 0.2s;
}

.wishlist-btn:hover {
    transform: scale(1.15);
}

.wishlist-btn.active i {
    font-weight: 900;
    color: var(--sale-red);
}

/* MODAL STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100001;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-card {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}



/* FILTER ENHANCEMENTS */
.color-filter-swatches {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.filter-swatch.active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111;
    transform: scale(1.1);
}

/* STYLIZED RANGE SLIDER */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px !important;
    height: 6px;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
    padding: 0;
    margin: 0;
    transition: background 450ms ease-in;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #111;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* --- PRINT INVOICE STYLES --- */
@media print {
    body * {
        visibility: hidden !important;
    }

    #invoice-container,
    #invoice-container * {
        visibility: visible !important;
    }

    #invoice-container {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: white !important;
        color: black !important;
        padding: 15mm !important;
        margin: 0 !important;
        z-index: 99999;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* Remove excessive padding for thermal receipt */
    #invoice-container.invoice-48mm {
        padding: 2mm !important;
    }

    @page {
        margin: 0;
    }

    .no-print {
        display: none !important;
    }
}

#invoice-container {
    display: none;
    background: white;
}

.invoice-48mm {
    /* 48mm Thermal Receipt Style */
    width: 48mm;
    font-size: 22px;
    line-height: 1.2;
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
    padding: 5px;
    background: #fff;
    margin: 0 auto;
}

.invoice-48mm .receipt-header-text {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.invoice-48mm .dashed-divider {
    border-top: 1px dashed #000;
    margin: 8px 0;
}

.invoice-48mm .receipt-row {
    display: flex;
    justify-content: space-between;
}

.invoice-48mm .receipt-item-qty {
    margin-right: 5px;
    min-width: 15px;
    display: inline-block;
}

.invoice-48mm .receipt-item-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 5px;
}

.invoice-48mm .receipt-total-amount {
    font-size: 26px;
    font-weight: 900;
}

.invoice-48mm .receipt-barcode-container {
    text-align: center;
    margin-top: 15px;
}

.invoice-48mm .receipt-barcode {
    font-family: 'Libre Barcode 39', monospace, cursive;
    font-size: 32px;
    /* Requires importing a barcode font or using SVG, we use a fallback or SVG later */
}

/* ================== A5 INVOICE STYLES ================== */
.invoice-a5 {
    /* Modern Corporate Invoice Style */
    width: 148mm;
    min-height: 210mm;
    padding: 15mm;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    background: #fff;
    border: 1px solid #eee;
    margin: 0 auto;
    box-sizing: border-box;
}

.invoice-a5-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    align-items: flex-start;
}

.invoice-a5-title {
    font-size: 34px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.invoice-a5-info {
    font-size: 12px;
    color: #333;
    line-height: 1.6;
    font-weight: 600;
}

.invoice-a5-brand {
    text-align: right;
}

.rtl .invoice-a5-brand {
    text-align: left;
}

.invoice-a5-brand-name {
    display: none;
}

.invoice-a5-billto {
    margin-bottom: 30px;
}

.invoice-a5-billto-title {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.invoice-table th {
    background: #000;
    color: #fff;
    text-align: left;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rtl .invoice-table th {
    text-align: right;
}

.invoice-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    font-weight: 600;
}

.invoice-table tr:nth-child(even) td {
    background: #fdfdfd;
}

.invoice-a5-totals-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.invoice-a5-totals {
    width: 250px;
    font-size: 11px;
}

.invoice-a5-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.invoice-a5-grand-total {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f4f4f4;
    font-weight: 900;
    font-size: 18px;
    margin-top: 10px;
    text-transform: uppercase;
}

.invoice-a5-footer {
    margin-top: 40px;
    font-size: 10px;
    line-height: 1.6;
}

.invoice-a5-footer-title {
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* ====== IMPROVEMENT #9: MOBILE RESPONSIVE ====== */

@media (max-width: 1200px) {
    .products {
        grid-template-columns: repeat(3, 1fr) !important;
        max-width: 100% !important;
    }

    .carousel-viewport {
        max-width: 100% !important;
    }

    .related-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .detail-grid {
        grid-template-columns: 1fr !important;
    }

    .generator-container {
        flex-direction: column !important;
    }

    .filter-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .admin-sidebar {
        width: 200px !important;
    }
}

@media (max-width: 768px) {
    .products {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 15px 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .carousel-viewport {
        max-width: 100% !important;
        padding: 0 10px !important;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .detail-grid {
        padding: 0 0 20px 0 !important;
        gap: 20px !important;
        margin-bottom: 30px !important;
    }

    .main-image-wrapper {
        margin: 0;
    }

    .right-col.detail-info {
        padding: 20px 15px !important;
    }



    .filter-bar {
        padding: 10px 15px !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        justify-content: flex-start !important;
    }

    .filter-bar::-webkit-scrollbar {
        display: none;
    }

    .filter-select {
        width: calc(50% - 5px) !important;
        flex: 0 0 calc(50% - 5px) !important;
    }

    .filter-btn {
        flex: 0 0 auto !important;
    }

    .color-filter-swatches {
        justify-content: center;
    }

    .sale-banner {
        padding: 30px 15px !important;
    }

    .sale-banner h2 {
        font-size: 22px !important;
    }

    .generator-container {
        display: flex !important;
        flex-direction: column !important;
        padding: 20px !important;
        gap: 20px !important;
    }

    .gen-preview-area {
        order: -1 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    #gen-frame {
        width: 100% !important;
        max-width: 100% !important;
    }

    .profile-layout {
        flex-direction: column !important;
    }

    .profile-sidebar {
        width: 100% !important;
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        padding: 25px 10px !important;
    }

    .features-bar {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
        padding: 20px 10px !important;
    }

    /* ADMIN DASHBOARD HIDDEN ELEMENTS */
    body.admin-mode .header-section,
    body.admin-mode footer,
    body.admin-mode .footer-newsletter,
    body.admin-mode .footer-links,
    body.admin-mode .announcement-bar,
    body.admin-mode .whatsapp-float,
    body.admin-mode .fab-add,
    body.admin-mode #sale-banner,
    body.admin-mode .features-bar {
        display: none !important;
    }

    .navbar .nav-links {
        display: none !important;
    }

    .navbar .mobile-menu-btn {
        display: flex !important;
    }

    .header-section {
        padding: 20px 15px 0 15px !important;
    }

    .header-title {
        font-size: 28px !important;
    }

    #checkout-view {
        padding: 20px 15px !important;
    }

    .checkout-grid {
        grid-template-columns: 1fr !important;
    }

    /* ====== ADMIN DASHBOARD MOBILE RESPONSIVE ====== */
    #admin-dashboard-view {
        flex-direction: column !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    /* Sidebar → Horizontal tab bar */
    .admin-sidebar {
        width: 100% !important;
        flex-direction: row !important;
        padding: 8px 12px !important;
        overflow-x: auto !important;
        /* Enable horizontal scrolling */
        overflow-y: hidden !important;
        flex-shrink: 0 !important;
        min-height: auto !important;
        height: auto !important;
        gap: 8px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background: #ffffff !important;
        border-bottom: 1px solid #f1f5f9 !important;
        box-shadow: none !important;
        display: flex !important;
        /* Ensure it behaves as a flex row */
        white-space: nowrap !important;
        /* Prevent tabs from wrapping */
    }

    .admin-sidebar::-webkit-scrollbar {
        display: none;
    }

    /* Hide the logo in sidebar on mobile */
    .admin-sidebar>.logo {
        display: none !important;
    }

    /* Restore the exit admin spacer div on mobile */
    .admin-sidebar>div[style*="margin-top: auto"] {
        margin-top: 0 !important;
        margin-left: auto !important;
        /* Push to the end of the row */
        display: flex !important;
    }

    .admin-sidebar>div[style*="margin-top: auto"] .admin-nav-item {
        margin-top: 0 !important;
        /* Remove the 20px margin from index line 294 */
    }

    /* Admin nav items – premium pill style from reference */
    .admin-nav-item {
        white-space: nowrap !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        border-radius: 30px !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
        gap: 10px !important;
        color: #475569 !important;
        /* Slate grey */
        background: transparent !important;
        transition: all 0.2s ease !important;
        border-bottom: none !important;
        opacity: 0.8;
    }

    .admin-nav-item i {
        display: none !important;
        /* Bug 1: Remove icons completely */
    }

    .admin-nav-item.active {
        background: #f1f5f9 !important;
        /* Light blue-grey pill */
        color: #2563eb !important;
        /* Vibrant blue */
        opacity: 1 !important;
    }

    .admin-nav-item.active i {
        display: none !important;
    }

    /* Bug 3: Finance Section Responsive Fixes */
    #admin-tab-finance,
    .finance-content {
        overflow-x: hidden !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    @media (max-width: 768px) {
        .finance-cards-grid {
            display: grid !important;
            grid-template-columns: repeat(2, 1fr) !important;
            /* 2-column grid on mobile */
            gap: 12px !important;
            width: 100% !important;
        }

        .finance-tabs {
            overflow-x: auto !important;
            white-space: nowrap !important;
            -webkit-overflow-scrolling: touch !important;
            scrollbar-width: none !important;
            width: 100% !important;
            display: flex !important;
            gap: 8px !important;
            padding-bottom: 5px !important;
        }

        .finance-tabs::-webkit-scrollbar {
            display: none;
        }

        .finance-table-wrapper,
        div[style*="overflow-x: auto"] {
            overflow-x: auto !important;
            width: 100% !important;
            -webkit-overflow-scrolling: touch !important;
        }

        .finance-table-wrapper table,
        .admin-tab table {
            min-width: 600px !important;
            /* Ensure table is wide enough to trigger scroll */
        }
    }

    /* Main content area - scrollable */
    .admin-main-content {
        padding: 15px 12px !important;
        height: 0 !important;
        min-height: 0 !important;
        flex: 1 1 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Admin header – stack on mobile */
    .admin-main-content>div:first-child {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .admin-main-content>div:first-child h1 {
        font-size: 20px !important;
    }

    .admin-main-content>div:first-child p {
        font-size: 12px !important;
    }

    /* Add Product button in header */
    .admin-main-content>div:first-child>button {
        font-size: 12px !important;
        padding: 8px 14px !important;
    }

    /* ---- OVERVIEW TAB ---- */
    /* KPI cards → 2 columns */
    #admin-tab-overview>div:first-child {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 15px !important;
    }

    .admin-kpi-card {
        padding: 15px !important;
        border-radius: 12px !important;
    }

    .admin-kpi-card div:first-child {
        font-size: 11px !important;
        margin-bottom: 6px !important;
    }

    .admin-kpi-card div:last-child {
        font-size: 20px !important;
    }

    /* Charts row (Sales + Recent Customers) → stack */
    #admin-tab-overview>div:nth-child(2) {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Status/Top Products/Visitors row → stack */
    #admin-tab-overview>div:nth-child(3) {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Revenue breakdown row → stack */
    #admin-tab-overview>div:nth-child(4) {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Chart containers */
    #admin-tab-overview canvas {
        max-height: 200px !important;
    }

    /* Card padding on mobile */
    #admin-tab-overview div[style*="border-radius: 16px"] {
        padding: 15px !important;
        border-radius: 12px !important;
    }

    #admin-tab-overview h3 {
        font-size: 15px !important;
        margin-bottom: 12px !important;
    }

    /* ---- ORDERS TAB ---- */
    #admin-tab-orders>div {
        padding: 12px !important;
        border-radius: 12px !important;
    }

    /* Orders header – stack search/filter */
    #admin-tab-orders>div>div:first-child {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    #admin-tab-orders>div>div:first-child>div {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    #admin-tab-orders input[type="text"] {
        width: 100% !important;
        font-size: 13px !important;
    }

    #admin-tab-orders select {
        width: 100% !important;
    }

    /* Table scroll on mobile */
    #admin-tab-orders table {
        min-width: 600px !important;
    }

    #admin-tab-orders th,
    #admin-tab-orders td {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }

    /* ---- PRODUCTS TAB ---- */
    #admin-tab-products>div {
        padding: 12px !important;
        border-radius: 12px !important;
    }

    /* Products header – stack */
    #admin-tab-products>div>div:first-child {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    #admin-tab-products>div>div:first-child>div {
        flex-direction: column !important;
        gap: 8px !important;
    }

    #admin-tab-products input[type="text"] {
        width: 100% !important;
        font-size: 13px !important;
    }

    #admin-tab-products button {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }

    #admin-tab-products table {
        min-width: 550px !important;
    }

    #admin-tab-products th,
    #admin-tab-products td {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }

    /* ---- CUSTOMERS TAB ---- */
    #admin-tab-customers>div {
        padding: 12px !important;
        border-radius: 12px !important;
    }

    #admin-tab-customers>div>div:first-child {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    #admin-tab-customers input[type="text"] {
        width: 100% !important;
        font-size: 13px !important;
    }

    #admin-tab-customers table {
        min-width: 500px !important;
    }

    #admin-tab-customers th,
    #admin-tab-customers td {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }

    /* ---- COSTS TAB ---- */
    /* Costs KPI cards → 2 columns */
    #admin-tab-costs>div:first-child {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 15px !important;
    }

    #admin-tab-costs>div:first-child>div {
        padding: 15px !important;
        border-radius: 12px !important;
    }

    #admin-tab-costs>div:first-child>div>div:first-child {
        font-size: 10px !important;
    }

    #admin-tab-costs>div:first-child>div>div:last-child {
        font-size: 18px !important;
    }

    /* Cost matrix header – stack */
    #admin-tab-costs>div:nth-child(2) {
        padding: 12px !important;
        border-radius: 12px !important;
    }

    #admin-tab-costs>div:nth-child(2)>div:first-child {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    #admin-tab-costs>div:nth-child(2)>div:first-child>div {
        display: flex !important;
        gap: 8px !important;
    }

    #admin-tab-costs>div:nth-child(2)>div:first-child>div button {
        flex: 1 !important;
        font-size: 12px !important;
        padding: 8px 12px !important;
    }

    #admin-tab-costs table {
        min-width: 500px !important;
    }

    #admin-tab-costs th,
    #admin-tab-costs td {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }

    /* ---- MODALS ON MOBILE ---- */
    .modal-card {
        width: 95% !important;
        max-width: none !important;
        padding: 20px !important;
        border-radius: 12px !important;
        max-height: 85vh !important;
    }

    .modal-card .form-group input,
    .modal-card .form-group select,
    .modal-card .form-group textarea {
        width: 100% !important;
        font-size: 14px !important;
    }

    /* Notification dropdown on mobile */
    #notif-dropdown {
        width: 280px !important;
        right: -50px !important;
    }
}

@media (max-width: 480px) {
    .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0 !important;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0 !important;
    }

    .navbar {
        padding: 10px 15px !important;
    }

    .logo {
        font-size: 22px !important;
    }

    .frame-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .material-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .size-select {
        width: 100% !important;
    }

    .newsletter-form {
        flex-direction: column !important;
    }

    .newsletter-input {
        width: 100% !important;
    }

    .cart-drawer {
        width: 100% !important;
    }

    /* === MOBILE UI IMPROVEMENTS (re-applied) === */

    /* Hide profile & admin icons on mobile nav - they're in mobile menu */
    #nav-profile-link,
    #nav-admin-link {
        display: none !important;
    }

    /* Detail View - frame options & right column on mobile */
    #detail-view .right-col.detail-info {
        padding: 15px !important;
    }

    #detail-view .frame-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
    }

    #detail-view .frame-option {
        border-radius: 8px !important;
    }

    #detail-view .frame-preview-box {
        height: 70px !important;
        border-radius: 8px 8px 0 0 !important;
    }

    #detail-view .frame-label {
        font-size: 12px !important;
        padding: 8px 0 !important;
        font-weight: 800 !important;
    }

    /* Material cards on mobile */
    .material-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    /* Size select full width */
    .size-select {
        width: 100% !important;
        padding: 12px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
    }

    /* AI Art Generator Mobile Layout */
    .generator-container {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        padding: 0 !important;
        gap: 0 !important;
        min-height: auto !important;
    }

    #generator-view {
        padding-top: 0 !important;
    }

    #generator-view .back-btn {
        margin: 10px 15px !important;
        font-size: 13px !important;
    }

    .gen-preview-area {
        order: -1 !important;
        width: 100% !important;
        min-height: auto !important;
        margin-bottom: 0;
        padding: 15px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Critical: constrain the frame from 2000px to fit mobile */
    #gen-frame {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 10px !important;
        background: #fff !important;
    }

    /* Frame style selector - center & full width on mobile */
    .gen-preview-area>div[style*="margin-top"] {
        max-width: 100% !important;
        width: 100% !important;
    }

    .frame-grid {
        display: flex !important;
        gap: 10px !important;
        justify-content: center !important;
    }

    .frame-option {
        flex: 1 !important;
        width: auto !important;
        font-size: 11px !important;
    }

    /* Frame options thumbnails */
    .frame-preview-box {
        width: 100% !important;
        height: 55px !important;
        border-radius: 4px 4px 0 0 !important;
    }

    .gen-controls {
        width: 100% !important;
        padding: 20px 15px !important;
    }

    .gen-title {
        font-size: 26px !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 8px !important;
        line-height: 1.1 !important;
    }

    .gen-subtitle {
        font-size: 13px !important;
        margin-bottom: 20px !important;
    }

    .gen-label {
        font-size: 11px !important;
    }

    .gen-input-group {
        margin-bottom: 15px !important;
    }

    .ratio-btn {
        padding: 10px 8px !important;
        font-size: 11px !important;
    }

    textarea.gen-prompt {
        height: 90px !important;
        font-size: 14px !important;
        border-width: 2px !important;
        padding: 12px !important;
        margin-bottom: 15px !important;
    }

    .btn-generate {
        padding: 14px !important;
        font-size: 13px !important;
    }

    .or-divider {
        margin: 20px 0 !important;
    }

    .file-upload-box {
        padding: 20px 15px !important;
    }

    /* Add to Cart button - prominent at bottom */
    .generator-container .add-to-cart-btn {
        width: 100% !important;
        padding: 16px !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        border-radius: 4px !important;
        letter-spacing: 1px !important;
        margin-top: 15px !important;
    }

    /* Hide floating chat when AI Gen is active */
    body.gen-active .whatsapp-float {
        display: none !important;
    }

    /* Reviews section - centered with spacing from edges */
    .reviews-section {
        margin: 25px 15px 30px !important;
        padding: 20px 15px !important;
        border-top: 1px solid #eee !important;
    }

    .reviews-section>div[style*="display:flex"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .reviews-section h2 {
        font-size: 20px !important;
    }

    .reviews-section button {
        width: 100% !important;
        padding: 14px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        text-align: center !important;
    }

    #write-review-form {
        padding: 15px !important;
        margin: 0 0 20px !important;
    }

    #write-review-form>div[style*="display:flex"] {
        flex-direction: column !important;
        gap: 8px !important;
    }

    #write-review-form input,
    #write-review-form select,
    #write-review-form textarea {
        width: 100% !important;
    }

    #reviews-container {
        font-size: 14px !important;
    }

    /* Features bar compact on mobile */
    .features-bar {
        grid-template-columns: repeat(3, 1fr) !important;
        padding: 20px 10px !important;
        gap: 5px !important;
    }

    .feature-item {
        padding: 10px 5px !important;
    }

    .feature-item i {
        font-size: 18px !important;
        margin-bottom: 5px !important;
    }

    .feature-item h4 {
        font-size: 9px !important;
    }

    .feature-item p {
        font-size: 7px !important;
    }

    /* Footer compact on mobile */
    .footer-links {
        grid-template-columns: repeat(3, 1fr) !important;
        padding: 25px 10px !important;
        gap: 10px !important;
    }

    .footer-col {
        padding: 0 5px !important;
    }

    .footer-col h4 {
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }

    .footer-col a {
        font-size: 10px !important;
    }

    .footer-col li {
        margin-bottom: 6px !important;
    }

    /* Thickness selector mobile improvements */
    #thickness-selector-container>div,
    #gen-thickness-container>div {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .thickness-opt {
        padding: 12px 5px !important;
        font-size: 11px !important;
        border-radius: 6px !important;
    }

}

/* ====== IMAGE PROTECTION ====== */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
}

/* Prevent selecting img text globally */
* {
    -webkit-touch-callout: none;
}

/* === Style Block 3 (was lines 4139-4283) === */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 24px;
    margin-bottom: 32px;
}

.profile-header-title {
    font-size: 28px;
    font-weight: 900;
    color: #111;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.profile-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.profile-sidebar {
    flex: 1;
    min-width: 240px;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
}

.profile-sidebar-title {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 16px;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-tab-btn {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.profile-tab-btn:hover {
    background: #fff;
    color: #111;
}

.profile-tab-btn.active {
    background: #111;
    color: #fff;
}

.profile-right {
    flex: 3;
    min-width: 320px;
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
}

.profile-section-title {
    margin-bottom: 24px;
    font-weight: 800;
    font-size: 18px;
    color: #111;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 16px;
}

.profile-input-group {
    margin-bottom: 20px;
}

.profile-input-group label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 8px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #111;
    outline: none;
    transition: all 0.2s;
    background: #fff;
}

.profile-input:focus {
    border-color: #111;
    box-shadow: 0 0 0 1px #111;
}

textarea.profile-input {
    resize: vertical;
    min-height: 100px;
}

.btn-profile-save {
    background: #111;
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.btn-profile-save:hover {
    background: #333;
}


/* AI Art Gen icon — show only on mobile */
.nav-ai-icon-mobile {
    display: none !important;
}

@media (max-width: 768px) {
    .nav-ai-icon-mobile {
        display: flex !important;
    }
}

/* ADMIN DASHBOARD HIDDEN ELEMENTS */
body.admin-mode .header-section,
body.admin-mode footer,
body.admin-mode .footer-newsletter,
body.admin-mode .footer-links,
body.admin-mode .announcement-bar,
body.admin-mode .whatsapp-float,
body.admin-mode .fab-add,
body.admin-mode .features-bar {
    display: none !important;
}

/* --- SKELETON LOADER (Fix Frame Flicker) --- */
.skeleton-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: 4px;
    z-index: 1;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.detail-frame.loading::after {
    opacity: 0;
}

.detail-frame.loading .skeleton-loader {
    display: block;
}

.detail-frame:not(.loading) .skeleton-loader {
    display: none;
}

.detail-frame img {
    transition: opacity 0.3s ease;
}

.detail-frame.loading img {
    opacity: 0;
}

/* ===== FINAL MOBILE CONTAINMENT OVERRIDE ===== */
@media (max-width: 768px) {
    #shop-view {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        display: flex;
        /* Removed !important so JS can hide it */
        flex-direction: column !important;
        align-items: center !important;
    }

    .header-section {
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow: hidden !important;
        text-align: center !important;
    }

    .sale-banner {
        width: calc(100% - 24px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    .filter-bar {
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        padding: 10px 12px !important;
        gap: 8px !important;
        /* Increased gap for better wrapping */
        justify-content: center !important;
    }

    .filter-select {
        flex: 1 1 calc(50% - 10px) !important;
        /* Allow two-up on some screens */
        min-width: 140px !important;
        max-width: 100% !important;
    }

    #sort-filter {
        margin-left: 0 !important;
        flex: 1 1 100% !important;
        /* Full width sort on mobile for clarity */
    }

    .price-filter-container {
        width: 100% !important;
        margin-left: 0 !important;
        box-sizing: border-box !important;
        justify-content: center !important;
        padding: 0 10px !important;
    }

    .products {
        width: 100% !important;
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 15px 10px !important;
        gap: 12px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        justify-content: center !important;
    }

    .product-card {
        /* Disable content-visibility on mobile to prevent layout jumps/shifts */
        content-visibility: visible !important;
        contain-intrinsic-size: none !important;
        width: 100% !important;
    }

    /* Sticker badge RTL fix for mobile edge hit */
    .sticker-badge {
        top: 8px !important;
        left: 8px !important;
    }

    body.rtl .sticker-badge {
        left: auto !important;
        right: 8px !important;
    }

    .wishlist-btn {
        top: 8px !important;
        right: 8px !important;
    }

    body.rtl .wishlist-btn {
        right: auto !important;
        left: 8px !important;
    }
}

/* --- NEW MODERN CHECKOUT --- */
#checkout-view {
    background: #ffffff !important;
    color: #000;
    font-family: inherit;
    padding: 0 !important;
}

.co-main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 5%;
    display: flex;
    gap: 60px;
}

.co-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    border-bottom: 1px solid #eaeaea;
}

.co-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.co-back-link {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.co-back-link:hover {
    color: #000;
}

.co-left {
    flex: 1.5;
}

.co-right {
    flex: 1;
    position: sticky;
    top: 40px;
    align-self: flex-start;
    background: #fafafa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

.co-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form Styles */
.co-input-group {
    margin-bottom: 20px;
}

.co-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 12px 0;
    background: transparent;
    font-size: 16px;
    color: #000;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.co-input:focus {
    outline: none;
    border-bottom: 2px solid #000;
}

.co-input::placeholder {
    color: #999;
}

/* Payment Cards */
.co-payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.co-payment-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.co-payment-card.active {
    border: 2px solid #000;
    background: #fafafa;
}

.co-payment-card-title {
    font-size: 16px;
    font-weight: 600;
}

.co-lypay-box {
    background: #fafafa;
    padding: 20px;
    border-left: 4px solid #000;
    margin-bottom: 30px;
    font-size: 14px;
    color: #333;
}

/* Order Summary */
.co-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.co-item-img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    background: #e0e0e0;
    border-radius: 4px;
}

.co-item-info {
    flex: 1;
}

.co-item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #000;
}

.co-item-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.co-item-price {
    font-weight: 600;
    font-size: 14px;
    color: #000;
}

.co-totals {
    border-top: 1px solid #eaeaea;
    padding-top: 20px;
    margin-top: 20px;
}

.co-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.co-total-row.grand {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    border-top: 2px solid #000;
    padding-top: 20px;
    margin-top: 5px;
}

/* Place Order Btn */
.co-btn-primary {
    background: #000;
    color: #fff;
    width: 100%;
    padding: 18px;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
    border-radius: 50px;
}

.co-btn-primary:active {
    opacity: 0.8;
}

.co-btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
}

.co-mobile-progress {
    display: none;
}

.co-mobile-continue {
    display: none;
}

.co-mobile-summary {
    display: none;
}

/* Desktop view: steps are always visible */
.co-step-section {
    display: block !important;
    margin-bottom: 50px;
}

.co-mobile-back {
    display: none !important;
}

/* Mobile View Checkout */
@media (max-width: 768px) {
    .co-main-container {
        flex-direction: column;
        padding: 20px 5%;
        gap: 0;
    }

    .co-right {
        position: static;
        padding: 0;
        background: transparent;
        border: none;
        order: 1;
        width: 100% !important;
        align-self: stretch !important;
        box-sizing: border-box !important;
    }

    .co-mobile-progress {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 20px 5% 10px;
        border-bottom: 1px solid #eaeaea;
        margin-bottom: 30px;
        position: relative;
        width: 100%;
        box-sizing: border-box;
    }

    .co-step-ind {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        color: #ddd;
        font-weight: 600;
        transition: color 0.3s;
        flex: 0 0 auto;
        z-index: 2;
        width: 60px;
    }

    .co-step-icon {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: #fff;
        border: 2px solid #eaeaea;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: #ddd;
        transition: all 0.3s;
        box-sizing: border-box;
    }

    .co-step-label {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: inherit;
        white-space: nowrap;
    }

    .co-step-line {
        display: none !important;
    }

    .co-step-ind.active {
        color: #000;
    }

    .co-step-ind.active .co-step-icon {
        border-color: #000;
        color: #000;
        background: #fff;
    }

    .co-step-ind.passed {
        color: #000;
    }

    .co-step-ind.passed .co-step-icon {
        border-color: #000;
        background: #000;
        color: #fff;
    }

    /* Step visibility handled by JS on mobile */
    .co-step-section {
        display: none !important;
        margin-bottom: 0;
    }

    .co-step-section.mobile-active {
        display: block !important;
    }

    .co-mobile-continue {
        display: block;
        width: 100%;
        background: #000;
        color: #fff;
        padding: 18px;
        font-size: 16px;
        border: none;
        font-weight: 600;
        margin-top: 30px;
        text-transform: uppercase;
        letter-spacing: 1px;
        border-radius: 50px;
    }

    .co-mobile-back {
        display: block !important;
        text-align: center;
        margin-top: 20px;
        font-size: 14px;
        color: #666;
        text-decoration: underline;
        padding: 10px;
    }

    .desktop-only {
        display: none !important;
    }

    .co-mobile-summary {
        display: flex;
        justify-content: space-between;
        padding: 15px;
        border: 1px solid #eaeaea;
        margin-bottom: 20px;
        font-weight: 600;
        font-size: 16px;
    }

    .co-payment-card {
        padding: 15px;
    }

    .co-left {
        order: 2;
        flex: none;
    }
}

/* Success View Minimal */
#success-view {
    background: #ffffff !important;
    align-items: center;
    justify-content: center;
}

.co-success-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 20px;
}

.co-success-icon {
    font-size: 80px;
    color: #000;
    margin-bottom: 20px;
}

.co-success-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}