/* ============================================================
   Mobile Overrides — Shop Frontend
   Loaded AFTER shop-custom.css to win specificity where needed.
   Breakpoints: 991 / 767 / 575 / 360
   ============================================================ */

/* -------- Global -------- */
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }
.img-responsive { max-width: 100%; height: auto; display: block; }

/* Accessible touch targets */
.btn, .button, button, a.button, .qty-btn,
.quantity input, .add-to-cart, .checkout-btn,
.pagination a, .pagination span {
    min-height: 44px;
}

/* Prevent iOS zoom on form focus */
@media (max-width: 767px) {
    input[type="text"], input[type="email"], input[type="tel"],
    input[type="password"], input[type="number"], input[type="search"],
    select, textarea {
        font-size: 16px !important;
    }
}

/* -------- Standalone MOBILE HEADER (mobile-first, self-contained) -------- */
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    direction: rtl;
}
.mobile-header .mh-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    min-height: 56px;
}
.mobile-header .mh-logo {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}
.mobile-header .mh-logo img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}
.mobile-header .mh-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}
.mobile-header .mh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f4f6f8;
    color: #222;
    border: 0;
    padding: 0;
    text-decoration: none;
    font-size: 22px;
    line-height: 1;
    position: relative;
    cursor: pointer;
    transition: background .15s;
}
.mobile-header .mh-btn:hover,
.mobile-header .mh-btn:active { background: #e9edf1; color: #000; }
.mobile-header .mh-btn i { font-size: 22px; line-height: 1; }

/* Hamburger lines */
.mobile-header .mh-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #222;
    border-radius: 2px;
    margin: 2px 0;
}

/* Cart badge */
.mobile-header .mh-badge {
    position: absolute;
    top: -2px;
    left: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #5bb300;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

/* Search dropdown */
.mobile-header .mh-search {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
    background: #fff;
    border-top: 1px solid #eee;
}
.mobile-header .mh-search.open { max-height: 80px; }
.mobile-header .mh-search form {
    display: flex;
    padding: 8px 12px;
    gap: 8px;
}
.mobile-header .mh-search input {
    flex: 1;
    height: 42px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    background: #fafafa;
}
.mobile-header .mh-search button {
    width: 44px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: #5bb300;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* Overlay */
.mobile-header .mh-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
    z-index: 1050;
}
.mobile-header .mh-overlay.open { opacity: 1; visibility: visible; }

/* Drawer */
.mobile-header .mh-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(86vw, 320px);
    height: 100%;
    background: #fff;
    z-index: 1060;
    transform: translateX(100%);
    transition: transform .28s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,.12);
    overflow: hidden;
}
.mobile-header .mh-drawer.open { transform: translateX(0); }

.mobile-header .mh-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #5bb300;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}
.mobile-header .mh-drawer-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
}

.mobile-header .mh-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mobile-header .mh-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-header .mh-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    color: #222;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f2f2f2;
    min-height: 48px;
}
.mobile-header .mh-nav > ul > li > a:hover,
.mobile-header .mh-nav > ul > li > a:active {
    background: #f7fafc;
    color: #5bb300;
}
.mobile-header .mh-nav > ul > li > a i {
    font-size: 18px;
    color: #888;
    width: 22px;
    text-align: center;
}
.mobile-header .mh-nav .mh-caret {
    margin-right: auto;
    color: #999;
    font-size: 14px;
    transition: transform .2s;
}
.mobile-header .mh-nav .has-sub.open > a .mh-caret { transform: rotate(180deg); }
.mobile-header .mh-nav .has-sub > ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    background: #fafbfc;
}
.mobile-header .mh-nav .has-sub.open > ul { max-height: 60vh; overflow-y: auto; }
.mobile-header .mh-nav .has-sub > ul > li > a {
    display: block;
    padding: 12px 40px;
    color: #444;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px dashed #eee;
}
.mobile-header .mh-nav .mh-sep {
    height: 8px;
    background: #f4f6f8;
    padding: 0;
    border: 0;
}

.mobile-header .mh-drawer-foot {
    padding: 12px 16px;
    background: #f7fafc;
    border-top: 1px solid #eee;
}
.mobile-header .mh-drawer-foot a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #5bb300;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    direction: ltr;
    justify-content: flex-end;
}
.mobile-header .mh-drawer-foot a i { font-size: 18px; }

/* Prevent body scroll when drawer open */
body:has(.mobile-header .mh-drawer.open) { overflow: hidden; }

/* -------- Product grid tiles -------- */
@media (max-width: 767px) {
    .product-image,
    .img-block,
    .single-product-wrap .product-image {
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }
    .product-image img,
    .img-block img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }
    .product-content-2 h4 a,
    .product-content h4 a { font-size: 14px; line-height: 1.4; }
    .price-2 .new-price, .price .new-price { font-size: 14px; }
    .price-2 .old-price, .price .old-price { font-size: 12px; }
}

@media (max-width: 575px) {
    .product-image,
    .img-block,
    .single-product-wrap .product-image {
        aspect-ratio: 4 / 5;
    }
}

/* Owl carousel spacing on mobile */
@media (max-width: 767px) {
    .owl-nav, .owl-dots { display: none; }
    .section-title h2 { font-size: 18px; line-height: 1.4; }
    .section-space-top { padding-top: 32px !important; }
    .section-space-bottom { padding-bottom: 32px !important; }
}

/* -------- Home static features (ارسال رایگان / تضمین / پرداخت / پشتیبانی) -------- */
@media (max-width: 767px) {
    .static-area .single-static {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 10px !important;
        border: 1px solid #eee;
        border-radius: 8px;
        min-height: 96px;
        text-align: right;
    }
    .static-area .single-static img {
        flex: 0 0 40px;
        width: 40px;
        height: auto;
        margin: 0 !important;
    }
    .static-area .single-static .single-static-meta {
        flex: 1 1 auto;
        min-width: 0;
        text-align: right;
    }
    .static-area .single-static .single-static-meta h4 {
        font-size: 13px;
        line-height: 1.4;
        margin: 0 0 4px;
        word-break: normal;
        overflow-wrap: normal;
        white-space: normal;
    }
    .static-area .single-static .single-static-meta p {
        font-size: 11px;
        line-height: 1.5;
        margin: 0;
        color: #777;
    }
    .static-area .row { row-gap: 12px; }
}
@media (max-width: 400px) {
    .static-area .single-static { flex-direction: column; text-align: center; align-items: center; min-height: 0; }
    .static-area .single-static .single-static-meta { text-align: center; }
}

/* Old desktop header is hidden below lg (d-none d-lg-block on <header class="main-header">) */

/* -------- Home hero / sliders -------- */
@media (max-width: 991px) {
    .slider-height-6, .slider-area,
    .slider-height, .slider-height-1, .slider-height-2 {
        min-height: 320px;
        height: auto !important;
    }
}
@media (max-width: 575px) {
    .slider-height-6, .slider-area,
    .slider-height, .slider-height-1, .slider-height-2 {
        min-height: 220px;
    }
    .slider-content h2, .slider-content h1 { font-size: 20px !important; line-height: 1.4; }
    .slider-content p { font-size: 13px !important; }
    .slider-content .default-btn { padding: 8px 18px; font-size: 13px; }
    .slider-content { padding: 12px; }
}

/* -------- Section wrappers -------- */
@media (max-width: 767px) {
    .cart-main-area,
    .status-main-area,
    .success-main-area,
    .user-panel-wrapper,
    .checkout-area,
    .product-details-area,
    .shop-main-area {
        padding-top: 32px !important;
        padding-bottom: 32px !important;
    }
    .breadcrumb-area { padding: 24px 0 !important; }
    .breadcrumb-area h2 { font-size: 20px; }
}

/* -------- Buttons groups -------- */
@media (max-width: 575px) {
    .buttons-group,
    .cart-shiping-update-wrapper,
    .totals-shipping-btn {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .buttons-group a,
    .buttons-group button,
    .cart-shiping-update-wrapper a,
    .cart-shiping-update-wrapper button {
        flex: 1 1 auto;
        min-width: 140px;
        text-align: center;
    }
}

/* -------- Cart table → stacked cards on very small screens -------- */
@media (max-width: 575px) {
    .cart-main-area .table-content table,
    .cart-main-area .table-content thead,
    .cart-main-area .table-content tbody,
    .cart-main-area .table-content th,
    .cart-main-area .table-content td,
    .cart-main-area .table-content tr {
        display: block;
        width: 100%;
    }
    .cart-main-area .table-content thead { display: none; }
    .cart-main-area .table-content tr {
        margin-bottom: 14px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 10px;
        background: #fff;
    }
    .cart-main-area .table-content td {
        text-align: right;
        padding: 8px 0;
        border: 0;
        border-bottom: 1px dashed #f0f0f0;
        position: relative;
    }
    .cart-main-area .table-content td:last-child { border-bottom: 0; }
    .cart-main-area .table-content td::before {
        content: attr(data-label);
        display: inline-block;
        min-width: 90px;
        font-weight: 700;
        color: #444;
        margin-left: 8px;
    }
    .cart-main-area .table-content td.product-thumbnail::before { content: ""; min-width: 0; }
    .cart-main-area .table-content td.product-thumbnail { text-align: center; }
    .cart-main-area .table-content td.product-thumbnail img { max-width: 120px; }
    .cart-main-area .quantity, .cart-main-area .cart-plus-minus { justify-content: flex-end; }
    .cart-main-area .table-content .product-remove { text-align: left; }
}

/* -------- Product single -------- */
@media (max-width: 767px) {
    /* Kill zoompro on mobile – show plain responsive image */
    .zoompro-wrap .zoompro-span,
    .zoompro-wrap [class*="zoomWindow"],
    .zoomWindow, .zoomWrapper .zoomWrapper,
    .product-dec-slider-2 .owl-nav { display: none !important; }
    .zoompro-wrap { cursor: default !important; }
    .zoompro-wrap img.zoompro { width: 100% !important; height: auto !important; }
    .product-details-content h2 { font-size: 18px; line-height: 1.5; }
    .product-details-content .price-2 span { font-size: 16px; }
    .product-dec-slider-2 { margin-top: 10px; }
    .product-dec-slider-2 .single-slide img { max-height: 80px; object-fit: cover; }
}

/* -------- Forms / inputs -------- */
@media (max-width: 767px) {
    .form-group, .form-row { margin-bottom: 12px; }
    input, select, textarea { width: 100%; }
}

/* -------- Modals -------- */
@media (max-width: 575px) {
    .modal-dialog { margin: 8px; }
    .modal-content { border-radius: 10px; }
    .modal-body { padding: 12px; }
    .modal-footer .btn { flex: 1 1 auto; }
}

/* -------- Pagination -------- */
@media (max-width: 575px) {
    .pagination { flex-wrap: wrap; gap: 4px; justify-content: center; }
    .pagination .page-link, .pagination li a, .pagination li span {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* -------- Footer -------- */
@media (max-width: 767px) {
    .footer-top-area { padding: 30px 0 10px; }
    .single-wedge h4 { font-size: 15px; margin-bottom: 10px; }
    .footer-list ul li { padding: 3px 0; }
    .footer-bottom-area { text-align: center; }
    .footer-bottom-area .col-md-6 { text-align: center !important; }
    .payment img { max-width: 100%; height: auto; }
}

/* -------- Order status / success -------- */
@media (max-width: 575px) {
    .order-status-content, .order-success-content {
        padding: 16px !important;
    }
    .order-status-content h2, .order-success-content h2 {
        font-size: 18px;
    }
}

/* -------- Landing safety net -------- */
@media (max-width: 575px) {
    .landing-hero, .landing-section { padding: 24px 12px !important; }
    .landing-hero h1 { font-size: 22px !important; line-height: 1.5; }
}

/* -------- Very small screens (360 and under) -------- */
@media (max-width: 360px) {
    .container, .container-fluid { padding-left: 10px; padding-right: 10px; }
    .btn, a.button { font-size: 12px; padding: 8px 12px; }
    .section-title h2 { font-size: 16px; }
}

/* -------- Fix Bootstrap 3 residual classes -------- */
.col-md-offset-3, .col-md-offset-2, .col-md-offset-4 { margin-right: 0; margin-left: 0; }

/* =========================================================
   DESKTOP HEADER (self-contained, lg and up)
   ========================================================= */
.dh {
    direction: rtl;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    position: relative;
    z-index: 900;
    font-family: inherit;
}

/* Topbar */
.dh-topbar {
    background: #2c3e50;
    color: #fff;
    font-size: 13px;
    line-height: 1;
}
.dh-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 38px;
    gap: 16px;
}
.dh-topbar-right,
.dh-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dh-topbar-link {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: color .15s;
    padding: 8px 0;
}
.dh-topbar-link:hover { color: #5bb300; text-decoration: none; }
.dh-topbar-link i { font-size: 15px; }
.dh-topbar-text { opacity: .85; }
.dh-sep { opacity: .35; }

/* User dropdown */
.dh-user { position: relative; }
.dh-user-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    min-width: 180px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    border-radius: 6px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s, transform .18s, visibility .18s;
    z-index: 1000;
}
.dh-user:hover .dh-user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dh-user-menu a {
    display: block;
    padding: 10px 16px;
    color: #333;
    font-size: 13px;
    text-decoration: none;
    transition: background .12s, color .12s;
}
.dh-user-menu a:hover { background: #f4f6f8; color: #5bb300; }

/* Main row */
.dh-main {
    padding: 20px 0;
    border-bottom: 1px solid #eef0f2;
}
.dh-main-inner {
    display: flex;
    align-items: center;
    gap: 28px;
}
.dh-logo {
    flex: 0 0 auto;
    display: inline-block;
}
.dh-logo img {
    display: block;
    max-height: 60px;
    width: auto;
}

/* Search */
.dh-search {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    max-width: 640px;
    border: 2px solid #5bb300;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .15s;
}
.dh-search:focus-within { box-shadow: 0 0 0 3px rgba(91,179,0,.15); }
.dh-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    font-size: 14px;
    background: transparent;
    color: #333;
    font-family: inherit;
}
.dh-search input::placeholder { color: #9aa1a8; }
.dh-search button {
    flex: 0 0 auto;
    border: 0;
    background: #5bb300;
    color: #fff;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s;
    font-family: inherit;
}
.dh-search button:hover { background: #4a9200; }
.dh-search button i { font-size: 16px; }

/* Cart */
.dh-cart {
    flex: 0 0 auto;
    position: relative;
}
.dh-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    text-decoration: none;
    color: #333;
    border-radius: 6px;
    transition: background .15s;
}
.dh-cart-btn:hover { background: #f4f6f8; color: #333; text-decoration: none; }
.dh-cart-icon {
    position: relative;
    width: 44px;
    height: 44px;
    background: #5bb300;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dh-cart-icon i { font-size: 22px; line-height: 1; }
.dh-cart-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    right: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
}
.dh-cart-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.dh-cart-text small {
    font-size: 11px;
    color: #888;
    font-weight: 400;
}
.dh-cart-text strong {
    font-size: 14px;
    color: #333;
    font-weight: 700;
    margin-top: 2px;
}

/* Cart dropdown */
.dh-cart-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    margin-top: 8px;
    width: 340px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,.15);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 1000;
}
.dh-cart:hover .dh-cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dh-cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}
.dh-cart-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f4;
}
.dh-cart-list li:last-child { border-bottom: 0; }
.dh-cart-thumb {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    background: #f4f6f8;
}
.dh-cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dh-cart-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dh-cart-meta a {
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dh-cart-meta a:hover { color: #5bb300; }
.dh-cart-meta span { font-size: 12px; color: #888; }
.dh-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #eef0f2;
    margin-top: 6px;
}
.dh-cart-total span { font-size: 13px; color: #666; }
.dh-cart-total strong { font-size: 15px; color: #5bb300; }
.dh-cart-cta {
    display: block;
    text-align: center;
    background: #5bb300;
    color: #fff;
    padding: 11px 14px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    font-size: 13px;
    transition: background .15s;
}
.dh-cart-cta:hover { background: #4a9200; color: #fff; text-decoration: none; }
.dh-cart-empty {
    text-align: center;
    padding: 24px 12px;
    color: #999;
}
.dh-cart-empty i {
    font-size: 44px;
    color: #d5d9dd;
    display: block;
    margin-bottom: 10px;
}
.dh-cart-empty p { margin: 0; font-size: 13px; }

/* Nav */
.dh-nav {
    background: #fff;
    border-top: 1px solid #f0f2f4;
}
.dh-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    gap: 4px;
}
.dh-nav-list > li { position: relative; }
.dh-nav-list > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s, background .15s;
    border-bottom: 3px solid transparent;
}
.dh-nav-list > li > a:hover {
    color: #5bb300;
    text-decoration: none;
    border-bottom-color: #5bb300;
}
.dh-nav-list > li > a i { font-size: 15px; }
.dh-nav-list > li > a > .ion-ios-arrow-down { font-size: 12px; opacity: .7; }

/* Category dropdown (vertical list under the "دسته بندی" item) */
.has-mega { position: relative; }
.dh-mega {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    min-width: 240px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0,0,0,.15);
    border-radius: 0 0 8px 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s, transform .18s, visibility .18s;
    z-index: 999;
}
.has-mega:hover .dh-mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dh-mega-grid {
    display: flex;
    flex-direction: column;
}
.dh-mega-grid a {
    display: block;
    padding: 9px 18px;
    color: #333;
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
    border-right: 3px solid transparent;
}
.dh-mega-grid a:hover {
    background: #f4faed;
    color: #5bb300;
    text-decoration: none;
    border-right-color: #5bb300;
}
.dh-mega-grid a span {
    font-size: 13px;
    font-weight: 500;
}

/* Sticky header on scroll (lg+) */
@media (min-width: 992px) {
    .dh {
        position: sticky;
        top: 0;
    }
}

/* =========================================================
   POPULAR CATEGORIES
   ========================================================= */
.pop-cats {
    direction: rtl;
    padding: 50px 0;
    background: #fafbfc;
}
.pop-cats-head {
    text-align: center;
    margin-bottom: 30px;
}
.pop-cats-head h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 6px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}
.pop-cats-head h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 50px;
    height: 3px;
    background: #5bb300;
    border-radius: 2px;
}
.pop-cats-head span {
    display: block;
    color: #7a8593;
    font-size: 13px;
    margin-top: 6px;
}
.pop-cats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.pop-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    padding: 20px 12px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    border: 1px solid #eef0f2;
    color: #333;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pop-cat:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(91,179,0,.12);
    border-color: #d5eab0;
    text-decoration: none;
    color: #333;
}
.pop-cat-thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f4faed;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: background .2s;
}
.pop-cat:hover .pop-cat-thumb { background: #e6f5cd; }
.pop-cat-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pop-cat-body h4 {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 4px;
    line-height: 1.4;
}
.pop-cat-body span {
    font-size: 12px;
    color: #8a95a3;
}

@media (max-width: 1199px) {
    .pop-cats-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 991px) {
    .pop-cats-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 767px) {
    .pop-cats { padding: 30px 0; }
    .pop-cats-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .pop-cats-head h2 { font-size: 20px; }
    .pop-cat-thumb { width: 68px; height: 68px; }
}
@media (max-width: 480px) {
    .pop-cats-grid { grid-template-columns: repeat(2, 1fr); }
    .pop-cat { padding: 14px 8px 12px; }
    .pop-cat-thumb { width: 60px; height: 60px; margin-bottom: 8px; }
    .pop-cat-body h4 { font-size: 13px; }
    .pop-cat-body span { font-size: 11px; }
}

/* =========================================================
   PRODUCT CARDS SECTION (New arrivals / discounts / etc.)
   ========================================================= */
.pc-section {
    direction: rtl;
    padding: 50px 0;
    background: #fff;
}
.pc-section + .pc-section { padding-top: 0; }
.pc-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef0f2;
}
.pc-head h2 {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 4px;
    position: relative;
    padding-right: 14px;
}
.pc-head h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    background: #5bb300;
    border-radius: 2px;
}
.pc-head span {
    display: block;
    font-size: 13px;
    color: #7a8593;
}
.pc-more {
    font-size: 13px;
    color: #5bb300;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.pc-more:hover { color: #4a9200; text-decoration: none; }

.pc-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.pc-card {
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative;
}
.pc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0,0,0,.08);
    border-color: #d5eab0;
}

.pc-thumb {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f7f8fa;
    overflow: hidden;
}
.pc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s;
}
.pc-card:hover .pc-thumb img { transform: scale(1.05); }
.pc-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #5bb300;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}
.pc-badge.discount { background: #e74c3c; }

.pc-body {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
}
.pc-cat {
    font-size: 11px;
    color: #8a95a3;
    text-decoration: none;
    align-self: flex-start;
}
.pc-cat:hover { color: #5bb300; text-decoration: none; }
.pc-body h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pc-body h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color .15s;
}
.pc-body h3 a:hover { color: #5bb300; text-decoration: none; }

.pc-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: auto;
}
.pc-price strong {
    font-size: 15px;
    font-weight: 700;
    color: #5bb300;
}
.pc-price .pc-old {
    font-size: 12px;
    color: #b5bcc4;
    text-decoration: line-through;
    margin-right: 6px;
}
.pc-price span {
    font-size: 11px;
    color: #7a8593;
    font-weight: 500;
}

.pc-add {
    margin: 0;
}
.pc-add button {
    width: 100%;
    border: 0;
    background: #f4faed;
    color: #4a9200;
    font-family: inherit;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background .15s, color .15s;
    min-height: 36px;
}
.pc-add button:hover { background: #5bb300; color: #fff; }
.pc-add button i { font-size: 16px; }

.pc-badge.best { background: #f39c12; }

/* Desktop stays single row of 6; shrink cards on smaller desktops */
@media (max-width: 1199px) {
    .pc-grid { gap: 10px; }
}

/* Mobile: horizontal snap slider */
@media (max-width: 767px) {
    .pc-section { padding: 30px 0; }
    .pc-head { align-items: center; }
    .pc-head h2 { font-size: 18px; }
    .pc-head span { font-size: 12px; }
    .pc-grid {
        display: flex;
        grid-template-columns: none;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 10px;
        /* bleed edges */
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .pc-grid::-webkit-scrollbar { display: none; }
    .pc-card {
        flex: 0 0 55%;
        max-width: 220px;
        scroll-snap-align: end;
    }
    .pc-body { padding: 10px; gap: 6px; }
}
@media (max-width: 480px) {
    .pc-card { flex-basis: 62%; }
}
@media (max-width: 360px) {
    .pc-head h2 { font-size: 16px; }
    .pc-card { flex-basis: 70%; }
}


/* Suppress Chrome "Slow network / Fallback font" intervention for FontAwesome & IRANSans
   by using font-display: swap (renders fallback immediately, swaps in when loaded). */
@font-face {
    font-family: "FontAwesome";
    font-display: swap;
    src: url("../fonts/fa-solid-900.woff2") format("woff2"),
         url("../fonts/fa-solid-900.woff")  format("woff"),
         url("../fonts/fa-solid-900.ttf")   format("truetype");
    font-weight: 900;
    font-style: normal;
}
@font-face {
    font-family: "Font Awesome 5 Free";
    font-display: swap;
    src: url("../fonts/fa-solid-900.woff2") format("woff2"),
         url("../fonts/fa-solid-900.woff")  format("woff"),
         url("../fonts/fa-solid-900.ttf")   format("truetype");
    font-weight: 900;
    font-style: normal;
}
