/* ==========================================================
   فایل واکنش‌گرایی کودک پوش
   Responsive Design

   تنظیمات برای:
   1- دسکتاپ بزرگ (1200px به بالا)
   2- دسکتاپ متوسط (992px تا 1200px)
   3- تبلت (768px تا 992px)
   4- موبایل (480px تا 768px)
   5- موبایل کوچک (کمتر از 480px)

   هدف:
   نمایش صحیح سایت در تمام اندازه‌های صفحه
========================================================== */

/* ==========================================================
   دسکتاپ متوسط
   صفحه‌های کمتر از 1200px
========================================================== */

@media (max-width:1200px) {

    /* کاهش تعداد ستون محصولات */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* دسته‌بندی‌ها */
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* فوتر */
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* ویژگی‌ها (ترین‌ها) */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* مقالات */
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* برندها */
    .brands-slider {
        grid-template-columns: repeat(4, 1fr);
    }

    /* متن اسلایدر */
    .hero-text h1 {
        font-size: clamp(2rem, 4vw, 3rem);
    }

}

/* ==========================================================
   تبلت
   768px تا 1024px
========================================================== */

@media (max-width:1024px) {

    /* ======================================================
       هدر تبلت
    ====================================================== */

    #header {
        height: 80px;
    }

    html {
        scroll-padding-top: 100px;
    }

    body {
        padding-top: 80px;
    }

    /* مخفی شدن منوی اصلی */
    .navbar ul {
        display: none;
    }

    /* نمایش دکمه همبرگری */
    .menu-toggle {
        display: flex;
    }

    /* تنظیم لوگو */
    .logo img {
        width: 50px;
        height: 50px;
    }

    .logo-text strong {
        font-size: 1.4rem;
    }

    .logo-text span {
        display: none;
    }

    /* ======================================================
       اسلایدر تبلت
    ====================================================== */

    .hero {
        padding-top: 130px;
        padding-bottom: 70px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text p {
        margin: 0 auto 35px;
        max-width: 500px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image::before {
        width: 300px;
        height: 300px;
    }

    .hero-image img {
        width: min(100%, 380px);
    }

    .slider-controls {
        position: relative;
        justify-content: center;
        gap: 20px;
        margin-top: 30px;
    }

    .slider-dots {
        position: relative;
        bottom: auto;
        right: auto;
        transform: none;
        justify-content: center;
        margin-top: 20px;
    }

    /* ======================================================
       دسته‌بندی تبلت
    ====================================================== */

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

    /* ======================================================
       محصولات تبلت
    ====================================================== */

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    /* ======================================================
       مقالات تبلت
    ====================================================== */

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    /* ======================================================
       قرعه‌کشی تبلت
    ====================================================== */

    .lottery-box {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px;
        gap: 40px;
    }

    .lottery-users {
        justify-content: center;
    }

    .countdown {
        justify-content: center;
    }

    /* ======================================================
       اقساط تبلت
    ====================================================== */

    .installment-box {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .installment-list li {
        justify-content: center;
    }

    /* ======================================================
       تماس با ما تبلت
    ====================================================== */

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* ======================================================
       فوتر تبلت
    ====================================================== */

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

}

/* ==========================================================
   موبایل
   صفحات کمتر از 768px
========================================================== */

@media (max-width:768px) {

    /* ======================================================
       تنظیمات عمومی موبایل
    ====================================================== */

    body {
        font-size: 14px;
    }

    .container {
        width: 92%;
        padding: 0 10px;
    }

    section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 35px;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .section-header p {
        font-size: .95rem;
    }

    /* ======================================================
       هدر موبایل
    ====================================================== */

    #header {
        height: 70px;
    }

    html {
        scroll-padding-top: 90px;
    }

    body {
        padding-top: 70px;
    }

    .header-container {
        gap: 12px;
    }

    .logo {
        gap: 6px;
    }

    .logo img {
        width: 42px;
        height: 42px;
    }

    .logo-text strong {
        font-size: 1.1rem;
    }

    .logo-text span {
        display: none;
    }

    .header-actions {
        gap: 5px;
    }

    .search-box {
        display: none;
    }

    .icon-btn {
        width: 38px;
        height: 38px;
        font-size: .9rem;
    }

    .icon-btn .badge-count {
        width: 18px;
        height: 18px;
        font-size: .6rem;
        top: -3px;
        left: -3px;
    }

    .menu-toggle {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        display: flex;
    }

    /* منوی موبایل - وقتی باز میشه */
    .navbar ul.active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 0;
        width: 100%;
        background: rgba(255, 255, 255, .98);
        padding: 20px 25px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, .1);
        border-radius: 0 0 20px 20px;
        gap: 12px;
        z-index: 999;
    }

    .navbar ul.active a {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0, 0, 0, .05);
    }

    .navbar ul.active a:last-child {
        border-bottom: none;
    }

    /* ======================================================
       اسلایدر موبایل
    ====================================================== */

    .hero {
        padding-top: 100px;
        padding-bottom: 40px;
    }

    .hero-content {
        gap: 25px;
    }

    .hero-text h1 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    .hero-text p {
        font-size: .9rem;
        margin-bottom: 20px;
        max-width: 100%;
    }

    .hero-buttons {
        gap: 10px;
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        padding: 12px 24px;
        font-size: .95rem;
        width: 100%;
        max-width: 260px;
    }

    .hero-image::before {
        width: 220px;
        height: 220px;
    }

    .hero-image img {
        width: min(100%, 260px);
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .slider-controls {
        gap: 15px;
        margin-top: 20px;
    }

    .slider-dots span {
        width: 10px;
        height: 10px;
    }

    .slider-dots span.active {
        width: 28px;
    }

    /* ======================================================
       دسته‌بندی‌ها در موبایل
    ====================================================== */

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        padding: 18px 10px;
        border-radius: 20px;
    }

    .category-card .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    .category-card h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .category-card span {
        font-size: .75rem;
    }

    /* ======================================================
       محصولات موبایل - یک ستون
    ====================================================== */

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

    .product-card {
        max-width: 360px;
        margin: 0 auto;
        border-radius: 20px;
    }

    .product-image img {
        aspect-ratio: 1/1;
    }

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

    .product-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .product-price .new {
        font-size: 1.1rem;
    }

    .product-footer .btn {
        padding: 10px 16px;
        font-size: .85rem;
    }

    /* ======================================================
       ویژگی‌ها (ترین‌ها) موبایل
    ====================================================== */

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 20px 12px;
        border-radius: 18px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .feature-card h3 {
        font-size: .95rem;
        margin-bottom: 8px;
    }

    .feature-card p {
        font-size: .8rem;
    }

    /* ======================================================
       مقالات موبایل
    ====================================================== */

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

    .article-card {
        max-width: 380px;
        margin: 0 auto;
        border-radius: 20px;
    }

    .article-image img {
        aspect-ratio: 16/9;
        height: auto;
    }

    .article-content {
        padding: 18px 20px;
    }

    .article-content h3 {
        font-size: 1.1rem;
    }

    .article-content p {
        font-size: .9rem;
    }

    .article-date {
        font-size: .75rem;
        padding: 6px 14px;
    }

    /* ======================================================
       FAQ موبایل
    ====================================================== */

    .faq-item {
        border-radius: 16px;
        margin-bottom: 12px;
    }

    .faq-question {
        padding: 14px 18px;
        font-size: .95rem;
        gap: 10px;
    }

    .faq-answer p {
        padding: 0 18px 16px;
        font-size: .9rem;
    }

    /* ======================================================
       قرعه‌کشی موبایل
    ====================================================== */

    .lottery {
        padding: 40px 0;
    }

    .lottery-box {
        padding: 25px 16px;
        border-radius: 20px;
        gap: 30px;
    }

    .lottery-content h2 {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }

    .lottery-content p {
        font-size: .9rem;
        margin-bottom: 20px;
    }

    .lottery-users {
        justify-content: center;
        gap: 8px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .user-chip {
        font-size: .75rem;
        padding: 6px 12px;
    }

    .lottery-content .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
        padding: 12px 20px;
        font-size: .95rem;
    }

    .lottery-image img {
        width: min(100%, 280px);
    }

    /* شمارش معکوس */
    .countdown {
        justify-content: center;
        gap: 8px;
        margin-bottom: 20px !important;
    }

    .count-item {
        min-width: 65px;
        padding: 12px 6px;
        border-radius: 16px;
    }

    .count-item strong {
        font-size: 1.4rem;
    }

    .count-item span {
        font-size: .7rem;
    }

    .lottery-result {
        font-size: 1.1rem;
        padding: 14px;
        margin-top: 15px;
    }

    /* ======================================================
       پرداخت اقساط موبایل
    ====================================================== */

    .installment {
        padding: 40px 0;
    }

    .installment-box {
        gap: 25px;
    }

    .installment-content h2 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }

    .installment-content p {
        font-size: .9rem;
        margin-bottom: 20px;
    }

    .installment-list {
        gap: 10px;
        margin-bottom: 25px;
    }

    .installment-list li {
        gap: 12px;
        font-size: .9rem;
        justify-content: flex-start;
        text-align: right;
    }

    .installment-list i {
        width: 36px;
        height: 36px;
        font-size: .9rem;
        flex-shrink: 0;
    }

    #installmentForm {
        flex-direction: column;
        gap: 10px;
    }

    #installmentForm input {
        width: 100% !important;
        padding: 12px 18px;
        font-size: .9rem;
    }

    #installmentForm .btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .installment-image img {
        width: min(100%, 300px);
    }

    /* ======================================================
       برندها / درگاه‌های پرداخت موبایل
    ====================================================== */

    .brands-slider {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .brand-item {
        height: 80px;
        padding: 10px;
        border-radius: 16px;
    }

    .brand-item img {
        max-width: 70px;
        max-height: 40px;
    }

    /* ======================================================
       تماس با ما موبایل
    ====================================================== */

    .contact {
        padding: 40px 0;
    }

    .contact-wrapper {
        gap: 25px;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .contact-card {
        padding: 16px 18px;
        gap: 12px;
        border-radius: 18px;
    }

    .contact-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        border-radius: 14px;
        flex-shrink: 0;
    }

    .contact-card h3 {
        font-size: .95rem;
        margin-bottom: 3px;
    }

    .contact-card p {
        font-size: .85rem;
    }

    .contact-form {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 12px;
    }

    .form-group {
        gap: 6px;
    }

    .form-group label {
        font-size: .95rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 14px;
        font-size: .9rem;
        border-radius: 12px;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .contact-form .btn {
        padding: 12px;
        font-size: .95rem;
    }

    /* ======================================================
       نقشه موبایل
    ====================================================== */

    .map iframe {
        height: 250px;
        border-radius: 16px;
    }

    /* ======================================================
       فوتر موبایل - یک ستون
    ====================================================== */

    footer {
        padding-top: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .footer-about p {
        text-align: center;
        font-size: .9rem;
        margin: 15px 0;
    }

    .footer-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .footer-links {
        gap: 8px;
    }

    .footer-links a {
        font-size: .9rem;
        text-align: center;
    }

    .footer-links a:hover {
        padding-right: 0;
    }

    .social-links {
        justify-content: center;
        margin-top: 12px;
        gap: 10px;
    }

    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .trust-badges {
        justify-content: center;
        margin-top: 12px;
        gap: 12px;
    }

    .trust-badges img {
        width: 60px;
        height: 60px;
        padding: 8px;
        border-radius: 14px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        margin-top: 30px;
        padding: 16px 0;
    }

    .footer-bottom p {
        font-size: .8rem;
    }

    .footer-bottom-links {
        justify-content: center;
        gap: 12px;
    }

    .footer-bottom-links a {
        font-size: .8rem;
    }

    /* ======================================================
       دکمه بازگشت به بالا موبایل
    ====================================================== */

    .back-to-top {
        width: 44px;
        height: 44px;
        left: 12px;
        bottom: 12px;
        font-size: 1.1rem;
    }

    /* ======================================================
       مودال موبایل
    ====================================================== */

    .modal-content {
        width: 95%;
        margin: 30px auto;
        padding: 20px 16px;
        border-radius: 20px;
    }

    .modal-content h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }

    .modal-content input {
        padding: 10px 14px;
        font-size: .9rem;
        border-radius: 12px;
        margin-bottom: 10px;
    }

    .modal-content .btn {
        padding: 12px;
        font-size: .95rem;
    }

    /* ======================================================
       اعلان (Toast) موبایل
    ====================================================== */

    .toast {
        right: 12px;
        left: 12px;
        bottom: 12px;
        max-width: 100%;
        padding: 12px 16px;
        font-size: .85rem;
        text-align: center;
        border-radius: 12px;
    }

    /* ======================================================
       لودر موبایل
    ====================================================== */

    .loader-logo svg {
        width: 80px;
        height: 80px;
    }

    .loader-box h2 {
        font-size: 1.8rem;
    }

    .loading-bar {
        width: 180px;
        height: 8px;
    }

}

/* ==========================================================
   موبایل کوچک
   صفحات کمتر از 480px
========================================================== */

@media (max-width:480px) {

    /* هدر موبایل کوچک */
    #header {
        height: 62px;
    }

    html {
        scroll-padding-top: 80px;
    }

    body {
        padding-top: 62px;
    }

    .logo img {
        width: 36px;
        height: 36px;
    }

    .logo-text strong {
        font-size: .95rem;
    }

    .icon-btn {
        width: 34px;
        height: 34px;
        font-size: .8rem;
    }

    .icon-btn .badge-count {
        width: 16px;
        height: 16px;
        font-size: .55rem;
        top: -4px;
        left: -4px;
    }

    .menu-toggle {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .header-actions {
        gap: 4px;
    }

    /* اسلایدر موبایل کوچک */
    .hero {
        padding-top: 90px;
        padding-bottom: 30px;
    }

    .hero-text h1 {
        font-size: 1.3rem;
    }

    .hero-text p {
        font-size: .85rem;
    }

    .hero-image::before {
        width: 180px;
        height: 180px;
    }

    .hero-image img {
        width: min(100%, 220px);
    }

    .slider-btn {
        width: 34px;
        height: 34px;
        font-size: .8rem;
    }

    .hero-buttons .btn {
        padding: 10px 18px;
        font-size: .85rem;
        max-width: 200px;
    }

    /* دسته‌بندی موبایل کوچک */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .category-card {
        padding: 12px 6px;
        border-radius: 16px;
    }

    .category-card .feature-icon {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .category-card h3 {
        font-size: .85rem;
    }

    .category-card span {
        font-size: .65rem;
    }

    /* محصولات موبایل کوچک */
    .products-grid {
        gap: 14px;
    }

    .product-card {
        max-width: 100%;
        border-radius: 16px;
    }

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

    .product-title {
        font-size: .95rem;
    }

    .product-price .new {
        font-size: .95rem;
    }

    .product-price .old {
        font-size: .8rem;
    }

    .product-footer .btn {
        padding: 8px 12px;
        font-size: .8rem;
    }

    /* ویژگی‌ها موبایل کوچک */
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .feature-card {
        padding: 14px 8px;
        border-radius: 14px;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .feature-card h3 {
        font-size: .8rem;
    }

    .feature-card p {
        font-size: .7rem;
    }

    /* مقالات موبایل کوچک */
    .article-card {
        border-radius: 16px;
    }

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

    .article-content h3 {
        font-size: 1rem;
    }

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

    /* قرعه‌کشی موبایل کوچک */
    .lottery-box {
        padding: 18px 12px;
        border-radius: 16px;
    }

    .lottery-content h2 {
        font-size: 1.3rem;
    }

    .count-item {
        min-width: 52px;
        padding: 8px 4px;
    }

    .count-item strong {
        font-size: 1.1rem;
    }

    .count-item span {
        font-size: .6rem;
    }

    /* برندها موبایل کوچک */
    .brands-slider {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .brand-item {
        height: 65px;
        padding: 8px;
        border-radius: 12px;
    }

    .brand-item img {
        max-width: 55px;
        max-height: 30px;
    }

    /* تماس موبایل کوچک */
    .contact-card {
        padding: 12px 14px;
        gap: 10px;
        border-radius: 14px;
    }

    .contact-icon {
        width: 38px;
        height: 38px;
        font-size: .9rem;
        border-radius: 10px;
    }

    .contact-card h3 {
        font-size: .85rem;
    }

    .contact-card p {
        font-size: .75rem;
    }

    .contact-form {
        padding: 16px 12px;
        border-radius: 16px;
    }

    /* فوتر موبایل کوچک */
    .footer-grid {
        gap: 18px;
    }

    .footer-title {
        font-size: 1rem;
    }

    .footer-links a {
        font-size: .8rem;
    }

    .social-links a {
        width: 34px;
        height: 34px;
        font-size: .85rem;
    }

    .trust-badges img {
        width: 50px;
        height: 50px;
        padding: 6px;
    }

    .footer-bottom p {
        font-size: .7rem;
    }

    .footer-bottom-links a {
        font-size: .7rem;
    }

    /* دکمه بازگشت */
    .back-to-top {
        width: 38px;
        height: 38px;
        left: 8px;
        bottom: 8px;
        font-size: .9rem;
    }

    /* مودال */
    .modal-content {
        padding: 16px 12px;
        border-radius: 16px;
    }

    .modal-content h2 {
        font-size: 1.2rem;
    }

    .modal-content input {
        padding: 8px 12px;
        font-size: .85rem;
    }

    /* اعلان */
    .toast {
        padding: 10px 12px;
        font-size: .8rem;
        bottom: 8px;
        right: 8px;
        left: 8px;
    }

}
/* ==========================================================
   واکنش‌گرایی نهایی پوسته جدید کودک‌پوش
========================================================== */
@media (max-width:1100px){
    .categories-grid{grid-template-columns:repeat(3,1fr)!important;}
    .hero-content{padding-inline:40px;}
    .hero-image img{height:380px;}
}
@media (max-width:768px){
    .hero{padding:24px 0 45px;}
    .hero-slider{border-radius:28px;}
    .hero-content{padding:30px 22px 35px;min-height:auto;gap:10px;}
    .hero-text{order:1;text-align:center;}
    .hero-image{order:2;min-height:290px;}
    .hero-image img{height:300px;width:min(100%,300px);}
    .hero-text h1{font-size:2rem!important;}
    .hero-text p{font-size:.9rem;line-height:1.9;}
    .hero-decor img{width:300px;right:-90px;top:-100px;}
    .categories-grid{grid-template-columns:repeat(2,1fr)!important;gap:12px!important;}
    .category-image{height:130px;}
    .category-image img{height:140px;}
    .category-card h3{font-size:1.1rem;}
    .footer-visual{width:260px;height:115px;opacity:.7;}
    #footer .footer-grid{padding-bottom:130px;}
    .header-search-panel{position:fixed;top:75px;left:50%;right:auto;transform:translateX(-50%) translateY(-10px);width:92vw;max-width:360px;}
    .header-search.active .header-search-panel{transform:translateX(-50%) translateY(0);}
}
@media (max-width:480px){
    .hero-content{padding:24px 14px 28px;}
    .hero-text h1{font-size:1.7rem!important;}
    .hero-image{min-height:240px;}
    .hero-image img{height:245px;}
    .category-image{height:105px;}
    .category-image img{height:112px;}
    .category-card{padding:10px 7px 15px!important;}
    .category-card h3{font-size:.95rem;}
    .category-card span{font-size:.7rem;}
    .footer-visual{width:210px;height:90px;left:-15px;opacity:.6;}
    #footer .footer-grid{padding-bottom:105px;}
}



/* ==========================================================
   اصلاحات نهایی واکنش‌گرایی موبایل - کودک‌پوش
========================================================== */

/* اطمینان از padding-top body برای هدر fixed */
@media (max-width: 1024px) {
    body {
        padding-top: 80px;
    }
    html {
        scroll-padding-top: 100px;
    }
    #header {
        height: 80px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        width: 100%;
    }
    .header-container {
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .navbar ul {
        display: none;
    }
    .menu-toggle {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
        background-attachment: scroll !important;
        font-size: 14px;
    }
    html {
        scroll-padding-top: 90px;
    }
    #header {
        height: 70px;
    }
    .header-container {
        height: 70px;
    }

    /* هیرو موبایل بهتر */
    .hero {
        padding: 20px 0 40px !important;
        margin-top: 0;
    }
    .hero-slider {
        border-radius: 24px !important;
    }
    .hero-content {
        grid-template-columns: 1fr !important;
        padding: 28px 18px !important;
        min-height: auto !important;
        gap: 16px !important;
        text-align: center;
    }
    .hero-text {
        order: 1;
        text-align: center;
    }
    .hero-image {
        order: 2;
        min-height: 260px !important;
    }
    .hero-image img {
        width: min(100%, 280px) !important;
        height: auto !important;
        max-height: 280px;
    }
    .hero-text h1 {
        font-size: 1.7rem !important;
        line-height: 1.35;
    }
    .hero-text p {
        font-size: 0.9rem !important;
        margin: 0 auto 18px;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .hero-buttons .btn {
        width: 100%;
        max-width: 260px;
        justify-content: center;
    }
    .slider-controls {
        position: relative !important;
        margin-top: 16px;
        bottom: auto !important;
    }

    /* دسته‌بندی */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .category-card {
        padding: 14px 8px 18px !important;
    }
    .category-image {
        height: 120px !important;
    }
    .category-image img {
        height: 130px !important;
        max-width: 100%;
        object-fit: contain;
    }
    .category-card h3 {
        font-size: 1rem !important;
    }

    /* محصولات */
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .product-card {
        max-width: 340px;
        margin: 0 auto;
    }
    .products-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 0 10px;
    }
    .category-filter {
        justify-content: center;
        gap: 6px;
    }
    .category-filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .sort-select {
        width: 100%;
    }

    /* ترین‌ها */
    .features-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .feature-card {
        padding: 16px 10px !important;
    }

    /* مقالات */
    .articles-grid {
        grid-template-columns: 1fr !important;
        gap: 18px;
    }
    .article-card {
        max-width: 380px;
        margin: 0 auto;
    }

    /* قرعه‌کشی و اقساط */
    .lottery-box,
    .installment-box {
        grid-template-columns: 1fr !important;
        padding: 24px 16px !important;
        gap: 24px !important;
        text-align: center;
    }
    .countdown {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    .count-item {
        min-width: 60px;
        padding: 10px 6px;
    }

    /* ارسال */
    .shipping-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
    }

    /* نظرات */
    .review-main-card {
        grid-template-columns: 1fr !important;
        padding: 16px 12px !important;
        gap: 20px;
    }
    .review-form-row {
        grid-template-columns: 1fr !important;
    }

    /* فوتر */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        text-align: center;
        padding-bottom: 160px !important;
    }
    .footer-visual {
        height: 150px !important;
    }
    #footer::before {
        height: 30px;
    }
    .footer-links,
    .social-links,
    .trust-grid,
    .footer-social {
        justify-content: center;
        align-items: center;
    }
    .footer-about p {
        margin-inline: auto;
    }

    /* جستجو موبایل */
    .header-search-panel {
        position: fixed !important;
        top: 78px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) translateY(-8px) !important;
        width: 92vw !important;
        max-width: 360px !important;
        z-index: 1100;
    }
    .header-search.active .header-search-panel {
        transform: translateX(-50%) translateY(0) !important;
        opacity: 1;
        visibility: visible;
    }

    /* منوی موبایل */
    .navbar ul.active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 0;
        left: 0;
        width: 100%;
        background: rgba(255,255,255,0.98);
        padding: 16px 20px;
        box-shadow: 0 16px 32px rgba(0,0,0,0.1);
        border-radius: 0 0 16px 16px;
        gap: 4px;
        z-index: 999;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 62px;
    }
    html {
        scroll-padding-top: 80px;
    }
    #header {
        height: 62px;
    }
    .header-container {
        height: 62px;
        gap: 6px;
    }
    .logo img {
        width: 36px !important;
        height: 36px !important;
    }
    .logo-text strong {
        font-size: 0.9rem !important;
    }
    .icon-btn, .menu-toggle {
        width: 34px !important;
        height: 34px !important;
        font-size: 0.85rem;
    }
    .login-btn {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
    }

    .hero-text h1 {
        font-size: 1.45rem !important;
    }
    .hero-image img {
        max-height: 220px !important;
    }
    .categories-grid {
        gap: 8px !important;
    }
    .category-image {
        height: 100px !important;
    }
    .category-image img {
        height: 105px !important;
    }
    .category-card h3 {
        font-size: 0.9rem !important;
    }
    .product-card {
        max-width: 100%;
    }
    .features-grid {
        gap: 8px !important;
    }
    .shipping-grid {
        grid-template-columns: 1fr !important;
    }
    .count-item {
        min-width: 50px;
        padding: 8px 4px;
    }
    .count-item strong {
        font-size: 1.15rem;
    }
    .footer-visual {
        height: 120px !important;
    }
    #footer .footer-grid {
        padding-bottom: 130px !important;
    }
    .navbar ul.active {
        top: 62px;
    }
}


/* ==========================================================
   اصلاح مشکل وسط‌چین نبودن و فضای خالی سمت چپ در موبایل
   (overflow افقی + محدود کردن المان‌های تزئینی)
========================================================== */

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
}

/* جلوگیری از بیرون‌زدگی المان‌های تزئینی و مطلق */
.hero,
.hero-slider,
#footer,
section {
    overflow-x: hidden;
    max-width: 100%;
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
    }

    /* مخفی کردن کامل تزئینات بزرگ که باعث اسکرول افقی می‌شوند */
    .hero-decor,
    .hero-decor img {
        display: none !important;
    }

    .hero::before,
    .hero::after {
        display: none !important;
    }

    .hero-slider {
        overflow: hidden !important;
        max-width: 100% !important;
        margin-inline: 0 !important;
    }

    .hero-content {
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box;
    }

    .hero-image img {
        max-width: 100% !important;
    }

    /* هدر هم نباید بیرون بزند */
    #header,
    .header-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* فوتر */
    #footer,
    .footer-visual {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .footer-visual img {
        max-width: 100%;
        object-fit: cover;
    }

    /* هر المان مطلق که ممکن است بیرون بزند */
    .slider-controls {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* محصولات و کارت‌ها وسط */
    .products-grid,
    .categories-grid,
    .articles-grid,
    .features-grid,
    .shipping-grid {
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
        box-sizing: border-box;
    }

    .product-card,
    .article-card,
    .category-card {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}


/* ==========================================================
   اصلاح نهایی بخش ویژگی‌ها (.features) برای موبایل
   ========================================================== */
@media (max-width: 768px) {
    .features {
        width: 100%;
        overflow: hidden;
    }

    .features .container {
        width: 100%;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

    .features-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-inline: auto !important;
        box-sizing: border-box;
    }

    .features-grid > * {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .feature-card {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 16px 8px !important;
        text-align: center;
        overflow: hidden;
    }

    .feature-card h3,
    .feature-card p {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .feature-card h3 {
        font-size: .9rem !important;
        line-height: 1.6;
    }

    .feature-card p {
        font-size: .75rem !important;
        line-height: 1.7;
    }

    .feature-icon {
        margin-inline: auto;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .feature-card {
        padding: 13px 6px !important;
        border-radius: 14px;
    }

    .feature-icon {
        width: 46px !important;
        height: 46px !important;
        font-size: 1.15rem !important;
        margin-bottom: 7px !important;
    }

    .feature-card h3 {
        font-size: .78rem !important;
    }

    .feature-card p {
        font-size: .68rem !important;
    }
}
