/* ===== RESET & VARIABLES ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a3a5c;
    --primary-dark: #0f2440;
    --primary-light: #2a5a8c;
    --accent: #e8751a;
    --accent-hover: #d0650a;
    --accent-light: #f5a623;
    --bg-body: #f4f6f9;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-light: #f0f3f7;
    --bg-dark: #1a2a3a;
    --text-primary: #1a2a3a;
    --text-secondary: #5a6a7a;
    --text-muted: #8a9aaa;
    --text-white: #ffffff;
    --border: #dde1e6;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--primary-dark);
    color: var(--text-white);
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 3px solid var(--accent);
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-links {
    display: flex;
    gap: 20px;
}

.top-link {
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-link:hover {
    color: var(--accent-light);
}

.top-bar-contact {
    display: flex;
    align-items: center;
    gap: 20px;
}

.office-hours {
    color: rgba(255,255,255,0.6);
    font-size: 11px;
}

.phone-number {
    color: var(--accent-light);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
}

.phone-number i {
    font-size: 14px;
}

/* ===== HEADER ===== */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.logo-text {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.search-wrapper {
    flex: 1;
    max-width: 580px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--accent);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(232, 117, 26, 0.12);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 18px;
}

.header-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.cart-btn {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 20px;
}

.cart-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.cart-count {
    position: absolute;
    top: 2px;
    left: 2px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: var(--transition);
}

.cart-count.visible {
    transform: scale(1);
}

/* ===== NAV ===== */
.main-nav {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 72px;
    z-index: 150;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 0;
}

.nav-list::-webkit-scrollbar { display: none; }

.nav-item a {
    display: block;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 50px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-item a:hover {
    color: var(--primary);
    background: var(--bg-light);
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.sort-select {
    padding: 8px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.sort-select:focus {
    border-color: var(--accent);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    min-height: 460px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.03)" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 80px 0;
}

.hero-badge {
    display: inline-block;
    padding: 6px 20px;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    color: var(--text-white);
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-brand {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.75);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: var(--accent);
    color: white;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    transition: var(--transition);
}

.hero-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 117, 26, 0.35);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 48px;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-light);
}

.stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

/* ===== SECTIONS ===== */
.section {
    padding: 60px 0;
}

.section-dark {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-muted);
}

/* ===== CATEGORY GRID ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 24px;
    color: white;
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.category-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== PRODUCTS ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50px;
    z-index: 2;
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: var(--bg-light);
    display: block;
}

.product-info {
    padding: 16px 18px 18px;
}

.product-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 13px;
}

.stars {
    color: var(--accent-light);
    letter-spacing: 1px;
}

.rating-number {
    color: var(--text-muted);
    font-size: 12px;
}

.product-prices {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
}

.price-current {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.price-original {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.add-to-cart {
    width: 100%;
    padding: 11px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart:hover {
    background: var(--primary-light);
}

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

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.empty-state h3 {
    margin-top: 16px;
    font-size: 18px;
    color: var(--text-secondary);
}

.empty-state p {
    margin-top: 8px;
    font-size: 14px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
}

.footer-logo i {
    color: var(--accent);
}

.footer-desc {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255,255,255,0.5);
}

.footer-col h4 {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-light);
}

.footer-links li i {
    margin-left: 8px;
    width: 16px;
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: var(--bg-white);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.toast i {
    color: var(--accent);
    font-size: 18px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .container { padding: 0 16px; }
    .hero-content { padding: 60px 0; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .hero-stats { gap: 40px; }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .header {
        top: 0;
        position: sticky;
        padding: 10px 0;
    }

    .header-inner {
        gap: 10px;
        flex-wrap: nowrap;
    }

    .logo-text {
        font-size: 20px;
    }

    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .search-wrapper {
        max-width: none;
        order: 3;
        flex-basis: 100%;
        margin-top: 8px;
    }

    .search-box input {
        padding: 10px 40px 10px 14px;
        font-size: 14px;
    }

    .header-actions {
        gap: 6px;
        margin-inline-start: auto;
    }

    .header-btn, .cart-btn {
        width: 38px;
        height: 38px;
    }

    .main-nav {
        top: auto;
        position: sticky;
        top: 0;
    }

    .nav-inner {
        gap: 8px;
        padding: 4px 0;
    }

    .nav-list {
        padding: 4px 0;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item a {
        padding: 8px 14px;
        font-size: 12px;
        white-space: nowrap;
    }

    .sort-select {
        padding: 8px 10px;
        font-size: 12px;
        max-width: 120px;
    }

    .hero {
        min-height: auto;
    }

    .hero-content {
        padding: 40px 16px;
    }

    .hero-title {
        font-size: clamp(24px, 6vw, 36px);
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .hero-cta {
        padding: 12px 28px;
        font-size: 14px;
    }

    .hero-stats {
        gap: 20px;
        flex-wrap: wrap;
        margin-top: 32px;
    }

    .stat-num {
        font-size: 22px;
    }

    .stat-label {
        font-size: 11px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }

    .category-card {
        padding: 20px 14px;
    }

    .category-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .product-card {
        border-radius: 10px;
    }

    .product-info {
        padding: 12px 12px 14px;
    }

    .product-name {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .price-current {
        font-size: 16px;
    }

    .price-original {
        font-size: 11px;
    }

    .add-to-cart {
        padding: 10px;
        font-size: 12px;
        min-height: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .section {
        padding: 36px 0;
    }

    .section-title {
        font-size: 20px;
    }

    .section-subtitle {
        font-size: 13px;
    }

    /* Modal - full screen on mobile */
    .product-modal {
        max-height: 92vh;
        padding: 16px;
        border-radius: 14px;
    }

    .product-modal-body {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pm-main {
        max-height: 50vh;
    }

    .pm-name {
        font-size: 1.2rem;
    }

    .pm-thumb {
        width: 56px;
        height: 56px;
    }

    .pm-desc {
        max-height: 160px;
        font-size: 0.9rem;
    }

    .pm-add {
        width: 100%;
        min-height: 46px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .logo-text {
        font-size: 18px;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .product-info {
        padding: 10px 10px 12px;
    }

    .product-category {
        font-size: 10px;
    }

    .product-name {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .product-rating {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .price-current {
        font-size: 14px;
    }

    .add-to-cart {
        font-size: 11px;
        min-height: 36px;
        padding: 8px 6px;
        gap: 4px;
    }

    .hero-title {
        font-size: clamp(22px, 7vw, 30px);
    }

    .hero-subtitle {
        font-size: 13px;
    }

    .hero-stats {
        gap: 16px;
    }

    .stat-num {
        font-size: 18px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .category-card {
        padding: 14px 8px;
    }

    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 8px;
    }

    .category-name {
        font-size: 11px;
    }

    .nav-item a {
        padding: 8px 10px;
        font-size: 11px;
    }

    .sort-select {
        max-width: 100px;
        padding: 8px 6px;
    }

    .product-modal-overlay {
        padding: 8px;
        align-items: flex-end;
    }

    .product-modal {
        border-radius: 16px 16px 0 0;
        max-height: 94vh;
        padding: 14px;
    }

    .pm-thumb {
        width: 48px;
        height: 48px;
    }

    .pm-info {
        gap: 8px;
    }

    .pm-name {
        font-size: 1.1rem;
    }

    .pm-price .price-current {
        font-size: 1.3rem;
    }

    /* Bottom sheet style for mobile */
    .pm-add {
        position: sticky;
        bottom: 0;
        width: 100%;
        margin-top: 8px;
    }

    /* Make touch targets at least 44px */
    .header-btn, .cart-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .chat-bubble {
        width: 50px;
        height: 50px;
        bottom: 12px;
        left: 12px;
        font-size: 20px;
    }

    .slide-caption .slide-name {
        font-size: 14px;
    }

    .slideshow-slide {
        height: 160px;
    }

    /* Footer */
    .footer {
        padding: 40px 0 0;
    }

    .footer-col h4 {
        font-size: 14px;
    }

    .footer-links a {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-name {
        font-size: 11px;
    }

    .price-current {
        font-size: 13px;
    }

    .add-to-cart i {
        display: none;
    }
}

/* ===== SLIDESHOW ===== */
.slideshow-section {
    padding: 0;
    overflow: hidden;
    background: var(--bg-body);
}

.slideshow-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 20px auto 0;
    overflow: hidden;
    border-radius: 12px;
}

.slideshow-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.slideshow-slide {
    min-width: 100%;
    flex-shrink: 0;
    position: relative;
    height: 260px;
    overflow: hidden;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slideshow-slide .slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(26, 42, 58, 0), rgba(26, 42, 58, 0.3));
}

.slideshow-slide .slide-caption {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 40px 32px 24px;
    background: linear-gradient(transparent, rgba(26, 42, 58, 0.7));
    color: white;
    direction: rtl;
}

.slide-caption .slide-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.slide-caption .slide-category {
    font-size: 13px;
    color: var(--accent-light);
    font-weight: 600;
}

.slideshow-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.slideshow-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.slideshow-dots .dot.active {
    background: white;
    width: 28px;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .slideshow-slide {
        height: 180px;
    }
    .slide-caption .slide-name {
        font-size: 14px;
    }
    .slide-caption .slide-category {
        font-size: 12px;
    }
}

/* ===== CHAT OVERLAY ===== */
.chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(232, 117, 26, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
}

.chat-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(232, 117, 26, 0.55);
}

.chat-overlay {
    position: fixed;
    bottom: 96px;
    left: 24px;
    width: 380px;
    max-height: 540px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    z-index: 998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    direction: rtl;
    animation: chatSlideUp 0.3s ease;
}

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

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

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--primary);
    color: white;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.chat-header-title {
    font-size: 15px;
    font-weight: 700;
}

.chat-header-status {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-header-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    display: inline-block;
}

.chat-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
}

.chat-close:hover {
    color: white;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 360px;
    background: var(--bg-light);
}

.chat-msg {
    display: flex;
    max-width: 85%;
}

.chat-msg-bot {
    align-self: flex-start;
}

.chat-msg-user {
    align-self: flex-end;
}

.msg-text {
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
}

.chat-msg-bot .msg-text {
    background: var(--bg-white);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
}

.chat-msg-user .msg-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-bottom-left-radius: 4px;
}

.chat-msg-user .msg-text p {
    margin: 4px 0;
}

.typing-indicator {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 14px;
    border-bottom-right-radius: 4px;
}

.typing-indicator span {
    width: 7px;
    height: 7px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-white);
}

.chat-input-area input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.chat-input-area input:focus {
    border-color: var(--accent);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 12px rgba(232, 117, 26, 0.4);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-send-btn:disabled:hover {
    box-shadow: none;
}

@media (max-width: 480px) {
    .chat-overlay {
        left: 8px;
        right: 8px;
        width: auto;
        bottom: 88px;
    }
    .chat-bubble {
        bottom: 16px;
        left: 16px;
    }
}

/* ===== PRODUCT DETAIL MODAL ===== */
.product-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.product-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 24px;
    direction: rtl;
}
.product-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: none;
    border: none;
    font-size: 26px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    z-index: 5;
}
.product-modal-close:hover { color: #c62828; }
.product-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.pm-gallery .pm-main {
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.pm-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}
.pm-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.pm-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: #f5f5f5;
}
.pm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pm-thumb.active { border-color: var(--accent, #2563eb); }
.pm-info { display: flex; flex-direction: column; gap: 12px; }
.pm-category { color: var(--accent, #2563eb); font-weight: 600; font-size: 0.9rem; }
.pm-name { font-size: 1.4rem; margin: 0; color: #1a1a1a; }
.pm-rating { display: flex; align-items: center; gap: 6px; }
.pm-prices { display: flex; align-items: baseline; gap: 12px; }
.pm-badge { color: #c62828; font-weight: 700; }
.pm-stock { font-size: 0.9rem; font-weight: 600; }
.pm-stock.in-stock { color: #15803d; }
.pm-stock.out-of-stock { color: #c62828; }
.pm-desc {
    color: #444;
    line-height: 1.9;
    font-size: 0.95rem;
    white-space: pre-line;
    max-height: 220px;
    overflow-y: auto;
    background: #fafafa;
    border-radius: 10px;
    padding: 12px;
}
.pm-add { align-self: flex-start; }
@media (max-width: 640px) {
    .product-modal-body { grid-template-columns: 1fr; }
}

.pm-docs { display: flex; flex-direction: column; gap: 8px; }
.pm-docs-title { font-weight: 700; color: #1a1a1a; font-size: 1rem; }
.pm-docs-list { display: flex; flex-direction: column; gap: 6px; }
.pm-doc-link {
    display: flex; align-items: center; gap: 10px;
    background: #f1f5f9; border: 1px solid #e2e8f0;
    border-radius: 10px; padding: 10px 14px;
    color: #1e293b; text-decoration: none;
    font-size: 0.92rem; transition: background .15s;
}
.pm-doc-link:hover { background: #e2e8f0; }
.pm-doc-link i { color: #dc2626; font-size: 1.1rem; }

/* ===== SKU ===== */
.product-sku {
    font-size: 10px;
    color: #94a3b8;
    direction: ltr;
    text-align: right;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.pm-sku {
    font-size: 12px;
    color: #64748b;
    direction: ltr;
    text-align: right;
    font-weight: 600;
    letter-spacing: 0.5px;
}
