.ics-header {
    direction: rtl;
    position: relative;
    z-index: 999;
    width: 100%;
    background: #fff;
    color: #1a1a1a;
    font-family: inherit;
}

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

.ics-header-top {
    background: #fff;
    border-bottom: 1px solid #eee;
}

.ics-header-inner {
    max-width: 1280px;
    min-height: 88px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.ics-header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ics-header-logo img {
    display: block;
    width: auto;
    max-width: 220px;
    height: 62px;
    object-fit: contain;
}

.ics-logo-mobile {
    display: none !important;
}

.ics-header-tools {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ics-account-button,
.ics-account-trigger {
    min-height: 44px;
    padding: 0 22px;
    border: 1px solid #ffefe7;
    border-radius: 9px;
    background: #ffefe7;
    color: #966310;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font: inherit;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.ics-account-wrap {
    position: relative;
}

.ics-account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 210px;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    z-index: 1002;
}

.ics-account-wrap.is-open .ics-account-dropdown {
    display: block;
}

.ics-header-account-menu,
.ics-header-account-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ics-header-account-menu a {
    display: block;
    padding: 10px 12px;
    color: #38251d;
    text-decoration: none;
    border-radius: 7px;
}

.ics-header-account-menu a:hover {
    background: #f8f4ee;
}

.ics-cart-trigger {
    position: relative;
    min-height: 44px;
    padding: 0 15px;
    border: 1px solid #eee;
    border-radius: 9px;
    background: #fff;
    color: #38251d;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ics-cart-count {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 20px;
    background: #9b5d23;
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}

.ics-header-navigation {
    background: #fff;
}

.ics-header-nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.ics-header-main-menu,
.ics-header-main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ics-header-main-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.ics-header-main-menu > li {
    position: relative;
}

.ics-header-main-menu a {
    display: block;
    padding: 17px 13px;
    color: #1a1a1a;
    font-size: 14px;
    text-decoration: none;
    transition: .2s ease;
}

.ics-header-main-menu > li:hover > a,
.ics-header-main-menu > li.current-menu-item > a,
.ics-header-main-menu > li.current-menu-ancestor > a {
    color: #9b5d23;
}

.ics-header-main-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    padding: 9px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
    z-index: 1001;
}

.ics-header-main-menu li:hover > .sub-menu {
    display: block;
}

.ics-header-main-menu .sub-menu li {
    position: relative;
}

.ics-header-main-menu .sub-menu .sub-menu {
    top: 0;
    right: 100%;
}

.ics-header-main-menu .sub-menu a {
    padding: 10px 12px;
    border-radius: 6px;
    white-space: normal;
}

.ics-header-main-menu .sub-menu a:hover {
    background: #f8f4ee;
    color: #9b5d23;
}

.ics-mobile-toggle,
.ics-mobile-drawer,
.ics-header-overlay {
    display: none;
}

.ics-cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    visibility: hidden;
    pointer-events: none;
}

.ics-cart-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
}

.ics-cart-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    transition: opacity .25s ease;
}

.ics-cart-drawer.is-open .ics-cart-overlay {
    opacity: 1;
}

.ics-cart-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(390px, 90vw);
    padding: 20px;
    overflow-y: auto;
    background: #fff;
    transform: translateX(-100%);
    transition: transform .25s ease;
}

.ics-cart-drawer.is-open .ics-cart-panel {
    transform: translateX(0);
}

.ics-cart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.ics-cart-close,
.ics-mobile-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 28px;
    cursor: pointer;
}

@media (max-width: 921px) {
    .ics-header-inner {
        min-height: 72px;
        padding: 8px 16px;
    }

    .ics-logo-desktop {
        display: none !important;
    }

    .ics-logo-mobile {
        display: block !important;
        width: 58px !important;
        height: 58px !important;
    }

    .ics-header-navigation {
        display: none;
    }

    .ics-mobile-toggle {
        width: 42px;
        height: 42px;
        padding: 9px;
        border: 1px solid #eee;
        border-radius: 8px;
        background: #fff;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        cursor: pointer;
    }

    .ics-mobile-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: #38251d;
    }

    .ics-header-tools {
        gap: 9px;
    }

    .ics-account-button,
    .ics-account-trigger {
        min-height: 40px;
        padding: 0 12px;
        font-size: 12px;
    }

    .ics-cart-trigger {
        min-height: 40px;
        padding: 0 10px;
    }

    .ics-cart-label {
        display: none;
    }

    .ics-mobile-drawer {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(340px, 88vw);
        padding: 20px;
        overflow-y: auto;
        background: #fff;
        z-index: 100003;
        transform: translateX(110%);
        transition: transform .25s ease;
    }

    .ics-mobile-drawer.is-open {
        transform: translateX(0);
    }

    .ics-mobile-drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 15px;
        margin-bottom: 12px;
        border-bottom: 1px solid #eee;
        font-weight: 700;
    }

    .ics-mobile-menu,
    .ics-mobile-menu ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .ics-mobile-menu a {
        display: block;
        padding: 12px 8px;
        color: #38251d;
        text-decoration: none;
        border-bottom: 1px solid #f0ece8;
    }

    .ics-mobile-menu .sub-menu {
        padding-right: 15px;
        background: #faf8f5;
    }

    .ics-mobile-account {
        display: block;
        margin-top: 20px;
        padding: 13px;
        border-radius: 8px;
        background: #ffefe7;
        color: #966310;
        text-align: center;
        text-decoration: none;
    }

    .ics-header-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.4);
        z-index: 100002;
        opacity: 0;
        visibility: hidden;
        transition: .25s ease;
    }

    .ics-header.mobile-open .ics-header-overlay {
        opacity: 1;
        visibility: visible;
    }

    .ics-header.mobile-open .ics-mobile-drawer {
        transform: translateX(0);
    }
}

@media (min-width: 922px) {
    .ics-mobile-toggle,
    .ics-mobile-drawer,
    .ics-header-overlay {
        display: none !important;
    }
}

/* IranSansX Variable - ICS Header */
@font-face {
    font-family: 'IRANSansX';
    src: url('./fonts/IRANSansXV.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

.ics-header,
.ics-header *,
.ics-cart-drawer,
.ics-cart-drawer *,
.ics-mobile-drawer,
.ics-mobile-drawer * {
    font-family: 'IRANSansX', sans-serif !important;
    font-variation-settings: normal;
}


/* Iran Coffee Expo typography system */

@font-face {
    font-family: 'IranYekan';
    src: url('./fonts/iranyekan/regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IranYekan';
    src: url('./fonts/iranyekan/medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('./fonts/iransansx/regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('./fonts/iransansx/medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('./fonts/iransansx/demibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('./fonts/iransansx/bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pelak';
    src: url('./fonts/pelak/regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pelak';
    src: url('./fonts/pelak/medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pelak';
    src: url('./fonts/pelak/bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pelak';
    src: url('./fonts/pelak/extrabold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* General text */
.ics-header,
.ics-header *,
.ics-cart-drawer,
.ics-cart-drawer *,
.ics-mobile-drawer,
.ics-mobile-drawer * {
    font-family: 'IRANSansX', sans-serif !important;
    font-variation-settings: normal;
}

/* Navigation and interface */
.ics-header-main-menu,
.ics-header-main-menu *,
.ics-mobile-menu,
.ics-mobile-menu *,
.ics-account-wrap,
.ics-account-wrap *,
.ics-header button,
.ics-cart-drawer button {
    font-family: 'IranYekan', sans-serif !important;
}

/* Headings and drawer titles */
.ics-header h1,
.ics-header h2,
.ics-header h3,
.ics-cart-drawer h1,
.ics-cart-drawer h2,
.ics-cart-drawer h3,
.ics-mobile-drawer-header {
    font-family: 'Pelak', sans-serif !important;
}

/* Iran Coffee School typography */
@font-face {
    font-family: 'Peyda';
    src: url('./fonts/peyda/PeydaWeb-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Main headings */
body h1,
body h2,
body h3,
body h4,
body .elementor-heading-title {
    font-family: 'Peyda', sans-serif !important;
    font-weight: 600;
}


/* ICS header contact bar */
.ics-contact-bar {
    background: #f8f4ee;
    border-bottom: 1px solid #eee6dc;
}
.ics-contact-inner {
    max-width: 1280px;
    min-height: 38px;
    margin: 0 auto;
    padding: 5px 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}
.ics-contact-inner a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #634333;
    font-size: 12px;
    line-height: 1.6;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease;
}
.ics-contact-inner a:hover {
    color: #9b5d23;
}
.ics-contact-inner svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}
@media (max-width: 921px) {
    .ics-contact-inner {
        min-height: 36px;
        padding: 5px 16px;
        justify-content: center;
        gap: 18px;
    }
    .ics-contact-inner a {
        font-size: 11px;
        gap: 5px;
    }
    .ics-contact-inner svg {
        width: 15px;
        height: 15px;
        flex-basis: 15px;
    }
}
@media (max-width: 380px) {
    .ics-contact-inner {
        gap: 12px;
        padding-right: 8px;
        padding-left: 8px;
    }
    .ics-contact-inner a {
        font-size: 10px;
    }
}

/* Fix contact icons size */
.ics-header .ics-contact-inner a svg {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    flex: 0 0 16px !important;
    vertical-align: middle;
}
@media (max-width: 921px) {
    .ics-header .ics-contact-inner a svg {
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
        max-width: 14px !important;
        min-height: 14px !important;
        max-height: 14px !important;
        flex-basis: 14px !important;
    }
}
