/* =====================================================
   XXL
   ≥ 1400px
===================================================== */
@media (min-width: 1400px) {
    .special-product-card {
        height: 215px;
    }

    .product-image-wrapper {
        height: 120px;
    }

    .brand-card {
        height: 135px;
    }

    .brand-logo {
        height: 70px;
    }

    .brands-all-btn {
        width: 180px;
    }

    .brand-item {
        height: 82px;
        padding: 14px 20px;
    }

    .brand-item img {
        max-width: 110px;
        height: 48px;
    }

    .magazine-image-wrapper {
        height: 190px;
    }

    .magazine-content {
        min-height: 135px;
        padding: 18px 20px 16px;
    }

    .magazine-card-title {
        font-size: 14px;
    }

    .homino-footer-main {
        padding-top: 45px;
        padding-bottom: 40px;
    }

    .footer-column {
        padding-right: 32px;
        padding-left: 32px;
    }

    .footer-title {
        font-size: 16px;
        margin-bottom: 21px;
    }

    .footer-links a {
        font-size: 12px;
    }

    .footer-about-text {
        font-size: 12px;
    }
}

/* =====================================================
   XL
   1200px - 1399px
===================================================== */
@media (max-width: 1399.98px) {
    .brands-layout {
        gap: 20px !important;
    }

    .brands-all-btn {
        width: 160px;
    }

    .brand-item {
        padding: 10px 12px;
    }

    .brand-item img {
        max-width: 95px;
    }

    .magazine-image-wrapper {
        height: 170px;
    }

    .footer-column {
        padding-right: 22px;
        padding-left: 22px;
    }
}

/* ==========================
   1200px
========================== */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }

    .header-main {
        gap: 20px;
    }

    .main-nav ul {
        gap: 22px;
    }

    .category-grid {
        gap: 10px;
    }

    .special-product {
        flex: 0 0 20%;
    }

    .brands-layout {
        gap: 15px !important;
    }

    .brands-all-btn {
        width: 145px;
    }

    .brand-item {
        height: 70px;
        padding: 8px 10px;
    }

    .brand-item img {
        max-width: 85px;
        height: 40px;
    }

    .magazine-image-wrapper {
        height: 155px;
    }

    .magazine-content {
        min-height: 125px;
        padding: 15px;
    }

    .magazine-card-title {
        font-size: 13px;
    }

    .homino-footer-main {
        padding-top: 35px;
        padding-bottom: 32px;
    }

    .footer-column {
        padding-right: 18px;
        padding-left: 18px;
    }

    .footer-title {
        font-size: 14px;
    }

    .footer-links {
        gap: 9px;
    }

    .footer-links a {
        font-size: 11px;
    }

    .footer-about-text {
        font-size: 11px;
        line-height: 2;
    }

    .footer-contact-list a,
    .footer-contact-item {
        font-size: 10px;
    }
}

/* ==========================
   992px
========================== */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }

    .header-main {
        height: 70px;
    }

    .header-actions {
        gap: 10px;
    }

    .header-action span {
        display: none;
    }

    .main-nav ul {
        gap: 13px;
    }

    .main-nav a {
        font-size: 12px;
    }

    .hero-grid {
        grid-template-columns: 74% 26%;
    }

    .hero-image {
        background-size: contain;
    }

    .hero h1 {
        font-size: 25px;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .special-product {
        flex: 0 0 25%;
    }

    .special-product-card {
        height: 210px;
    }

    .product-image-wrapper {
        height: 115px;
    }

    /*
       دکمه می‌رود بالای لیست
    */
    .brands-layout {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .brands-all-btn {
        width: 100%;
        height: 40px;
    }

    .brands-list {
        flex-wrap: wrap;
    }

    .brand-item {
        flex: 0 0 25%;
        height: 75px;
    }

    /*
       حذف خط‌های انتهای هر ردیف
    */
    .brand-item:nth-child(4)::after,
    .brand-item:nth-child(8)::after {
        display: none;
    }

    .magazine-title {
        font-size: 20px;
    }

    .magazine-title::before {
        height: 23px;
    }

    .magazine-image-wrapper {
        height: 170px;
    }

    .magazine-content {
        min-height: 125px;
    }

    /* newsletter section */
    .newsletter-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }

    .newsletter-form {
        width: 90%;
        margin: 0 auto;
    }

    .newsletter-info {
        justify-content: center;
        padding: 0;
    }

    .homino-footer-main {
        grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
        grid-template-rows: 1fr 0.5fr;
        padding-top: 32px;
        padding-bottom: 25px;
    }

    .footer-about {
        grid-column: 1 / -1;
    }

    .footer-column {
        margin-bottom: 25px;
        padding-right: 22px;
        padding-left: 22px;
    }

    /*چون layout دو ستونه می‌شود، جداکننده‌های عمودی را حذف می‌کنیم.*/
    .footer-column::after {
        display: none;
    }

    /*
       به جای آن جداکننده افقی
    */
    .footer-column:nth-child(n + 3)::before,
    .footer-column:nth-child(2)::before {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        width: 1px;
        background-color: rgba(255, 255, 255, .10);
    }

    .footer-column:nth-child(5)::before {
        content: "";
        position: absolute;
        background-color: rgba(255, 255, 255, .10);
        height: 1px;
        width: 100%;
        top: -12px;
    }


    .footer-about-text {
        max-width: 100%;
    }
}

/* ==========================
   768px
========================== */
@media (max-width: 767.98px) {
    .container {
        max-width: 100%;
        padding-left: 18px;
        padding-right: 18px;
    }

    .topbar {
        font-size: 9px;
    }

    .header-main {
        height: auto;
        padding: 12px 0;
        flex-wrap: wrap;
    }

    .logo {
        order: 1;
    }

    .header-actions {
        order: 2;
    }

    .search-box {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .header-action span {
        display: inline-block;
    }

    .main-nav {
        overflow-x: auto;
    }

    .main-nav ul {
        width: max-content;
    }

    .hero-grid {
        grid-template-columns: auto max-content;
        min-height: 375px;
    }

    .hero-text {
        padding: 40px 25px;
        min-height: 250px;
    }

    .hero-image {
        background-size: cover;
        min-height: 250px;
    }

    .banner-grid {
        grid-template-columns: 1fr;
    }

    .banner-large {
        height: 300px;
    }

    .services .row>div {
        border-bottom: 1px solid var(--border-light);
    }

    .special-offers-title {
        font-size: 19px;
    }

    .special-product {
        flex: 0 0 33.333333%;
    }

    .special-product-card {
        height: 205px;
    }

    .product-image-wrapper {
        height: 110px;
    }

    .special-slider-btn {
        width: 30px;
        height: 30px;
    }

    .brands-section {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .brand-item {
        flex: 0 0 25%;
        height: 70px;
        padding: 8px;
    }

    .brand-item img {
        max-width: 80px;
        height: 38px;
    }

    .magazine-header {
        margin-bottom: 18px !important;
    }

    .magazine-title {
        font-size: 18px;
    }


    .magazine-image-wrapper {
        height: 175px;
    }

    /* newsletter section */
    .newsletter-wrapper {
        padding: 25px;
        gap: 25px;
    }

    .newsletter-icon {
        width: 90px;
        height: 90px;
        flex-basis: 90px;
        font-size: 42px;
    }

    .newsletter-text h3 {
        font-size: 1.25rem;
    }

    .newsletter-form {}

    .homino-footer-main {

        padding-top: 30px;
        padding-bottom: 15px;
    }

    .footer-column {
        min-height: auto;
        margin-bottom: 30px;
        padding-right: 15px;
        padding-left: 15px;
    }

    .footer-title {
        margin-bottom: 15px;
        font-size: 14px;
    }

    .footer-links {
        gap: 8px;
    }

    .footer-links a {
        font-size: 11px;
    }

    .footer-about-text {
        font-size: 11px;
        line-height: 2.1;
    }

    .footer-socials {
        margin-top: 16px;
    }

    .footer-bottom-content {
        min-height: 55px;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 8px 0;
        text-align: center;
        font-size: 9px;
    }
}

/* ==========================
   576px
========================== */
@media (max-width: 575.98px) {
    .header-main {
        display: grid;
        grid-template-columns: 45px 45px 1fr 100px;
        gap: 10px;
    }

    .menu-toggle {
        order: 0;
        display: flex;
        flex-basis: 45px;
    }

    .mobile-menu {
        width: 88vw;
    }

    .logo {
        justify-content: center;
        min-width: 80%;
        order: 2;
    }

    .logo img {
        display: none;
    }

    .logo-text {
        text-align: center;
    }

    .search-box {
        flex: 0;
        flex-basis: 45px;
        min-width: 45px;
        height: 45px;
        background-color: var(--bg-light);
        order: 1;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 8px;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
        -ms-border-radius: 8px;
        -o-border-radius: 8px;
    }

    .search-box input {
        display: none;
    }

    .search-box svg {
        color: var(--primary) !important;
    }

    .header-action {
        width: 45px;
        height: 45px;
        background-color: var(--bg-light);
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 8px;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
        -ms-border-radius: 8px;
        -o-border-radius: 8px;
    }

    .support-header {
        display: none;
    }

    .header-action svg {
        font-size: 28px;
        color: var(--primary);
    }

    .header-action span {
        display: none;
    }

    .tel {
        display: none;
    }

    .cart {
        height: 45px;
        width: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--bg-light);
        border-radius: 8px;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
        -ms-border-radius: 8px;
        -o-border-radius: 8px;
    }

    .cart svg {
        font-size: 21px;
        color: var(--primary);
    }

    .cart-count {
        top: 2px;
        right: 5px;
    }

    .main-nav {
        display: none;
    }

    .hero-content {
        min-height: 345px;
    }

    .hero-grid {
        min-height: 305px;
        grid-template-columns: 1fr;
        position: relative;
    }

    .hero-image::after {
        top: -100%;
        background: linear-gradient(to bottom, transparent 45%, #F1F4F8 100%);
    }

    .hero-text {
        position: absolute;
        top: 15%;
        
        padding: 20px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-image {
        height: 120px;
    }

    .service-item {
        min-height: 65px;
    }

    .service-item>i {
        font-size: 19px;
    }

    .service-item strong {
        font-size: 9px;
    }

    .service-item small {
        font-size: 7px;
    }

    .section {
        padding: 25px 0;
    }

    .section-header h2 {
        font-size: 15px;
    }

    .hero h1 {
        font-size: 23px;
    }

    .special-offers {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .special-offers-header {
        margin-bottom: 12px !important;
    }

    .special-offers-title {
        font-size: 17px;
    }

    .special-offers-title::before {
        width: 3px;
        height: 20px;
    }

    .special-offers-more {
        min-width: 82px;
        height: 31px;
        padding: 0 10px;
        font-size: 10px;
    }

    .special-product {
        flex: 0 0 50%;
    }

    .special-product-card {
        height: 200px;
    }

    .product-image-wrapper {
        height: 105px;
    }

    .product-content {
        padding: 6px 10px 9px;
    }

    .product-title {
        font-size: 10px;
    }

    .product-title span {
        font-size: 8px;
    }

    .product-price strong {
        font-size: 10px;
    }

    .product-old-price {
        font-size: 7px;
    }

    .brands-box {
        border-radius: var(--radius-sm);
    }

    .brands-all-btn {
        height: 38px;
        border-radius: var(--radius-sm);
    }

    /*
       2 برند در هر ردیف
    */
    .brand-item {
        flex: 0 0 50%;
        height: 72px;
    }

    .brand-item img {
        max-width: 95px;
        height: 40px;
    }

    /*
       خط بین دو ستون
    */
    .brand-item:nth-child(2n)::after {
        display: none;
    }

    .magazine-section {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .magazine-title::before {
        width: 3px;
        height: 20px;
    }

    .magazine-image-wrapper {
        height: 190px;
    }

    .magazine-content {
        min-height: 120px;
        padding: 14px;
    }

    .magazine-card-title {
        font-size: 12px;
        line-height: 1.9;
    }

    .magazine-date {
        font-size: 9px;
    }

    /* news letter section */
    .newsletter-wrapper {
        padding: 25px 20px;
        border-radius: 16px;
        text-align: center;
    }

    .newsletter-info {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-icon {
        width: 75px;
        height: 75px;
        flex-basis: 75px;
        font-size: 38px;
    }

    .newsletter-text h3 {
        font-size: 1.2rem;
    }

    .newsletter-text p {
        font-size: 0.8rem;
    }

    .newsletter-form {
        font-size: 14px;
        width: 95%;
        margin: 0 auto;
        height: fit-content;
    }

    .newsletter-input {
        height: 45px;
        width: inherit;
    }

    .newsletter-btn {
        height: 45px;
        min-width: 80px;
    }

    .newsletter-input::placeholder {
        font-size: 14px;
    }

    .homino-footer-main {
        grid-template-columns: 1fr 1fr;
        padding-top: 28px;
        padding-bottom: 5px;
    }

    .footer-column {
        padding-right: 20px;
        padding-left: 10px;
        margin-bottom: 28px;
    }

    .footer-title {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .footer-links a {
        font-size: 11px;
    }

    .footer-contact-list {
        gap: 10px;
    }

    .footer-contact-list a,
    .footer-contact-item {
        font-size: 10px;
    }

    .footer-social {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
}

/* =========================================================
   XS — Mobile
   ========================================================= */
@media (max-width: 400px) {
    .special-product {
        flex: 0 0 100%;
    }

    .special-product-card {
        height: 215px;
    }

    .product-image-wrapper {
        height: 120px;
    }

    .product-title {
        font-size: 11px;
    }

    .product-title span {
        font-size: 9px;
    }

    .brand-item {
        height: 68px;
    }

    .brand-item img {
        max-width: 85px;
        height: 36px;
    }

    .magazine-header {
        align-items: center;
    }


    .magazine-image-wrapper {
        height: 180px;
    }
}

/* =========================================================
   Very Small Screens
   ========================================================= */
@media (max-width: 340px) {
    .special-slider-btn {
        width: 27px;
        height: 27px;
        font-size: 10px;
    }

    .special-slider-prev {
        right: -4px;
    }

    .special-slider-next {
        left: -4px;
    }
}