/* Search pill + Footer design overrides */

.gm-header--design .gm-header__left {
    gap: 0.75rem;
    flex: 1;
    justify-content: flex-end;
    max-width: 560px;
}

.gm-header--design .gm-search-box-wrap {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 420px;
}

.gm-header--design .gm-search-pill {
    display: flex;
    align-items: center;
    width: 100%;
    height: 44px;
    background: #F0F0F1;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 0.35rem;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.gm-header--design .gm-search-box-wrap.is-open .gm-search-pill,
.gm-header--design .gm-search-pill:focus-within {
    background: #fff;
    border-color: #E5E7EB;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.gm-header--design .gm-search-pill__submit {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #6B7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1rem;
}

.gm-header--design .gm-search-pill__input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    height: 42px !important;
    padding: 0 0.25rem !important;
    font-size: 0.9rem !important;
    color: #1F2937 !important;
    border-radius: 0 !important;
}

.gm-header--design .gm-search-pill__input::placeholder {
    color: #9CA3AF;
}

.gm-header--design .gm-search-pill__clear {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #9CA3AF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, background 0.15s;
}

.gm-header--design .gm-search-box-wrap.is-open .gm-search-pill__clear,
.gm-header--design .gm-search-pill:focus-within .gm-search-pill__clear {
    opacity: 1;
    pointer-events: auto;
}

.gm-header--design .gm-search-pill__clear:hover {
    background: #F3F4F6;
    color: #374151;
}

.gm-header--design .gm-search-box-wrap .search-result {
    display: none !important;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: min(520px, calc(100vw - 2rem));
    background: #fff !important;
    border: 1px solid #EEEEEE;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    padding: 1rem 1.1rem 1.15rem;
    z-index: 1400;
    max-height: min(70vh, 520px);
    overflow-y: auto;
}

.gm-header--design .gm-search-box-wrap.show-result .search-result,
.gm-header--design .gm-search-box-wrap.is-open .search-result {
    display: block !important;
}

.gm-search-block { margin-bottom: 1.1rem; }
.gm-search-block:last-child { margin-bottom: 0; }

.gm-search-block__head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.7rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #1F2937;
}

.gm-search-block__head i { color: #6B7280; }

.gm-search-brands,
.gm-search-popular {
    position: relative;
}

.gm-search-brands__track,
.gm-search-popular__track {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    padding-left: 2rem;
    list-style: none;
    margin: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gm-search-brands__track::-webkit-scrollbar,
.gm-search-popular__track::-webkit-scrollbar {
    display: none;
}

.gm-search-scroll-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #6B7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 2;
    padding: 0;
}

.gm-search-scroll-btn:hover {
    color: var(--gm-green, #00A651);
    border-color: var(--gm-green, #00A651);
}

.gm-search-brand {
    flex: 0 0 88px;
    width: 88px;
    height: 56px;
    border: 1px solid #EEEEEE;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    background: #fff;
    text-decoration: none !important;
}

.gm-search-brand img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gm-search-popular__card-li { list-style: none; flex: 0 0 auto; }

.gm-search-popular__card {
    flex: 0 0 200px;
    width: 200px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem;
    border: 1px solid #EEEEEE;
    border-radius: 12px;
    background: #fff;
    text-decoration: none !important;
    color: #1F2937 !important;
}

.gm-search-popular__card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    background: #FAFAFA;
    flex-shrink: 0;
}

.gm-search-popular__card span {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gm-search-suggest-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gm-search-suggest {
    list-style: none;
    margin: 0;
    border-bottom: 1px solid #F3F4F6;
}

.gm-search-suggest:last-child { border-bottom: none; }

.gm-search-suggest a {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.15rem;
    text-decoration: none !important;
    color: #1F2937 !important;
}

.gm-search-suggest a:hover { background: #FAFAFA; }
.gm-search-suggest i { color: #9CA3AF; margin-top: 0.2rem; flex-shrink: 0; }

.gm-search-suggest__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.gm-search-suggest__text strong {
    font-size: 0.9rem;
    font-weight: 700;
}

.gm-search-suggest__text small {
    font-size: 0.78rem;
    color: #9CA3AF;
}

.gm-header--design .gm-search-trends__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.gm-header--design .gm-search-trends__tag {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #F3F4F6;
    color: #374151 !important;
    font-size: 0.78rem;
    text-decoration: none !important;
}

.gm-header--design .gm-header__cart > a.dropdown--btn .gm-cart-svg,
.gm-header--design .gm-header__cart .gm-cart-svg {
    width: 22px;
    height: 22px;
    display: block;
    color: #0a0a0a;
}

.gm-header--design .gm-header__cart > a.dropdown--btn:hover .gm-cart-svg {
    color: var(--gm-green, #00A651);
}

/* Footer */
.gm-footer--design {
    background: #fff !important;
    border-top: none !important;
    padding: 2rem 0 1.25rem !important;
    margin-top: 2rem;
}

.gm-footer-support { margin: 0 0 2.25rem; }

.gm-footer-support__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: #E8F6F0;
    border-radius: 20px;
    padding: 1.35rem 1.75rem;
}

.gm-footer-support__content {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.gm-footer-support__content strong {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1F2937;
}

.gm-footer-support__phone {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #374151 !important;
    text-decoration: none !important;
    font-size: 1rem;
    font-weight: 700;
    direction: ltr;
    justify-content: flex-end;
}

.gm-footer-support__phone i { color: var(--gm-green, #00A651); }
.gm-footer-support__art { flex-shrink: 0; line-height: 0; }
.gm-footer-support__headset { display: block; }

.gm-footer--design .gm-footer__main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto;
    gap: 2rem 1.75rem;
    align-items: start;
    padding-bottom: 2rem;
}

.gm-footer--design .gm-footer__logo {
    display: inline-block;
    margin-bottom: 1rem;
}

.gm-footer--design .gm-footer__logo img { max-height: 48px; }

.gm-footer--design .gm-footer__col-title {
    margin: 0 0 0.9rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--gm-green, #00A651) !important;
}

.gm-footer--design .gm-footer__contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gm-footer--design .gm-footer__contact-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gm-footer--design .gm-footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: #6B7280 !important;
    text-decoration: none !important;
    font-size: 0.875rem;
    line-height: 1.7;
}

.gm-footer--design .gm-footer__contact-item i {
    color: var(--gm-green, #00A651);
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    background: none !important;
    border-radius: 0 !important;
    font-size: 1rem;
    margin-top: 0.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gm-footer--design .gm-footer__col-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gm-footer--design .gm-footer__col-list a {
    color: #6B7280 !important;
    font-size: 0.875rem;
    padding: 0.3rem 0;
    display: inline-block;
    text-decoration: none !important;
}

.gm-footer--design .gm-footer__col-list a:hover {
    color: var(--gm-green, #00A651) !important;
}

.gm-footer--design .gm-footer__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.gm-footer--design .gm-footer__trust img,
.gm-footer--design .gm-footer__trust a img {
    max-height: 72px;
    width: auto;
    filter: grayscale(1);
    opacity: 0.85;
}

.gm-footer--design .gm-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1.15rem;
    border-top: 1px solid #EEEEEE;
}

.gm-footer--design .gm-footer__copyright {
    font-size: 0.78rem;
    color: #9CA3AF;
    text-align: right;
    max-width: 70%;
    line-height: 1.7;
}

.gm-footer--design .gm-footer__social-list {
    display: flex;
    gap: 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gm-footer--design .gm-footer__social-list a {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #4B5563;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    text-decoration: none !important;
}

.gm-footer--design .gm-footer__social-list a:hover {
    background: var(--gm-green, #00A651);
}

@media (max-width: 991.98px) {
    .gm-footer--design .gm-footer__main {
        grid-template-columns: 1fr 1fr;
    }

    .gm-footer--design .gm-footer__col--contact {
        grid-column: 1 / -1;
    }

    .gm-header--design .gm-search-box-wrap {
        max-width: 280px;
    }
}

@media (max-width: 575.98px) {
    .gm-footer--design .gm-footer__main {
        grid-template-columns: 1fr;
    }

    .gm-footer-support__inner {
        flex-direction: column-reverse;
        text-align: center;
    }

    .gm-footer-support__phone { justify-content: center; }

    .gm-footer--design .gm-footer__bottom {
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .gm-footer--design .gm-footer__copyright { max-width: 100%; }

    .gm-header--design .gm-search-box-wrap {
        display: none;
    }
}

/* Mobile Digikala-style search */
.gm-header-mobile .header-bottom {
    padding: 0.45rem 0.85rem 0.65rem;
}

.gm-header-mobile .gm-header__search--mobile {
    position: relative;
    flex: 1;
    width: 100%;
}

.gm-header-mobile .gm-header__search--mobile form {
    display: flex;
    align-items: center;
    width: 100%;
    height: 42px;
    background: #F3F4F6;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 0.35rem;
    overflow: hidden;
}

.gm-header-mobile .gm-header__search--mobile form:focus-within {
    background: #fff;
    border-color: #E5E7EB;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.gm-header-mobile .gm-mobile-search__btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #6B7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}

.gm-header-mobile .gm-mobile-search__input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    height: 40px !important;
    padding: 0 0.25rem !important;
    font-size: 0.84rem !important;
    color: #1F2937 !important;
}

.gm-header-mobile .gm-mobile-search__input::placeholder {
    color: #9CA3AF;
    font-size: 0.82rem;
}

.gm-header-mobile .gm-mobile-search__clear {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #9CA3AF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
}

.gm-header-mobile .gm-mobile-search__clear[hidden] {
    display: none !important;
}
