/* ==========================================================
   Pharmacy shop
========================================================== */

/* Hero search (hero itself uses the shared .page-hero in styles.css) */
/* Left-aligned with the hero text */
.page-hero .ph-search { margin: 28px 0 0; }

.ph-search {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 18px;
    background: var(--white);
    border-radius: var(--radius-pill);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.ph-search i { color: var(--text-light); }

.ph-search input {
    flex: 1;
    min-width: 0;
    height: 54px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-dark);
}

.ph-search input:focus { outline: none; }

/* Shop */
.ph-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.ph-service-card { display: flex; flex-direction: column; align-items: flex-start; padding: 22px; border: none; border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-sm); transition: box-shadow 0.25s ease, transform 0.25s ease; }
.ph-service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ph-service-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 10px; background: var(--brand-mint-soft); color: var(--brand-700); }
.ph-service-card h2 { margin-bottom: 8px; color: var(--text-dark); font-size: 1.05rem; }
.ph-service-card p { margin-bottom: 16px; color: var(--text-medium); font-size: 0.86rem; line-height: 1.6; }
.ph-service-link { display: inline-flex; align-items: center; gap: 10px;    min-height: 40px;
margin-top: auto; padding: 0; border: 0; background: transparent; color: var(--brand-700); font: inherit; font-size: 0.86rem;    font-weight: 600;
text-align: left; cursor: pointer; }
.ph-service-link:focus-visible, .ph-upload:focus-visible { outline: 2px solid var(--brand-700); outline-offset: 4px; }
.ph-request-note { margin-bottom: 18px; color: var(--text-medium); font-size: 0.85rem; }
.ph-upload { overflow-wrap: anywhere; }
.ph-upload span { min-width: 0; }
.ph-upload.is-dragover { outline: 2px solid var(--brand-700); background: var(--brand-mint-soft); }
.ph-upload[aria-disabled="true"] { opacity: 0.65; cursor: wait; }
.ph-upload-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.ph-upload-action { min-height: 36px; padding: 5px 10px; border: var(--border); border-radius: 6px; background: var(--white); color: var(--brand-900); font: inherit; font-size: 0.8rem; cursor: pointer; }
@media (max-width: 767px) { .ph-services { grid-template-columns: 1fr; gap: 12px; } .ph-service-card { padding: 18px; } }

.ph-shop {
    background: var(--bg-light);
    padding: 36px 0 var(--section-y);
}

.ph-toolbar {
    position: sticky;
    top: calc(var(--header-h) - 40px);   /* top tier is hidden once scrolled */
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    margin-bottom: 20px;
    background: var(--bg-light);
}

@media (max-width: 991px) {
    .ph-toolbar { top: var(--nav-offset, var(--header-h)); }
}

.ph-chips {
    flex: 1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.ph-chips::-webkit-scrollbar { display: none; }

.ph-chip {
    flex-shrink: 0;
    min-height: 34px;
    padding: 0 14px;
    border: var(--border);
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--text-medium);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.ph-chip:hover { color: var(--text-dark); border-color: var(--gray-300); }

.ph-chip.is-active {
    background: var(--brand-900);
    border-color: var(--brand-900);
    color: var(--white);
}

.ph-cart-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: none;
    border-radius: var(--radius-btn);
    background: var(--primary-color);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ph-cart-btn:hover { background: var(--primary-dark); }

.ph-cart-count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--primary-dark);
    font-size: 0.75rem;
}

.ph-status {
    padding: 48px 16px;
    text-align: center;
    color: var(--text-medium);
}

.ph-status i { margin-right: 6px; color: var(--brand-700); }

/* Product grid */
.ph-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: clamp(12px, 2vw, 20px);
}

/* Product card: image, quiet meta, name, price + action */
.ph-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e6ebe8;
    border-radius: 14px;
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.ph-card:hover {
    border-color: #d3ddd8;
    box-shadow: 0 10px 28px -14px rgba(16, 42, 32, 0.28);
    transform: translateY(-2px);
}

.ph-card-img {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    background: #f5f7f6;
}
.ph-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14%;
    mix-blend-mode: multiply;               /* white product shots sit on the tint */
    transition: transform 0.35s ease;
}
.ph-card:hover .ph-card-img img { transform: scale(1.04); }
.ph-card-img > i { font-size: 2.2rem; color: #b6c4bd; }
.ph-card.is-oos .ph-card-img img { filter: grayscale(1); opacity: 0.55; }

.ph-rx {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
}
.ph-card .ph-rx {
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background: var(--white);
    color: #b42318;
    font-size: 0.68rem;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ph-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 14px 14px;
}

.ph-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.ph-cat {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-light);
}

.ph-card-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.35em);           /* keeps rows aligned */
    overflow-wrap: anywhere;
}

.ph-card-foot {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 48px;
}
.ph-price {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ph-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--brand-900);
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--brand-900);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.ph-add i { font-size: 0.7rem; }
.ph-add:hover,
.ph-add:focus-visible { background: var(--brand-900); color: var(--white); }
.ph-add:focus-visible { outline: 2px solid var(--brand-900); outline-offset: 2px; }

.ph-soldout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    background: var(--gray-100);
    color: var(--text-light);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.ph-card.is-oos .ph-price { color: var(--text-light); }
.ph-card.is-oos .ph-card-meta .ph-stock--out { display: none; }   /* the foot already says it */

.ph-card .ph-stepper button { width: 36px; height: 40px; }
.ph-card .ph-stepper span { min-width: 16px; }

.ph-unavailable {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
}

.ph-stepper {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-pill);
    background: var(--brand-900);
    color: var(--white);
}

.ph-stepper button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 36px;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 0.72rem;
    cursor: pointer;
}

.ph-stepper span {
    min-width: 18px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
}

.ph-stepper--sm {
    margin-top: 6px;
    background: var(--gray-100);
    color: var(--text-dark);
}

.ph-stepper--sm button { width: 30px; height: 30px; }

.ph-help {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 36px;
    font-size: 0.92rem;
    color: var(--text-medium);
    text-align: center;
}

.ph-help i { color: var(--brand-700); }

.ph-help a {
    font-weight: 700;
    color: var(--brand-700);
}

/* Mobile cart bar */
.ph-cartbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 10px 10px 18px;
    border-radius: var(--radius-pill);
    background: var(--brand-900);
    color: var(--white);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.ph-cartbar-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    font-size: 0.85rem;
}

.ph-cartbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: var(--radius-btn);
    background: var(--brand-mint);
    color: var(--brand-900);
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 767px) {
    .ph-cartbar:not([hidden]) { display: flex; }

    /* keep the floating buttons clear of the cart bar */
    body:has(.ph-cartbar:not([hidden])) .floating-whatsapp { bottom: 84px; }
    body:has(.ph-cartbar:not([hidden])) .scroll-to-top { bottom: 152px; }

    .ph-cart-btn span:not(.ph-cart-count) { display: none; }
}

/* Drawer */
.ph-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(17, 24, 39, 0.5);
}

.ph-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    width: min(440px, 100vw);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: var(--white);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.35s;
}

.ph-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s;
}

.ph-drawer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-bottom: var(--border);
}

.ph-drawer-head h2 {
    flex: 1;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.ph-close,
.ph-back {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--text-medium);
    cursor: pointer;
}

.ph-close:hover,
.ph-back:hover { background: var(--brand-900); color: var(--white); }

.ph-step {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.ph-step[hidden] { display: none; }

.ph-lines,
.ph-form-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px;
}

.ph-form-body { padding-top: 18px; }

.ph-line {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
}

.ph-line-img {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--gray-50);
    color: var(--gray-300);
}

.ph-line-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ph-line-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.82rem;
    color: var(--text-light);
}

.ph-line-info strong {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.ph-line-info em {
    font-style: normal;
    font-weight: 700;
    color: var(--danger);
}

.ph-line-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.ph-remove {
    border: none;
    background: none;
    color: var(--text-light);
    cursor: pointer;
}

.ph-remove:hover { color: var(--danger); }

.ph-empty {
    padding: 60px 0;
    text-align: center;
    color: var(--text-light);
}

.ph-empty i {
    display: block;
    margin-bottom: 10px;
    font-size: 2rem;
    color: var(--gray-300);
}

.ph-drawer-foot {
    padding: 16px 20px 20px;
    border-top: var(--border);
    background: var(--white);
}

.ph-sum {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    color: var(--text-medium);
}

.ph-sum strong {
    font-size: 1.2rem;
    color: var(--text-dark);
}

.ph-note {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-light);
}

.ph-full { width: 100%; }

.ph-step .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
}

.ph-rx-box {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: var(--radius-sm);
    background: #fef2f2;
}

.ph-rx-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--danger);
}

.ph-rx-text {
    margin: 4px 0 10px;
    font-size: 0.8rem;
    color: var(--text-medium);
}

.ph-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: 0.85rem;
    color: var(--text-medium);
    cursor: pointer;
}

.ph-upload:hover { border-color: var(--brand-700); }

.ph-form-error {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: #fef2f2;
    color: var(--danger);
    font-size: 0.85rem;
}

.ph-done {
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    text-align: center;
}

.ph-done-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--brand-mint-soft);
    color: var(--brand-700);
    font-size: 1.6rem;
}

.ph-done h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.ph-done p {
    margin-bottom: 24px;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-medium);
}

@media (max-width: 575px) {
    .ph-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ph-card-body { padding: 10px 10px 12px; gap: 4px; }
    .ph-card-meta .ph-stock--in { display: none; }   /* only flag low / out on small screens */
    .ph-card-name { font-size: 0.86rem; }
    .ph-card-foot { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 6px; }
    .ph-price { font-size: 0.95rem; }
    .ph-add, .ph-soldout { width: 100%; min-height: 38px; }
    .ph-card .ph-stepper { width: 100%; justify-content: space-between; }
    .ph-card:hover { transform: none; }
}

@media (max-width: 340px) {
    .ph-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ----------------------------------------
   Hero promise row with a delivery rider riding across
---------------------------------------- */
.ph-ride {
    --ride: 7s;
    position: relative;
    width: fit-content;          /* road is exactly as wide as the row */
    max-width: 100%;
    margin-top: 26px;
}

.page-hero .ph-ride-points {
    display: flex;
    flex-wrap: nowrap;
    gap: 28px;
    margin: 0;
}

.ph-ride-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

.ph-ride-points li i {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--brand-mint);
    font-size: 0.85rem;
    animation: phStop var(--ride) ease-in-out infinite;
}

/* Each stop lights up as the rider passes it */
.ph-ride-points li:nth-child(1) i { animation-delay: calc(var(--ride) * 0.12); }
.ph-ride-points li:nth-child(2) i { animation-delay: calc(var(--ride) * 0.42); }
.ph-ride-points li:nth-child(3) i { animation-delay: calc(var(--ride) * 0.72); }

@keyframes phStop {
    0%, 14%, 100% {
        background: rgba(255, 255, 255, 0.12);
        color: var(--brand-mint);
        transform: scale(1);
    }
    5% {
        background: var(--brand-mint);
        color: var(--brand-900);
        transform: scale(1.15);
    }
}

/* The road */
.ph-road {
    position: relative;
    height: 54px;
    margin-top: 6px;
    overflow: hidden;
}

.ph-road::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 2px;
    background: repeating-linear-gradient(90deg,
        rgba(255, 255, 255, 0.45) 0 14px,
        transparent 14px 24px);
    animation: phRoad 0.6s linear infinite;     /* dashes stream past = sense of speed */
}

@keyframes phRoad {
    from { background-position: 0 0; }
    to   { background-position: -24px 0; }
}

/* The rider */
.ph-rider {
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 66px;
    height: 46px;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35));
    animation: phRide var(--ride) linear infinite;
}

.ph-rider-svg {
    display: block;
    overflow: visible;
    animation: phBump 0.3s ease-in-out infinite alternate;
}

.ph-wheel {
    transform-box: fill-box;
    transform-origin: center;
    animation: phSpin 0.45s linear infinite;
}

@keyframes phSpin { to { transform: rotate(360deg); } }

/* Speed streaks behind the scooter */
.ph-rider::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 16px;
    width: 34px;
    height: 12px;
    margin-right: 2px;
    background:
        linear-gradient(90deg, transparent, rgba(134, 239, 172, 0.75)) 0 0 / 100% 2px no-repeat,
        linear-gradient(90deg, transparent, rgba(134, 239, 172, 0.45)) 10px 6px / 70% 2px no-repeat,
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35)) 16px 11px / 50% 1px no-repeat;
}

/* Exhaust puffs */
.ph-puff {
    position: absolute;
    left: 0;
    bottom: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    animation: phPuff 0.9s ease-out infinite;
}

.ph-puff + .ph-puff { animation-delay: 0.45s; }

@keyframes phPuff {
    0%   { opacity: 0.7; transform: translate(0, 0) scale(0.6); }
    100% { opacity: 0; transform: translate(-22px, -6px) scale(1.8); }
}

@keyframes phRide {
    0%   { left: -80px; opacity: 0; }
    6%   { opacity: 1; }
    90%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

@keyframes phBump {
    from { transform: translateY(0) rotate(0deg); }
    to   { transform: translateY(-1.5px) rotate(-1.5deg); }
}

@media (max-width: 575px) {
    .ph-ride { width: 100%; }

    .page-hero .ph-ride-points {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .ph-ride-points li {
        white-space: normal;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        font-size: 0.74rem;
        line-height: 1.3;
    }

    .ph-ride-points li i { width: 30px; height: 30px; font-size: 0.75rem; }

    .ph-rider { transform: scale(0.85); transform-origin: bottom left; }
}

@media (prefers-reduced-motion: reduce) {
    .ph-rider,
    .ph-rider-svg,
    .ph-wheel,
    .ph-puff,
    .ph-road::before,
    .ph-ride-points li i { animation: none; }
    .ph-rider { left: 0; opacity: 1; }
}

/* ==========================================================
   Product page (/pharmacy?product=<id>)
========================================================== */

/* Whole card opens the product; Add / quantity buttons sit above the link */
.ph-card { position: relative; cursor: pointer; }
.ph-card-link { color: inherit; text-decoration: none; }
.ph-card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.ph-card-link:focus-visible { outline: none; }
.ph-card:has(.ph-card-link:focus-visible) { outline: 2px solid var(--brand-900); outline-offset: 2px; }
.ph-card-control { position: relative; z-index: 2; }
.ph-card:hover .ph-card-link { color: var(--brand-900); }

/* While a product is open, the catalogue steps aside */
.ph-shop.is-detail .ph-services,
.ph-shop.is-detail .ph-toolbar,
.ph-shop.is-detail .ph-status,
.ph-shop.is-detail > .container > .ph-grid { display: none; }

.ph-detail[hidden] { display: none; }
.ph-detail { padding-bottom: 8px; }
.ph-detail h1:focus { outline: none; }   /* focus moves here for screen readers; no box needed */

.ph-detail-crumbs,
.ph-detail-back {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--text-light);
    font-size: 13.5px;
}

.ph-detail-crumbs a,
.ph-detail-back {
    color: var(--brand-900);
    font-weight: 600;
    text-decoration: none;
}

.ph-detail-crumbs a:hover,
.ph-detail-back:hover { text-decoration: underline; }

.ph-detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
    padding: clamp(18px, 3vw, 32px);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.ph-detail-media {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    background: #f6f8f7;
    color: #b7c3be;
    font-size: 4rem;
}

.ph-detail-media img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.ph-detail-media .ph-rx { top: 14px; left: 14px; }

.ph-detail-info { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }

.ph-detail-name {
    margin: 8px 0 10px;
    color: var(--text-dark);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.ph-detail-price {
    color: var(--brand-900);
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ph-detail-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 13.5px;
    font-weight: 600;
}

.ph-detail-stock span { width: 8px; height: 8px; border-radius: 50%; }
.ph-detail-stock.is-in { color: #047857; }
.ph-detail-stock.is-in span { background: #10b981; }
.ph-detail-stock.is-out { color: #b45309; }
.ph-detail-stock.is-out span { background: #f59e0b; }

.ph-detail-desc {
    margin-top: 18px;
    color: var(--text-medium);
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-line;
}

.ph-detail-rx {
    margin-top: 18px;
    padding: 12px 14px;
    border-left: 3px solid var(--danger);
    border-radius: 6px;
    background: #fef2f2;
    color: #7f1d1d;
    font-size: 13.5px;
    line-height: 1.55;
}

.ph-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 24px;
}

.ph-detail-add,
.ph-detail-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 26px;
    border: 1px solid transparent;
    border-radius: var(--radius-btn);
    background: var(--brand-900);
    color: var(--white);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.ph-detail-add:hover { background: var(--brand-700); }

.ph-detail-checkout {
    border-color: var(--brand-900);
    background: var(--white);
    color: var(--brand-900);
}

.ph-detail-checkout:hover { background: #f0fdf4; }

.ph-stepper--lg button { width: 46px; height: 46px; font-size: 0.85rem; }
.ph-stepper--lg span { min-width: 28px; font-size: 1rem; }

.ph-detail-alt { color: var(--brand-900); font-size: 14px; font-weight: 600; }

.ph-detail-promises {
    display: grid;
    gap: 10px;
    width: 100%;
    margin: 26px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--gray-200);
    list-style: none;
    color: var(--text-medium);
    font-size: 14px;
}

.ph-detail-promises i { width: 20px; color: var(--brand-700); }

.ph-detail-help { margin-top: 16px; color: var(--text-light); font-size: 13.5px; }
.ph-detail-help a { color: var(--brand-900); font-weight: 600; }

.ph-detail-more { margin-top: clamp(28px, 4vw, 44px); }

.ph-detail-more h2 {
    margin-bottom: 16px;
    color: var(--text-dark);
    font-size: 1.15rem;
    font-weight: 700;
}

.ph-detail-missing {
    padding: 48px 24px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.ph-detail-missing h1 { margin-bottom: 10px; font-size: 1.4rem; }
.ph-detail-missing p { max-width: 520px; margin: 0 auto 20px; color: var(--text-medium); line-height: 1.6; }

@media (max-width: 860px) {
    .ph-detail-main { grid-template-columns: minmax(0, 1fr); }
    .ph-detail-media { max-height: 420px; aspect-ratio: 4 / 3; }
}

@media (max-width: 480px) {
    .ph-detail-actions > * { flex: 1 1 100%; }
    .ph-detail-add, .ph-detail-checkout { width: 100%; }
    .ph-stepper--lg { justify-content: space-between; }
}

/* Stock label on product cards */
.ph-stock {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
}

.ph-stock::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ph-stock--in { color: #047857; }
.ph-stock--low { color: #b45309; }
.ph-stock--out { color: #6b7280; }

.ph-detail-stock.is-low { color: #b45309; }
.ph-detail-stock.is-low span { background: #f59e0b; }
