:root {
    --primary: #8b5cf6;
    /* Sleek Violet */
    --primary-glow: rgba(139, 92, 246, 0.4);
    --secondary: #ec4899;
    /* Pink accent */
    --bg-dark: #0b071e;
    /* Deep night background */
    --card-bg: rgba(25, 18, 52, 0.6);
    --card-border: rgba(139, 92, 246, 0.15);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent: #10b981;
    /* Emerald for approvals/success */
    --danger: #ef4444;
    /* Cancelled / deletes */
    --glass-blur: blur(16px);
    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Inter', sans-serif;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-ar);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Background Blobs */
.bg-glow {
    position: fixed;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
    z-index: -1;
    pointer-events: none;
}

.blob-1 {
    top: -100px;
    right: -50px;
    background-color: var(--primary);
}

.blob-2 {
    bottom: -100px;
    left: -50px;
    background-color: var(--secondary);
}

.blob-3 {
    top: 40%;
    left: 30%;
    background-color: var(--primary);
}

/* Header & Navbar */
.top-banner {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    font-size: 0.85rem;
    padding: 8px 0;
    color: white;
    font-weight: 500;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-top a {
    color: white;
    margin-right: 12px;
    font-size: 1rem;
    transition: var(--transition);
}

.social-top a[hidden],
.contact-actions a[hidden] {
    display: none;
}

.social-top a:hover {
    opacity: 0.8;
}

.main-header {
    background: rgba(11, 7, 30, 0.75);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 14px 28px rgba(0,0,0,0.24);
    padding: 6px;
    transition: var(--transition);
}

.logo:hover .brand-mark {
    transform: translateY(-1px) scale(1.04);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 18px 32px rgba(139, 92, 246, 0.28);
}

.brand-wolf {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
}

.brand-text {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-en);
}


.brand-text .accent-text {
    color: var(--secondary);
    -webkit-text-fill-color: var(--secondary);
}

.search-bar-wrapper {
    position: relative;
    width: 320px;
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

#search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 10px 40px 10px 15px;
    border-radius: 50px;
    color: white;
    font-family: var(--font-ar);
    font-size: 0.9rem;
    transition: var(--transition);
}

#search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    text-shadow: 0 0 10px var(--primary-glow);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-btn {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--primary);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.cart-btn:hover {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.cart-count {
    position: absolute;
    top: -5px;
    left: -5px;
    background: var(--secondary);
    color: white;
    font-size: 0.75rem;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--font-en);
}

.language-control { display: inline-flex; align-items: center; margin: 0; }
.language-control select { min-height: 36px; border: 1px solid currentColor; border-radius: 9px; padding: 5px 9px; background: #171326; color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.admin-body .language-control select { background: #fff; color: var(--admin-ink); border-color: var(--admin-line); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html[dir="ltr"] body { text-align: start; }

/* Mobile Nav Bar - Bottom Fix */
.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(11, 7, 30, 0.9);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--card-border);
    z-index: 99;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 3px;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.badge-wrapper {
    position: relative;
}

/* Hero Section */
.hero-section {
    padding: 64px 0 86px;
    position: relative;
}

.hero-text h1 {
    font-size: clamp(2rem, 3.2vw, 3.1rem);
    line-height: 1.2;
    margin-bottom: 14px;
}

.hero-text p {
    font-size: 1rem;
    color: rgba(243, 244, 246, 0.84);
    max-width: 610px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.badge-new {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary-glow);
    color: #c084fc;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    width: max-content;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.spinner-icon {
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 35px;
    max-width: 550px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

/* Buttons */
.btn {
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-ar);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: var(--transition);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    border: none;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-main);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.danger-btn {
    background: var(--danger);
    color: white;
    border: none;
}

.danger-btn:hover {
    opacity: 0.9;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.buy-btn {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
}

.stat-lbl {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-image-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    background: var(--primary);
    opacity: 0.2;
    filter: blur(60px);
    border-radius: 50%;
}

.hero-img {
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    border: 2px solid var(--card-border);
    transform: rotate(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.hero-img:hover {
    transform: rotate(0) scale(1.02);
}

.hero-logo-card {
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.12));
    border-radius: 34px;
    border: 2px solid rgba(255,255,255,0.12);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.hero-logo-card img {
    width: auto;
    max-width: 240px;
    max-height: 240px;
    object-fit: contain;
    filter: drop-shadow(0 14px 30px rgba(0,0,0,0.18));
    animation: logoFloat 5s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.floating-badge {
    position: absolute;
    background: rgba(25, 18, 52, 0.8);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
}

.floating-badge i {
    font-size: 1.5rem;
    color: var(--secondary);
}

.floating-badge h4 {
    font-size: 0.9rem;
    font-weight: 700;
}

.floating-badge p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.badge-top {
    top: 50px;
    left: -20px;
}

.badge-bottom {
    bottom: 50px;
    right: -20px;
}

/* Features */
.features-section {
    padding: 85px 0;
    background: rgba(25, 18, 52, 0.3);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 35px 25px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
}

.icon-box {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.7rem;
    border: 1.5px solid var(--primary);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Shop Filters & Products */
.shop-section {
    padding: 80px 0;
}

.shop-filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 15px 25px;
    border-radius: 50px;
}

.categories-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.cat-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-ar);
    font-size: 0.9rem;
    transition: var(--transition);
    white-space: nowrap;
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.sort-wrapper select {
    background: var(--bg-dark);
    color: white;
    border: 1px solid var(--card-border);
    padding: 8px 12px;
    border-radius: 30px;
    font-family: var(--font-ar);
    outline: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(11, 7, 30, 0.5);
}

.product-card-img-wrapper {
    position: relative;
    padding-top: 100%;
    /* square ratio */
    overflow: hidden;
    cursor: pointer;
}

.product-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card-img {
    transform: scale(1.08);
}

.badge-discount {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.product-card-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-cat {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
    line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.product-card-title:hover {
    color: var(--primary);
}

.variant-choice-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.variant-choice-button { min-width: 42px; min-height: 38px; padding: 7px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 9px; background: rgba(17,12,34,.8); color: #fff; cursor: pointer; }
.variant-choice-button.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(139,92,246,.24); }
.variant-choice-button:disabled { opacity: .38; text-decoration: line-through; cursor: not-allowed; }
.variant-color-button { display: inline-flex; align-items: center; gap: 7px; }
.variant-color-chip { width: 17px; height: 17px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; }
.variant-stock-status { min-height: 18px; margin: 4px 0 0; color: var(--text-muted); font-size: .82rem; }
.variant-stock-status.sold-out { color: #f87171; }

.product-card-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 15px;
}

.new-price {
    font-weight: 800;
    color: white;
    font-size: 1.15rem;
}

.old-price {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 0.85rem;
}

.product-card-actions {
    display: flex;
    gap: 10px;
}

.add-btn {
    flex-grow: 1;
    text-align: center;
    justify-content: center;
    font-size: 0.85rem;
    padding: 10px 14px;
}

.view-btn {
    width: 40px;
    padding: 0;
    justify-content: center;
}

/* Modals System */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 2, 13, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: var(--transition);
}

.modal-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 35px;
    position: relative;
    max-width: 800px;
    width: 100%;
    max-height: none;
    overflow-y: visible;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: auto;
}

@keyframes popIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: white;
}

.checkout-card .checkout-return-btn {
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 10px;
    background: rgba(11,7,30,.9);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
}
.checkout-card .checkout-return-btn:hover { border-color: var(--primary); background: rgba(139,92,246,.2); }

/* Product Detail Modal specific designs */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
}

.detail-gallery img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.main-detail-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.detail-thumbs-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    opacity: 1;
    border-color: var(--primary);
}

.slide-img-col {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-img {
    width: 100%;
    max-width: 340px;
    max-height: 340px;
    object-fit: contain;
    border-radius: 20px;
    position: relative;
    z-index: 1;
}

.slide-img-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(139,92,246,0.25) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.detail-cat-badge {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    width: max-content;
    display: inline-block;
    margin-bottom: 10px;
}

.detail-info h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.detail-specs-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detail-specs-box p {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-specs-box p:last-child {
    margin-bottom: 0;
}

.detail-specs-box p::before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
}

.detail-pricing {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.detail-new-price {
    font-size: 1.8rem;
    font-weight: 850;
    color: white;
}

.detail-old-price {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.variant-picker {
    margin: 12px 0;
}

.variant-picker > label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
}

.variant-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.variant-swatches .color-dot {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    cursor: pointer;
}

.variant-swatches .color-dot.active {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.variant-picker select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-main);
}

.purchase-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.purchase-controls .btn {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
}

.qty-selector {
    display: flex;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.qty-selector button {
    background: transparent;
    border: none;
    color: white;
    width: 40px;
    height: 44px;
    cursor: pointer;
    transition: var(--transition);
}

.qty-selector button:hover {
    background: rgba(255, 255, 255, 0.05);
}

.qty-selector input {
    width: 50px;
    text-align: center;
    background: transparent;
    border: none;
    color: white;
    font-weight: bold;
    outline: none;
}

/* Sliding Cart Drawer */
.cart-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: min(440px, 100vw);
    background: #100b25;
    border-left: 1px solid var(--card-border);
    z-index: 250;
    display: flex;
    flex-direction: column;
    box-shadow: -24px 0 70px rgba(0,0,0,.42);
    transition: transform .28s cubic-bezier(.2,.75,.25,1);
    visibility: visible;
}

.cart-sidebar.hidden {
    display: flex !important;
    transform: translateX(105%);
    visibility: hidden;
    pointer-events: none;
}
body.cart-open { overflow: hidden; }

.cart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 249;
    border: 0;
    background: rgba(4,2,13,.68);
    backdrop-filter: blur(3px);
    cursor: pointer;
    opacity: 1;
    transition: opacity .25s ease;
}
.cart-backdrop.hidden { display: block !important; opacity: 0; pointer-events: none; }
.cart-header-title { display: flex; align-items: center; gap: 12px; }
.cart-header-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(139,92,246,.25); border-radius: 14px; background: rgba(139,92,246,.14); color: #c4a7ff; font-size: 18px; }
.cart-header h3 { margin: 0; color: #fff; font-size: 1.08rem; }
.cart-header p { margin-top: 3px; color: var(--text-muted); font-size: .78rem; }
.cart-header {
    min-height: 82px;
    padding: 17px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(135deg, rgba(139,92,246,.1), transparent 70%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    color: #d9d6e5;
    font-size: 1rem;
    cursor: pointer;
}
.close-cart-btn:hover { background: rgba(255,255,255,.09); }

.cart-items-container {
    padding: 16px;
    flex-grow: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cart-item {
    display: grid;
    grid-template-columns: 76px minmax(0,1fr) 34px;
    align-items: start;
    gap: 12px;
    padding: 14px;
    margin-bottom: 11px;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
}
.cart-item.cart-item-unavailable { border-color: rgba(239,68,68,.45); }
.cart-item-img-wrap { width: 76px; height: 76px; overflow: hidden; border-radius: 12px; background: rgba(139,92,246,.1); }
.cart-item-img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-unavailable .cart-item-img { opacity: .55; }
.cart-item-info { min-width: 0; }
.cart-item-title { display: -webkit-box; overflow: hidden; margin: 0; color: #fff; font-size: .91rem; font-weight: 800; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cart-item-variants { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.cart-variant-chip { padding: 3px 8px; border: 1px solid rgba(255,255,255,.09); border-radius: 7px; background: rgba(255,255,255,.04); color: #c6c2d2; font-size: .71rem; }
.cart-stock-message { display: flex; align-items: center; gap: 5px; margin-top: 7px; color: #5ee0ae; font-size: .72rem; }
.cart-stock-message.low-stock { color: #fbbf24; }
.cart-stock-message.out-of-stock { color: #f87171; }
.cart-item-unavailable .cart-stock-message { color: #f87171; }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.cart-item-unit-price { color: var(--text-muted); font-size: .74rem; }
.cart-item-line-total { color: #fff; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.cart-item-qty-row { display: inline-flex; align-items: center; gap: 9px; padding: 3px; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: rgba(0,0,0,.18); }
.cart-item-qty-row button { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(139,92,246,.25); border-radius: 8px; background: rgba(139,92,246,.1); color: #fff; cursor: pointer; }
.cart-item-qty-row button:disabled { opacity: .35; cursor: not-allowed; }
.cart-item-qty-row span { min-width: 15px; color: #fff; text-align: center; font-size: .85rem; font-weight: 800; }
.delete-item-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(239,68,68,.14); border-radius: 9px; background: rgba(239,68,68,.07); color: #f87171; cursor: pointer; }
.delete-item-btn:hover { background: rgba(239,68,68,.16); }
.cart-empty-state { display: grid; justify-items: center; gap: 10px; padding: 44px 18px; color: var(--text-muted); text-align: center; }
.cart-empty-icon { display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid rgba(139,92,246,.2); border-radius: 24px; background: rgba(139,92,246,.1); color: #bba0ff; font-size: 28px; }
.cart-empty-state h4 { margin: 0; color: #fff; font-size: 1rem; }
.cart-empty-state p { max-width: 260px; font-size: .82rem; line-height: 1.7; }
.cart-browse-btn { margin-top: 4px; padding: 10px 16px; border: 1px solid rgba(139,92,246,.38); border-radius: 10px; background: rgba(139,92,246,.13); color: #e8ddff; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }

.cart-summary {
    padding: 17px 20px max(18px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,.09);
    background: #0e0921;
}
.cart-summary-products { color: #c7c3d1; }
.cart-shipping-note { display: flex; align-items: center; gap: 8px; margin: 12px 0; color: var(--text-muted); font-size: .75rem; }
.cart-shipping-note i { color: #bba0ff; }
.cart-summary-total { margin: 0; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.08); color: #fff; font-size: 1rem; font-weight: 800; }
.cart-summary-total span:last-child { color: #c4a7ff; }
.cart-summary .checkout-btn { display: flex; align-items: center; justify-content: space-between; min-height: 50px; margin-top: 16px; padding: 0 17px; border-radius: 12px; font-size: .91rem; }
.cart-summary .checkout-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.cart-secure-note { margin-top: 11px; color: var(--text-muted); text-align: center; font-size: .7rem; }
.cart-secure-note i { margin-inline-end: 4px; color: #5ee0ae; }
@media (max-width: 580px) {
    .cart-sidebar { width: min(100vw, 440px); }
    .cart-header { min-height: 72px; padding: 13px 16px; }
    .cart-items-container { padding: 12px; }
    .cart-item { grid-template-columns: 66px minmax(0,1fr) 32px; gap: 9px; padding: 11px; }
    .cart-item-img-wrap { width: 66px; height: 66px; }
    .cart-item-title { font-size: .84rem; }
    .cart-summary { padding: 14px 16px max(16px, env(safe-area-inset-bottom)); }
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.divider {
    height: 1px;
    background: var(--card-border);
    margin: 15px 0;
}

.total-line {
    font-size: 1.2rem;
    color: white;
    font-weight: 800;
}

.checkout-btn {
    width: 100%;
    margin-top: 15px;
    justify-content: center;
}

/* Checkout Page design */
.checkout-card {
    max-width: 950px;
    padding: 0;
    overflow: hidden;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    min-height: 70vh;
}

.checkout-summary-col {
    background: rgba(0, 0, 0, 0.25);
    border-left: 1px solid var(--card-border);
    padding: 40px 30px;
}

.checkout-summary-col h3 {
    margin-bottom: 25px;
    font-size: 1.25rem;
}

.checkout-items-mini {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 25px;
}

.mini-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 8px;
}

.mini-item-details {
    display: flex;
    flex-direction: column;
}

.mini-item-qty {
    color: var(--primary);
    font-weight: 700;
}

.checkout-form-col {
    padding: 40px 40px 40px 30px;
}

.form-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.form-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.checkout-form-col form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group label i {
    margin-left: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(10, 6, 30, 0.9);
    border: 1px solid var(--card-border);
    padding: 11px 15px;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-ar);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    /* Force dark background for native select dropdown */
    color-scheme: dark;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.shipping-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ship-option {
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.ship-option input {
    margin-left: 12px;
}

.option-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.opt-title {
    font-size: 0.9rem;
    font-weight: 700;
}

.opt-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.opt-price {
    font-weight: bold;
    color: var(--accent);
}

.ship-option.active {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.08);
}

.submit-btn {
    width: 100%;
    margin-top: 15px;
    justify-content: center;
    font-size: 1.05rem;
    padding: 14px;
}

/* Success Card */
.success-card {
    max-width: 480px;
    text-align: center;
    padding: 40px;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    font-size: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.order-id-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px dashed var(--primary);
    display: inline-block;
    font-family: var(--font-en);
    font-weight: bold;
    font-size: 1.1rem;
    margin: 15px 0;
    color: white;
}

.call-reminder {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Admin Dashboard layout styling */
.admin-body {
    display: block;
    direction: rtl;
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.glow-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.login-card h2 {
    margin-bottom: 8px;
}

.login-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
}

.password-input-wrapper input {
    width: 100%;
    padding-left: 45px;
}

.password-input-wrapper button {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.default-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
}

.error-msg {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 8px;
    text-align: right;
}

.login-btn {
    width: 100%;
    margin-top: 20px;
    justify-content: center;
}

.back-home-link {
    margin-top: 25px;
    font-size: 0.85rem;
}

.back-home-link a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.back-home-link a:hover {
    color: white;
}

/* Main Admin Panel */
.admin-dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(8, 7, 24, 0.95), rgba(18, 13, 42, 0.95));
}

.admin-sidebar {
    background: linear-gradient(180deg, rgba(12, 8, 32, 0.98), rgba(18, 12, 43, 0.98));
    border-left: 1px solid rgba(139, 92, 246, 0.18);
    display: flex;
    flex-direction: column;
    padding: 28px 18px;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.25);
}

.sidebar-header {
    margin-bottom: 34px;
    text-align: center;
    padding: 12px 10px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
}

.sidebar-header .brand-text {
    font-size: 1.35rem;
}

.sidebar-nav {
    flex-grow: 1;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-nav-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 16px;
    text-align: right;
    font-family: var(--font-ar);
    font-size: 0.92rem;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    box-shadow: inset 0 0 0 1px transparent;
}

.side-nav-btn i {
    font-size: 1.1rem;
    width: 20px;
}

.side-nav-btn:hover,
.side-nav-btn.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.14));
    color: white;
    border-right: 3px solid var(--primary);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.badge-pending-count {
    background: var(--secondary);
    color: white;
    margin-right: auto;
    padding: 2px 7px;
    font-size: 0.75rem;
    border-radius: 50px;
    font-weight: bold;
}

.logout-btn {
    width: 100%;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: var(--danger);
    padding: 11px 14px;
    border-radius: 14px;
    cursor: pointer;
    font-family: var(--font-ar);
    transition: var(--transition);
    font-weight: 600;
}

.logout-btn:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}

.admin-main {
    padding: 30px 32px 40px;
}

.admin-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 18px 22px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
}

.top-title h1 {
    font-size: 1.7rem;
    font-weight: 800;
}

.admin-profile-badge {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.16), rgba(236, 72, 153, 0.12));
    border: 1px solid rgba(255,255,255,0.08);
    padding: 8px 16px;
    border-radius: 50px;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Tabs */
.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(25, 18, 52, 0.95), rgba(14, 9, 39, 0.85));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 18px 18px 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card.revenue .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
}

.stat-card.total-orders .stat-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-card.pending .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 850;
    margin: 4px 0;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Dashboard Block & Tables */
.dashboard-block {
    background: linear-gradient(135deg, rgba(24, 17, 52, 0.96), rgba(13, 10, 34, 0.9));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 12px 26px rgba(0,0,0,0.16);
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.block-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
}

.admin-table th {
    color: var(--text-muted);
    font-weight: 600;
}

.status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-badge.confirmed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
}

.status-badge.shipped {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
}

.status-badge.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Toolbar controls */
.block-toolbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    margin-bottom: 18px;
    align-items: center;
}

.toolbar-search {
    position: relative;
}

.toolbar-search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.toolbar-search input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255,255,255,0.09);
    padding: 10px 38px 10px 15px;
    border-radius: 12px;
    color: white;
    width: 300px;
    outline: none;
    font-family: var(--font-ar);
}

.toolbar-filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 999px;
    font-family: var(--font-ar);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    color: white;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-color: transparent;
}

.action-row-buttons {
    display: flex;
    gap: 6px;
}

.micro-btn {
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    border: none;
    cursor: pointer;
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.micro-btn.view {
    background: var(--primary);
}

.micro-btn.delete {
    background: var(--danger);
}

.micro-btn.visibility {
    background: #f59e0b;
}

/* Products Layout Management */
.products-tab-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 25px;
}

.product-actions-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-uploader-wrapper {
    display: flex;
    gap: 10px;
}

.image-uploader-wrapper input {
    flex-grow: 1;
}

.image-preview-container {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
}

.image-preview-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Settings block specificity */
.settings-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.settings-card {
    position: relative;
    padding-top: 60px;
}

.card-icon-badge {
    position: absolute;
    top: -20px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.telegram-color {
    background: linear-gradient(135deg, #229ED9, #179cde);
}

.security-color {
    background: linear-gradient(135deg, #10b981, #047857);
}

.instructions-toggle {
    background: rgba(139, 92, 246, 0.1);
    color: #c084fc;
    padding: 10px 15px;
    border-radius: var(--radius-md);
    margin: 15px 0;
    cursor: pointer;
    font-size: 0.85rem;
}

.tg-instructions-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--card-border);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tg-instructions-box ol {
    padding-right: 15px;
}

.tg-instructions-box li {
    margin-bottom: 8px;
}

.system-reset-box {
    border-top: 1px dashed var(--danger);
    margin-top: 30px;
    padding-top: 25px;
}

.system-reset-box h3 {
    color: var(--danger);
    font-size: 1rem;
    margin-bottom: 8px;
}

.system-reset-box p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* In depth Invoice Modal in Admin */
.invoice-view-card {
    max-width: 750px;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.invoice-title h2 {
    font-size: 1.4rem;
    font-weight: 800;
}

.invoice-number {
    font-family: var(--font-en);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
}

.invoice-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 15px;
}

.invoice-sections-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    margin-bottom: 25px;
}

.invoice-section-card {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.invoice-section-card h3 {
    font-size: 0.95rem;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
    color: white;
}

.invoice-list-details {
    list-style: none;
}

.invoice-list-details li {
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.invoice-list-details li strong {
    color: var(--text-muted);
}

.btn-micro-call {
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.invoice-status-controller select {
    background: var(--bg-dark);
    color: white;
    border: 1px solid var(--card-border);
    padding: 8px;
    border-radius: var(--radius-sm);
    width: 100%;
    font-family: var(--font-ar);
    margin-top: 6px;
    margin-bottom: 15px;
}

.form-group-internal textarea {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 10px;
    border-radius: var(--radius-sm);
    width: 100%;
    resize: none;
    font-family: var(--font-ar);
    font-size: 0.85rem;
}

.invoice-items-box {
    margin-bottom: 25px;
}

.invoice-footer-totals {
    border-top: 1.5px solid var(--card-border);
    padding-top: 15px;
    max-width: 320px;
    margin-right: auto;
    /* aligns it to left in RTL */
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 30px;
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.invoice-total-row.final-total {
    font-size: 1.25rem;
    color: white;
    font-weight: 800;
}

.invoice-action-bar {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
}

/* Toast Mechanism */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(15, 11, 38, 0.95);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    padding: 15px 25px;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideIn {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast i {
    font-size: 1.20rem;
}

.toast.success {
    border-color: var(--accent);
}

.toast.success i {
    color: var(--accent);
}

.toast.info {
    border-color: var(--primary);
}

.toast.info i {
    color: var(--primary);
}

.toast.danger {
    border-color: var(--danger);
}

.toast.danger i {
    color: var(--danger);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.empty-state {
    text-align: center;
    padding: 40px;
}

.empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Admin Globe Button in Footer */
.admin-globe-btn {
    position: fixed;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
    text-decoration: none;
    backdrop-filter: blur(8px);
}

.admin-globe-btn:hover {
    background: rgba(139, 92, 246, 0.4);
    border-color: var(--primary);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        margin-top: 30px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .products-tab-layout {
        grid-template-columns: 1fr;
    }

    .settings-grid-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 60px;
        /* Space for mobile nav bar */
    }

    .main-header {
        padding: 10px 0;
    }

    .search-bar-wrapper {
        display: none;
    }

    /* Hide search or make it full screen */
    .nav-menu {
        display: none;
    }

    .mobile-nav-bar {
        display: flex;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-summary-col {
        border-left: none;
        border-bottom: 1px solid var(--card-border);
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-dashboard-container {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: auto;
        z-index: 100;
        background: rgba(11, 7, 30, 0.96);
        border-top: 1px solid var(--card-border);
        backdrop-filter: blur(12px);
        display: block;
        padding: 0;
    }
    .admin-sidebar .sidebar-header,
    .admin-sidebar .sidebar-footer {
        display: none;
    }
    .admin-sidebar .sidebar-nav ul {
        display: flex;
        overflow-x: auto;
        gap: 0;
        padding: 0;
    }
    .admin-sidebar .sidebar-nav li {
        flex: 1;
        min-width: 0;
    }
    .admin-sidebar .side-nav-btn {
        flex-direction: column;
        gap: 2px;
        padding: 8px 4px;
        font-size: 0.6rem;
        border-radius: 0;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
    }
    .admin-sidebar .side-nav-btn i {
        font-size: 1rem;
    }
    .admin-sidebar .side-nav-btn.active {
        border-bottom-color: var(--primary);
        background: transparent;
    }
    .admin-sidebar .badge-pending-count {
        top: 2px;
        right: 2px;
        font-size: 0.55rem;
        min-width: 14px;
        height: 14px;
    }
    .admin-main {
        padding: 16px 12px;
        padding-bottom: 70px;
    }
    .admin-top-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .top-title h1 {
        font-size: 1rem;
    }

    /* products tab */
    .products-tab-layout {
        grid-template-columns: 1fr;
    }
    .product-form-card {
        padding: 16px;
    }
    .product-form-card .form-group {
        flex-direction: column;
    }
    .product-form-card input,
    .product-form-card select,
    .product-form-card textarea {
        font-size: 16px;
    }
    .image-uploader-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .image-uploader-wrapper input {
        width: 100%;
    }
    .form-actions-buttons {
        flex-direction: column;
        gap: 8px;
    }
    .form-actions-buttons .btn {
        width: 100%;
    }

    /* product table scroll */
    .dashboard-block {
        overflow-x: auto;
    }
    .admin-table {
        font-size: 0.75rem;
    }
    .admin-table td,
    .admin-table th {
        padding: 6px 4px;
    }
    .action-row-buttons {
        gap: 2px;
    }
    .action-row-buttons .micro-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    /* stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .stat-card {
        padding: 12px;
    }

    /* invoices & orders */
    .invoice-sections-grid {
        grid-template-columns: 1fr;
    }
    .block-toolbar {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .block-toolbar select,
    .block-toolbar input {
        width: 100%;
    }

    /* settings tab */
    .settings-grid-layout {
        grid-template-columns: 1fr;
    }
    .settings-card {
        padding: 14px;
    }

    .cart-sidebar {
        width: 100%;
    }
}

@media (max-width: 580px) {

    /* Main Layout Spacing code */
    .container {
        width: 92%;
    }

    .hero-section {
        padding: 40px 0 25px 0;
    }

    .hero-text h1 {
        font-size: 2.1rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .hero-text p {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    /* Remove floating badges on small mobile screens to prevent horizontal overflow */
    .badge-top,
    .badge-bottom {
        display: none !important;
    }

    .hero-visual {
        margin-top: 15px;
    }

    .hero-img {
        max-width: 320px;
        transform: none;
    }

    .hero-img:hover {
        transform: scale(1.02);
    }

    /* Features Spacing */
    .features-section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 35px;
    }

    .section-header h2 {
        font-size: 1.7rem;
    }

    .feature-card {
        padding: 25px 15px;
        margin-bottom: 15px;
    }

    /* 2-Column Responsive Products Grid */
    .shop-section {
        padding: 50px 0;
    }

    .shop-filters-row {
        flex-direction: column;
        gap: 15px;
        border-radius: 20px;
        padding: 15px;
        align-items: stretch;
    }

    .categories-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    .cat-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .sort-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .sort-wrapper select {
        width: 60%;
        font-size: 0.85rem;
    }

    /* 2 Columns cards layout with clean spacing */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        border-radius: var(--radius-md);
    }

    .product-card-details {
        padding: 10px;
    }

    .product-card-cat {
        font-size: 0.7rem;
    }

    .product-card-title {
        font-size: 0.82rem;
        margin-bottom: 8px;
        line-height: 1.4;
    }

    .product-card-price-row {
        gap: 6px;
        margin-bottom: 10px;
    }

    .new-price {
        font-size: 0.95rem;
    }

    .old-price {
        font-size: 0.75rem;
    }

    .product-card-actions {
        flex-direction: column;
        gap: 6px;
    }

    .add-btn {
        font-size: 0.75rem;
        padding: 8px 10px;
        border-radius: var(--radius-sm);
    }

    .view-btn {
        display: none !important;
        /* Hide view details button to avoid clutter, user can click image/title */
    }

    .badge-discount {
        top: 8px;
        right: 8px;
        padding: 2px 6px;
        font-size: 0.65rem;
    }

    /* Modals & Checkout layout values */
    .modal-backdrop {
        padding: 14px 10px;
        align-items: flex-start;
    }

    .modal-content {
        padding: 18px 14px;
        border-radius: var(--radius-md);
        margin: auto;
    }

    .product-detail-grid {
        gap: 15px;
    }

    .detail-info h2 {
        font-size: 1.35rem;
        margin-top: 10px;
    }

    .detail-pricing {
        margin-bottom: 15px;
    }

    .detail-new-price {
        font-size: 1.4rem;
    }

    .detail-old-price {
        font-size: 1.05rem;
    }

    .purchase-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .purchase-controls .btn {
        width: 100%;
        justify-content: center;
    }

    .qty-selector {
        justify-content: center;
    }

    .qty-selector button {
        height: 38px;
    }

    .modal-close {
        top: 15px;
        left: 15px;
    }

    /* Form and Checkout controls */
    .checkout-form-col {
        padding: 20px 10px;
    }

    .checkout-card .checkout-return-btn {
        position: sticky;
        top: 8px;
        left: auto;
        margin: 8px 8px 0 auto;
        min-height: 44px;
    }

    .checkout-summary-col { padding: 22px 18px; }

    .form-header h2 {
        font-size: 1.3rem;
    }

    .form-group-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ship-option {
        padding: 10px 12px;
    }

    .opt-title {
        font-size: 0.85rem;
    }

    .opt-desc {
        font-size: 0.7rem;
    }

    .opt-price {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    /* Footer responsiveness */
    .footer-section {
        padding: 40px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .footer-text {
        max-width: 440px;
        margin: 16px auto 0;
        color: var(--text-muted);
        line-height: 1.8;
        font-size: 0.98rem;
    }

    .footer-contact-card {
        margin: 18px 0 18px;
        display: grid;
        gap: 12px;
        justify-items: center;
        color: var(--text-muted);
        font-size: 0.95rem;
        padding: 18px 20px;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.03);
    }

    .footer-contact-title {
        font-weight: 600;
        color: #f3f3ff;
        letter-spacing: 0.02em;
    }

    .footer-info-list {
        display: grid;
        gap: 12px;
        margin-top: 16px;
        align-items: center;
    }

    .footer-contact-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        padding: 12px 16px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: #e9e9ff;
        font-size: 0.95rem;
    }

    .footer-contact-row i {
        min-width: 22px;
        color: var(--secondary);
    }

    .contact-actions .btn {
        min-width: 170px;
        padding: 12px 18px;
        font-size: 0.96rem;
    }

    .footer-links h4,
    .footer-info h4 {
        margin-bottom: 14px;
        color: #ffffff;
        letter-spacing: 0.03em;
    }

    .footer-links ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: grid;
        gap: 10px;
        justify-content: center;
    }

    .footer-links ul li a {
        color: var(--text-muted);
        font-size: 0.95rem;
        transition: color 0.2s ease;
    }

    .footer-links ul li a:hover {
        color: #ffffff;
    }

    .footer-info-socials .social-label {
        color: var(--text-muted);
        font-size: 0.95rem;
    }
}

[hidden] { display: none !important; }
.promotion-summary { margin: 8px 0; color: #16845b; font-weight: 700; }
.storefront-order-extras { margin: 10px 0 16px; }
.storefront-policy { margin: 8px 0; border: 1px solid #ffffff26; border-radius: 10px; padding: 10px 12px; }
.storefront-policy summary { cursor: pointer; font-weight: 700; }
.storefront-policy p { white-space: pre-wrap; margin: 10px 0 0; line-height: 1.7; }
.storefront-policy-link { display: inline-flex; margin-top: 8px; color: #c9a7ff; font-size: 13px; }
.storefront-consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; line-height: 1.6; cursor: pointer; }
.storefront-consent input { flex: 0 0 auto; margin-top: 5px; }

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    align-items: start;
    gap: clamp(28px, 6vw, 80px);
}

.footer-contact-title,
.footer-info h4 {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-weight: 700;
}

.footer-contact-title i,
.footer-info h4 i,
.footer-contact-row > i {
    color: var(--secondary);
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.contact-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 132px;
    min-height: 46px;
    border-radius: 12px;
    text-decoration: none;
}

.contact-actions .btn i {
    font-size: 1.1rem;
}

.footer-info h4 {
    margin-bottom: 16px;
}

.footer-info-list {
    display: grid;
    gap: 11px;
    list-style: none;
}

.footer-info-list li {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.footer-info-list li > i {
    width: 18px;
    flex: 0 0 18px;
    color: var(--primary);
    text-align: center;
}

.footer-info-list a {
    color: #e9e9ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-info-list a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .footer-contact-title,
    .footer-info h4 {
        justify-content: center;
    }

    .contact-actions {
        justify-content: center;
    }

    .footer-info-list {
        max-width: 440px;
        margin-inline: auto;
    }
}