@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;300;400;500;700;800;900&display=swap');


:root {
    --primary: #5B3DF5;
    --primary-dark: #4B2EE0;
    --secondary: #FF6B00;
    --secondary-light: #FF9100;

    --text: #0F172A;
    --muted: #64748B;
    --bg: #F8FAFC;
    --white: #FFFFFF;
    --border: #E2E8F0;

    --glass: rgba(255, 255, 255, 0.75);

    --shadow-sm: 0 5px 15px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.10);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 25px;
    --radius-xl: 35px;
}


*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;

}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ======================
   HEADER / NAVBAR
====================== */
.header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}



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



.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 15px;
    transition: 0.25s ease;
}

.nav-links a:hover {
    color: var(--primary);
}


/* ======================
   HERO SECTION
====================== */
.hero {
    background: linear-gradient(135deg, var(--primary), #00D1FF);
    color: var(--white);
    padding: 120px 20px;
    text-align: center;
    border-radius: 0 0 50px 50px;
    margin-bottom: 50px;
    overflow: hidden;
}

.hero h1 {
    font-size: 45px;
    font-weight: 900;
    margin: 0 0 20px;
    line-height: 1.5;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
}

.hero p {
    font-size: 20px;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 30px;
}

.btn-main {
    display: inline-block;
    background: var(--secondary);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(255, 107, 0, 0.30);
    transition: 0.3s ease;
}

.btn-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 107, 0, 0.40);
}

/* ======================
   SECTION TITLES
====================== */
.section-title {
    font-size: 30px;
    font-weight: 900;
    margin: 40px 0 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row-reverse;
}

.section-title::before {
    content: '';
    width: 8px;
    height: 35px;
    background: var(--secondary);
    border-radius: 10px;
    flex-shrink: 0;

}

/* ======================
   PRODUCT GRID & CARDS
====================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

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

.card-img-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #F1F5F9;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.45s ease;
}

.card:hover img {
    transform: scale(1.08);
}

.card-content {
    padding: 20px;
}

.card h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 15px;
    height: 58px;
    line-height: 1.6;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.price {
    font-size: 19px;
    font-weight: 900;
    color: var(--secondary);
    white-space: nowrap;
}

.buy-link {
    background: #F1F5F9;
    color: var(--text);
    padding: 10px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    transition: 0.25s ease;
    white-space: nowrap;
}

.card:hover .buy-link {
    background: var(--secondary);
    color: var(--white);
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 107, 0, 0.92);
    color: white;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    z-index: 10;
}

/* ======================
   EMPTY STATE
====================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: 30px;
    margin-bottom: 50px;
    box-shadow: var(--shadow-sm);
}

/* ======================
   PRODUCT PAGE
====================== */
.py-50 {
    padding: 50px 0;
}

.product-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--white);
    padding: 40px;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
}

.main-img-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #F8FAFC;
    border: 1px solid #F1F5F9;
}

.main-img-card img {
    width: 100%;
    transition: 0.5s;
}

.rating-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--white);
    padding: 8px 15px;
    border-radius: 12px;
    font-weight: 900;
    box-shadow: var(--shadow-sm);
}

.breadcrumb {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 15px;
}

.product-info h1 {
    font-size: 32px;
    font-weight: 900;
    margin: 0 0 25px;
    color: var(--text);
    line-height: 1.6;
}

.price-box {
    background: rgba(255, 107, 0, 0.06);
    padding: 20px;
    border-radius: 15px;
    border-right: 5px solid var(--secondary);
    margin-bottom: 30px;
}

.price-value {
    display: block;
    font-size: 28px;
    font-weight: 900;
    color: var(--secondary);
}

.btn-buy-now {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: linear-gradient(45deg, var(--secondary), var(--secondary-light));
    color: white;
    padding: 20px 30px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 900;
    font-size: 18px;
    margin-bottom: 40px;
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.30);
    transition: 0.3s ease;
}

.btn-buy-now:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 107, 0, 0.40);
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pc-box {
    padding: 20px;
    border-radius: 15px;
}

.pros {
    background: #F0FFF4;
    border: 1px solid #C6F6D5;
}

.cons {
    background: #FFF5F5;
    border: 1px solid #FED7D7;
}

.pc-box h4 {
    margin: 0 0 10px;
    font-size: 16px;
}

.pc-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    opacity: 0.85;
}

/* ======================
   PRODUCT DETAIL — MOBILE
   The desktop layout is a 2-column grid (gallery | info) with pros/cons
   side by side; on phones both must collapse to a single column.
====================== */
@media (max-width: 768px) {
    .product-page {
        padding: 16px 0 40px;
    }

    .product-wrapper {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 18px;
        border-radius: 22px;
    }

    .main-img-card {
        border-radius: 16px;
    }

    .main-img-card img {
        max-height: 340px;
        object-fit: cover;
    }

    .rating-badge {
        bottom: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 13px;
    }

    .breadcrumb {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .product-info h1 {
        font-size: 21px;
        margin: 0 0 16px;
        line-height: 1.5;
    }

    .price-box {
        padding: 14px 16px;
        border-radius: 13px;
        border-right-width: 4px;
        margin-bottom: 22px;
    }

    .price-value {
        font-size: 22px;
    }

    .btn-buy-now {
        padding: 15px 18px;
        font-size: 15px;
        border-radius: 14px;
        margin-bottom: 26px;
    }

    .pros-cons {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pc-box {
        padding: 16px;
    }
}

/* ======================
   PAGINATION
====================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 40px 0 60px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 800;
    color: var(--text);
    transition: 0.25s ease;
}

.pagination a:hover,
.pagination .active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ======================
   FOOTER
====================== */
/* ======================
   FOOTER MODERN STYLE
====================== */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--white);
    padding: 60px 0 40px;
    margin-top: 80px;
    border-top: 4px solid #ff4757;
    /* یک نوار رنگی برای تاکید */
    position: relative;
    overflow: hidden;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-text {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.heart {
    display: inline-block;
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* انیمیشن ریز و جذاب وقتی موس روی قلب می‌رود */
.heart:hover {
    transform: scale(1.3);
}

.copyright {
    opacity: 0.6;
    font-size: 0.85rem;
    font-weight: 300;
}

/* اضافه کردن یک افکت محو در پس‌زمینه (اختیاری) */
.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    margin: 0 10px;
    color: #666;
    text-decoration: none;
}

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




/* ================================
   Final Responsive Header
================================ */

/* Header Base */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

/* Desktop / Default */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
}



.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.menu-toggle {
    display: none;
    border: none;
    outline: none;
    background: var(--primary);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 22px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: 0.25s ease;
}

.menu-toggle:active {
    transform: scale(0.94);
}

.menu-icon {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ================================
   Mobile Header
================================ */
@media (max-width: 768px) {
    .header {
        width: 100%;
    }

    .nav {
        display: grid;
        grid-template-columns: 44px 1fr;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
    }



    .menu-toggle {
        display: flex;
        grid-column: 1;
        grid-row: 1;
        width: 42px;
        height: 42px;
        margin: 0;
        padding: 0;
        align-items: center;
        justify-content: center;
    }

    .menu-toggle.active {
        background: var(--secondary);
    }





    .nav-links {
        display: none;
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 18px;
        padding: 10px;
        box-shadow: var(--shadow-sm);
        animation: mobileMenuFade 0.22s ease;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .nav-links a {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        color: var(--text);
        font-size: 14px;
    }

    .nav-links a:hover {
        background: rgba(91, 61, 245, 0.08);
        color: var(--primary);
    }
}

@keyframes mobileMenuFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Very Small Phones */
@media (max-width: 420px) {
    .nav {
        gap: 8px;
        padding: 8px 0;
    }


    .menu-toggle {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 21px;
    }


}

.header {
    z-index: 99999;
}

.menu-toggle {
    position: relative;
    z-index: 100000;
    pointer-events: auto;
}

.nav-links {
    z-index: 99999;
}



.empty-state {
    text-align: center;
    padding: 60px 20px;
    opacity: .85;
}

.empty-state img {
    display: block;
    margin: 0 auto;
}

.article-page {
    max-width: 900px;
    margin: auto;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.article-page h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

.article-content {
    line-height: 2;
    font-size: 16px;
}

.article-content h2 {
    margin-top: 30px;
}

.article-content p {
    margin-bottom: 16px;
}

.breadcrumb {
    font-size: 14px;
    margin-bottom: 20px;
    color: #777;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 5px;
}

.articles-header {
    margin-bottom: 40px;
}

.articles-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}

.article-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
    transition: .25s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .08);
}

.article-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .35s;
}

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

.article-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-content h3 {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.article-content h3 a {
    text-decoration: none;
    color: #222;
}

.excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 14px;
    flex: 1;
}

.read-more {
    font-size: 14px;
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

.category-header {
    margin-bottom: 40px;
}

.category-header h1 {
    font-size: 28px;
    margin: 10px 0;
}

.breadcrumb {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 6px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}

.article-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
    transition: .25s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .08);
}

.article-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .35s;
}

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

.article-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-content h3 {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.article-content h3 a {
    color: #222;
    text-decoration: none;
}

.excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 14px;
    flex: 1;
}

.read-more {
    font-size: 14px;
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

.article-wrapper {
    padding: 40px 0 70px;
    background: #f7f8fa;
}

.article-breadcrumb {
    margin-bottom: 22px;
    font-size: 13px;
    color: #777;
}

.article-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.article-breadcrumb a:hover {
    color: #0d6efd;
}

.article-breadcrumb span {
    margin: 0 6px;
}

.article-page {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .06);
}

.article-hero {
    text-align: right;
    margin-bottom: 28px;
}

.article-badge {
    display: inline-flex;
    align-items: center;
    background: #eef5ff;
    color: #0d6efd;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 16px;
}

.article-page h1 {
    font-size: 34px;
    line-height: 1.6;
    color: #1f2937;
    margin: 0 0 14px;
}

.article-excerpt {
    font-size: 16px;
    line-height: 2;
    color: #64748b;
    margin: 0 0 16px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 13px;
}

.article-cover {
    margin: 28px 0;
    border-radius: 20px;
    overflow: hidden;
    background: #f1f1f1;
}

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

.article-body {
    font-size: 16px;
    line-height: 2.25;
    color: #333;
}

.article-body h2 {
    font-size: 24px;
    line-height: 1.7;
    margin: 34px 0 14px;
    color: #111827;
}

.article-body h3 {
    font-size: 20px;
    line-height: 1.7;
    margin: 28px 0 12px;
    color: #1f2937;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

.article-body a:hover {
    text-decoration: underline;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 22px 0;
}

.article-body ul,
.article-body ol {
    padding-right: 24px;
    margin: 18px 0;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body blockquote {
    margin: 28px 0;
    padding: 18px 22px;
    background: #f8fafc;
    border-right: 4px solid #0d6efd;
    border-radius: 12px;
    color: #475569;
}

@media (max-width:768px) {
    .article-wrapper {
        padding: 24px 0 50px;
    }

    .article-page {
        padding: 22px;
        border-radius: 18px;
    }

    .article-page h1 {
        font-size: 24px;
    }

    .article-excerpt {
        font-size: 14px;
    }

    .article-body {
        font-size: 15px;
        line-height: 2.15;
    }
}

.articles-page {
    padding: 46px 0 70px;
    background:
        radial-gradient(circle at top right, rgba(13, 110, 253, .08), transparent 34%),
        #f7f8fb;
}

.articles-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff, #f1f6ff);
    border: 1px solid rgba(13, 110, 253, .08);
    border-radius: 24px;
    padding: 38px;
    margin-bottom: 34px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .06);
}

.articles-hero:before {
    content: "";
    position: absolute;
    left: -70px;
    top: -70px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(13, 110, 253, .09);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    background: #eaf3ff;
    color: #0d6efd;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.articles-hero h1 {
    font-size: 34px;
    line-height: 1.5;
    color: #111827;
    margin: 0 0 10px;
}

.articles-hero p {
    max-width: 680px;
    font-size: 15px;
    line-height: 2;
    color: #64748b;
    margin: 0;
}

.category-breadcrumb {
    margin-bottom: 20px;
    font-size: 13px;
    color: #777;
}

.category-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.category-breadcrumb a:hover {
    color: #0d6efd;
}

.category-breadcrumb span {
    margin: 0 6px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}

.article-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
    transition: .25s ease;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .10);
}

.article-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #eef2f7;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: .4s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.06);
}

.article-card-body {
    padding: 19px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-category {
    display: inline-flex;
    align-self: flex-start;
    background: #f1f6ff;
    color: #0d6efd;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 12px;
}

.article-card-body h2 {
    font-size: 17px;
    line-height: 1.75;
    margin: 0 0 10px;
}

.article-card-body h2 a {
    color: #1f2937;
    text-decoration: none;
    transition: .2s;
}

.article-card-body h2 a:hover {
    color: #0d6efd;
}

.article-card-body p {
    font-size: 14px;
    line-height: 1.9;
    color: #64748b;
    margin: 0 0 18px;
    flex: 1;
}

.article-read-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 12px;
    background: #f8fafc;
    color: #0d6efd;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: .2s;
}

.article-read-more:hover {
    background: #0d6efd;
    color: #fff;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 38px;
}

.page-link,
.page-dots {
    min-width: 42px;
    height: 42px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.page-link:hover {
    border-color: #0d6efd;
    color: #0d6efd;
}

.page-link.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 10px 24px rgba(13, 110, 253, .25);
}

.page-prev,
.page-next {
    min-width: 76px;
}

.page-dots {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #94a3b8;
}

.empty-state {
    background: #fff;
    border: 1px dashed rgba(15, 23, 42, .15);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .04);
}

@media (max-width:768px) {
    .articles-page {
        padding: 28px 0 50px;
    }

    .articles-hero {
        padding: 26px 22px;
        border-radius: 20px;
    }

    .articles-hero h1 {
        font-size: 25px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .article-card {
        border-radius: 18px;
    }

    .pagination {
        gap: 6px;
    }

    .page-link,
    .page-dots {
        min-width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 13px;
    }
}

.article-image {
    display: block;
    aspect-ratio: 16/10;
    background: #f1f3f7;
    overflow: hidden;
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: .35s;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-image img[src*="noimage"] {
    filter: grayscale(.2);
    opacity: .9;
}

.home-articles-section {
    margin-top: 42px;
    margin-bottom: 48px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.section-more-link {
    font-size: 14px;
    font-weight: 800;
    color: #0d6efd;
    text-decoration: none;
    background: #eef5ff;
    padding: 8px 14px;
    border-radius: 999px;
    transition: .2s;
}

.section-more-link:hover {
    background: #0d6efd;
    color: #fff;
}

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

.home-article-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
    transition: .25s ease;
}

.home-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .10);
}

.home-article-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f1f3f7;
}

.home-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: .35s ease;
}

.home-article-card:hover .home-article-image img {
    transform: scale(1.06);
}

.home-article-image img[src*="noimage"] {
    filter: grayscale(.15);
    opacity: .92;
}

.home-article-content {
    padding: 17px;
}

.home-article-content h3 {
    font-size: 16px;
    line-height: 1.8;
    margin: 0 0 9px;
}

.home-article-content h3 a {
    color: #1f2937;
    text-decoration: none;
    transition: .2s;
}

.home-article-content h3 a:hover {
    color: #0d6efd;
}

.home-article-content p {
    font-size: 13px;
    line-height: 1.9;
    color: #64748b;
    margin: 0 0 14px;
}

.home-article-read {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 11px;
    background: #f8fafc;
    color: #0d6efd;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: .2s;
}

.home-article-read:hover {
    background: #0d6efd;
    color: #fff;
}

@media (max-width:768px) {
    .section-title {
        align-items: flex-start;
        flex-direction: column;
        text-align: left;
    }

    .home-articles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .home-article-card {
        border-radius: 17px;
    }
}

.article-wrapper {
    padding: 40px 0 70px;
    background: #f7f8fb;
}

.article-page {
    max-width: 820px;
    margin: auto;
    background: #fff;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .08);
}

.article-hero {
    margin-bottom: 26px;
}

.article-badge {
    display: inline-flex;
    align-items: center;
    background: #eef5ff;
    color: #0d6efd;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 14px;
}

.article-hero h1 {
    font-size: 30px;
    line-height: 1.7;
    margin: 0 0 14px;
    color: #111827;
}

.article-excerpt {
    font-size: 15px;
    line-height: 2;
    color: #64748b;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
}

.article-cover {
    margin: 28px 0;
    border-radius: 18px;
    overflow: hidden;
    background: #f1f3f7;
}

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

.article-cover img[src*="no-image"] {
    filter: grayscale(.2);
    opacity: .9;
}

.article-body {
    font-size: 16px;
    line-height: 2.2;
    color: #1f2937;
}

.article-body h2 {
    margin-top: 32px;
    font-size: 22px;
}

.article-body h3 {
    margin-top: 26px;
    font-size: 18px;
}

.article-body p {
    margin-bottom: 18px;
}

.article-body img {
    max-width: 100%;
    border-radius: 14px;
    margin: 18px 0;
}

.article-breadcrumb {
    font-size: 13px;
    color: #777;
    margin-bottom: 20px;
}

.article-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.article-breadcrumb a:hover {
    color: #0d6efd;
}

.article-breadcrumb span {
    margin: 0 6px;
}

@media (max-width:768px) {

    .article-page {
        padding: 22px;
        border-radius: 18px;
    }

    .article-hero h1 {
        font-size: 23px;
    }

    .article-body {
        font-size: 15px;
    }

}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}

.top-nav {
    height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}



.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.main-nav a {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
    transition: .2s;
}

.main-nav a:hover {
    color: #2563eb;
}

.menu-toggle {
    display: none;
    border: 0;
    background: #f1f5f9;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 20px;
    cursor: pointer;
}

.related-articles {
    margin-top: 48px;
    padding-top: 34px;
    border-top: 1px solid #e5e7eb;
}

.related-header {
    margin-bottom: 22px;
}

.related-header h2 {
    font-size: 23px;
    margin: 0 0 8px;
    color: #0f172a;
}

.related-header p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.related-card {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 12px;
    text-decoration: none;
    transition: .25s;
}

.related-card:hover {
    transform: translateY(-3px);
    background: #fff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .09);
}

.related-thumb {
    height: 105px;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f5f9;
}

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

.related-info {
    min-width: 0;
}

.related-category {
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 999px;
    padding: 4px 9px;
    margin-bottom: 8px;
}

.related-info h3 {
    font-size: 14px;
    line-height: 1.8;
    margin: 0 0 6px;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-info p {
    font-size: 12px;
    line-height: 1.9;
    margin: 0;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media(max-width:992px) {
    .top-nav {
        height: auto;
        padding: 14px 0;
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }



    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width:640px) {


    .menu-toggle {
        display: block;
        margin-right: auto;
    }

    .main-nav {
        display: none;
    }


    .related-card {
        grid-template-columns: 100px 1fr;
    }

    .related-thumb {
        height: 92px;
    }


}



.product-type {
    background: #ecfdf5;
    color: #16a34a;
}

.article-type {
    background: #eff6ff;
    color: #2563eb;
}




.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 76px;
}

.main-nav {
    display: flex;
    gap: 6px;
}

.nav-item {
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    color: #334155;
    padding: 10px 16px;
    border-radius: 10px;
}

.nav-item:hover {
    background: #f1f5f9;
}

.nav-item.active {
    background: #2563eb;
    color: white;
}


.menu-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 22px;
    cursor: pointer;
}



/* ======================
   FINAL CLEAN HEADER
====================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 72px;
}


/* NAV */

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-item {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 10px;
    transition: .2s;
}

.nav-item:hover {
    background: #f1f5f9;
}

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



/* MOBILE BUTTON */

.menu-toggle {
    display: none;
    border: 0;
    background: #f1f5f9;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
}

/* ======================
   MOBILE
====================== */

@media(max-width:768px) {

    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 1;
    }




    .main-nav {
        order: 4;
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 6px;
        margin-top: 8px;
    }

    .main-nav.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
        padding: 12px;
        background: #f8fafc;
    }

}







/*-------*/
.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 72px;
}

/* NAV */

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
}

.nav-item:hover {
    background: #f1f5f9;
}

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




/* MOBILE BUTTON */

.menu-toggle {
    display: none;
    border: 0;
    background: #f1f5f9;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
}

/* MOBILE */

@media(max-width:768px) {

    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 1;
    }





    .main-nav {
        order: 4;
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 6px;
        margin-top: 8px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 8px;
    }

    .main-nav.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
        padding: 12px;
    }

}


/*----------*/



.main-nav {
    z-index: 1500;
}


.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--dark);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 100000;
    transition: background 0.2s ease, color 0.2s ease;
}

.menu-toggle.active {
    background: var(--secondary);
    color: #fff;
}

/* ======================
   PRODUCTS PAGE — REFINED CARDS
   (mirrors the polished look used on the homepage:
    price as a pill, full-width gradient CTA, footer pinned to bottom)
====================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
    margin-bottom: 60px;
}

.products-grid .card {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1),
                box-shadow 0.35s ease, border-color 0.35s ease;
}

.products-grid .card:hover {
    transform: translateY(-8px);
    border-color: rgba(37, 99, 235, 0.20);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.12);
}

.products-grid .card-img-wrapper {
    width: 100%;
    flex: 0 0 auto;
    height: 230px;
    overflow: hidden;
    background: #f1f5f9;
}

.products-grid .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.products-grid .card:hover .card-img-wrapper img {
    transform: scale(1.07);
}

.products-grid .card-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.products-grid .card h3 {
    height: auto;
    min-height: 54px;
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.65;
}

.products-grid .card h3 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.products-grid .card h3 a:hover {
    color: #2563eb;
}

.products-grid .card-rating {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13.5px;
}

/* price pill on top, full-width CTA below — never side by side, never overlap */
.products-grid .card-footer {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.products-grid .price {
    display: block;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff7ed;
    color: #ea580c;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
}

.products-grid .buy-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
    transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.3s ease;
}

.products-grid .buy-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.28);
}

.products-grid .card:hover .buy-link {
    background: linear-gradient(135deg, #ff6b00, #ff9100);
    box-shadow: 0 14px 26px rgba(255, 107, 0, 0.28);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
}

/* two cards per row on phones, with comfortable spacing */
@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px;
        margin-bottom: 44px;
    }

    .products-grid .card { border-radius: 16px; }
    .products-grid .card-img-wrapper { height: 132px; }
    .products-grid .card-content { padding: 11px 11px 13px; }
    .products-grid .card h3 { min-height: 0; font-size: 12.5px; line-height: 1.55; margin-bottom: 6px; }
    .products-grid .card-rating { font-size: 11px; margin-bottom: 9px; }
    .products-grid .card-footer { gap: 7px; padding-top: 9px; }
    .products-grid .price { font-size: 11.5px; padding: 6px 6px; border-radius: 11px; }
    .products-grid .buy-link { font-size: 11px; min-height: 36px; padding: 7px 6px; border-radius: 11px; }
}





/* =====================================================
   HEADER + AJAX SEARCH + SEARCH PAGE
   Safe scoped styles
===================================================== */

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border, #e5e7eb);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-header .header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 18px;
}



/* ---------- Navigation ---------- */

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.main-nav .nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 13px;
    border-radius: 12px;
    color: var(--text, #0f172a);
    text-decoration: none;
    font-size: 14px;
    font-weight: 850;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav .nav-item:hover {
    background: #f1f5f9;
    color: var(--primary, #2563eb);
}

.main-nav .nav-item.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary, #2563eb);
}

/* ---------- Menu Toggle ---------- */

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 13px;
    background: #fff;
    color: var(--text, #0f172a);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.menu-toggle:hover,
.menu-toggle.active {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
}

/* ---------- Header Search Form ---------- */

.header-search {
    position: relative;
    width: min(360px, 100%);
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    flex: 0 1 360px;
}

#search-input {
    width: 100%;
    height: 40px;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 10px;
    color: var(--text, #0f172a);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
}

#search-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.header-search button {
    width: 42px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: var(--primary, #2563eb);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    flex: 0 0 42px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover {
    background: var(--primary-dark, #1d4ed8);
    transform: translateY(-1px);
}

/* ---------- AJAX Search Dropdown ---------- */

#search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    z-index: 10000;
    display: none;
    max-height: 460px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 18px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
    padding: 8px;
}

#search-results.active {
    display: block;
}

#search-results::-webkit-scrollbar {
    width: 7px;
}

#search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.search-status,
.search-empty {
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--muted, #64748b);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.search-loading {
    color: var(--primary, #2563eb);
    background: rgba(37, 99, 235, 0.06);
}

.search-error {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.07);
}

.search-group {
    padding: 4px 0;
}

.search-group+.search-group {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.search-group-title {
    padding: 6px 10px 9px;
    color: var(--muted, #64748b);
    font-size: 12px;
    font-weight: 900;
}

.search-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    color: var(--text, #0f172a);
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.search-item:hover {
    background: #f8fafc;
    transform: translateX(-2px);
}

.search-item-image {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #eef2f7;
}

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

.article-search-image {
    border-radius: 14px;
}

.search-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.search-title {
    color: var(--text, #0f172a);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-price {
    color: #16a34a;
    font-size: 12px;
    font-weight: 900;
}

.search-excerpt {
    color: var(--muted, #64748b);
    font-size: 12px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-type {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.product-type {
    color: #15803d;
    background: #dcfce7;
}

.article-type {
    color: #7c3aed;
    background: #ede9fe;
}

.search-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--primary, #2563eb);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    transition: background 0.2s ease, transform 0.2s ease;
}

.search-view-all:hover {
    background: var(--primary-dark, #1d4ed8);
    transform: translateY(-1px);
}

/* =====================================================
   SEARCH RESULT PAGE
===================================================== */

.search-page {
    padding: 42px 0 70px;
}

.search-hero {
    margin-bottom: 28px;
    padding: 34px 28px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 34%),
        linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid var(--border, #e5e7eb);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.search-hero h1 {
    margin: 0 0 10px;
    color: var(--text, #0f172a);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 950;
    letter-spacing: -0.7px;
}

.search-hero p {
    margin: 0;
    color: var(--muted, #64748b);
    font-size: 15px;
    font-weight: 650;
}

.search-hero strong {
    color: var(--primary, #2563eb);
}

.search-empty-page {
    padding: 34px 24px;
    border-radius: 22px;
    background: #fff;
    border: 1px dashed #cbd5e1;
    color: var(--muted, #64748b);
    text-align: center;
    font-size: 15px;
    font-weight: 800;
}

.search-section {
    margin-top: 34px;
}

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

.search-section-header h2 {
    margin: 0;
    color: var(--text, #0f172a);
    font-size: 22px;
    font-weight: 950;
}

.search-section-header span {
    padding: 6px 11px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--muted, #64748b);
    font-size: 12px;
    font-weight: 900;
}

/* ---------- Search Products Page Cards ---------- */

.search-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.search-product-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.search-product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.search-product-image {
    display: block;
    aspect-ratio: 1 / 0.78;
    background: #f1f5f9;
    overflow: hidden;
}

.search-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.search-product-card:hover .search-product-image img {
    transform: scale(1.04);
}

.search-product-content {
    padding: 15px;
}

.search-product-content h2 {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.8;
    font-weight: 900;
}

.search-product-content h2 a {
    color: var(--text, #0f172a);
    text-decoration: none;
}

.search-product-content h2 a:hover {
    color: var(--primary, #2563eb);
}

.search-product-price {
    margin-bottom: 12px;
    color: #16a34a;
    font-size: 14px;
    font-weight: 950;
}

.search-product-price.unavailable {
    color: #ef4444;
}

.search-product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 12px;
    background: var(--primary, #2563eb);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.search-product-btn:hover {
    background: var(--primary-dark, #1d4ed8);
}

/* ---------- Search Articles Page Cards ---------- */

.search-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.search-article-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.search-article-card:hover {
    transform: translateY(-5px);
    border-color: rgba(124, 58, 237, 0.25);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.search-article-image {
    display: block;
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
    overflow: hidden;
}

.search-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.search-article-card:hover .search-article-image img {
    transform: scale(1.04);
}

.search-article-content {
    padding: 16px;
}

.search-article-category {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #ede9fe;
    color: #7c3aed;
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
}

.search-article-content h2 {
    margin: 0 0 9px;
    font-size: 16px;
    line-height: 1.8;
    font-weight: 950;
}

.search-article-content h2 a {
    color: var(--text, #0f172a);
    text-decoration: none;
}

.search-article-content h2 a:hover {
    color: #7c3aed;
}

.search-article-content p {
    margin: 0 0 14px;
    color: var(--muted, #64748b);
    font-size: 13px;
    line-height: 1.9;
}

.search-article-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 12px;
    background: #7c3aed;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.search-article-btn:hover {
    background: #6d28d9;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1100px) {
    .site-header .header-inner {
        gap: 12px;
    }

    .header-search {
        width: min(300px, 100%);
        flex-basis: 300px;
    }

    .search-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}



@media (max-width: 640px) {


    .search-page {
        padding: 26px 0 50px;
    }

    .search-hero {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .search-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-products-grid,
    .search-articles-grid {
        grid-template-columns: 1fr;
    }

    .search-item {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .search-item-image {
        width: 48px;
        height: 48px;
    }

    .search-type {
        grid-column: 2;
        justify-self: start;
        margin-top: 2px;
    }
}

/* ================= BRAND LOGO (advanced) =================
   Glass badge mark: layered gradient fill + top gloss highlight
   + an animated light sweep, layered colored glow, plus a
   gradient-clipped wordmark. Pure CSS — no markup dependency. */

.site-logo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    line-height: 1.15;
    padding: 2px 0;
    white-space: nowrap;
    transition: transform .3s ease, filter .3s ease;
}

/* ---- The badge mark (glass + animated sheen) ---- */

.logo-mark {
    position: relative;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0) 40%),
        linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    color: #fff;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -.5px;
    overflow: hidden;
    isolation: isolate;            /* keep the sweep layered above the fill */
    flex: 0 0 auto;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),    /* crisp top edge light   */
        inset 0 -10px 18px rgba(76, 29, 149, 0.35), /* inner bottom glow      */
        0 12px 22px rgba(79, 70, 229, 0.32),        /* colored drop glow      */
        0 2px 5px rgba(15, 23, 42, 0.14);           /* soft depth             */
    transition: transform .35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow .35s ease;
}

/* gloss: a soft top-down white wash for a glassy 3D feel */
.logo-mark::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 46%);
    pointer-events: none;
    z-index: 1;
}

/* animated light sweep that travels across the badge */
.logo-mark::after {
    content: "";
    position: absolute;
    top: -20%;
    left: -80%;
    width: 45%;
    height: 140%;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-18deg);
    animation: logo-sheen 4.8s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes logo-sheen {
    0%, 62% { left: -80%; }
    100%    { left: 140%; }
}

/* ---- Wordmark: gradient-clipped text ---- */

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

.logo-text-main {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(95deg, #0f172a 0%, #1e293b 52%, #4f46e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* safety net: solid color if background-clip:text is unsupported */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .logo-text-main {
        background: none;
        color: #0f172a;
    }
}

.logo-tagline {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    color: #64748b;
}

/* خط برند زیر لوگو */

.site-logo::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 0%;
    height: 3px;
    border-radius: 10px;
    background: linear-gradient(90deg, #2563eb, #6366f1, #8b5cf6);
    transition: width .35s ease;
}

/* hover: lift + brighter glow */

.site-logo:hover {
    transform: translateY(-2px);
}

.site-logo:hover::after {
    width: 100%;
}

.site-logo:hover .logo-mark {
    transform: translateY(-1px) scale(1.04);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -10px 18px rgba(76, 29, 149, 0.40),
        0 16px 30px rgba(79, 70, 229, 0.42),
        0 2px 6px rgba(15, 23, 42, 0.16);
}

/* respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    .logo-mark::after { animation: none; opacity: 0; }
    .site-logo, .logo-mark { transition: none; }
}

/* ================= MOBILE ================= */

@media (max-width:768px) {

    .logo-mark {
        width: 38px;
        height: 38px;
        font-size: 17px;
        border-radius: 12px;
    }

    .logo-text-main {
        font-size: 19px;
    }

    .logo-tagline {
        font-size: 10px;
    }
}

@media (max-width:480px) {

    .logo-mark {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

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





/* ===== NAV ACTIVE STYLE ===== */

.main-nav {
    display: flex;
    gap: 6px;
}

.nav-item {
    position: relative;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    color: #0f172a;
    transition: all .25s ease;
}

/* hover */

.nav-item:hover {
    background: #f1f5f9;
    color: #2563eb;
}

/* active */

.nav-item.active {
    color: #2563eb;
    background: rgba(37, 99, 235, .10);
}

/* underline animation */

.nav-item::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #4f46e5);
    border-radius: 10px;
    transition: width .3s ease;
}

.nav-item.active::after {
    width: 100%;
}



/* ================= MOBILE HEADER ================= */



/* فقط یک نسخه موبایل 900 پیکسلی – نسخه نهایی */

@media (max-width: 900px) {

    .header-inner {
        display: flex;
        width: 100%;
        align-items: center;
    }

    /* لوگو سمت چپ */
    .site-logo {
        order: 2;
        margin-right: auto;
        flex: 0 0 auto;
    }

    /* همبرگر سمت راست */
    .menu-toggle {
        order: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        background: #f1f5f9;
        border: none;
        border-radius: 12px;
        font-size: 22px;
        cursor: pointer;
    }

    .site-header .header-inner {
        padding-right: 0;
    }

    .site-header .menu-toggle {
        margin-right: -8px;
    }

    /* سرچ خط بعد */
    .header-search {
        order: 3;
        width: 100%;
        margin-top: 12px;
    }

    /* منوی کشویی */
    .main-nav {
        position: fixed;
        top: 0;
        right: -270px;
        width: 260px;
        height: 100vh;
        background: #fff;
        padding: 70px 20px 20px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 12px;
        transition: right .3s ease;
        box-shadow: -12px 0 35px rgba(0, 0, 0, 0.14);
        z-index: 1000;
    }

    .main-nav.active {
        right: 0;
    }

    /* لینک‌های داخل منو */
    .nav-item {
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 15px;
    }

    /* بک‌دراپ */
    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .35);
        backdrop-filter: blur(3px);
        opacity: 0;
        pointer-events: none;
        transition: .25s;
        z-index: 900;
    }

    .menu-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* جلوگیری از اسکرول هنگام باز بودن منو */
    body.menu-open {
        overflow: hidden;
    }
}






/* ======================
   ABOUT PAGE
====================== */

.about-page {
    padding-top: 40px;
}

/* hero */

.about-hero {
    text-align: center;
    padding: 70px 20px;
    background: linear-gradient(135deg, #f8f9fb, #eef1f5);
    border-radius: 14px;
    margin-bottom: 60px;
}

.about-hero h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.about-hero h1 span {
    color: var(--primary);
}

.about-hero p {
    max-width: 700px;
    margin: auto;
    line-height: 2;
    opacity: .8;
}


/* sections */

.about-section {
    margin-bottom: 60px;
}

.section-text {
    line-height: 2;
    opacity: .8;
    max-width: 750px;
}


/* features grid */

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-top: 30px;
}


/* cards */

.about-card {
    background: #fff;
    border-radius: 14px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    transition: .3s;
}

.about-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.about-card h3 {
    margin-bottom: 10px;
}

.about-card p {
    opacity: .7;
    font-size: 14px;
}




/* ===== Article Content Fixes ===== */

.article-cover {
    overflow: hidden;
    background: #f3f4f6;
}

.article-cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
}

.article-body {
    color: #1f2937;
    font-size: 16px;
    line-height: 2.25;
}

.article-body h2 {
    margin: 34px 0 16px;
    font-size: 24px;
    line-height: 1.7;
    color: #111827;
}

.article-body h3 {
    margin: 28px 0 12px;
    font-size: 20px;
    line-height: 1.7;
    color: #1f2937;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    margin: 18px 0;
    padding-right: 26px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body strong {
    color: #111827;
    font-weight: 700;
}

.article-body table {
    width: 100%;
    margin: 28px 0;
    border-collapse: collapse;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.article-body thead {
    background: #f8fafc;
}

.article-body th,
.article-body td {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    text-align: right;
    vertical-align: middle;
}

.article-body th {
    color: #111827;
    font-weight: 700;
}

.article-body tbody tr:nth-child(even) {
    background: #fcfcfd;
}

.article-body tbody tr:hover {
    background: #f9fbff;
}

@media (max-width: 768px) {
    .article-body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .article-body th,
    .article-body td {
        min-width: 140px;
    }

    .article-body {
        font-size: 15px;
        line-height: 2.15;
    }

    .article-body h2 {
        font-size: 21px;
    }

    .article-body h3 {
        font-size: 18px;
    }
}


/* ======================
   HOME PAGE REDESIGN
====================== */

.home {
    background: linear-gradient(180deg, rgba(91, 61, 245, 0.06), #F8FAFC 28%);
    padding-bottom: 40px;
}

.home-hero {
    padding: 20px 0 6px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.14), transparent 26%),
        linear-gradient(135deg, #0f172a 0%, #1e1b4b 48%, #312e81 100%);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.18);
}

.hero-slide {
    display: none;
    align-items: center;
    gap: 24px;
    padding: 42px;
    min-height: 380px;
}

.hero-slide.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.hero-slide-copy {
    color: #fff;
}

.hero-slide-copy .hero-kicker {
    display: inline-flex;
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-slide-copy h1 {
    margin: 0 0 14px;
    max-width: 620px;
    line-height: 1.34;
    font-size: 42px;
    letter-spacing: -0.8px;
}

.hero-slide-copy p:not(.hero-kicker) {
    margin: 0;
    max-width: 590px;
    line-height: 2;
    color: #dbeafe;
    font-size: 15px;
}

.hero-slide-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide-visual img {
    width: 100%;
    max-width: 360px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.hero-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-main {
    background: linear-gradient(135deg, #ff6b00, #ff9100);
    color: #fff;
    padding: 14px 22px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 16px 32px rgba(255, 107, 0, 0.35);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 14px;
    padding: 13px 20px;
    text-decoration: none;
    font-weight: 800;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, width .2s ease;
}

.hero-dot.is-active {
    width: 30px;
    background: #fff;
}

.hero-nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 3;
}

.hero-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

.hero-arrow:hover,
.hero-arrow:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.06);
}

.hero-arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Soft entrance for the active slide so each change feels intentional
   rather than an instant swap. */
.hero-slide.is-active {
    animation: hero-slide-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hero-slide-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide.is-active {
        animation: none;
    }
}

.home-articles-section {
    margin: 34px 0;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-title-row h2,
.home-section-head h2 {
    margin: 0;
    font-size: 30px;
}

.home-section-head p {
    margin: 10px 0 0;
    color: var(--muted);
}

.section-title,
.home-section-head {
    margin-bottom: 18px;
}

.section-more-link {
    text-decoration: none;
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
}

.section-more-link:hover {
    background: #0d6efd;
    color: #fff;
}

.home-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.home-article-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.home-article-image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.home-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-article-content {
    padding: 14px;
}

.home-article-category {
    display: inline-flex;
    font-size: 12px;
    text-decoration: none;
    background: #eef6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 10px;
}

.home-article-content h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
}

.home-article-content h3 a {
    text-decoration: none;
}

.home-article-content p {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.95;
    color: var(--muted);
}

.home-section-head {
    margin-top: 28px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
}

.home-products-grid .card {
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.07);
}

.home-products-grid .card-img-wrapper {
    height: 230px;
    flex: 0 0 auto;
}

.home-products-grid .card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.home-products-grid .card h3 {
    height: auto;
    min-height: 58px;
    margin-bottom: 10px;
}

.home-products-grid .card h3 a {
    color: var(--text);
    text-decoration: none;
}

.home-products-grid .card h3 a:hover {
    color: #2563eb;
}

.home-products-grid .card-footer {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
}

.home-products-grid .price {
    display: block;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff7ed;
    color: #ea580c;
    font-size: 16px;
    line-height: 1.5;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
}

.home-products-grid .buy-link {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 11px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    text-align: center;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
    text-decoration: none;
}

.home-products-grid .card:hover .buy-link {
    background: linear-gradient(135deg, #ff6b00, #ff9100);
    color: #fff;
}

.card-rating {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 14px;
}

.badge {
    left: auto;
    right: 14px;
}

@media (max-width: 640px) {
    .home-products-grid {
        grid-template-columns: 1fr;
    }

    .section-title-row,
    .home-section-head {
        gap: 10px;
    }

    .section-title-row h2,
    .home-section-head h2 {
        font-size: 26px;
    }
}

/* ======================
   MOBILE POLISH OVERRIDES
====================== */

@media (max-width: 900px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(14px);
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    }

    .header-inner {
        display: grid !important;
        /* 3 columns: [hamburger] [logo centered] [spacer] — the empty
           spacer mirrors the hamburger's width so the logo sits on the
           true geometric center of the header. */
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        gap: 10px;
        row-gap: 10px;
        width: 100%;
    }

    .site-header .header-inner {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .menu-toggle {
        grid-column: 1;          /* right side in RTL */
        grid-row: 1;
        order: initial;
        margin: 0 !important;
    }

    .site-logo {
        grid-column: 2;          /* centered middle column */
        grid-row: 1;
        order: initial;
        min-width: 0;
        margin: 0 !important;
        justify-self: center;
    }

    .header-search {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        flex: none;
        margin-top: 0;
        border-radius: 18px;
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    }

    .main-nav {
        width: min(84vw, 320px) !important;
        right: -100vw !important;
        border-radius: 22px 0 0 22px;
    }

    .main-nav.active {
        right: 0 !important;
    }

    #search-results {
        left: 0;
        right: 0;
        max-height: min(430px, 70vh);
    }
}

@media (max-width: 640px) {
    body {
        background: #f8fafc;
    }

    /* Mobile gutter: 8px on each side (16px total) across the whole layout.
       Replaces the old min(…, var(--container)) which referenced an
       undefined variable and was therefore ignored. */
    .container {
        width: calc(100% - 16px);
    }

    .logo-text-main {
        font-size: 19px;
    }

    .logo-tagline {
        display: none;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .home-hero {
        margin: 0 0 14px;
        padding: 8px 0 0;
        border-radius: 0;
    }

    .hero-slider {
        border-radius: 20px;
    }

    .hero-slide {
        min-height: 0;
        padding: 20px 18px 46px;
        gap: 14px;
    }

    /* Override the desktop 2-column template for the active slide.
       Desktop uses `.hero-slide.is-active` (0,2,0) for grid-template-columns,
       so the plain `.hero-slide` rule above can't beat it — we must match
       the specificity here; later source order then wins. */
    .hero-slide.is-active {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* On phones lead with the headline, drop the image right under it, then
       the short description and the call-to-action. The copy bundles the
       title + description + buttons in one block, so to slot the image
       between the title and the description we let the copy's children
       "escape" into the slide grid via display:contents and order each one.
       Desktop keeps its 2-column text/image layout untouched. */
    .hero-slide-copy {
        display: contents;
    }

    .hero-slide-copy .hero-kicker {
        order: 1;
        margin: 0;
    }

    .hero-slide-copy h1 {
        order: 2;
        margin: 0;
        font-size: 20px;
        line-height: 1.5;
    }

    .hero-slide-visual {
        order: 3;
    }

    .hero-slide-copy p:not(.hero-kicker) {
        order: 4;
        margin: 0;
        font-size: 12.5px;
        line-height: 1.7;
    }

    .hero-actions {
        order: 5;
        margin: 0;
        flex-direction: row;
        gap: 8px;
    }

    .hero-slide-visual img {
        max-width: 260px;
        width: 100%;
        height: auto;
        border-radius: 16px;
    }

    .hero-nav {
        bottom: 8px;
    }

    .hero-actions a,
    .btn-main,
    .btn-ghost {
        flex: 1 1 0;
        width: auto;
        min-height: 40px;
        border-radius: 12px;
        padding: 9px 12px;
        justify-content: center;
        font-size: 13px;
    }

    .section-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-articles-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .home-article-card,
    .home-products-grid .card,
    .search-product-card,
    .search-article-card {
        border-radius: 20px;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    }

    .home-products-grid .card-img-wrapper {
        height: 205px;
    }

    .home-products-grid .card-content {
        padding: 16px;
    }

    .home-products-grid .card h3 {
        min-height: 0;
        font-size: 16px;
        line-height: 1.7;
    }

    .search-page {
        padding: 22px 0 46px;
    }

    .search-hero {
        padding: 22px 16px;
        border-radius: 20px;
    }

    .search-hero h1 {
        font-size: 24px;
    }

    .search-hero p {
        font-size: 14px;
        line-height: 1.9;
    }

    .search-item {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 10px;
        padding: 9px;
    }

    .search-type {
        grid-column: 2;
        justify-self: start;
    }

    .search-product-content,
    .search-article-content {
        padding: 14px;
    }

    .search-product-btn,
    .search-article-btn {
        width: 100%;
    }
}

/* ======================
   HOMEPAGE APP RESPONSIVE
====================== */

.home {
    overflow-x: hidden;
}

.home-product-section {
    margin-top: 30px;
}

.home-product-section + .home-product-section {
    margin-top: 46px;
}

@media (min-width: 641px) and (max-width: 1100px) {
    .home {
        background:
            radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 36%),
            linear-gradient(180deg, #f8fbff 0%, #f8fafc 45%, #fff 100%);
    }

    .home-hero {
        margin: 10px 16px 24px;
        padding: 54px 0 50px;
        border-radius: 30px;
    }

    .home-hero h1 {
        font-size: clamp(34px, 5vw, 46px);
        max-width: 720px;
    }

    .home-articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .home-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .home-products-grid .card-img-wrapper {
        height: 220px;
    }

    .home-products-grid .card {
        border-radius: 24px;
    }
}

@media (max-width: 640px) {
    .home {
        background:
            radial-gradient(circle at 92% 8%, rgba(79, 70, 229, 0.13), transparent 28%),
            linear-gradient(180deg, #f6f8ff 0%, #f8fafc 38%, #ffffff 100%);
        padding-bottom: 24px;
    }

    .home .container {
        width: calc(100% - 16px);
    }

    .home-articles-section,
    .home-product-section {
        margin-top: 26px;
    }

    .home-product-section + .home-product-section {
        margin-top: 36px;
    }

    .section-title-row,
    .home-section-head {
        position: relative;
        margin-bottom: 14px;
        padding: 0 2px;
    }

    .section-title-row h2,
    .home-section-head h2 {
        font-size: 22px;
        line-height: 1.55;
        letter-spacing: -0.4px;
    }

    .home-section-head p {
        margin-top: 5px;
        font-size: 13px;
        line-height: 1.9;
    }

    .section-more-link {
        padding: 8px 12px;
        font-size: 12px;
    }

    .home-articles-grid {
        display: flex;
        gap: 12px;
        margin-inline: -12px;
        padding: 0 12px 6px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .home-article-card {
        flex: 0 0 82%;
        max-width: 330px;
        border-radius: 22px;
        scroll-snap-align: start;
        border: 1px solid rgba(37, 99, 235, 0.08);
    }

    .home-article-image {
        aspect-ratio: 16 / 9;
    }

    .home-article-content {
        padding: 13px;
    }

    .home-article-content h3 {
        font-size: 15px;
        line-height: 1.75;
    }

    .home-article-content p {
        font-size: 13px;
        line-height: 1.85;
    }

    /* homepage product grid: two clean columns on phones, consistent with /products */
    .home-products-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px;
    }

    .home-products-grid .card {
        display: flex;
        flex-direction: column;
        min-height: 0;
        border-radius: 16px;
        overflow: hidden;
        background: var(--white);
        border: 1px solid rgba(15, 23, 42, 0.06);
        box-shadow: var(--shadow-sm);
        transform: none !important;
    }

    .home-products-grid .card:hover {
        transform: none;
    }

    .home-products-grid .card-img-wrapper {
        width: 100%;
        height: 132px;
        min-height: 0;
        border-radius: 0;
        background: #f1f5f9;
    }

    .home-products-grid .card-img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .home-products-grid .card:hover img {
        transform: none;
    }

    .home-products-grid .card-content {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-width: 0;
        padding: 11px 11px 13px;
        background: transparent;
    }

    .home-products-grid .card h3 {
        min-height: 0;
        margin: 0 0 6px;
        font-size: 12.5px;
        line-height: 1.55;
    }

    .home-products-grid .card h3 a {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card-rating {
        margin-bottom: 9px;
        font-size: 11px;
    }

    .home-products-grid .card-footer {
        margin-top: auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
        padding-top: 9px;
        border-top: 1px solid rgba(15, 23, 42, 0.06);
    }

    .home-products-grid .price {
        padding: 6px 6px;
        border-radius: 11px;
        font-size: 11.5px;
        text-align: center;
    }

    .home-products-grid .buy-link {
        min-height: 36px;
        padding: 7px 6px;
        border-radius: 11px;
        font-size: 11px;
    }

    .badge {
        top: 8px;
        right: 8px;
        left: auto;
        padding: 4px 8px;
        border-radius: 999px;
        font-size: 11px;
        z-index: 2;
    }

    .empty-state {
        border-radius: 22px;
        padding: 24px 16px;
        background: #fff;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    }
}

@media (max-width: 380px) {
    .home .container {
        width: calc(100% - 16px);
    }

    .home-products-grid .card h3 {
        font-size: 12px;
    }

    .hero-slide {
        padding: 14px 12px 40px;
    }

    .hero-slide-copy h1 {
        font-size: 20px;
    }
}


/* ======================
   PRODUCTS PAGE
====================== */
.products-page {
    padding: 26px 0 60px;
}

.products-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff, #f3effe);
    border: 1px solid rgba(91, 61, 245, .10);
    border-radius: 24px;
    padding: 38px;
    margin-bottom: 26px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .06);
}

.products-hero:before {
    content: "";
    position: absolute;
    left: -70px;
    top: -70px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(91, 61, 245, .10);
    z-index: 0;
}

.products-hero:after {
    content: "";
    position: absolute;
    right: -55px;
    bottom: -65px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 107, 0, .08);
    z-index: 0;
}

.products-hero .eyebrow {
    position: relative;
    z-index: 1;
    background: #efeaff;
    color: var(--primary);
}

.products-hero h1 {
    position: relative;
    z-index: 1;
    font-size: 34px;
    line-height: 1.5;
    color: #111827;
    margin: 0 0 10px;
}

.products-hero p {
    position: relative;
    z-index: 1;
    max-width: 680px;
    font-size: 15px;
    line-height: 2;
    color: #64748b;
    margin: 0;
}

.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.products-count {
    font-size: 14px;
    color: var(--muted);
}

.products-count strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}

.products-count .muted {
    color: var(--muted);
}

.products-sort {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.sort-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin-left: 4px;
}

.sort-chip {
    background: #f1f5f9;
    color: var(--text);
    padding: 8px 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: .25s ease;
    white-space: nowrap;
}

.sort-chip:hover {
    background: #e8eaf6;
    color: var(--primary);
}

.sort-chip.active {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 600px) {
    .products-hero {
        padding: 26px 22px;
    }

    .products-hero h1 {
        font-size: 25px;
    }

    .products-toolbar {
        padding: 12px 14px;
    }

    .sort-label {
        width: 100%;
        margin-bottom: 2px;
    }
}
