/* =========================================================
   DG24 FRONTEND
   Responsive System
   Mobile First
========================================================= */


/* =========================================================
   01. Base Mobile
========================================================= */

.container,
.container-fluid {
    padding-right: 12px;
    padding-left: 12px;
}

.top-bar-content {
    min-height: 32px;
    justify-content: center;
    font-size: 11px;
}

.top-bar-content span:last-child {
    display: none;
}

.header-row,
.header-main-content {
    min-height: 66px;
    gap: 7px;

    flex-wrap: wrap;

    padding-top: 8px;
    padding-bottom: 8px;
}

.site-logo {
    width: 58px;
}

.logo-main {
    font-size: 22px;
}

.logo-sub {
    margin-top: 5px;
    font-size: 8px;
}

.header-actions {
    margin-right: auto;
    gap: 2px;
}

.header-action {
    min-width: 38px;
    min-height: 40px;
    padding: 4px;
}

.action-icon {
    font-size: 18px;
}

.action-label,
.action-text {
    display: none;
}

.cart-count {
    top: 0;
    left: 0;

    min-width: 16px;
    height: 16px;

    padding: 0 4px;

    font-size: 9px;
}

.mobile-menu-btn,
.mobile-menu-toggle {
    display: flex;

    width: 38px;
    height: 40px;

    flex-basis: 38px;
}

.header-search {
    order: 5;

    flex: 0 0 100%;
    width: 100%;
}

.search-box {
    min-height: 44px;
    border-radius: var(--dg-radius-sm);
}

.search-box input {
    height: 42px;
    font-size: 12px;
}

.search-icon {
    padding-right: 9px;
    font-size: 16px;
}

.search-submit,
.search-button {
    min-height: 42px;
    padding: 0 13px;
    font-size: 12px;
}

.main-nav,
.main-navigation {
    display: none;
}


/* =========================================================
   02. Mobile Search
========================================================= */

.search-suggestions {
    top: calc(100% + 6px);

    max-height: 65vh;

    border-radius: var(--dg-radius-sm);
}

.search-suggestion-item {
    min-height: 64px;
    padding: 10px;
    gap: 9px;
}

.search-suggestion-image {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
}

.search-suggestion-info strong {
    font-size: 12px;
}

.search-suggestion-meta {
    font-size: 10px;
}

.search-suggestion-price {
    font-size: 10px;
}


/* =========================================================
   03. Mobile Sections
========================================================= */

.dg-section {
    padding-top: 28px;
    padding-bottom: 28px;
}

.section-header {
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
}

.section-description {
    font-size: 11px;
}

.section-link {
    font-size: 11px;
}


/* =========================================================
   04. Mobile Products
========================================================= */

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

    gap: 10px;
}

.product-card {
    border-radius: var(--dg-radius-sm);
}

.product-card-body {
    padding: 10px;
}

.product-card-title {
    min-height: 42px;
    font-size: 11px;
}

.product-card-price {
    font-size: 12px;
}

.product-card-old-price {
    font-size: 10px;
}


/* =========================================================
   05. Mobile Trust
========================================================= */

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

    gap: 8px;
}

.trust-item {
    padding: 11px;
}

.trust-item-icon {
    font-size: 19px;
}

.trust-item-title {
    font-size: 11px;
}

.trust-item-text {
    font-size: 10px;
}


/* =========================================================
   06. Mobile Buttons
========================================================= */

.dg-btn {
    min-height: 42px;
    padding: 8px 14px;
    font-size: 12px;
}

.dg-btn-block {
    width: 100%;
}


/* =========================================================
   07. Mobile Footer
========================================================= */

.footer-main {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 24px 14px;

    padding-top: 30px;
    padding-bottom: 24px;
}

.footer-column:first-child {
    grid-column: 1 / -1;
}

.footer-description {
    max-width: none;
}

.footer-column h3 {
    font-size: 12px;
}

.footer-column a {
    margin-bottom: 6px;
    font-size: 11px;
}

.footer-bottom {
    min-height: 0;

    flex-direction: column;
    justify-content: center;

    padding-top: 12px;
    padding-bottom: 12px;

    text-align: center;

    font-size: 10px;
}


/* =========================================================
   08. Small Mobile
========================================================= */

@media (min-width: 480px) {

    .container,
    .container-fluid {
        padding-right: 14px;
        padding-left: 14px;
    }

    .site-logo {
        width: 64px;
    }

    .logo-main {
        font-size: 24px;
    }

    .mobile-menu-btn,
    .mobile-menu-toggle {
        width: 40px;
        height: 42px;
        flex-basis: 40px;
    }

    .header-action {
        min-width: 40px;
    }

    .search-box input {
        font-size: 13px;
    }

    .search-submit,
    .search-button {
        padding-right: 15px;
        padding-left: 15px;
    }

}


/* =========================================================
   09. Tablet
========================================================= */

@media (min-width: 768px) {

    .container,
    .container-fluid {
        padding-right: 22px;
        padding-left: 22px;
    }

    .top-bar-content {
        min-height: 34px;
        justify-content: space-between;
        font-size: 12px;
    }

    .top-bar-content span:last-child {
        display: inline;
    }

    .header-row,
    .header-main-content {
        min-height: 78px;
        flex-wrap: nowrap;
        gap: 14px;

        padding-top: 0;
        padding-bottom: 0;
    }

    .site-logo {
        width: 90px;
    }

    .logo-main {
        font-size: 28px;
    }

    .logo-sub {
        font-size: 9px;
    }

    .header-actions {
        margin-right: 0;
        gap: 3px;
    }

    .header-action {
        min-width: 48px;
        padding: 5px 7px;
    }

    .action-text,
    .action-label {
        display: none;
    }

    .action-icon {
        font-size: 19px;
    }

    .mobile-menu-btn,
    .mobile-menu-toggle {
        display: none;
    }

    .header-search {
        order: initial;

        flex: 1;
        width: auto;
    }

    .search-box {
        min-height: 48px;
        border-radius: var(--dg-radius-md);
    }

    .search-box input {
        height: 46px;
        font-size: 13px;
    }

    .search-submit,
    .search-button {
        display: flex;

        min-height: 46px;
        padding-right: 18px;
        padding-left: 18px;
    }

    .main-nav,
    .main-navigation {
        display: block;
    }

    .nav-row,
    .navigation-content {
        min-height: 48px;
    }

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

        gap: 14px;
    }

    .product-card-body {
        padding: 12px;
    }

    .product-card-title {
        font-size: 12px;
    }

    .product-card-price {
        font-size: 13px;
    }

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

        gap: 12px;
    }

    .dg-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

}


/* =========================================================
   10. Laptop
========================================================= */

@media (min-width: 992px) {

    .container,
    .container-fluid {
        padding-right: 26px;
        padding-left: 26px;
    }

    .header-row,
    .header-main-content {
        min-height: 84px;
        gap: 20px;
    }

    .site-logo {
        width: 105px;
    }

    .logo-main {
        font-size: 32px;
    }

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

    .header-actions {
        gap: 5px;
    }

    .header-action {
        min-width: auto;
        padding: 7px 10px;
    }

    .action-text,
    .action-label {
        display: inline;
        margin-top: 4px;
        font-size: 11px;
    }

    .action-icon {
        font-size: 18px;
    }

    .header-search {
        max-width: 680px;
    }

    .search-box {
        min-height: 50px;
    }

    .search-box input {
        height: 48px;
        font-size: 14px;
    }

    .search-submit,
    .search-button {
        min-height: 48px;
        padding-right: 21px;
        padding-left: 21px;
    }

    .nav-row,
    .navigation-content {
        min-height: 50px;
        gap: 7px;
    }

    .nav-link,
    .navigation-content a {
        padding: 8px 14px;
        font-size: 13px;
    }

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

        gap: 16px;
    }

    .section-title {
        font-size: 22px;
    }

}


/* =========================================================
   11. Desktop
========================================================= */

@media (min-width: 1200px) {

    .container,
    .container-fluid {
        padding-right: 28px;
        padding-left: 28px;
    }

    .header-row,
    .header-main-content {
        min-height: 90px;
        gap: 24px;
    }

    .site-logo {
        width: 120px;
    }

    .logo-main {
        font-size: 35px;
    }

    .logo-sub {
        font-size: 11px;
    }

    .header-search {
        max-width: 760px;
    }

    .header-actions {
        gap: 7px;
    }

    .header-action {
        padding: 8px 11px;
        border-radius: var(--dg-radius-sm);
    }

    .action-icon {
        font-size: 19px;
    }

    .action-text,
    .action-label {
        font-size: 12px;
    }

    .nav-row,
    .navigation-content {
        min-height: 52px;
        gap: 8px;
    }

    .nav-link,
    .navigation-content a {
        padding: 8px 16px;
        font-size: 13px;
    }

    .product-grid {
        gap: 18px;
    }

    .dg-section {
        padding-top: 52px;
        padding-bottom: 52px;
    }

}


/* =========================================================
   12. Large Desktop
========================================================= */

@media (min-width: 1400px) {

    .container,
    .container-fluid {
        padding-right: 20px;
        padding-left: 20px;
    }

    .header-row,
    .header-main-content {
        gap: 30px;
    }

    .header-search {
        max-width: 820px;
    }

    .product-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));

        gap: 20px;
    }

}


/* =========================================================
   13. Landscape Mobile
========================================================= */

@media (
    max-width: 767.98px
) and (
    orientation: landscape
) {

    .header-row,
    .header-main-content {
        min-height: 60px;
    }

    .header-search {
        flex-basis: 100%;
    }

    .mobile-menu {
        width: min(300px, 85vw);
    }

}


/* =========================================================
   14. Touch Devices
========================================================= */

@media (hover: none) {

    .dg-card-interactive:hover,
    .product-card:hover {
        transform: none;
        box-shadow: var(--dg-shadow-sm);
    }

    .header-action:hover,
    .nav-link:hover,
    .navigation-content a:hover {
        background: transparent;
        color: inherit;
    }

}


/* =========================================================
   15. Reduced Motion
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: .01ms !important;
    }

}

/* =========================================================
   DG24 - Mobile Header Clean Layout
========================================================= */

@media (max-width: 767px) {

    .main-header .container-fluid {
        width: 100%;
        padding: 0 10px;
    }

    .header-main-content {
        position: relative !important;

        display: flex;
        flex-wrap: wrap;

        align-items: center;

        width: 100%;
        min-height: 0;

        padding: 10px 52px !important;
    }


    /* =====================================================
       Mobile Menu - Right
    ====================================================== */

    .mobile-menu-btn {
        display: flex !important;

        position: absolute !important;

        right: 0 !important;
        left: auto !important;

        top: 28px !important;

        transform: translateY(-50%) !important;

        width: 42px !important;
        height: 42px !important;

        margin: 0 !important;
        padding: 0 !important;

        align-items: center !important;
        justify-content: center !important;

        z-index: 1000 !important;

        border: 1px solid #ddd !important;
        border-radius: 10px !important;

        background: #fff !important;
        color: #222 !important;

        font-size: 21px !important;
    }

    .mobile-menu-btn span {
        display: block !important;

        color: #222 !important;
        font-size: 21px !important;
        line-height: 1 !important;
    }


    /* =====================================================
       Logo
    ====================================================== */

    .site-logo {
        order: 1;

        flex: 1;

        text-align: center;

        min-width: 0;
    }


    /* =====================================================
       Header Actions
    ====================================================== */

    .header-actions {
        order: 2;

        position: absolute;

        left: 0;
        top: 28px;

        transform: translateY(-50%);

        display: flex;

        width: auto;

        margin: 0;
        padding: 0;
    }

    .header-actions .header-action {
        display: none;
    }

    .header-actions .cart-action {
        display: flex;
    }


    /* =====================================================
       Search - ردیف دوم و تمام عرض
    ====================================================== */

    .header-search {
        order: 3;

        flex: 0 0 100%;

        width: 100%;

        margin-top: 12px;
    }

    .search-form,
    .search-box {
        width: 100%;
    }

    .search-box {
        display: flex;
        align-items: center;

        min-height: 44px;
    }

    .search-box input {
        min-width: 0;
        flex: 1;
    }


    /* =====================================================
       Main Header
    ====================================================== */

    .main-header {
        background: #fff;
    }


    /* =====================================================
       عنابی - محدود
    ====================================================== */

    .top-bar {
        background: #800020;
    }

    .site-header {
        border-bottom: 2px solid #800020;
    }
}

@media (max-width: 767px) {

    /* خوانایی عمومی هدر */
    .site-header {
        font-family: inherit;
    }

    .site-header a,
    .site-header button,
    .site-header input {
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
    }

    /* لوگو */
    .site-logo {
        text-decoration: none;
        white-space: nowrap;
    }

    .logo-main {
        font-size: 22px !important;
        font-weight: 800;
        line-height: 1.2;
    }

    .logo-sub {
        font-size: 11px !important;
        line-height: 1.4;
        white-space: nowrap;
    }

    /* متن جست‌وجو */
    .search-box input {
        font-size: 14px !important;
        line-height: 1.5;
        color: #222 !important;
        background: #fff !important;
    }

    .search-box input::placeholder {
        color: #777 !important;
        opacity: 1;
    }

    /* متن‌های هدر */
    .header-action {
        color: #222 !important;
        text-decoration: none;
    }

    .header-action .action-text {
        color: #222 !important;
        font-size: 13px;
        line-height: 1.5;
    }

    /* آیکن‌ها */
    .action-icon {
        line-height: 1.2;
    }

    /* نوار بالایی */
    .top-bar {
        font-size: 12px;
        line-height: 1.6;
    }

    .top-bar-content {
        line-height: 1.6;
    }

    /* منوی اصلی */
    .main-nav .nav-link {
        color: #222 !important;
        font-size: 13px;
        line-height: 1.7;
        white-space: nowrap;
    }

    /* متن دکمه جست‌وجو */
    .search-submit {
        font-size: 13px !important;
        white-space: nowrap;
    }
}

/* =========================================================
   DG24 - Header Text Contrast
========================================================= */

@media (max-width: 767px) {

    /* متن‌های اصلی هدر */
    .site-header .action-text,
    .site-header .nav-link,
    .site-header .logo-sub,
    .site-header .top-bar-content,
    .site-header .search-submit {
        color: #222 !important;
    }

    /* عنوان لوگو */
    .site-header .logo-main {
        color: #800020 !important;
        font-weight: 800;
    }

    /* متن جستجو */
    .site-header .search-box input {
        color: #222 !important;
        background: #fff !important;
    }

    .site-header .search-box input::placeholder {
        color: #555 !important;
        opacity: 1 !important;
    }

    /* متن منوی اصلی */
    .site-header .main-nav .nav-link {
        color: #222 !important;
    }

    .site-header .main-nav .nav-link:hover,
    .site-header .main-nav .nav-link:focus {
        color: #800020 !important;
    }

    /* متن بالای سایت */
    .site-header .top-bar {
        color: #fff !important;
    }

    .site-header .top-bar * {
        color: #fff !important;
    }

    /* آیکن‌های هدر */
    .site-header .action-icon {
        color: #222 !important;
    }

    /* شماره سبد */
    .site-header .cart-count {
        background: #800020 !important;
        color: #fff !important;
    }

    /* دکمه همبرگر */
    .site-header .mobile-menu-btn,
    .site-header .mobile-menu-btn span {
        color: #222 !important;
    }
}

/* =========================================================
   DG24 - Mobile Header Actions Position
========================================================= */

@media (max-width: 767px) {

    .header-actions {
        position: absolute !important;

        left: 0 !important;
        right: auto !important;

        top: 28px !important;
        transform: translateY(-50%) !important;

        margin: 0 !important;
        padding: 0 !important;

        z-index: 1000 !important;
    }

    .header-actions .header-action {
        display: none !important;
    }

    .header-actions .cart-action {
        display: flex !important;

        align-items: center !important;
        justify-content: center !important;

        margin: 0 !important;
    }

    .header-actions .cart-action .action-icon {
        font-size: 28px !important;
        color: #800020 !important;
    }
}
@media (max-width: 767px) {

    .header-actions .cart-action .action-icon {
        transform: translateY(12px) !important;
    }

    .header-actions .cart-action .cart-count {
        transform: none !important;
    }
}
@media (max-width: 767px) {

    .header-actions .cart-action {
        width: 50px !important;
        height: 50px !important;

        border: 1px solid #e1e1e1 !important;
        border-radius: 12px !important;

        background: #fff !important;
    }

    .header-actions .cart-action .action-icon {
        width: 30px !important;
        height: 30px !important;

        transform: translateY(4px) !important;
    }
}
@media (max-width: 767px) {

    .header-actions .cart-action .cart-count {
        min-width: 12px !important;
        height: 12px !important;

        padding: 0 3px !important;

        font-size: 9px !important;
        line-height: 1 !important;

        border-radius: 20% !important;
    }
}

/* =========================================================
   DG24 Header Brand
   DG24 + دقیق و جذاب
========================================================= */

.site-logo {
    position: relative;

    display: inline-flex;

    flex-direction: row;

    align-items: baseline;
    justify-content: center;

    gap: 8px;

    text-decoration: none;

    line-height: 1;

    padding-bottom: 7px;
}


/* DG24 */

.site-logo .logo-main {
    color: #800020;

    font-size: 30px;
    font-weight: 950;

    line-height: 1;

    letter-spacing: -1.2px;
}


/* دقیق و جذاب */

.site-logo .logo-sub {
    color: #40586d;

    font-size: 12px;
    font-weight: 700;

    line-height: 1.3;

    white-space: nowrap;
}


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

.site-logo .logo-chalk {
    position: absolute;

    right: 2px;
    left: 2px;
    bottom: 0;

    height: 3px;

    opacity: .45;

    border-radius: 50%;

    background:
        repeating-linear-gradient(
            174deg,
            transparent 0 1px,
            rgba(128, 0, 32, .36) 1px 2px,
            transparent 2px 3px
        );

    transform: rotate(-1deg);
}

.site-logo .logo-chalk::after {
    content: "";

    position: absolute;

    right: 12px;
    left: 14px;
    top: 2px;

    height: 1px;

    opacity: .5;

    border-radius: 50%;

    background: rgba(128, 0, 32, .25);

    transform: rotate(.8deg);
}


/* Hover */

.site-logo:hover .logo-main {
    color: #800020;
}

.site-logo:hover .logo-chalk {
    opacity: .58;
}


/* Mobile */

@media (max-width: 767px) {

    .site-logo {
        gap: 6px;
        padding-bottom: 6px;
    }

    .site-logo .logo-main {
        font-size: 24px;
    }

    .site-logo .logo-sub {
        font-size: 9px;
    }

    .site-logo .logo-chalk {
        right: 1px;
        left: 1px;
        height: 2px;
    }
}




