/* EP Collections — Site-wide mobile responsive polish */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.ep-store {
    overflow-x: hidden;
    min-width: 0;
}

body.ep-store img,
body.ep-store video,
body.ep-store iframe {
    max-width: 100%;
    height: auto;
}

/* —— Header & mobile nav —— */
@media (max-width: 991px) {
    body.ep-store {
        --ep-header-height: 64px;
    }

    body.ep-store .ep-header__inner {
        padding: 0 16px;
        min-height: var(--ep-header-height);
    }

    body.ep-store .ep-header__logo img {
        height: 56px !important;
        max-height: 56px !important;
    }

    body.ep-store .ep-mobile-nav {
        max-height: calc(100dvh - 64px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.ep-store #ep-header-mount .ep-mobile-nav .ep-nav__link {
        padding: 14px 20px !important;
        font-size: 0.875rem !important;
        font-weight: 600 !important;
        color: #ffffff !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }
}

@media (max-width: 575px) {
    body.ep-store .ep-header__logo img {
        height: 48px !important;
        max-height: 48px !important;
    }
}

/* —— Home hero —— */
@media (max-width: 767px) {
    body.ep-store .ep-hero {
        min-height: min(72vh, 520px);
    }

    body.ep-store .ep-hero__content {
        padding: 20px 20px 56px;
        max-width: 100%;
    }

    body.ep-store .ep-hero__title {
        font-size: clamp(1.6rem, 6.5vw, 2.25rem);
        margin-bottom: 10px;
    }

    body.ep-store .ep-hero__desc {
        font-size: 0.9375rem;
        margin-bottom: 18px;
    }

    body.ep-store .ep-hero__dots {
        bottom: 20px;
        gap: 8px;
    }

    body.ep-store .ep-hero__dot {
        width: 10px !important;
        height: 10px !important;
        min-width: 10px !important;
        min-height: 10px !important;
        max-width: 10px !important;
        max-height: 10px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        line-height: 1 !important;
    }

    body.ep-store .ep-promo {
        min-height: 320px;
        padding: 48px 20px;
    }

    body.ep-store .ep-promo__content {
        padding: 0;
    }

    body.ep-store .ep-trust {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 32px 16px;
    }

    body.ep-store .ep-trust-item {
        padding: 16px 12px;
    }

    body.ep-store .ep-trust-item i {
        font-size: 1.25rem;
    }
}

@media (max-width: 399px) {
    body.ep-store .ep-trust {
        grid-template-columns: 1fr;
    }
}

/* —— Sections —— */
@media (max-width: 767px) {
    body.ep-store .ep-section {
        padding: 48px 16px;
    }

    body.ep-store .ep-section__head {
        margin-bottom: 28px;
    }

    body.ep-store .ep-section__title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    body.ep-store .ep-btn {
        padding: 13px 28px;
        width: auto;
        max-width: 100%;
    }
}

/* —— Product grids (consistent 2-col mobile) —— */
@media (max-width: 767px) {
    body.ep-store .ep-product-grid,
    body.ep-store #productsGrid.products-grid,
    body.shop-page #productsGrid.products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    body.ep-store.womens-page section.womens-products .womens-products__grid--compact,
    body.ep-store.womens-page section.womens-products .womens-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}

@media (max-width: 399px) {
    body.ep-store .ep-product-grid,
    body.ep-store #productsGrid.products-grid,
    body.shop-page #productsGrid.products-grid {
        gap: 10px !important;
    }
}

/* —— Shop page —— */
@media (max-width: 991px) {
    body.shop-page .ep-about-hero {
        min-height: clamp(300px, 42vh, 420px);
        padding: 48px 20px;
    }

    body.shop-page .ep-about-hero__bg {
        background-position: center top;
    }

    body.shop-page .ep-about-hero__title {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
    }

    body.shop-page .shop-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.shop-page .shop-layout > .products-content,
    body.shop-page .shop-layout > .shop-products {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 100%;
    }

    body.shop-page .shop-mobile-bar {
        top: 0;
    }

    body.shop-page .mobile-filter-toggle {
        display: inline-flex !important;
    }

    body.shop-page .filter-size-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    body.shop-page .filter-size-btn {
        font-size: 0.75rem;
        padding: 10px 8px;
        min-height: 40px;
    }
}

@media (max-width: 575px) {
    body.shop-page .filter-drawer-content {
        padding: 16px;
    }

    body.shop-page .filter-size-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* —— Women's page —— */
@media (max-width: 767px) {
    body.ep-store .womens-hero {
        min-height: 280px !important;
    }

    body.ep-store .womens-hero__title {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
    }

    body.ep-store .womens-hero__content {
        padding: 24px 16px !important;
    }
}

/* —— About page —— */
@media (max-width: 767px) {
    body.ep-store .ep-about-hero {
        min-height: 240px;
    }

    body.ep-store .ep-about-body {
        padding: 40px 16px 56px;
    }

    body.ep-store .ep-about-story {
        gap: 28px;
    }

    body.ep-store .ep-about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    body.ep-store .ep-about-visit__grid {
        grid-template-columns: 1fr;
    }

    body.ep-store .ep-about-cta-band__actions {
        flex-direction: column;
    }

    body.ep-store .ep-about-cta-band__actions .ep-btn {
        width: 100%;
    }
}

/* —— Contact page —— */
@media (max-width: 991px) {
    body.contact-page .contact-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    body.contact-page .contact-main {
        padding: 0;
    }
}

@media (max-width: 575px) {
    body.contact-page .contact-cards-grid {
        grid-template-columns: 1fr;
    }

    body.contact-page .contact-form-wrapper {
        padding: 24px 18px;
    }

    body.contact-page .map-wrapper iframe {
        min-height: 240px;
    }
}

/* —— Product details —— */
@media (max-width: 991px) {
    body.product-page .product-main-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    body.product-page .product-info-column {
        position: static;
    }

    body.product-page .product-info-column .size-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    body.product-page .product-details-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.product-page .product-info-column .size-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.product-page .product-purchase-block .order-btn {
        width: 100%;
        justify-content: center;
    }
}

/* —— Footer —— */
@media (max-width: 767px) {
    body.ep-store .ep-footer {
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 12px;
    }

    body.ep-store .ep-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px 24px;
        text-align: left;
    }

    body.ep-store .ep-footer__brand {
        grid-column: 1 / -1;
        text-align: center;
        padding-bottom: 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    body.ep-store .ep-footer__tagline {
        max-width: 340px;
        margin-left: auto;
        margin-right: auto;
    }

    body.ep-store .ep-footer__social {
        justify-content: center;
    }

    body.ep-store .ep-footer__contact {
        grid-column: 1 / -1;
    }

    body.ep-store .ep-footer__heading {
        display: block;
        width: 100%;
        min-width: 0;
        margin-bottom: 16px;
    }

    body.ep-store .ep-footer__links li {
        margin-bottom: 10px;
    }

    body.ep-store .ep-footer__links a:hover {
        padding-left: 0;
    }

    body.ep-store .ep-footer__contact-list li {
        justify-content: flex-start;
        align-items: flex-start;
        text-align: left;
        gap: 14px;
        margin-bottom: 16px;
    }

    body.ep-store .ep-footer__contact-list .fa {
        margin-top: 4px;
        width: 18px;
        font-size: 1.0625rem;
    }

    body.ep-store .ep-footer__contact-list span,
    body.ep-store .ep-footer__contact-list a {
        flex: 1;
        min-width: 0;
        line-height: 1.6;
    }

    body.ep-store .ep-footer__bottom {
        margin-top: 36px;
        padding-bottom: 72px;
    }
}

@media (max-width: 399px) {
    body.ep-store .ep-footer__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    body.ep-store .ep-footer__col + .ep-footer__col {
        padding-top: 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    body.ep-store .ep-footer__contact {
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
}

/* —— WhatsApp float —— */
@media (max-width: 767px) {
    body.ep-store .whatsapp-float {
        bottom: 18px;
        right: 16px;
        z-index: 9998;
    }

    body.ep-store .whatsapp-float i,
    body.ep-store .whatsapp-float .my-float {
        width: 52px !important;
        height: 52px !important;
        line-height: 52px !important;
        font-size: 24px !important;
    }

    body.shop-page .whatsapp-float {
        bottom: 78px;
    }
}

/* —— Prevent horizontal scroll from legacy template —— */
body.ep-store .container,
body.ep-store .container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

body.ep-store .row {
    margin-left: 0;
    margin-right: 0;
}

/* Touch targets (exclude carousel dots & compact icon buttons) */
@media (max-width: 991px) {
    body.ep-store button:not(.ep-hero__dot),
    body.ep-store .ep-btn,
    body.ep-store a.ep-btn {
        min-height: 44px;
    }
}
