/**
 * LPCO Mobile App - Production CSS
 * Modern, responsive, RTL-friendly design
 * 
 * Design System:
 * - Colors: Red (#D32F2F), Dark (#1A1A1A), Light (#F5F5F5)
 * - Spacing: 4/8/12/16/20/24px rhythm
 * - Border Radius: 8-12px
 * - Shadows: Subtle, layered
 */

:root {
    --product-card-min: 200px;
    --product-card-max: 240px;
    --product-image-height: 220px;
    --font-display: "Cairo", "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif;
    /* Colors */
    --color-primary: #D32F2F;
    --color-primary-dark: #B71C1C;
    --color-primary-light: #EF5350;
    --color-text-primary: #1A1A1A;
    --color-text-secondary: #666666;
    --color-text-tertiary: #999999;
    --color-bg-white: #FFFFFF;
    --color-bg-light: #F5F5F5;
    --color-border: #E0E0E0;
    --color-success: #4CAF50;
    --color-warning: #FF9800;
    --color-error: #F44336;
    --color-info: #2196F3;
    --primary-red: var(--color-primary);
    --primary-white: var(--color-bg-white);
    --background-gray: var(--color-bg-light);
    --text-dark: var(--color-text-primary);
    --text-light: var(--color-text-secondary);
    --border-color: var(--color-border);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    --gradient-dark: linear-gradient(135deg, #2C3E50 0%, #1a252f 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
}

@media (max-width: 900px) {
    :root {
        --product-card-min: 180px;
        --product-image-height: 200px;
    }
}

@media (max-width: 600px) {
    :root {
        --product-card-min: 150px;
        --product-image-height: 180px;
    }
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .product-card {
        min-width: 0;
    }
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-gray);
    color: var(--text-dark);
    direction: rtl;
    overflow-x: hidden;
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}

/* Container Structure */
.global-ui-container {
    position: relative;
    z-index: 9999;
}

.screens-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.navigation-container {
    position: relative;
    z-index: 1000;
}

.scripts-container {
    display: none;
}

/* Screen Structure Containers */
.screen-header-container {
    position: relative;
    z-index: 100;
}

.screen-menu-container {
    position: relative;
    z-index: 999;
}

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

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 4px;
    background: var(--primary-red);
    z-index: 9999;
    transition: width 0.3s ease;
}

.progress-bar.active {
    width: 100%;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10000;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay p {
    color: white;
    margin-top: 20px;
    font-size: 16px;
}

/* إدارة الشاشات */
.screen {
    display: none;
    min-height: 100vh;
    opacity: 0;
    transform: translateY(8px);
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: screenFadeIn 480ms ease;
}

.screen.exiting {
    display: block;
    opacity: 0;
    transform: translateY(8px);
    animation: screenFadeOut 420ms ease;
}

@keyframes screenFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes screenFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* شاشة تسجيل الدخول */
.login-container {
    max-width: 500px;
    margin: 30px auto;
    padding: 40px;
    background: var(--primary-white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    max-height: 90vh;
    overflow-y: auto;
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo-img {
    height: 100px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(212, 0, 31, 0.2));
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.login-header .back-btn {
    position: absolute;
    right: 0;
    top: 0;
    background: var(--background-gray);
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container h1 {
    color: var(--primary-red);
    font-size: 32px;
    margin-bottom: 10px;
}

.logo-container p {
    color: var(--text-light);
    font-size: 16px;
}

.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-red);
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-primary);
    color: var(--primary-white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(212, 0, 31, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(212, 0, 31, 0.4);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 0, 31, 0.3);
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: var(--primary-white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--primary-red);
    color: var(--primary-white);
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

/* نموذج التوظيف */
.job-application-form {
    background: var(--primary-white);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.job-application-form h2 {
    color: var(--primary-red);
    margin-bottom: 8px;
    font-size: 24px;
}

.form-description {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 14px;
}

.guest-mode {
    text-align: center;
    margin-top: 20px;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    z-index: 100;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.header-logo {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
    max-width: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s;
}

.logo-img:hover {
    transform: scale(1.05);
}

.header-logo h1 {
    font-size: 20px;
    color: var(--primary-red);
    font-weight: 700;
    margin: 0;
}

.header-context {
    display: none;
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: var(--primary-red);
    background: #fff6f4;
    border: 1px solid rgba(255, 99, 71, 0.2);
    border-radius: 10px;
    padding: 6px 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.save-button,
.save-product-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 99, 71, 0.25);
    background: #fff8f4;
    color: var(--primary-red);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

.save-button:hover,
.save-product-btn:hover {
    background: #ffe8e1;
}

.save-button.saved,
.save-product-btn.saved {
    background: var(--primary-red);
    color: #fff;
    border-color: var(--primary-red);
}

@media (max-width: 768px) {
    .app-header {
        padding: 8px 12px;
    }
    
    .header-logo {
        gap: 8px;
    }
    
    .logo-img {
        height: 30px;
        max-width: 30px;
    }
    
    .header-logo h1 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 6px 10px;
    }
    
    .header-logo {
        gap: 6px;
    }
    
    .logo-img {
        height: 24px;
        max-width: 24px;
    }
    
    .header-logo h1 {
        font-size: 14px;
    }
    
    .menu-btn, .cart-btn {
        font-size: 20px;
        padding: 4px;
    }
}

.menu-btn, .cart-btn, .back-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

.cart-btn {
    position: relative;
}

.badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--primary-red);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-red);
    font-size: 14px;
    cursor: pointer;
}

/* Floating barcode button */
.fab {
    position: fixed;
    left: 16px;
    bottom: 90px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-red);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1100;
}

.fab:active {
    transform: scale(0.97);
}

/* شريط فتح القائمة من أي مكان على يمين الشاشة */
.menu-edge-opener {
    position: fixed;
    top: 0;
    right: 0;
    width: 28px;
    height: 100vh;
    z-index: 1200;
    background: transparent;
}

/* القائمة الجانبية */
.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(86vw, 320px);
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: -18px 0 36px rgba(0, 0, 0, 0.18);
    transform: translate3d(105%, 0, 0);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 16px 0 0 16px;
}

.side-menu.active {
    transform: translate3d(0, 0, 0);
}

.side-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1400;
}

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

body.side-menu-open {
    overflow: hidden;
}

/* Avoid transformed ancestors breaking fixed positioning of the side menu */
body.side-menu-open .screen,
body.side-menu-open .screen.active {
    transform: none !important;
}

.side-menu::-webkit-scrollbar {
    width: 6px;
}

.side-menu::-webkit-scrollbar-track {
    background: transparent;
}

.side-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.menu-header {
    padding: 30px 24px;
    background: var(--gradient-primary);
    color: var(--primary-white);
    position: relative;
    overflow: hidden;
}

.menu-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.menu-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.menu-logo {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 16px;
}

.menu-logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.menu-header h2 {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.menu-header p {
    position: relative;
    z-index: 1;
    opacity: 0.9;
    font-size: 14px;
}

.menu-user-info {
    padding: 24px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 4px 12px rgba(212, 0, 31, 0.3);
}

.user-avatar svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

.user-name {
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.user-email {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
}

.menu-list {
    list-style: none;
    padding: 8px 12px;
}

.menu-list li {
    margin-bottom: 4px;
}

.menu-list a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

.menu-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-red);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.menu-list a:hover {
    background: linear-gradient(90deg, rgba(212, 0, 31, 0.08) 0%, transparent 100%);
    transform: translateX(-4px);
    padding-right: 20px;
}

.menu-list a:hover::before {
    transform: scaleY(1);
}

.menu-list a:active {
    transform: translateX(-2px) scale(0.98);
}

.menu-list a svg {
    flex-shrink: 0;
    transition: all 0.3s;
}

.menu-list a:hover svg {
    stroke: var(--primary-red);
    transform: scale(1.1);
}

.menu-accordion {
    position: relative;
}

.brand-accordion-toggle {
    display: flex;
    align-items: center;
}

.menu-chevron {
    margin-right: auto;
    transition: transform var(--transition-fast);
    font-size: 14px;
    color: var(--text-light);
}

.menu-accordion.open .menu-chevron {
    transform: rotate(180deg);
}

.menu-sublist {
    list-style: none;
    padding: 0 12px 6px 12px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    opacity: 0;
}

.menu-accordion.open .menu-sublist {
    max-height: 600px;
    opacity: 1;
}

.menu-sublist li {
    margin: 0;
}

.menu-sublist a {
    padding: 10px 14px;
    gap: 12px;
    font-size: 14px;
    border-radius: 10px;
}

.menu-sublist .menu-sublist-placeholder {
    padding: 10px 14px;
    color: var(--text-light);
    font-size: 13px;
}

.brand-menu-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--background-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.brand-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-menu-fallback {
    color: var(--text-light);
}

.menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
    margin: 16px 0;
}

#logoutBtn {
    color: #dc3545;
}

#logoutBtn:hover {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.08) 0%, transparent 100%);
}

#logoutBtn svg {
    stroke: #dc3545;
}

#closeMenuBtn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: rotate(90deg);
}

/* المحتوى */
.main-content {
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Banners Container */
.home-banners-container {
    width: 100%;
}

.home-banners-container[style*="display: none"] {
    display: none !important;
}

.home-hero {
    margin: 12px 12px 4px;
}

.home-hero.hidden {
    display: none;
}

.home-hero-inner {
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.home-hero-image-wrapper {
    position: relative;
    overflow: hidden;
}

.home-hero-image-wrapper img {
    width: 100%;
    display: block;
    transition: transform 0.25s ease;
}

.home-hero-inner:hover .home-hero-image-wrapper img {
    transform: scale(1.03);
}

.home-hero-content {
    padding: 12px 14px 14px;
    text-align: right;
    direction: rtl;
}

.home-hero-content h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
}

.home-hero-content p {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 0 0 8px;
}

#home-hero-button {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#home-hero-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-header h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #ff4b4b 55%, var(--color-primary-dark) 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(211, 47, 47, 0.25);
    font-family: var(--font-display);
}

.section-header h2::before,
.section-header h2::after {
    content: "";
    position: absolute;
    width: 110%;
    height: 110%;
    left: -5%;
    top: -5%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 55%);
    opacity: 0.7;
    animation: liquidPulse 4.6s ease-in-out infinite;
    pointer-events: none;
}

.section-header h2::after {
    background: radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 60%);
    animation-delay: -2.2s;
}

.home-section {
    margin-bottom: 20px;
    animation: sectionReveal 520ms ease both;
}

.section-action-btn {
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    font-family: var(--font-display);
    transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.section-action-btn:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    filter: saturate(1.05);
}

.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
}

.search-bar button {
    padding: 12px 20px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.search-bar .search-back-btn {
    background: #f3f4f6;
    color: #111827;
    border: 1px solid var(--border-color);
}

.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.filter-group select {
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-red);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.category-card {
    background: var(--primary-white);
    padding: 24px 20px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.category-card:hover::after {
    transform: scaleX(1);
}

.categories-list,
.brands-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

@media (max-width: 768px) {
    .categories-list,
    .brands-list {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .categories-list,
    .brands-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-gray);
    border-radius: 16px;
    transition: all 0.3s;
}

.category-thumb img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fff;
    padding: 4px;
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(212, 0, 31, 0.1);
}

.category-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    text-align: center;
}

.category-count {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
}

/* ========== MODERN PRODUCT CARDS ========== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--product-card-min), 1fr));
    gap: 16px;
    padding: 0;
    justify-items: stretch;
    align-items: stretch;
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 380px) {
    .products-grid {
        gap: 8px;
    }
}

.products-grid.products-list-view {
    grid-template-columns: 1fr;
}

.products-grid.products-list-view .product-card {
    display: flex;
    flex-direction: row-reverse;
}

.products-grid.products-list-view .product-card-image-container {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.products-grid.products-list-view .product-card-content {
    flex: 1;
    justify-content: center;
}

.products-grid.products-list-view .product-card-pricing {
    border: none;
    padding: 0;
    margin-top: 4px;
}

.products-grid.products-list-view .product-card-actions {
    margin-top: 6px;
}

/* Product Card Container */
.product-card {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #eee;
}

.product-card.in-cart {
    background: #fff1f1;
    border-color: #f3b3b3;
    box-shadow: 0 10px 24px rgba(211, 47, 47, 0.12);
}

.btn-add-to-cart.added {
    background: #f87171;
    color: #fff;
    cursor: default;
    box-shadow: none;
}

.product-card.reveal-ready {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
}

.product-card.reveal-in {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: transform 420ms ease, opacity 420ms ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-card:active {
    transform: translateY(-2px);
}

/* Image Container */
.product-card-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.15;
    height: var(--product-image-height);
    min-height: var(--product-image-height);
    max-height: var(--product-image-height);
    overflow: hidden;
    background: #f6f6f6;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    background: #e11d48;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 2;
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.25);
    animation: dmsNewPulse 1.6s ease-in-out infinite;
}

.product-card > .product-new-badge {
    top: 12px;
    right: 12px;
    left: auto;
    transform: none;
}

@keyframes dmsNewPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 6px 16px rgba(225, 29, 72, 0.25);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 10px 22px rgba(225, 29, 72, 0.35);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 6px 16px rgba(225, 29, 72, 0.25);
    }
}

.liquid-label {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary) 0%, #ff4b4b 55%, var(--color-primary-dark) 100%);
    color: #fff;
    border-radius: 999px;
    padding: 5px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    letter-spacing: 0.2px;
    box-shadow: 0 8px 18px rgba(211, 47, 47, 0.22);
}

.liquid-label::before,
.liquid-label::after {
    content: "";
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 55%);
    opacity: 0.6;
    animation: liquidPulse 4.2s ease-in-out infinite;
    pointer-events: none;
}

.liquid-label::after {
    background: radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 60%);
    animation-delay: -1.8s;
}

@keyframes liquidPulse {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate3d(2px, -2px, 0) scale(1.06);
        opacity: 0.85;
    }
}

@keyframes sectionReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card-image {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform var(--transition-normal);
    background: #f6f6f6;
    max-width: 100%;
}

.product-card-image.product-image {
    object-fit: contain;
}

.product-card:hover .product-card-image {
    transform: none;
}

/* Badge */
.product-card-badge {
    display: none;
}

/* Content Area */
.product-card-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--spacing-sm);
    min-height: 220px;
}

.product-card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
}

/* Label */
.product-card-label {
    display: none;
}

/* Product Name (2-line clamp) */
.product-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.product-card-name:hover {
    color: var(--color-primary);
}

/* SKU */
.product-card-sku {
    font-size: 11px;
    color: var(--color-text-tertiary);
    font-weight: 500;
}

.stock-indicator {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-error);
}

/* Pricing */
.product-card-pricing {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    flex: 0 0 auto;
}

.price-current,
.price-package {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-xs);
    font-size: 13px;
}

.price-label {
    color: var(--color-text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.price-value {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 15px;
}

.price-unit {
    color: var(--color-text-tertiary);
    font-size: 11px;
    margin-right: auto;
}

.price-package {
    font-size: 12px;
    opacity: 0.8;
}

.product-card-pricing.guest-price {
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    text-align: center;
    align-items: center;
    justify-content: center;
}

.product-card-pricing.guest-price .price-value {
    color: var(--color-text-secondary);
    font-weight: 600;
}

/* Add to Cart Button */
.product-card-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Share button placed under actions */
.product-card-share {
    margin-top: 6px;
    text-align: center;
}

.product-card .share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 999px;
    border: 1px solid #dc2626;
    background-color: #ffffff;
    color: #dc2626;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.product-card .share-button i,
.product-card .share-button span[aria-hidden="true"] {
    font-size: 14px;
}

.product-card .share-button:hover {
    background-color: #dc2626;
    color: #ffffff;
}
/* Share button on product cards */
.share-card-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    z-index: 2;
}

.share-card-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.14);
    background: #f7f7f7;
}

.unit-chip-placeholder {
    min-height: 38px;
}

.btn-add-to-cart {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-sm);
    min-height: 44px;
    background: var(--color-primary);
    color: var(--color-bg-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    white-space: nowrap;
}

.btn-add-to-cart:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.btn-add-to-cart:active {
    transform: translateY(0);
}

.btn-add-to-cart svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.btn-add-to-cart.btn-disabled {
    background: #d5d5d5;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .product-card-content {
        padding: var(--spacing-sm);
        gap: var(--spacing-xs);
    }
    
    .product-card-name {
        font-size: 13px;
    }
    
    .price-value {
        font-size: 14px;
    }
    
    .btn-add-to-cart {
        padding: var(--spacing-sm) var(--spacing-xs);
        font-size: 11px;
    }
}

/* Legacy product styles (for backward compatibility) */
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--color-bg-light);
}

.product-info {
    padding: 16px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-price {
    font-size: 18px;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.product-unit {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.product-prices {
    margin: 12px 0;
}

.price-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.price-label {
    font-size: 13px;
    color: var(--text-dark);
}

.price-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-red);
}

.unit-selector {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.unit-select {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.unit-select:focus {
    outline: none;
    border-color: var(--primary-red);
}

.unit-chip-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: var(--spacing-sm);
}

.unit-chip-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.unit-chip-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.unit-chip {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.unit-chip:hover {
    border-color: var(--color-primary);
}

.unit-chip.active {
    background: var(--color-primary);
    color: var(--color-bg-white);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
}

.add-to-cart-btn {
    flex: 1;
    padding: 10px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.add-to-cart-btn:hover {
    background: #B00019;
}

/* السلة */
.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    background: var(--primary-white);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

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

.cart-item-name {
    font-weight: 600;
    margin-bottom: 8px;
}

.cart-item-price {
    color: var(--primary-red);
    font-weight: 700;
}

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

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--primary-red);
    cursor: pointer;
    margin-right: auto;
}

.cart-summary {
    background: var(--primary-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 18px;
}

.total-amount {
    color: var(--primary-red);
    font-weight: 700;
}

/* Checkout */
.checkout-form {
    background: var(--primary-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.order-summary {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

/* الحساب */
.account-info {
    background: var(--primary-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.info-card {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

/* FAB */
.fab {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(212, 0, 31, 0.4);
    z-index: 999;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 12px;
}

.nav-item:hover {
    background: var(--background-gray);
}

.nav-item.active {
    color: var(--color-primary);
}

.nav-item.active svg {
    stroke: var(--color-primary);
    transform: scale(1.1);
}

.nav-item svg {
    transition: all 0.3s;
    stroke: var(--color-primary);
}

.nav-item .label {
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}

/* Product detail (responsive image-first layout) */
.product-detail {
    max-width: 960px;
    margin: 0 auto;
}

.product-detail-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--primary-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.product-detail-image {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    max-height: clamp(220px, 55vw, 360px);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border-bottom: 1px solid var(--color-border);
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-detail-info {
    width: 100%;
    padding: 16px 20px 24px;
}

.product-detail-info h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
}

.product-detail-info .product-sku {
    color: var(--text-light);
    margin-bottom: 12px;
    font-size: 14px;
}

.product-detail-info .product-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.product-attributes {
    margin: 12px 0 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-attr-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attr-title {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 14px;
}

.attr-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attr-option {
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.attr-option.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.attr-option.color-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.attr-option.color-option--selected {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.attr-option.color-option--out-of-stock {
    border-color: #d93025;
    color: #d93025;
    background: #fff5f5;
    cursor: not-allowed;
    box-shadow: none;
}

.attr-option.color-option--out-of-stock:hover {
    box-shadow: none;
}

.attr-option[disabled] {
    pointer-events: none;
    opacity: 0.8;
}

.color-stock-badge {
    font-size: 11px;
    font-weight: 600;
    color: #d93025;
}

.product-detail-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-detail-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.product-detail-price {
    font-size: 24px;
    color: var(--primary-red);
    font-weight: 700;
    margin-bottom: 16px;
}

/* Product detail gallery */
.product-detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.product-detail-main {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1 / 1;
    background: #f8f8f8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-detail-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
    font-size: 18px;
    color: var(--color-primary);
}

.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }

.product-detail-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.product-detail-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    background: #f2f2f2;
}

.product-detail-thumb.active {
    border-color: var(--color-primary);
}

/* ========== Responsive Design ========== */

/* Tablets */
@media (max-width: 1024px) {
    .main-content {
        padding: 16px;
    }
    
    .login-container {
        padding: 32px 24px;
        margin: 20px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .main-content {
        padding: 12px;
        padding-bottom: 80px;
    }
    
    .login-container {
        padding: 24px 20px;
        margin: 16px;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }
    
    .product-detail-container {
        gap: 12px;
    }
    
    .product-detail-info h1 {
        font-size: 20px;
    }
    
    .product-detail-image {
        max-height: clamp(200px, 60vw, 300px);
        padding: 10px;
    }
    
    .side-menu {
        width: 280px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .app-header {
        padding: 10px 12px;
    }
    
    .app-header h1 {
        font-size: 16px;
    }
    
    .main-content {
        padding: 10px;
    }
    
    .login-container {
        padding: 20px 16px;
        margin: 12px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-card {
        padding: 16px 12px;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 13px;
    }
    
    .product-price {
        font-size: 14px;
    }
    
    .product-detail-container {
        gap: 10px;
        border-radius: 10px;
    }
    
    .product-detail-image {
        max-height: clamp(170px, 70vw, 240px);
        padding: 8px;
    }
    
    .product-detail-info {
        padding: 14px 16px 18px;
    }
    
    .product-detail-info h1 {
        font-size: 18px;
    }
    
    .product-detail-name {
        font-size: 18px;
    }
    
    .product-detail-price {
        font-size: 20px;
    }
    
    .bottom-nav {
        padding: 6px 0 10px;
    }
    
    .nav-item {
        padding: 6px 8px;
    }
    
    .nav-item .label {
        font-size: 10px;
    }
    
    .side-menu {
        width: 260px;
    }
    
    .menu-list a {
        padding: 14px 16px;
        font-size: 14px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .product-image {
        height: 120px;
    }
    
    .bottom-nav {
        padding: 4px 0 8px;
    }
    
    .nav-item svg {
        width: 18px;
        height: 18px;
    }
    
    .nav-item .label {
        font-size: 9px;
    }
}

/* Skeleton Loading */
.skeleton-card {
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 0;
}

/* Scanner Overlay */
.scanner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 11000;
    display: flex;
    flex-direction: column;
    color: #fff;
}
.scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.6);
}
.scanner-title { font-weight: 700; }
.scanner-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}
.scanner-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}
.scanner-video {
    width: 100%;
    height: 60vh;
    background: #111;
    border-radius: 12px;
    object-fit: cover;
}
.scanner-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    align-items: center;
}
.scanner-btn {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 600;
}
.scanner-btn:active { transform: translateY(1px); }
.scanner-zoom {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #fff;
    font-weight: 600;
}
.scanner-zoom input { flex: 1; }
.scanner-manual {
    display: flex;
    gap: 6px;
}
.scanner-manual-input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #111;
    color: #fff;
}
.scanner-debug {
    font-size: 12px;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 8px;
}

/* Orders */
.orders-list {
    display: grid;
    gap: 12px;
}
.order-card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.cart-item-attrs {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--color-text-primary);
}
.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: var(--color-text-secondary);
}
.status-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.status-pending,
.status-on-hold {
    background: #f0ad4e;
}
.status-processing {
    background: #17a2b8;
}
.status-completed {
    background: #28a745;
}
.status-cancelled,
.status-failed,
.status-refunded {
    background: #dc3545;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    width: 80%;
    height: 18px;
}

.skeleton-price {
    width: 60%;
    height: 20px;
}

.skeleton-unit {
    width: 40%;
    height: 14px;
}

.skeleton-button {
    width: 100%;
    height: 40px;
    margin-top: 12px;
    border-radius: 8px;
}

@media (max-width: 480px) {
    .skeleton-image {
        height: 150px;
    }
}

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

/* Search functionality styles */
.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.search-no-results p {
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 500;
}

.search-no-results button {
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-no-results button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 0, 31, 0.3);
}

/* Search back button */
.search-back-btn {
    background: var(--background-gray);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-back-btn:hover {
    background: var(--primary-white);
    transform: translateX(2px);
}

/* Search input focus styles */
.search-bar input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(212, 0, 31, 0.1);
}

/* Search button active state */
.search-bar button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(212, 0, 31, 0.3);
}

/* Loading skeleton for search results */
.products-grid .skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.load-more-container {
    text-align: center;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.inline-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light, #777);
}

.inline-loader.active {
    display: inline-flex;
}

.inline-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--color-primary, #d32f2f);
    animation: spin 1s linear infinite;
}

.no-more-message {
    display: none;
    font-size: 13px;
    color: var(--text-light, #777);
}

.no-more-message.active {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* ============================================================================
 * GLASSMORPHISM THEME
 * Modern, eye-comfortable design with frosted glass effect
 * ============================================================================ */

:root {
    /* Glassmorphism Colors */
    --glass-bg-dark: #0f172a;           /* Very dark slate */
    --glass-bg-darker: #0a0f1f;         /* Darker slate */
    --glass-panel: rgba(255, 255, 255, 0.08);
    --glass-panel-hover: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-text-primary: #e2e8f0;      /* Light slate */
    --glass-text-secondary: #cbd5e1;    /* Medium slate */
    --glass-text-tertiary: #94a3b8;     /* Dim slate */
    
    /* Glassmorphism Shadows */
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glass-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.2);
    --glass-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.4);
    
    /* Glassmorphism Blur */
    --glass-blur: blur(10px);
    --glass-blur-sm: blur(6px);
}

/* Enable glassmorphism theme globally */
body.glass-theme {
    background: linear-gradient(135deg, var(--glass-bg-dark) 0%, var(--glass-bg-darker) 100%);
    color: var(--glass-text-primary);
}

/* Glass Panel - Generic reusable glass card */
.glass-panel {
    background: var(--glass-panel);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow-sm);
    transition: all var(--transition-normal);
}

.glass-panel:hover {
    background: var(--glass-panel-hover);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: var(--glass-shadow);
}

/* Glass Panel - Elevated variant */
.glass-panel-elevated {
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--glass-shadow);
}

/* Products Toolbar - Glass filter bar */
.products-toolbar {
    background: var(--glass-panel);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--glass-shadow-sm);
}

.products-toolbar .filter-group label {
    color: var(--glass-text-secondary);
}

.products-toolbar .filter-group select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--glass-text-primary);
    border-radius: var(--radius-md);
}

.products-toolbar .filter-group select:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.12);
}

.products-toolbar .filter-group select option {
    background: var(--glass-bg-dark);
    color: var(--glass-text-primary);
}

/* Bottom Navigation - Glass style */
.bottom-nav.glass-style {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-top: 1px solid #f1f1f1;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

.bottom-nav.glass-style .nav-item {
    color: var(--color-primary);
    transition: all var(--transition-fast);
}

.bottom-nav.glass-style .nav-item:hover {
    background: rgba(211, 47, 47, 0.08);
    color: var(--color-primary);
}

.bottom-nav.glass-style .nav-item.active {
    color: var(--color-primary);
    background: rgba(211, 47, 47, 0.15);
}

/* Glass Product Card */
.product-card.glass-card {
    background: var(--glass-panel);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow-sm);
}

.product-card.glass-card:hover {
    background: var(--glass-panel-hover);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: var(--glass-shadow);
}

.product-card.glass-card .product-card-content {
    color: var(--glass-text-primary);
}

.product-card.glass-card .product-card-name {
    color: var(--glass-text-primary);
}

.product-card.glass-card .product-card-name:hover {
    color: var(--color-primary);
}

.product-card.glass-card .price-label {
    color: var(--glass-text-tertiary);
}

.product-card.glass-card .price-unit {
    color: var(--glass-text-tertiary);
}

/* Glass Login Container */
.login-container.glass-login {
    background: var(--glass-panel-elevated);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: var(--glass-text-primary);
}

.login-container.glass-login .form-group label {
    color: var(--glass-text-secondary);
}

.login-container.glass-login .form-group input,
.login-container.glass-login .form-group select,
.login-container.glass-login .form-group textarea {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--glass-text-primary);
    border-radius: var(--radius-md);
}

.login-container.glass-login .form-group input::placeholder,
.login-container.glass-login .form-group textarea::placeholder {
    color: var(--glass-text-tertiary);
}

.login-container.glass-login .form-group input:focus,
.login-container.glass-login .form-group select:focus,
.login-container.glass-login .form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.login-container.glass-login .login-header h1 {
    color: var(--glass-text-primary);
}

.login-container.glass-login .login-header p {
    color: var(--glass-text-tertiary);
}

.login-container.glass-login .login-footer a {
    color: var(--color-primary);
}

/* Glass Account Info */
.account-info.glass-account {
    background: var(--glass-panel);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow-sm);
    color: var(--glass-text-primary);
}

.account-info.glass-account .info-row {
    border-bottom-color: var(--glass-border);
    color: var(--glass-text-secondary);
}

/* Glass Category Card */
.category-card.glass-category {
    background: var(--glass-panel);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow-sm);
}

.category-card.glass-category:hover {
    background: var(--glass-panel-hover);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: var(--glass-shadow);
}

.category-card.glass-category .category-name {
    color: var(--glass-text-primary);
}

.category-card.glass-category .category-count {
    color: var(--glass-text-tertiary);
}

/* Glass Cart Item */
.cart-item.glass-cart-item {
    background: var(--glass-panel);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow-sm);
    color: var(--glass-text-primary);
}

.cart-item.glass-cart-item .cart-item-name {
    color: var(--glass-text-primary);
}

.cart-item.glass-cart-item .cart-item-price {
    color: var(--color-primary);
}

/* Glass Cart Summary */
.cart-summary.glass-summary {
    background: var(--glass-panel-elevated);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: var(--glass-text-primary);
}

.cart-summary.glass-summary .summary-row {
    color: var(--glass-text-secondary);
}

.cart-summary.glass-summary .total-amount {
    color: var(--color-primary);
}

/* Glass Header */
.app-header.glass-header {
    background: var(--glass-panel-elevated);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);
}

.app-header.glass-header .header-logo h1 {
    color: var(--color-primary);
}

/* Error State - Glass style */
.error-message.glass-error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: var(--radius-lg);
    color: #ff9999;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

/* Success State - Glass style */
.success-message.glass-success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: var(--radius-lg);
    color: #90ee90;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

/* Loading Indicator - Glass style */
.loading-indicator.glass-loading {
    background: var(--glass-panel-elevated);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--glass-text-secondary);
}

.loading-indicator.glass-loading .spinner {
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: var(--color-primary);
}

/* Empty State - Glass style */
.empty-state.glass-empty {
    background: var(--glass-panel);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    text-align: center;
    color: var(--glass-text-tertiary);
}

.empty-state.glass-empty svg {
    opacity: 0.5;
    margin-bottom: var(--spacing-lg);
}

#pushPopup {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 20px;
    z-index: 11000;
}

#pushPopup .push-card {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 12px;
}

#pushPopup .push-image {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

#pushPopup .push-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

#pushPopup .push-body {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.4;
}

#pushPopup .push-action {
    margin-top: 6px;
    padding: 8px 12px;
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
}

.invoice-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000;
}

.invoice-popup-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: min(360px, 90%);
    text-align: center;
}

.invoice-popup-card h3 {
    margin-bottom: 8px;
}

.invoice-popup-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* Responsive adjustments for glassmorphism */
@media (max-width: 768px) {
    .products-toolbar {
        padding: var(--spacing-md);
    }
    
    .login-container.glass-login {
        margin: var(--spacing-lg);
        padding: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .glass-panel {
        border-radius: var(--radius-md);
    }
    
.products-toolbar {
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
    }
    
    .login-container.glass-login {
        margin: var(--spacing-md);
        padding: var(--spacing-md);
    }
}

/* =============================================================================
   Product card alignment overrides
   Keeps add-to-cart footer aligned even when unit chips are absent
   ========================================================================== */
.products-grid {
    align-items: stretch;
}

.product-card {
    display: flex;
    flex-direction: column;
}

.product-card-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.product-card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
}

.product-card-pricing {
    min-height: 56px;
    justify-content: center;
}

.unit-chip-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    min-height: 56px;
}

.unit-chip-row {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: nowrap;
    overflow-x: auto;
    min-height: 44px;
    max-height: 44px;
}

.unit-chip-placeholder {
    min-height: 56px;
}

.unit-cart-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px;
    margin-top: 10px;
}

.unit-selector {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 36px;
    flex: 1 1 auto;
    direction: rtl;
    overflow-x: auto;
}

.product-card-footer .unit-cart-row .unit-selector {
    width: 100%;
    order: 0;
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
}

.product-card-footer .unit-cart-row .unit-selector .unit-chip {
    width: 100%;
}

.unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 70px;
    min-height: 32px;
    white-space: nowrap;
    text-align: center;
    border-radius: 8px;
    padding: 6px 10px;
}

.unit-single-row {
    min-height: 16px;
}

.unit-cart-row .product-card-actions {
    width: 100%;
    order: 1;
}

.unit-cart-row .btn-add-to-cart {
    white-space: nowrap;
    flex-shrink: 0;
    width: 100%;
    margin-top: 2px;
}

.product-card-actions {
    width: 100%;
}

.product-card-actions .btn-add-to-cart {
    width: 100%;
}

@media (max-width: 380px) {
    .unit-cart-row {
        align-items: stretch;
    }
    .unit-cart-row .product-card-actions {
        width: 100%;
    }
    .unit-cart-row .btn-add-to-cart {
        width: 100%;
    }
}

/* Contact screen layout */
.contact-page {
    padding: 12px 12px 24px;
    background: var(--color-bg-light, #f8f8f8);
}

.contact-container {
    max-width: 100%;
    margin: 0 auto;
}

.contact-title {
    text-align: center;
    margin-bottom: 20px;
}

.contact-title h1 {
    color: var(--color-text-primary, #212121);
    font-size: 20px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.contact-title p {
    color: var(--color-text-secondary, #666);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 520px;
}

.sep-inner-contact-boxs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.con-lefts,
.con-rights {
    width: 100%;
    background: #fff;
    padding: 18px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm, 0 3px 15px rgba(0, 0, 0, 0.05));
}

.con-lefts {
    border-right: 4px solid var(--color-primary, #d32f2f);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--color-border, #eee);
}

.contact-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-icon {
    font-size: 20px;
    color: var(--color-primary, #d32f2f);
    min-width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff5f5;
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-content {
    flex: 1;
}

.contact-content-title {
    color: var(--color-text-primary, #212121);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.phone-numbers-simple {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phone-link-simple,
.email-simple,
.address-simple {
    display: block;
    padding: 12px 14px;
    background: #f9f9f9;
    border: 2px solid #eee;
    border-radius: 8px;
    color: var(--color-primary, #d32f2f);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    text-align: center;
    transition: all 0.25s ease;
    word-break: break-word;
}

.phone-link-simple:hover,
.phone-link-simple:active,
.email-simple:hover,
.email-simple:active {
    background: var(--color-primary, #d32f2f);
    color: #fff;
    border-color: var(--color-primary, #d32f2f);
}

.address-simple {
    color: var(--color-text-primary, #212121);
}

.whatsapp-btn-simple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #25d366;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.whatsapp-btn-simple:hover,
.whatsapp-btn-simple:active {
    background: #1da851;
    transform: translateY(-1px);
}

.hours-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    -webkit-user-select: none;
    user-select: none;
}

.toggle-icon {
    color: var(--color-primary, #d32f2f);
    font-size: 18px;
    transition: transform 0.3s ease;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.hours-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease;
}

.hours-content.open {
    max-height: 500px;
}

.current-status {
    display: inline-block;
    padding: 10px 12px;
    background: var(--color-primary, #d32f2f);
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
    width: 100%;
}

.hours-table-simple {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hours-table-simple tr {
    border-bottom: 1px solid #eee;
}

.hours-table-simple td {
    padding: 12px 6px;
    color: var(--color-text-primary, #333);
}

.hours-table-simple td:first-child {
    font-weight: 700;
    color: var(--color-text-primary, #212121);
    width: 40%;
}

.closed-day {
    color: var(--color-primary, #d32f2f) !important;
    font-weight: 700;
}

.con-rights .titles {
    color: var(--color-text-primary, #212121);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.con-rights .richtext {
    color: var(--color-text-secondary, #666);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 18px;
    text-align: center;
}

.sep-index-form {
    margin-top: 12px;
}

.sep-form-inquire1 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    margin-bottom: 12px;
}

.names.bold {
    color: var(--color-text-primary, #212121);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}

.contact-page .form-control {
    width: 100%;
    padding: 14px 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 15px;
    color: var(--color-text-primary, #333);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #f9f9f9;
}

.contact-page .form-control:focus {
    outline: none;
    border-color: var(--color-primary, #d32f2f);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.contact-page textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.contact-page .btn-primary {
    background: var(--color-primary, #d32f2f);
    color: #fff;
    border: none;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.contact-page .btn-primary:hover,
.contact-page .btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.25);
}

.contact-page .loading-spinner {
    display: none;
    text-align: center;
    margin: 12px 0;
}

.contact-page .loading-spinner.show {
    display: block;
}

.contact-page .spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary, #d32f2f);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 8px;
}

.contact-page .success-message,
.contact-page .error-message {
    display: none;
    padding: 14px 12px;
    border-radius: 8px;
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
}

.contact-page .success-message.show {
    display: block;
    background: #4caf50;
    color: #fff;
}

.contact-page .error-message.show {
    display: block;
    background: #f44336;
    color: #fff;
}

.contact-map {
    margin-top: 24px;
    text-align: center;
}

.contact-map h3 {
    margin-bottom: 12px;
    font-size: 18px;
    color: var(--color-text-primary, #212121);
}

.contact-map-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

.contact-map-frame {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.15));
}

.contact-map-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.contact-map-caption {
    margin-top: 10px;
    color: var(--color-text-secondary, #666);
    font-size: 13px;
}

@media (min-width: 768px) {
    .contact-page {
        padding: 20px 20px 32px;
    }

    .contact-title h1 {
        font-size: 26px;
    }

    .contact-title p {
        font-size: 16px;
    }

    .con-rights .titles {
        font-size: 28px;
        text-align: right;
    }

    .con-rights .richtext {
        text-align: right;
    }

    .phone-link-simple,
    .email-simple,
    .address-simple {
        text-align: right;
    }
}

@media (min-width: 992px) {
    .contact-container {
        max-width: 1200px;
    }

    .sep-inner-contact-boxs {
        flex-direction: row;
        gap: 32px;
        margin-top: 28px;
    }

    .con-lefts {
        flex: 1;
        min-width: 320px;
    }

    .con-rights {
        flex: 1.4;
        min-width: 360px;
    }
}

/* Product list skeleton cards */
.product-card.skeleton {
    background: #f3f4f6;
    border-radius: 18px;
    padding: 12px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    pointer-events: none;
}

.product-card.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.6) 50%,
        rgba(255,255,255,0) 100%
    );
    animation: skeleton-shimmer 1.3s infinite;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 14px;
    background: #e5e7eb;
    margin-bottom: 10px;
}

.skeleton-line {
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    margin-bottom: 6px;
}

.skeleton-line.wide { width: 80%; }
.skeleton-line.medium { width: 60%; }
.skeleton-line.short { width: 35%; }

@keyframes skeleton-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.is-hidden {
    display: none !important;
}

.product-card.skeleton .product-card-image-container {
    padding: 0;
    background: transparent;
}

.product-card.skeleton .skeleton-image {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 14px;
    background: #e5e7eb;
}

.product-card.skeleton .skeleton-line {
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    margin-bottom: 0;
}

.product-card.skeleton .skeleton-line.price {
    width: 70%;
    height: 12px;
}

.product-card.skeleton .product-card-content,
.product-card.skeleton .product-card-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-card.skeleton .skeleton-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-card.skeleton .skeleton-chip-row {
    display: flex;
    gap: 6px;
}

.product-card.skeleton .skeleton-chip {
    width: 48px;
    height: 24px;
    border-radius: 999px;
    background: #e5e7eb;
}

.product-card.skeleton .skeleton-button {
    width: 100%;
    height: 36px;
    border-radius: 10px;
    background: #e5e7eb;
}

.nav-item.active .label {
    font-weight: 700;
}

.nav-item.active svg {
    transform: scale(1.18);
}

.unit-selector {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
}

.unit-chip {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.unit-chip:active {
    transform: scale(0.97);
}

.unit-chip.is-static,
.unit-chip[disabled] {
    cursor: default;
    opacity: 0.8;
    pointer-events: none;
    box-shadow: none;
}

.unit-chip.is-static:hover,
.unit-chip[disabled]:hover {
    border-color: var(--color-border);
}

.btn-add-to-cart {
    transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.btn-add-to-cart svg {
    transition: transform 0.12s ease;
}

.btn-add-to-cart:active {
    transform: scale(0.96);
}

.btn-add-to-cart:active svg {
    transform: translateY(-1px) scale(1.05);
}

.attr-option.color-option--selected {
    background: rgba(211, 47, 47, 0.12);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.attr-option.color-option--out-of-stock {
    opacity: 0.55;
}

.color-stock-badge {
    margin-right: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #d93025;
    color: #fff;
    font-size: 10px;
    line-height: 1.2;
}

/* خيارات الدفع */
.payment-options-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.payment-options-section h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 18px;
}

.payment-method-option {
    margin-bottom: 15px;
    background: var(--primary-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.payment-method-label {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.payment-method-label:hover {
    background-color: #f9f9f9;
}

.payment-method-label input[type="radio"] {
    margin-left: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.payment-method-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.bank-transfer-details {
    padding: 15px;
    background: #f9fafb;
    border-top: 1px solid var(--border-color);
    margin-top: 0;
}

.bank-instructions {
    background: #f8f8f8;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-right: 3px solid #4CAF50;
    font-size: 13px;
    line-height: 1.6;
    text-align: right;
    color: #333;
}

.bank-instructions p {
    margin: 0;
}

.bank-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bank-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 11px;
    direction: rtl;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    table-layout: fixed;
}

.bank-table th {
    background: #2c3e50;
    color: white;
    padding: 8px 5px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #1a252f;
    font-size: 10px;
    line-height: 1.3;
    word-break: break-word;
}

.bank-table td {
    padding: 6px 5px;
    text-align: center;
    border: 1px solid #ddd;
    vertical-align: middle;
    line-height: 1.3;
    word-break: break-word;
}

.bank-table tr:nth-child(even) {
    background: #f9f9f9;
}

.bank-table tr:nth-child(odd) {
    background: white;
}

.bank-table tr:hover {
    background: #f1f8ff;
}

/* أرقام الحساب - خط أحمر وخلفية فاتحة */
.bank-table td:nth-child(3) {
    color: #e74c3c;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    background: #fff5f5;
    font-size: 10px;
    word-break: break-all;
}

/* أرقام الهاتف */
.bank-table td:nth-child(7) {
    color: #2c3e50;
    font-weight: bold;
    background: #f8f9fa;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    word-break: break-all;
}

/* تصميم متجاوب للجوال */
@media (max-width: 768px) {
    .bank-table {
        font-size: 9px;
        display: block;
        overflow: hidden;
    }
    
    .bank-table thead {
        display: none;
    }
    
    .bank-table tbody {
        display: block;
    }
    
    .bank-table tr {
        display: block;
        margin-bottom: 10px;
        border: 1px solid #ddd;
        border-radius: 5px;
        background: white;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .bank-table td {
        display: block;
        text-align: right;
        padding: 8px 10px;
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        font-size: 10px;
    }
    
    .bank-table td:last-child {
        border-bottom: none;
    }
    
    .bank-table td:before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
        color: #2c3e50;
        font-size: 9px;
        background: #f5f5f5;
        padding: 3px 6px;
        border-radius: 3px;
        text-align: right;
    }
    
    .bank-table tr:nth-child(even),
    .bank-table tr:nth-child(odd) {
        background: white;
    }
    
    .bank-instructions {
        font-size: 11px;
        padding: 10px;
    }
    
    .payment-method-label {
        padding: 12px;
    }
    
    .payment-method-title {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .bank-table td {
        padding: 6px 8px;
        font-size: 9.5px;
    }
    
    .bank-table td:before {
        font-size: 8.5px;
    }
    
    .bank-instructions {
        font-size: 10px;
        padding: 8px;
        line-height: 1.4;
    }
    
    .payment-options-section h3 {
        font-size: 16px;
    }
}

/* شام كاش - الباركود الفوري */
.sham-cash-details {
    padding: 15px;
    background: #f9fafb;
    border-top: 1px solid var(--border-color);
    margin-top: 0;
}

.sham-cash-instructions {
    background: #fef2f2;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-right: 3px solid #dc2626;
    font-size: 13px;
    line-height: 1.6;
    text-align: right;
    color: #333;
}

.sham-cash-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.sham-cash-amount-container {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.sham-cash-label {
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
}

.sham-cash-amount {
    font-size: 22px;
    font-weight: 700;
    color: #dc2626;
    word-break: break-word;
}

.sham-cash-qr-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.sham-cash-qr-label {
    margin: 0 0 12px 0;
    font-weight: 700;
    font-size: 16px;
    color: #1f2937;
}

.sham-cash-qr-code {
    margin: 0 auto;
}

.share-qr-btn {
    margin-top: 15px;
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 250px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.share-qr-btn:hover {
    background: #b91c1c;
}

.share-qr-btn:active {
    transform: scale(0.98);
}

.share-qr-btn span {
    font-size: 16px;
}

.sham-cash-account-info {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    text-align: right;
}

.sham-cash-account-item {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.sham-cash-account-item:last-child {
    margin-bottom: 0;
}

.sham-cash-account-item strong {
    display: block;
    margin-bottom: 4px;
    color: #1f2937;
}

.sham-cash-account-code {
    background: white;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-family: monospace;
    color: #1f2937;
    font-size: 13px;
    word-break: break-all;
    display: inline-block;
    margin-top: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* تصميم متجاوب لشام كاش */
@media (max-width: 768px) {
    .sham-cash-details {
        padding: 12px;
    }
    
    .sham-cash-instructions {
        font-size: 11px;
        padding: 10px;
    }
    
    .sham-cash-info {
        padding: 12px;
    }
    
    .sham-cash-amount {
        font-size: 20px;
    }
    
    .sham-cash-qr-label {
        font-size: 15px;
    }
    
    .sham-cash-account-item {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .sham-cash-details {
        padding: 10px;
    }
    
    .sham-cash-instructions {
        font-size: 10px;
        padding: 8px;
        line-height: 1.4;
    }
    
    .sham-cash-info {
        padding: 10px;
    }
    
    .sham-cash-amount {
        font-size: 18px;
    }
    
    .sham-cash-qr-label {
        font-size: 14px;
    }
    
    .sham-cash-account-item {
        font-size: 12px;
    }
    
    .sham-cash-account-code {
        font-size: 11px;
        padding: 6px;
    }
    
    .share-qr-btn {
        font-size: 14px;
        padding: 10px 16px;
        max-width: 100%;
    }
}
