:root {
    --ph-ink: #17312f;
    --ph-muted: #5f7772;
    --ph-soft: #edf8f5;
    --ph-panel: #ffffff;
    --ph-bg: #f6fbfa;
    --ph-line: #d6e7e3;
    --ph-green: #2f9a5f;
    --ph-teal: #0d8f82;
    --ph-amber: #e7a93e;
    --ph-radius: 18px;
    --ph-radius-sm: 12px;
    --ph-shadow: 0 18px 48px rgba(18, 72, 67, 0.1);
    --ph-font: "Manrope", "IBM Plex Sans Arabic", sans-serif;
}

.store-type-pharmacy {
    --surface: var(--ph-bg);
    min-width: 0;
    overflow-x: hidden;
    background:
        linear-gradient(135deg, rgba(var(--brand-rgb), 0.12), transparent 28%),
        linear-gradient(315deg, rgba(47, 154, 95, 0.1), transparent 32%),
        var(--ph-bg);
    color: var(--ph-ink);
    font-family: var(--ph-font);
}

.store-type-pharmacy .storefront-page {
    background: transparent;
}

.store-type-pharmacy .storefront-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgba(23, 49, 47, 0.08);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(18, 72, 67, 0.05);
}

.store-type-pharmacy .storefront-header__bar,
.store-type-pharmacy .storefront-main,
.store-type-pharmacy .ph-footer {
    width: min(1320px, calc(100% - clamp(28px, 5vw, 72px)));
    margin-inline: auto;
}

.store-type-pharmacy .brand-lockup__mark,
.store-type-pharmacy .brand-lockup__logo {
    border-radius: 16px;
    background: linear-gradient(145deg, var(--brand-color), var(--ph-green));
    color: #fff;
    box-shadow: 0 10px 24px rgba(var(--brand-rgb), 0.18);
}

.store-type-pharmacy .brand-lockup__copy strong {
    color: var(--ph-ink);
    font-family: var(--ph-font);
    letter-spacing: 0;
}

.store-type-pharmacy .brand-lockup__copy small {
    color: var(--ph-muted);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.store-type-pharmacy .storefront-search {
    border: 1px solid var(--ph-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(18, 72, 67, 0.06);
}

.store-type-pharmacy .storefront-search__input {
    min-width: 0;
    color: var(--ph-ink);
    font-family: var(--ph-font);
}

.store-type-pharmacy .storefront-search__input:focus {
    outline: 2px solid rgba(var(--brand-rgb), 0.24);
    outline-offset: 2px;
}

.store-type-pharmacy .storefront-search__button,
.store-type-pharmacy .cart-button {
    border-radius: 14px;
    background: var(--brand-color);
    color: #fff;
}

.store-type-pharmacy .cart-button__badge {
    background: var(--ph-ink);
    color: #fff;
}

.store-type-pharmacy .storefront-nav {
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.store-type-pharmacy .storefront-nav::-webkit-scrollbar {
    display: none;
}

.store-type-pharmacy .storefront-nav__link {
    flex: 0 0 auto;
    border: 1px solid var(--ph-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--ph-ink);
    font-weight: 800;
    white-space: nowrap;
}

.store-type-pharmacy .storefront-main {
    display: grid;
    gap: clamp(32px, 5vw, 72px);
    padding-block: clamp(22px, 4vw, 54px);
}

.ph-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ph-muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ph-eyebrow::before {
    content: "";
    inline-size: 26px;
    block-size: 2px;
    border-radius: 999px;
    background: var(--brand-color);
}

.ph-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: clamp(16px, 3vw, 32px);
    align-items: stretch;
}

.ph-hero__copy,
.ph-hero__media,
.ph-category,
.ph-rx-panel,
.ph-card,
.ph-banner,
.ph-aisle,
.ph-trust > div,
.ph-footer__top {
    border: 1px solid rgba(23, 49, 47, 0.08);
    border-radius: var(--ph-radius);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 12px 36px rgba(18, 72, 67, 0.07);
}

.ph-hero__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(24px, 5vw, 56px);
}

.ph-hero h1 {
    max-width: 820px;
    margin: 18px 0 16px;
    color: var(--ph-ink);
    font-size: clamp(40px, 6vw, 82px);
    line-height: 0.98;
    letter-spacing: 0;
}

.ph-hero p {
    max-width: 650px;
    margin: 0 0 26px;
    color: var(--ph-muted);
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.7;
}

.ph-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    max-width: 620px;
    padding: 8px;
    border: 1px solid var(--ph-line);
    border-radius: 16px;
    background: #fff;
}

.ph-search input {
    min-width: 0;
    border: 0;
    padding: 15px 14px;
    background: transparent;
    color: var(--ph-ink);
    font: 700 15px var(--ph-font);
}

.ph-search input:focus {
    outline: 0;
}

.ph-search button,
.ph-button,
.ph-add,
.ph-whatsapp {
    border: 0;
    border-radius: 14px;
    background: var(--brand-color);
    color: #fff;
    font: 900 14px var(--ph-font);
    text-decoration: none;
    cursor: pointer;
}

.ph-search button {
    padding-inline: 22px;
}

.ph-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.ph-hero__stats span {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--ph-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ph-muted);
    font-size: 12px;
    font-weight: 800;
}

.ph-hero__stats strong {
    display: block;
    color: var(--ph-ink);
    font-size: 28px;
    line-height: 1;
}

.ph-hero__media {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    padding: clamp(16px, 2.2vw, 28px);
    background:
        radial-gradient(circle at 12% 14%, rgba(24, 139, 128, .13), transparent 33%),
        linear-gradient(145deg, #eef8f5 0%, #f7fbf9 48%, #e5f2ee 100%);
}

.ph-category img,
.ph-card__media img,
.ph-banner > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ph-hero__products {
    display: grid;
    height: 100%;
    min-height: 466px;
    grid-template-columns: 1.2fr .8fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ph-hero__product {
    min-width: 0;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(23, 49, 47, .08);
    border-radius: 18px;
    background: #fff;
}

.ph-hero__product--primary {
    grid-row: 1 / -1;
}

.ph-hero__product img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ph-hero__service {
    position: absolute;
    inset-inline: 22px;
    inset-block-end: 22px;
    display: grid;
    gap: 10px;
    max-width: 440px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ph-ink);
    box-shadow: var(--ph-shadow);
    backdrop-filter: blur(12px);
}

.ph-hero__service strong {
    font-size: 22px;
    line-height: 1.15;
}

.ph-hero__service small {
    color: var(--ph-muted);
    line-height: 1.55;
}

.ph-service-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ph-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 16px;
}

.ph-button--soft {
    border: 1px solid var(--ph-line);
    background: #fff;
    color: var(--ph-ink);
}

.ph-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.ph-section-head h2 {
    margin: 8px 0 0;
    color: var(--ph-ink);
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: 0;
}

.ph-section-head p {
    max-width: 620px;
    margin: 8px 0 0;
    color: var(--ph-muted);
    line-height: 1.7;
}

.ph-section-head > a,
.ph-aisle__head a {
    color: var(--ph-ink);
    font-weight: 900;
    text-decoration: none;
}

.ph-category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.ph-category {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    isolation: isolate;
}

.ph-category::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(23, 49, 47, 0.02) 18%, rgba(23, 49, 47, 0.74));
}

.ph-category img {
    transition: transform 220ms ease;
}

.ph-category:hover img {
    transform: scale(1.03);
}

.ph-category span {
    position: absolute;
    inset-inline: 14px;
    inset-block-end: 14px;
    z-index: 2;
}

.ph-category strong,
.ph-category small {
    display: block;
}

.ph-category strong {
    font-size: 18px;
    line-height: 1.2;
}

.ph-category small {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
}

.ph-rx-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: 20px;
    padding: clamp(22px, 4vw, 42px);
    background:
        linear-gradient(145deg, rgba(var(--brand-rgb), 0.13), rgba(47, 154, 95, 0.09)),
        #fff;
}

.ph-rx-panel h2 {
    margin: 8px 0 10px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.05;
}

.ph-rx-panel p {
    margin: 0;
    color: var(--ph-muted);
    line-height: 1.7;
}

.ph-rx-panel__list {
    display: grid;
    gap: 10px;
    align-self: center;
}

.ph-rx-panel__list div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 13px;
    border: 1px solid var(--ph-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.ph-rx-panel__list b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 28px;
    block-size: 28px;
    border-radius: 10px;
    background: var(--brand-color);
    color: #fff;
    font-size: 12px;
}

.ph-rx-panel__list strong {
    display: block;
    color: var(--ph-ink);
}

.ph-rx-panel__list small {
    color: var(--ph-muted);
    line-height: 1.45;
}

.ph-deal-grid,
.ph-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 14px;
}

.ph-product-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.ph-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.ph-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 50px rgba(18, 72, 67, 0.12);
}

.ph-card__media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    background: var(--ph-soft);
}

.ph-badge {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-start: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--brand-color);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.ph-badge--soft {
    background: rgba(23, 49, 47, 0.82);
}

.ph-card__body {
    display: flex;
    min-height: 218px;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
}

.ph-card__name {
    color: var(--ph-ink);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.25;
    text-decoration: none;
}

.ph-card__body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: var(--ph-muted);
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ph-card__unit {
    color: var(--ph-muted);
    font-size: 12px;
    font-weight: 800;
}

.ph-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.ph-price {
    min-width: 0;
}

.ph-price strong,
.ph-price del {
    display: block;
}

.ph-price strong {
    color: var(--ph-ink);
    font-size: 17px;
}

.ph-price del {
    color: var(--ph-muted);
    font-size: 12px;
}

.ph-add {
    inline-size: 42px;
    block-size: 42px;
    flex: 0 0 42px;
    font-size: 23px;
    line-height: 1;
}

.ph-add:disabled {
    background: #b9c8c5;
    cursor: not-allowed;
}

.ph-banner {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(280px, 5fr);
    overflow: hidden;
    background: var(--ph-ink);
    color: #fff;
}

.ph-banner > img {
    min-height: 340px;
}

.ph-banner__copy {
    align-self: center;
    padding: clamp(26px, 4vw, 54px);
}

.ph-banner h2 {
    margin: 10px 0;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1.04;
}

.ph-banner p {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
}

.ph-banner .ph-button--soft {
    border-color: transparent;
    background: #fff;
    color: var(--ph-ink);
}

.ph-aisle {
    padding: 18px;
    margin-bottom: 14px;
}

.ph-aisle__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.ph-aisle__head h3 {
    margin: 0;
    font-size: 24px;
}

.ph-trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.ph-trust > div {
    display: grid;
    gap: 8px;
    padding: 22px;
}

.ph-trust span {
    color: var(--brand-color);
    font-size: 12px;
    font-weight: 900;
}

.ph-trust strong {
    font-size: 19px;
}

.ph-trust small {
    color: var(--ph-muted);
    line-height: 1.55;
}

.ph-empty {
    border: 1px dashed var(--ph-line);
    border-radius: var(--ph-radius);
    padding: 28px;
    background: rgba(255, 255, 255, 0.66);
    color: var(--ph-muted);
}

.ph-footer {
    padding-block: 10px 36px;
}

.ph-footer__top {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(260px, 3fr) minmax(180px, 2fr) minmax(180px, 2fr);
    gap: 18px;
    padding: clamp(22px, 4vw, 44px);
    background:
        linear-gradient(145deg, rgba(23, 49, 47, 0.98), rgba(22, 70, 65, 0.92)),
        var(--ph-ink);
    color: #fff;
}

.ph-footer h2 {
    margin: 0 0 12px;
    font-size: clamp(22px, 3vw, 40px);
    line-height: 1.08;
}

.ph-footer p,
.ph-footer span,
.ph-footer small {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
}

.ph-footer a {
    color: #fff;
    text-decoration: none;
}

.ph-footer__locale {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.ph-footer__locale a,
.ph-footer__locale span,
.ph-whatsapp {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
}

.ph-footer__locale .is-active {
    background: rgba(255, 255, 255, 0.12);
}

.ph-contact,
.ph-footer__links {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.ph-whatsapp {
    margin-top: 8px;
    border-color: transparent;
    background: var(--brand-color);
}

.ph-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-block: 16px;
    color: var(--ph-muted);
    font-size: 13px;
}

.ph-footer__bottom p,
.ph-footer__bottom span {
    margin: 0;
    color: var(--ph-muted);
}

[dir="rtl"] .ph-eyebrow {
    letter-spacing: 0;
}

[dir="rtl"] .store-type-pharmacy .brand-lockup__copy small {
    letter-spacing: 0;
}

[dir="rtl"] .ph-search,
[dir="rtl"] .store-type-pharmacy .storefront-search__input,
[dir="rtl"] .ph-card__body,
[dir="rtl"] .ph-footer,
[dir="rtl"] .ph-hero__copy {
    text-align: right;
}

@media (max-width: 1120px) {
    .ph-hero,
    .ph-rx-panel,
    .ph-banner,
    .ph-footer__top {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 760px) {
    .store-type-pharmacy .storefront-header__bar,
    .store-type-pharmacy .storefront-main,
    .store-type-pharmacy .ph-footer {
        width: min(100% - 28px, 1320px);
    }

    .store-type-pharmacy .storefront-search {
        order: 3;
        width: 100%;
    }

    .store-type-pharmacy .language-switch {
        display: none;
    }

    .ph-hero__copy {
        padding: 22px;
    }

    .ph-hero h1 {
        font-size: clamp(36px, 14vw, 56px);
    }

    .ph-search {
        grid-template-columns: 1fr;
    }

    .ph-search button {
        min-height: 46px;
    }

    .ph-hero__stats,
    .ph-category-grid,
    .ph-trust {
        grid-template-columns: 1fr;
    }

    .ph-hero__media {
        min-height: auto;
        order: -1;
        padding: 12px;
    }

    .ph-hero__products {
        min-height: 420px;
        grid-template-columns: 1.15fr .85fr;
        gap: 8px;
    }

    .ph-hero__service {
        position: relative;
        inset: auto;
        margin: 12px 0 0;
    }

    .ph-section-head,
    .ph-aisle__head,
    .ph-card__foot,
    .ph-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .ph-card__foot {
        gap: 10px;
    }

    .ph-add {
        inline-size: 100%;
    }

    .ph-banner > img {
        min-height: 260px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ph-card,
    .ph-category img {
        transition: none;
    }
}
