/* ===== Variables ===== */
:root {
    --primary: #c41e3a;
    --primary-dark: #9b1830;
    --primary-light: #ef4056;
    --accent: #e8a317;
    --accent-dark: #c48a0f;
    --bg: #f5f5f5;
    --bg-card: #ffffff;
    --text: #3f3f46;
    --text-light: #71717a;
    --text-muted: #a1a1aa;
    --border: #e4e4e7;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: .25s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Vazirmatn', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: inherit; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Top Bar ===== */
.top-bar {
    background: var(--primary-dark);
    color: rgba(255,255,255,.9);
    font-size: .8rem;
    padding: 8px 0;
}

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

.top-bar-right, .top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-right i { margin-left: 6px; }

.top-bar-left a {
    color: rgba(255,255,255,.8);
    transition: color var(--transition);
}

.top-bar-left a:hover { color: #fff; }
.top-bar-left a i { margin-left: 4px; }

/* ===== Header ===== */
.header {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(196,30,58,.3);
}

.logo-text { display: flex; flex-direction: column; }

.logo-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.logo-tagline {
    font-size: .7rem;
    color: var(--text-light);
    font-weight: 400;
}

/* Search */
.search-wrap {
    position: relative;
    flex: 1;
    max-width: 560px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
    width: 100%;
}

.search-box:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(239,64,86,.1);
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    color: var(--text);
}

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

.search-box button {
    background: var(--primary-light);
    color: #fff;
    padding: 12px 20px;
    font-size: 1rem;
    transition: background var(--transition);
}

.search-box button:hover { background: var(--primary); }

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 1300;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: min(70vh, 420px);
    overflow: auto;
}

.search-dropdown-inner {
    padding: 8px;
}

.search-section-title {
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 8px 10px 4px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    transition: background .15s ease;
}

.search-item:hover,
.search-item:focus {
    background: #fdf2f4;
    color: var(--text);
    outline: none;
}

.search-item-icon,
.search-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    color: var(--primary);
}

.search-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-item-body strong {
    font-size: .88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-body small {
    font-size: .74rem;
    color: var(--text-light);
}

.search-item-price {
    font-size: .78rem;
    font-weight: 700;
    color: var(--primary);
}

.search-hit {
    background: #fde68a;
    color: inherit;
    padding: 0 2px;
    border-radius: 3px;
}

.search-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-light);
}

.search-empty i {
    font-size: 1.4rem;
    margin-bottom: 8px;
    opacity: .5;
}

.search-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    padding: 12px;
    border-top: 1px solid var(--border);
    font-size: .85rem;
    font-weight: 600;
    color: var(--primary);
}

.search-view-all:hover {
    background: #fdf2f4;
    color: var(--primary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: .85rem;
    font-weight: 500;
    color: var(--text);
    transition: all var(--transition);
    position: relative;
}

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

.action-btn i { font-size: 1.2rem; }

.account-menu {
    position: relative;
}

.account-menu-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.account-menu-caret {
    font-size: .7rem !important;
    opacity: .7;
    transition: transform var(--transition);
}

.account-menu.open .account-menu-caret {
    transform: rotate(180deg);
}

.account-menu.open .account-menu-toggle {
    background: var(--bg);
    color: var(--primary);
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 8px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-dropdown[hidden] {
    display: none;
}

.account-dropdown a,
.account-logout-form button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: .88rem;
    font-weight: 500;
    text-align: right;
    transition: background var(--transition), color var(--transition);
}

.account-dropdown a i,
.account-logout-form button i {
    width: 18px;
    text-align: center;
    color: var(--text-light);
}

.account-dropdown a:hover {
    background: var(--bg);
    color: var(--primary);
}

.account-dropdown a:hover i {
    color: var(--primary);
}

.account-logout-form {
    margin: 4px 0 0;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.account-logout-form button {
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    color: var(--primary);
}

.account-logout-form button:hover {
    background: rgba(196, 30, 58, .08);
}

.account-logout-form button i {
    color: var(--primary);
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 6px;
    background: var(--primary-light);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Hero Slider ===== */
.hero-section {
    padding: 24px 0;
}

.slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.slider-track {
    display: flex;
    transition: transform .5s cubic-bezier(.4,0,.2,1);
    direction: ltr;
}

.slide {
    min-width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
    padding: 32px 48px;
}

.slide-saffron {
    background: linear-gradient(135deg, #c41e3a 0%, #e8a317 100%);
}

.slide-spice {
    background: linear-gradient(135deg, #6b4226 0%, #d4380d 100%);
}

.slide-gift {
    background: linear-gradient(135deg, #2d6a4f 0%, #b8860b 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 480px;
    flex: 1;
}

.slide-media {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    width: min(300px, 40%);
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-media-ring {
    position: absolute;
    width: 88%;
    height: 88%;
    border: 2px solid rgba(255,255,255,.35);
    border-radius: 42% 58% 48% 52% / 48% 42% 58% 52%;
    transform: rotate(-8deg);
    animation: slideRingFloat 8s ease-in-out infinite;
}

.slide-media-blob {
    position: absolute;
    width: 78%;
    height: 78%;
    background: rgba(255,255,255,.14);
    border-radius: 58% 42% 52% 48% / 42% 58% 42% 58%;
    transform: rotate(12deg);
    animation: slideBlobFloat 7s ease-in-out infinite reverse;
}

.slide-image-shape {
    position: relative;
    z-index: 1;
    width: 78%;
    height: 78%;
    border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
    overflow: hidden;
    box-shadow:
        0 20px 48px rgba(0,0,0,.32),
        0 0 0 6px rgba(255,255,255,.22);
    transform: rotate(-3deg);
    animation: slideImageFloat 6s ease-in-out infinite;
}

.slide-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.08);
    transition: transform .5s ease;
}

.slide:hover .slide-product-image {
    transform: scale(1.14);
}

.slide-media-fallback {
    position: relative;
    z-index: 1;
    width: 78%;
    height: 78%;
    border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #fff;
    box-shadow: 0 16px 40px rgba(0,0,0,.2);
    transform: rotate(-3deg);
}

@keyframes slideImageFloat {
    0%, 100% { transform: rotate(-3deg) translateY(0); }
    50% { transform: rotate(-1deg) translateY(-8px); }
}

@keyframes slideRingFloat {
    0%, 100% { transform: rotate(-8deg) scale(1); }
    50% { transform: rotate(-4deg) scale(1.04); }
}

@keyframes slideBlobFloat {
    0%, 100% { transform: rotate(12deg) scale(1); }
    50% { transform: rotate(16deg) scale(1.06); }
}

.slide-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.slide-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.3;
}

.slide-content p {
    font-size: .95rem;
    opacity: .9;
    margin-bottom: 16px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .95rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #fff;
    filter: brightness(1.05);
}

.slide .btn-primary {
    background: #fff;
    color: var(--primary);
    padding: 10px 20px;
    font-size: .88rem;
}

.slide .btn-primary:hover {
    color: var(--primary);
    filter: none;
}

.slide-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}

.deco-1 { width: 300px; height: 300px; top: -80px; left: -60px; }
.deco-2 { width: 200px; height: 200px; bottom: -40px; left: 30%; }
.deco-3 { width: 150px; height: 150px; top: 20%; left: 55%; }

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    color: var(--text);
    box-shadow: var(--shadow-md);
    z-index: 10;
    transition: all var(--transition);
    opacity: 0;
}

.slider:hover .slider-btn { opacity: 1; }

.slider-btn:hover {
    background: #fff;
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev { right: 16px; }
.slider-next { left: 16px; }

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

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.slider-dot.active {
    background: #fff;
    width: 28px;
    border-radius: 5px;
}

/* ===== Section Header ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.section-header h2 i {
    color: var(--primary-light);
    font-size: 1.1rem;
}

.see-all {
    font-size: .85rem;
    color: var(--primary-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition);
}

.see-all:hover { gap: 8px; }

/* ===== Categories (Digikala-style) ===== */
.categories-section {
    padding: 32px 0;
}

.categories-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
}

.categories-scroll::-webkit-scrollbar { display: none; }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    min-width: max-content;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    width: 120px;
    text-align: center;
}

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

.category-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--cat-color) 12%, white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--cat-color);
    transition: all var(--transition);
    border: 2px solid color-mix(in srgb, var(--cat-color) 20%, transparent);
}

.category-card:hover .category-icon {
    background: color-mix(in srgb, var(--cat-color) 20%, white);
    transform: scale(1.08);
}

.category-name {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.category-count {
    font-size: .7rem;
    color: var(--text-muted);
}

/* ===== Promo Banners ===== */
.promo-section { padding: 8px 0 32px; }

.promo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.promo-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    color: #fff;
    transition: transform var(--transition);
    overflow: hidden;
    position: relative;
}

.promo-card:hover { transform: translateY(-3px); }

.promo-saffron { background: linear-gradient(135deg, #c41e3a, #e85d4a); }
.promo-organic { background: linear-gradient(135deg, #2d6a4f, #52b788); }
.promo-gift { background: linear-gradient(135deg, #b8860b, #e8a317); }

.promo-label {
    font-size: .75rem;
    opacity: .85;
    display: block;
    margin-bottom: 6px;
}

.promo-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.promo-content p { font-size: .85rem; opacity: .85; }

.promo-icon {
    font-size: 3rem;
    opacity: .25;
    position: absolute;
    left: 20px;
    bottom: -8px;
}

/* ===== Blog ===== */
.blog-section {
    padding: 8px 0 40px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.blog-grid-home {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.blog-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.blog-card-media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(196, 30, 58, .08), rgba(232, 163, 23, .12));
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.blog-card:hover .blog-card-media img {
    transform: scale(1.04);
}

.blog-card-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    font-size: 2.4rem;
}

.blog-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.blog-date {
    font-size: .78rem;
    color: var(--text-muted);
}

.blog-card-body h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.7;
}

.blog-card-body h3 a {
    color: var(--text);
    transition: color var(--transition);
}

.blog-card-body h3 a:hover {
    color: var(--primary);
}

.blog-card-body p {
    font-size: .88rem;
    color: var(--text-light);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-read-more {
    margin-top: auto;
    font-size: .84rem;
    font-weight: 600;
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-read-more:hover {
    gap: 10px;
}

.blog-related-products {
    margin-top: 32px;
}

.blog-related-products .section-header {
    margin-bottom: 20px;
}

.blog-article .blog-cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.blog-meta {
    color: var(--text-muted);
    font-size: .85rem;
    margin-bottom: 16px;
}

/* ===== Products ===== */
.products-section {
    padding: 32px 0;
}

.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

.products-grid > .empty-state {
    flex: 1 1 100%;
    width: 100%;
}

.products-grid > .product-card {
    flex: 0 0 calc((100% - 48px) / 4);
    width: calc((100% - 48px) / 4);
    max-width: calc((100% - 48px) / 4);
    min-width: 0;
    box-sizing: border-box;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
}

.product-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-light);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 2;
}

.product-image {
    height: 180px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--prod-color) 8%, white), color-mix(in srgb, var(--prod-color) 18%, white));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--prod-color);
    transition: transform var(--transition);
    overflow: hidden;
}
.product-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    object-fit: cover;
    display: block;
}

.product-card:hover .product-image { transform: scale(1.03); }

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.product-name {
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars { color: #fbbf24; font-size: .75rem; }
.rating-count { font-size: .75rem; color: var(--text-muted); }

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
}

.current-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.current-price small {
    font-size: .7rem;
    font-weight: 400;
    color: var(--text-light);
}

.old-price {
    font-size: .8rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.btn-add-cart {
    width: 100%;
    padding: 10px;
    background: var(--bg);
    color: var(--primary-light);
    border-radius: var(--radius);
    font-size: .82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition);
    margin-top: 8px;
}

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

/* ===== Features ===== */
.features-section {
    padding: 40px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.feature-icon {
    width: 52px;
    height: 52px;
    background: color-mix(in srgb, var(--primary) 8%, white);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.feature-item p {
    font-size: .78rem;
    color: var(--text-light);
}

/* ===== Footer ===== */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,.8);
    padding: 48px 0 0;
}

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

.footer-brand p {
    font-size: .85rem;
    line-height: 1.8;
    margin: 16px 0;
    color: rgba(255,255,255,.6);
}

.footer-brand .logo-name { color: #fff; }
.footer-brand .logo-tagline { color: rgba(255,255,255,.5); }

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: rgba(255,255,255,.7);
    transition: all var(--transition);
}

.social-links a:hover {
    background: var(--primary-light);
    color: #fff;
}

.footer-links h4,
.footer-contact h4 {
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.footer-links ul { display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
    font-size: .85rem;
    color: rgba(255,255,255,.6);
    transition: color var(--transition);
}

.footer-links a:hover { color: #fff; }

.footer-contact p {
    font-size: .85rem;
    color: rgba(255,255,255,.6);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-contact i { color: var(--primary-light); width: 16px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 20px 0;
    text-align: center;
    font-size: .8rem;
    color: rgba(255,255,255,.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-pwa-install[hidden],
[data-pwa-install][hidden] {
    display: none !important;
}

.footer-pwa-install {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-family: inherit;
    font-size: .85rem;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.footer-pwa-install:hover {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.35);
}

.footer-pwa-installed {
    color: rgba(255,255,255,.55);
    font-size: .82rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-install-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 1200;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: pwaSlideUp .35s ease;
}

#pwaInstallBanner[hidden],
.pwa-install-banner[hidden],
.pwa-install-banner-inner[hidden],
[data-pwa-guide][hidden] {
    display: none !important;
}

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

.pwa-install-banner-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
}

.pwa-install-banner-icon img {
    border-radius: 12px;
    display: block;
}

.pwa-install-banner-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: .82rem;
    color: var(--text-light);
}

.pwa-install-banner-text strong {
    color: var(--text);
    font-size: .9rem;
}

.pwa-install-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-dismiss {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-install-banner-guide {
    background: linear-gradient(135deg, #312e81, #4338ca);
    border-color: #4338ca;
    color: #fff;
    box-shadow: 0 10px 36px rgba(49, 46, 129, .35);
}

.pwa-install-banner-guide .pwa-install-banner-text,
.pwa-install-banner-guide .pwa-install-banner-text strong {
    color: #fff;
}

.pwa-install-banner-guide [data-pwa-guide-text] {
    line-height: 1.7;
}

.pwa-install-banner-guide .pwa-install-dismiss {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.pwa-install-banner-icon-guide {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    flex-shrink: 0;
}

.panel-nav-pwa {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: 1px dashed rgba(196, 30, 58, .35);
    border-radius: var(--radius);
    background: rgba(196, 30, 58, .06);
    color: var(--primary);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
    transition: background .2s;
}

.panel-nav-pwa:hover {
    background: rgba(196, 30, 58, .12);
}

.panel-nav-pwa[hidden] {
    display: none !important;
}

@media (max-width: 480px) {
    .pwa-install-banner-inner {
        flex-wrap: wrap;
    }
    .pwa-install-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .products-grid > .product-card {
        flex: 0 0 calc((100% - 32px) / 3);
        width: calc((100% - 32px) / 3);
        max-width: calc((100% - 32px) / 3);
    }
}

@media (max-width: 1024px) {
    .promo-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .logo-name { font-size: 1.05rem; }
}

@media (max-width: 768px) {
    .top-bar-left { display: none; }
    .top-bar-right span { font-size: .75rem; }

    .header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "logo actions"
            "search search";
        align-items: center;
        gap: 10px 12px;
        padding: 12px 16px;
    }

    .logo {
        grid-area: logo;
        gap: 8px;
        min-width: 0;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.05rem;
        border-radius: 12px;
    }

    .logo-text { min-width: 0; }

    .logo-name {
        font-size: .92rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .logo-tagline { font-size: .62rem; }

    .header-actions {
        grid-area: actions;
        gap: 2px;
    }

    .search-wrap {
        grid-area: search;
        max-width: 100%;
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .search-dropdown {
        max-height: 55vh;
    }

    .action-btn {
        padding: 8px 10px;
    }

    .action-btn span { display: none; }

    .action-btn i { font-size: 1.15rem; }

    .account-menu-caret { display: none; }

    .account-dropdown {
        left: auto;
        right: 0;
        min-width: 200px;
    }

    .slide {
        height: 132px;
        min-height: 132px;
        padding: 12px 14px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        justify-content: flex-start;
    }

    .slide-media {
        order: -1;
        width: 108px;
        height: 108px;
        flex-shrink: 0;
    }

    .slide-content {
        order: 0;
        flex: 1;
        min-width: 0;
        max-width: none;
    }

    .slide-icon {
        display: none;
    }

    .slide-content h2 {
        font-size: .95rem;
        margin-bottom: 4px;
        line-height: 1.35;
    }

    .slide-content p {
        font-size: .72rem;
        margin-bottom: 8px;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .slide .btn-primary {
        padding: 7px 12px;
        font-size: .72rem;
        gap: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,.15);
    }

    .slide .btn-primary i {
        font-size: .65rem;
    }

    .slide-image-shape,
    .slide-media-fallback {
        width: 88%;
        height: 88%;
        transform: none;
        animation: none;
    }

    .slide-media-fallback {
        font-size: 2.2rem;
    }

    .slide-media-ring,
    .slide-media-blob {
        display: none;
    }

    .slide-decoration {
        display: none;
    }

    .slider-dots {
        bottom: 8px;
        gap: 6px;
    }

    .slider-dot {
        width: 7px;
        height: 7px;
    }

    .slider-dot.active {
        width: 18px;
    }

    .slider-btn {
        opacity: 1;
        width: 30px;
        height: 30px;
        font-size: .75rem;
    }

    .slider-prev { right: 6px; }
    .slider-next { left: 6px; }

    .hero-section {
        padding: 12px 0;
    }

    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .category-card { width: 100px; padding: 16px 8px; }
    .category-icon { width: 56px; height: 56px; font-size: 1.3rem; }

    .products-grid {
        gap: 12px;
    }

    .products-grid > .product-card {
        flex: 0 0 calc((100% - 12px) / 2);
        width: calc((100% - 12px) / 2);
        max-width: calc((100% - 12px) / 2);
    }

    .page-container {
        padding: 24px 16px 40px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .promo-section { padding: 8px 0 24px; }

    .blog-grid-home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .logo-name { font-size: .85rem; }

    .product-image { height: 140px; font-size: 2.5rem; }

    .product-info { padding: 12px; }

    .product-name { font-size: .8rem; }

    .btn-add-cart { font-size: .78rem; padding: 10px 8px; }

    .blog-grid-home {
        grid-template-columns: 1fr;
    }
}

/* ===== Extended Pages ===== */
.main-content { min-height: 50vh; }
.page-container { padding: 32px 20px 48px; width: 100%; box-sizing: border-box; }
.page-container.narrow { max-width: 720px; }
.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.page-title i { color: var(--primary-light); }

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-light); margin-bottom: 24px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--primary); }

.messages-container { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 1000; width: min(520px, 92vw); }
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-md); animation: slideDown .3s ease; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error, .alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

.card-panel { background: var(--bg-card); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.empty-state { text-align: center; color: var(--text-muted); padding: 40px 20px; grid-column: 1 / -1; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-input, .checkout-form select, .search-bar select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
    font-family: inherit; font-size: .9rem; background: #fff; transition: border-color var(--transition);
}
.form-input:focus, .checkout-form select:focus, .search-bar select:focus {
    outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(239,64,86,.08);
}
.field-error { color: #dc2626; font-size: .8rem; display: block; margin-top: 4px; }
.form-group.has-error .form-input,
.form-group.has-error select,
.form-group.has-error textarea,
.form-input.input-invalid {
    border-color: #dc2626 !important;
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}
.field-error-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
    font-size: .85rem;
    line-height: 1.5;
}
.field-error-box i { margin-top: 2px; flex-shrink: 0; }
.field-help { display: block; margin-top: 6px; font-size: .78rem; color: var(--text-light); }
.field-required { color: #dc2626; }
.form-errors-summary {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
}
.form-errors-summary-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin-bottom: 8px;
}
.form-errors-summary ul {
    margin: 0;
    padding-right: 18px;
    font-size: .88rem;
    line-height: 1.7;
}
.password-strength { margin-top: 10px; }
.password-strength-bar {
    height: 5px;
    background: #e4e4e7;
    border-radius: 999px;
    overflow: hidden;
}
.password-strength-fill { height: 100%; transition: width .2s ease, background .2s ease; }
.password-strength-label { margin-top: 6px; font-size: .8rem; color: var(--text-light); }
.password-strength-rules {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    font-size: .76rem;
    display: grid;
    gap: 4px;
}
.password-strength-rules li { display: flex; align-items: center; gap: 6px; }
.password-strength-rules li.valid { color: #15803d; }
.password-strength-rules li.invalid { color: var(--text-muted); }
.password-weak-warning {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: .78rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.password-match-hint {
    margin-top: 8px;
    font-size: .8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.password-match-hint.is-match { color: #15803d; }
.password-match-hint.is-mismatch { color: #b91c1c; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.btn-block { width: 100%; display: flex; justify-content: center; }
.btn-lg { padding: 14px 24px; font-size: .95rem; }
.btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border: 2px solid var(--border); border-radius: var(--radius);
    background: #fff; color: var(--text); font-weight: 600; transition: all var(--transition);
}
.btn-outline:hover { border-color: var(--primary-light); color: var(--primary); }
.btn-danger { border-color: #fecaca; color: #dc2626; }
.btn-danger:hover { background: #fef2f2; border-color: #dc2626; }
.btn-sm { padding: 6px 12px; font-size: .8rem; background: var(--bg); border-radius: 8px; color: var(--primary); font-weight: 600; }
.btn-sm:hover { background: var(--primary-light); color: #fff; }
.btn-icon-danger { background: #fef2f2; color: #dc2626; width: 36px; height: 36px; border-radius: 8px; }

/* Product Detail */
.product-detail-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; margin-bottom: 40px; }
.product-gallery { position: relative; }
.product-main-image {
    height: 420px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center;
    font-size: 6rem; color: var(--prod-color); overflow: hidden;
    background: linear-gradient(145deg, color-mix(in srgb, var(--prod-color) 8%, white), color-mix(in srgb, var(--prod-color) 20%, white));
}
.product-main-image img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.product-thumbnails { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb-btn { width: 72px; height: 72px; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; padding: 0; background: #fff; cursor: pointer; }
.thumb-btn.active { border-color: var(--primary-light); }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; }
.product-badge-lg {
    position: absolute; top: 16px; right: 16px; background: var(--accent); color: #fff;
    padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: .85rem;
}
.product-detail-info h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 16px; line-height: 1.4; }
.product-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; font-size: .85rem; color: var(--text-light); }
.meta-item.in-stock { color: #16a34a; }
.meta-item.out-stock { color: #dc2626; }
.product-price-box { background: var(--bg); padding: 20px; border-radius: var(--radius); margin-bottom: 20px; }
.discount-tag { background: var(--primary-light); color: #fff; padding: 4px 10px; border-radius: 6px; font-size: .8rem; font-weight: 600; }
.price-row { display: flex; align-items: baseline; gap: 12px; margin-top: 8px; }
.current-price-lg { font-size: 1.75rem; font-weight: 800; }
.old-price-lg { text-decoration: line-through; color: var(--text-muted); }
.product-short-desc { color: var(--text-light); line-height: 1.8; margin-bottom: 24px; }
.buy-form { margin-bottom: 24px; }
.quantity-selector { margin-bottom: 16px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qty-btn { width: 40px; height: 40px; background: var(--bg); font-size: 1.1rem; }
.qty-control input { width: 56px; text-align: center; border: none; font-family: inherit; font-size: 1rem; }
.buy-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.product-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.product-features div {
    background: var(--bg); padding: 12px; border-radius: var(--radius); font-size: .82rem;
    display: flex; align-items: center; gap: 8px; color: var(--text-light);
}
.product-features i { color: var(--primary); }
.product-description-section h2 { font-size: 1.15rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.product-description { line-height: 2; color: var(--text-light); }
.product-name a:hover { color: var(--primary); }

/* Category page */
.page-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.category-header-icon {
    width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--cat-color); background: color-mix(in srgb, var(--cat-color) 12%, white);
}

/* Cart & Checkout */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.cart-item {
    display: grid; grid-template-columns: 72px 1fr 80px 100px 40px; gap: 16px; align-items: center;
    padding: 16px 0; border-bottom: 1px solid var(--border);
}
.cart-item-image {
    width: 72px; height: 72px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--prod-color);
    background: linear-gradient(145deg, color-mix(in srgb, var(--prod-color) 8%, white), color-mix(in srgb, var(--prod-color) 18%, white));
}
.cart-item-info h3 { font-size: .9rem; margin-bottom: 4px; }
.cart-qty-form input { width: 64px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; text-align: center; }
.cart-item-total { font-weight: 700; font-size: .9rem; }
.cart-summary, .checkout-form { position: sticky; top: 100px; }
.cart-summary h3, .checkout-form h3 { font-size: 1rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: .9rem; color: var(--text-light); }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 16px; font-weight: 700; color: var(--text); font-size: 1rem; }
.summary-item { display: flex; justify-content: space-between; font-size: .85rem; padding: 8px 0; color: var(--text-light); }
.empty-cart { text-align: center; padding: 60px 20px; }
.empty-cart i { font-size: 4rem; color: var(--text-muted); margin-bottom: 16px; }
.payment-methods { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.payment-option { cursor: pointer; }
.payment-option input { display: none; }
.payment-option-content {
    display: flex; align-items: center; gap: 14px; padding: 16px; border: 2px solid var(--border);
    border-radius: var(--radius); transition: all var(--transition);
}
.payment-option input:checked + .payment-option-content {
    border-color: var(--primary-light); background: rgba(239,64,86,.04);
}
.payment-option-content i { font-size: 1.5rem; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.payment-icon-card { color: #16a34a; background: #ecfdf5; }
.payment-icon-zarinpal { color: #f59e0b; background: #fffbeb; }
.payment-icon-bank { color: #2563eb; background: #eff6ff; }
.payment-option-content strong { display: block; margin-bottom: 2px; }
.payment-option-content span { font-size: .8rem; color: var(--text-light); }

/* Payment pages */
.bank-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 16px 0; }
.bank-info-grid .full-width { grid-column: 1 / -1; }
.bank-info-grid span { display: block; font-size: .8rem; color: var(--text-muted); margin-bottom: 4px; }
.card-number { font-size: 1.25rem; letter-spacing: 2px; color: var(--primary); direction: ltr; text-align: right; }
.help-text { color: var(--text-light); font-size: .9rem; }
.payment-mock { text-align: center; max-width: 420px; margin: 0 auto; }
.mock-gateway-logo { margin-bottom: 24px; }
.mock-gateway-logo i { font-size: 3rem; color: var(--primary); margin-bottom: 12px; }
.mock-badge { display: inline-block; background: #fef3c7; color: #92400e; padding: 4px 10px; border-radius: 6px; font-size: .75rem; }
.mock-amount { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin-top: 8px; }
.mock-details { margin-bottom: 24px; color: var(--text-light); }

/* Auth */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #fdf2f4, #fff7ed); padding: 24px; }
.auth-card { background: #fff; padding: 40px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(440px, 100%); }
.auth-logo { justify-content: center; margin-bottom: 24px; }
.auth-card h1 { text-align: center; font-size: 1.35rem; margin-bottom: 24px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: .9rem; color: var(--text-light); }
.auth-switch a { color: var(--primary-light); font-weight: 600; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-light); font-size: .85rem; margin-bottom: 16px; }
.back-link:hover { color: var(--primary); }

/* Panel Layout */
.panel-page { background: var(--bg); }
.panel-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.panel-sidebar {
    background: #1a1a2e;
    color: #fff;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.25) transparent;
}
.panel-sidebar::-webkit-scrollbar { width: 6px; }
.panel-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.25);
    border-radius: 999px;
}
.manage-sidebar { background: #1e293b; }
.panel-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0 12px 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 16px;
    flex-shrink: 0;
}
.panel-brand i { color: var(--accent); font-size: 1.3rem; }
.panel-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.panel-nav a {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius);
    color: rgba(255,255,255,.75); font-size: .9rem; transition: all var(--transition);
}
.panel-nav a:hover, .panel-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.panel-nav a.active { background: var(--primary); }
.logout-form { margin: 0; }
.logout-form button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 12px 14px; border-radius: var(--radius);
    background: transparent; color: rgba(255,255,255,.75);
    font-size: .9rem; font-family: inherit; text-align: right;
    transition: all var(--transition);
}
.logout-form button:hover { background: rgba(255,255,255,.1); color: #fff; }
.panel-content { padding: 32px; }
.panel-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.panel-subtitle { color: var(--text-light); margin-bottom: 20px; font-size: .9rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: #fff; padding: 20px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 16px;
}
.stat-card i { font-size: 1.5rem; color: var(--primary); width: 48px; height: 48px; background: rgba(196,30,58,.08); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.stat-card strong { display: block; font-size: 1.35rem; }
.stat-card span { font-size: .8rem; color: var(--text-light); }
.stat-card.warning i { color: #d97706; background: #fffbeb; }
.stat-card.info i { color: #2563eb; background: #eff6ff; }
.stat-card.success i { color: #16a34a; background: #ecfdf5; }

.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th, .data-table td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--border); }
.data-table th { background: var(--bg); font-weight: 600; color: var(--text-light); font-size: .8rem; }
.data-table tr:hover td { background: rgba(0,0,0,.015); }

.status-badge {
    display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: .75rem; font-weight: 600;
}
.status-pending, .status-awaiting { background: #fef3c7; color: #92400e; }
.status-verification { background: #dbeafe; color: #1e40af; }
.status-paid { background: #d1fae5; color: #065f46; }
.status-processing { background: #e0e7ff; color: #3730a3; }
.status-shipped { background: #cffafe; color: #0e7490; }
.status-delivered { background: #bbf7d0; color: #166534; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-chip {
    padding: 8px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--border);
    font-size: .82rem; transition: all var(--transition);
}
.filter-chip.active, .filter-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.order-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.order-status-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.order-item-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.action-buttons { display: flex; flex-direction: column; gap: 10px; }

.order-track-layout {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 24px;
    align-items: start;
}

.order-track-form .btn-block {
    width: 100%;
    justify-content: center;
}

.order-track-result h2 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.tracking-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.tracking-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: .82rem;
    border: 1px solid var(--border);
}

.tracking-step.done {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.tracking-step.current {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fdba74;
    font-weight: 600;
}

.tracking-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: .5;
}

.tracking-step.done .tracking-step-dot,
.tracking-step.current .tracking-step-dot {
    opacity: 1;
}

.tracking-info {
    margin: 16px 0;
    padding: 14px 16px;
    background: #eff6ff;
    border-radius: var(--radius);
    color: #1e40af;
    font-size: .92rem;
}

.tracking-note {
    margin-top: 16px;
    font-size: .88rem;
    color: var(--text-light);
}

.tracking-note.cancelled {
    color: #991b1b;
    background: #fef2f2;
    padding: 12px 14px;
    border-radius: var(--radius);
}

.order-track-meta {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: .88rem;
    color: var(--text-light);
    display: grid;
    gap: 8px;
}

.order-track-meta i {
    width: 18px;
    color: var(--primary-light);
}

.payment-info-box {
    margin-top: 12px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    display: grid;
    gap: 10px;
    font-size: .9rem;
}

.payment-method-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.payment-receipt-note {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.payment-receipt-image-wrap {
    display: grid;
    gap: 10px;
}

.payment-receipt-image {
    max-width: 100%;
    max-height: 420px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
    object-fit: contain;
}

.payment-gateway-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 14px;
    color: #1e3a8a;
    display: grid;
    gap: 8px;
}

.payment-hint {
    color: var(--text-light);
    font-size: .88rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-bar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.search-bar input { flex: 1; min-width: 200px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-family: inherit; }
.badge-success { background: #d1fae5; color: #065f46; padding: 4px 8px; border-radius: 6px; font-size: .75rem; }
.badge-muted { background: var(--bg); color: var(--text-muted); padding: 4px 8px; border-radius: 6px; font-size: .75rem; }
.text-gold { color: #fbbf24; }
.text-muted { color: var(--text-muted); font-size: .8rem; display: block; }
.mb-24 { margin-bottom: 24px; }

/* Revenue cards */
.revenue-section { margin-bottom: 24px; }
.revenue-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.revenue-card {
    background: linear-gradient(135deg, #fff, #fdf2f4);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition);
    display: block;
}
a.revenue-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.revenue-card.highlight {
    background: linear-gradient(135deg, #c41e3a, #e85d4a);
    color: #fff;
    border: none;
}
.revenue-card.highlight .revenue-label,
.revenue-card.highlight small { color: rgba(255,255,255,.85); }
.revenue-label { font-size: .8rem; color: var(--text-light); display: block; margin-bottom: 8px; }
.revenue-card strong { font-size: 1.35rem; font-weight: 800; display: block; margin-bottom: 4px; }
.revenue-card small { font-size: .78rem; color: var(--text-muted); }

/* Analytics */
.analytics-charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.analytics-charts-grid .span-2 { grid-column: span 2; }
.chart-panel h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.analytics-tables-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.status-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.status-breakdown-item {
    background: var(--bg);
    padding: 14px 16px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .88rem;
}
.status-breakdown-item strong {
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .8rem;
}

@media (max-width: 1024px) {
    .revenue-grid { grid-template-columns: repeat(2, 1fr); }
    .analytics-charts-grid { grid-template-columns: 1fr; }
    .analytics-charts-grid .span-2 { grid-column: span 1; }
    .analytics-tables-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .revenue-grid { grid-template-columns: 1fr; }
}

/* Reviews */
.product-reviews-section { margin: 40px 0; }
.product-reviews-section > h2 {
    font-size: 1.15rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.review-form-panel { margin-bottom: 24px; }
.review-form-panel h3 { margin-bottom: 8px; }
.review-form-note { color: var(--text-light); font-size: .85rem; margin-bottom: 16px; }
.review-notice {
    background: var(--bg);
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
}
.review-notice.success { background: #ecfdf5; color: #065f46; }
.review-notice.pending { background: #fffbeb; color: #92400e; }
.review-notice a { color: var(--primary-light); font-weight: 600; }
.reviews-list { display: flex; flex-direction: column; gap: 16px; }
.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.review-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.review-author { display: flex; align-items: center; gap: 12px; }
.review-avatar {
    width: 40px; height: 40px; background: var(--bg); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--text-muted);
}
.review-author strong { display: block; font-size: .9rem; }
.review-author span { font-size: .78rem; color: var(--text-muted); }
.review-stars { color: #fbbf24; font-size: .85rem; }
.review-title { font-size: .95rem; margin-bottom: 8px; }
.review-text { color: var(--text-light); line-height: 1.9; font-size: .9rem; }

.reviews-admin-list { display: flex; flex-direction: column; gap: 16px; }
.review-admin-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--bg);
}
.review-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.review-admin-meta { display: flex; align-items: center; gap: 10px; }
.review-product-link a { color: var(--primary-light); font-size: .85rem; }
.review-admin-card h4 { margin: 8px 0; font-size: .95rem; }
.review-admin-card p { color: var(--text-light); line-height: 1.8; font-size: .9rem; margin-bottom: 12px; }
/* Products toolbar */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.toolbar-info { font-size: .88rem; color: var(--text-light); display: flex; gap: 12px; flex-wrap: wrap; }
.toolbar-search { color: var(--primary); font-weight: 500; }
.toolbar-filters { display: flex; align-items: center; gap: 10px; }
.toolbar-filters label { font-size: .85rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.sort-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: .88rem;
    background: #fff;
    min-width: 160px;
    cursor: pointer;
}
.sort-select:focus { outline: none; border-color: var(--primary-light); }
.category-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .products-toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-filters { justify-content: space-between; }
    .sort-select { flex: 1; }
}


@media (max-width: 1024px) {
    .product-detail-grid, .cart-layout, .checkout-layout, .order-detail-grid, .order-track-layout { grid-template-columns: 1fr; }
    .panel-layout { grid-template-columns: 1fr; }
    .panel-sidebar { position: static; height: auto; }
    .cart-summary, .checkout-form { position: static; }
}

@media (max-width: 768px) {
    .cart-item { grid-template-columns: 60px 1fr; gap: 10px; }
    .cart-item-total, .cart-qty-form, .btn-icon-danger { grid-column: 2; }
    .form-grid { grid-template-columns: 1fr; }
    .product-features { grid-template-columns: 1fr; }
    .buy-actions { flex-direction: column; }
    .buy-actions .btn-primary, .buy-actions .btn-outline { width: 100%; }
}

/* Product manage */
.manage-form-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-bottom: 20px; }
.product-manage-form .card-panel h3 { margin-bottom: 16px; display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.field-help { display: block; font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.form-checkbox { width: 18px; height: 18px; accent-color: var(--primary); }
.form-group-check { margin-bottom: 12px; }
.check-label {
    display: flex; align-items: center; gap: 10px;
    font-weight: 600; cursor: pointer; margin: 0;
}
.check-label span { font-size: .9rem; }
.price-preview { margin-top: 20px; padding: 16px; background: var(--bg); border-radius: var(--radius); }
.price-preview p { font-size: .85rem; color: var(--text-light); margin-bottom: 6px; }
.price-preview strong { font-size: 1.25rem; color: var(--primary); }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.user-meta-box {
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: .9rem;
}
.user-meta-box p { margin-bottom: 8px; }
.user-meta-box p:last-child { margin-bottom: 0; }
.card-panel h3 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}
.field-error { color: #dc2626; font-size: .8rem; display: block; margin-top: 4px; }
.delete-product-form { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.product-gallery-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.gallery-admin-item { position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.gallery-admin-item.primary { border-color: var(--primary-light); box-shadow: 0 0 0 2px rgba(196,30,58,.15); }
.gallery-admin-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.gallery-admin-actions { display: flex; justify-content: space-between; align-items: center; padding: 8px; gap: 6px; }
.review-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-danger-text { color: #dc2626; background: #fef2f2; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.table-product-thumb { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.table-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* SEO: accessible page title without changing visual layout */
.seo-page-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1024px) {
    .manage-form-grid { grid-template-columns: 1fr; }
}

/* ── Settings page ── */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-muted);
    text-decoration: none;
    font-size: .92rem;
    border: 1px solid var(--border);
    transition: all .2s;
}
.settings-tab:hover {
    color: var(--primary);
    border-color: var(--primary);
}
.settings-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.settings-panel { max-width: 900px; }
.settings-form .card-panel h3 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}
.form-group.full-width { grid-column: 1 / -1; }
.field-hint {
    display: block;
    font-size: .82rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.mb-16 { margin-bottom: 16px; }
.logo-preview-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px dashed var(--border);
}
.logo-preview-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), #8b0000);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 1.4rem;
}
.logo-preview-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: var(--radius-md);
}
.logo-preview-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.logo-preview-text strong { font-size: 1.05rem; }
.logo-preview-text span { font-size: .85rem; color: var(--text-muted); }
.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.menu-items-list { display: flex; flex-direction: column; gap: 12px; }
.menu-item-row {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
}
.menu-item-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.menu-item-fields.footer-link-fields {
    grid-template-columns: 1.2fr 1.2fr .5fr auto;
    align-items: end;
}
.menu-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.check-label.compact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    margin: 0;
}
.delete-check { color: #c41e3a; }
.menu-item-row.compact { padding: 10px 12px; }
@media (max-width: 768px) {
    .menu-item-fields,
    .menu-item-fields.footer-link-fields {
        grid-template-columns: 1fr;
    }
}

/* ── Rich text content (storefront + editor preview) ── */
.rich-content {
    line-height: 1.9;
    color: var(--text);
    word-wrap: break-word;
}
.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4 {
    margin: 1.2em 0 0.6em;
    line-height: 1.4;
    color: var(--text);
}
.rich-content p { margin: 0 0 1em; }
.rich-content ul,
.rich-content ol {
    margin: 0 0 1em;
    padding-right: 1.4em;
}
.rich-content li { margin-bottom: 0.35em; }
.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 0.5em 0;
}
.rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}
.rich-content table td,
.rich-content table th {
    border: 1px solid var(--border);
    padding: 8px 10px;
}
.rich-content blockquote {
    margin: 1em 0;
    padding: 12px 16px;
    border-right: 4px solid var(--primary);
    background: var(--bg);
    border-radius: var(--radius-md);
}
.rich-content a { color: var(--primary); }
.rich-content iframe,
.rich-content video { max-width: 100%; }

.manage-page .tox-tinymce {
    border-radius: var(--radius-md);
    border-color: var(--border) !important;
}
.manage-page .form-group-rich {
    grid-column: 1 / -1;
}

.rich-editor-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}

.rich-editor-wrap .ql-toolbar.ql-snow {
    border: none;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
    direction: rtl;
}

.rich-editor-wrap .ql-container.ql-snow {
    border: none;
    font-family: Vazirmatn, Tahoma, sans-serif;
    font-size: 15px;
    min-height: 320px;
}

.rich-editor-wrap .ql-editor {
    min-height: 320px;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
}

.rich-editor-wrap .ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
