/*
 * Pharmint vendor store page — scoped stylesheet.
 * All rules live under .pharmint-vendor-store so nothing leaks into Astra,
 * WooCommerce archives, Elementor, or other Dokan surfaces.
 *
 * Brand tokens are pulled from pharmint.net kit-3049:
 *   accent  #EF6820 (Pharmint orange)
 *   accent-h #F38744
 *   accent-bg #FEFAF5
 *   accent-text #70310F
 *   ink   #1D2939 / muted #667085 / mute #98A2B3
 *   page  #F9FAFB   card  #FFFFFF   hairline #EAECF0   dark #101828
 *   type  DM Sans (already enqueued globally by the theme)
 *   scale 12/14/16/18/20/24/32/40/48/56, LH 1.2em display / 1.4em body
 */

.pharmint-vendor-store {
    /* Design tokens local to this root so we don't leak custom properties */
    --pv-ink:        #1D2939;
    --pv-ink-2:      #667085;
    --pv-ink-3:      #98A2B3;
    --pv-page:       #F9FAFB;
    --pv-card:       #FFFFFF;
    --pv-hair:       #EAECF0;
    --pv-dark:       #101828;

    --pv-accent:      #EF6820;
    --pv-accent-h:    #F38744;
    --pv-accent-bg:   #FEFAF5;
    --pv-accent-text: #70310F;

    --pv-success:    #067647;
    --pv-success-bg: #ECFDF3;
    --pv-amber:      #B54708;
    --pv-amber-bg:   #FEF6EE;

    --pv-radius-md: 8px;
    --pv-radius-lg: 12px;
    --pv-shadow-sm: 0 1px 2px rgba(16,24,40,.06);
    --pv-shadow-md: 0 4px 12px -4px rgba(16,24,40,.08), 0 2px 4px -2px rgba(16,24,40,.04);

    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.4em;
    color: var(--pv-ink);
    background: var(--pv-page);
    letter-spacing: -0.1px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Undo any Astra site-wide constraints */
    padding: 24px 0 96px;
}

.pharmint-vendor-store *,
.pharmint-vendor-store *::before,
.pharmint-vendor-store *::after { box-sizing: border-box; }

.pharmint-vendor-store ::selection { background: var(--pv-accent); color: #fff; }

/* ============ SHELL ============ */
.pharmint-vendor-store .pv-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;
}
@media (max-width: 640px) {
    .pharmint-vendor-store .pv-shell { padding: 0 20px; }
}

/* ============ BREADCRUMB ============ */
.pharmint-vendor-store .pv-breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: var(--pv-ink-3);
    padding: 4px 0 28px;
}
.pharmint-vendor-store .pv-breadcrumb a {
    color: var(--pv-ink-3);
    text-decoration: none;
}
.pharmint-vendor-store .pv-breadcrumb a:hover { color: var(--pv-accent); }
.pharmint-vendor-store .pv-breadcrumb .sep { opacity: .5; }
.pharmint-vendor-store .pv-breadcrumb .now { color: var(--pv-ink); font-weight: 500; }

/* ============ HERO ============ */
.pharmint-vendor-store .pv-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 64px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--pv-hair);
}
@media (max-width: 900px) {
    .pharmint-vendor-store .pv-hero { grid-template-columns: 1fr; gap: 32px; }
}
.pharmint-vendor-store .pv-hero-main { min-width: 0; }

.pharmint-vendor-store .pv-flag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 8px;
    background: var(--pv-success-bg);
    color: var(--pv-success);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: -0.1px;
    margin-bottom: 24px;
    line-height: 1.2em;
}
.pharmint-vendor-store .pv-flag svg { width: 14px; height: 14px; }

.pharmint-vendor-store .pv-name {
    font-family: "DM Sans", -apple-system, sans-serif;
    font-size: clamp(38px, 5.5vw, 56px);
    font-weight: 500;
    line-height: 1.15em;
    letter-spacing: -1.2px;
    margin: 0 0 18px;
    text-wrap: balance;
    color: var(--pv-ink);
}
.pharmint-vendor-store .pv-tag {
    font-size: 18px;
    line-height: 1.5em;
    color: var(--pv-ink-2);
    max-width: 62ch;
    margin: 0 0 32px;
    text-wrap: pretty;
    letter-spacing: -0.1px;
}

/* ---- Metrics strip ---- */
.pharmint-vendor-store .pv-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--pv-hair);
    border-bottom: 1px solid var(--pv-hair);
    margin-top: 8px;
}
@media (max-width: 640px) {
    .pharmint-vendor-store .pv-metrics { grid-template-columns: repeat(2, 1fr); }
}
.pharmint-vendor-store .pv-metric {
    padding: 20px 24px 20px 0;
    border-right: 1px solid var(--pv-hair);
}
.pharmint-vendor-store .pv-metric:first-child { padding-left: 0; }
.pharmint-vendor-store .pv-metric:nth-child(n+2) { padding-left: 24px; }
.pharmint-vendor-store .pv-metric:last-child { border-right: none; padding-right: 0; }
@media (max-width: 640px) {
    .pharmint-vendor-store .pv-metric:nth-child(2n) { border-right: none; padding-right: 0; }
    .pharmint-vendor-store .pv-metric:nth-child(2n+1) { padding-left: 0; }
    .pharmint-vendor-store .pv-metric:nth-child(-n+2) { border-bottom: 1px solid var(--pv-hair); }
}
.pharmint-vendor-store .pv-metric .n {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.6px;
    color: var(--pv-ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.2em;
}
.pharmint-vendor-store .pv-metric .n .unit {
    font-size: 13px;
    color: var(--pv-ink-3);
    font-weight: 400;
    letter-spacing: 0;
    margin-left: 4px;
}
.pharmint-vendor-store .pv-metric .k {
    font-size: 12.5px;
    color: var(--pv-ink-2);
    margin-top: 6px;
    letter-spacing: -0.05px;
}

/* ============ RIGHT RAIL ============ */
.pharmint-vendor-store .pv-rail {
    background: var(--pv-card);
    border: 1px solid var(--pv-hair);
    border-radius: var(--pv-radius-lg);
    padding: 28px 28px 24px;
    align-self: start;
    position: sticky;
    top: 20px;
    box-shadow: var(--pv-shadow-sm);
}
.pharmint-vendor-store .pv-rail-label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--pv-ink-2);
    margin-bottom: 12px;
}
.pharmint-vendor-store .pv-price-hint {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.6px;
    color: var(--pv-ink);
    margin-bottom: 16px;
    line-height: 1.2em;
}
.pharmint-vendor-store .pv-price-hint small {
    display: block;
    font-size: 13px;
    color: var(--pv-ink-2);
    font-weight: 400;
    letter-spacing: 0;
    margin-top: 4px;
}
.pharmint-vendor-store .pv-cta {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: var(--pv-accent);
    color: #FFFFFF;
    border: none;
    border-radius: var(--pv-radius-md);
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.15px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .12s ease, transform .12s ease;
}
.pharmint-vendor-store .pv-cta:hover,
.pharmint-vendor-store .pv-cta:focus {
    background: var(--pv-accent-h);
    color: #FFFFFF;
    transform: translateY(-1px);
    text-decoration: none;
}
.pharmint-vendor-store .pv-cta:focus-visible { outline: 2px solid var(--pv-accent); outline-offset: 2px; }
.pharmint-vendor-store .pv-cta-sub {
    display: block;
    text-align: center;
    color: var(--pv-ink-2);
    font-size: 12.5px;
    margin-top: 12px;
    letter-spacing: -0.05px;
}

.pharmint-vendor-store .pv-rail-facts {
    list-style: none;
    padding: 22px 0 0;
    margin: 22px 0 0;
    border-top: 1px solid var(--pv-hair);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pharmint-vendor-store .pv-rail-facts li {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: start;
    font-size: 14px;
    color: var(--pv-ink);
    line-height: 1.4em;
    letter-spacing: -0.05px;
}
.pharmint-vendor-store .pv-rail-facts .icon {
    width: 22px; height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pv-ink-3);
    margin-top: 1px;
}
.pharmint-vendor-store .pv-rail-facts .icon svg { width: 16px; height: 16px; }
.pharmint-vendor-store .pv-rail-facts .k {
    display: block;
    color: var(--pv-ink-2);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}
.pharmint-vendor-store .pv-rail-facts a {
    color: var(--pv-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--pv-hair);
    text-decoration-thickness: 1px;
}
.pharmint-vendor-store .pv-rail-facts a:hover { text-decoration-color: var(--pv-accent); }
.pharmint-vendor-store .pv-rail-facts .empty-hint {
    color: var(--pv-ink-3);
    font-style: italic;
    font-size: 13px;
}

.pharmint-vendor-store .pv-rail-social {
    display: flex;
    gap: 8px;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--pv-hair);
    flex-wrap: wrap;
}
.pharmint-vendor-store .pv-rail-social a {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pv-page);
    color: var(--pv-ink-2);
    text-decoration: none;
    border: 1px solid var(--pv-hair);
    transition: color .15s, background .15s, border-color .15s;
}
.pharmint-vendor-store .pv-rail-social a:hover {
    color: var(--pv-accent);
    border-color: var(--pv-accent);
    background: var(--pv-accent-bg);
}
.pharmint-vendor-store .pv-rail-social a svg { width: 15px; height: 15px; }

/* ============ SECTIONS ============ */
.pharmint-vendor-store .pv-section {
    margin-top: 56px;
}
.pharmint-vendor-store .pv-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--pv-hair);
    flex-wrap: wrap;
}
.pharmint-vendor-store .pv-section-head h2 {
    font-family: "DM Sans", sans-serif;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.6px;
    margin: 0;
    color: var(--pv-ink);
    line-height: 1.2em;
}
.pharmint-vendor-store .pv-meta {
    font-size: 13px;
    color: var(--pv-ink-2);
    font-weight: 400;
    letter-spacing: -0.05px;
    margin-right: auto;
    margin-left: 12px;
}
.pharmint-vendor-store .pv-see-all {
    color: var(--pv-accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.pharmint-vendor-store .pv-see-all:hover { color: var(--pv-accent-h); }

/* ============ PRODUCTS ============ */
.pharmint-vendor-store .pv-products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}
@media (max-width: 1024px) {
    .pharmint-vendor-store .pv-products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 780px) {
    .pharmint-vendor-store .pv-products { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 460px) {
    .pharmint-vendor-store .pv-products { grid-template-columns: 1fr; }
}

.pharmint-vendor-store .pv-product {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--pv-card);
    border-radius: var(--pv-radius-md);
    overflow: hidden;
    border: 1px solid var(--pv-hair);
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
    min-width: 0;
}
.pharmint-vendor-store .pv-product:hover,
.pharmint-vendor-store .pv-product:focus {
    border-color: var(--pv-accent);
    box-shadow: var(--pv-shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}
.pharmint-vendor-store .pv-product:focus-visible { outline: 2px solid var(--pv-accent); outline-offset: 2px; }
.pharmint-vendor-store .pv-thumb {
    aspect-ratio: 1 / 1;
    background: var(--pv-page);
    overflow: hidden;
    position: relative;
    display: block;
}
.pharmint-vendor-store .pv-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    max-width: none;
}
.pharmint-vendor-store .pv-body {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.pharmint-vendor-store .pv-pname {
    font-size: 14.5px;
    line-height: 1.4em;
    color: var(--pv-ink);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.4em * 3);
    font-weight: 500;
    letter-spacing: -0.1px;
}
.pharmint-vendor-store .pv-cas {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 11.5px;
    letter-spacing: 0.02em;
    color: var(--pv-ink-2);
}
.pharmint-vendor-store .pv-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--pv-hair);
}
.pharmint-vendor-store .pv-price-note {
    font-size: 12.5px;
    color: var(--pv-ink-2);
    font-weight: 500;
    letter-spacing: -0.05px;
}
.pharmint-vendor-store .pv-arrow {
    color: var(--pv-accent);
    font-size: 16px;
    line-height: 1;
    transition: transform .18s ease;
}
.pharmint-vendor-store .pv-product:hover .pv-arrow { transform: translateX(3px); }

/* ============ EMPTY STATE ============ */
.pharmint-vendor-store .pv-empty {
    background: var(--pv-card);
    border: 1px solid var(--pv-hair);
    border-radius: var(--pv-radius-lg);
    padding: 36px 40px;
    color: var(--pv-ink-2);
    font-size: 15.5px;
    line-height: 1.5em;
}
.pharmint-vendor-store .pv-empty p { margin: 0 0 8px; }
.pharmint-vendor-store .pv-empty p:last-child { margin-bottom: 0; }
.pharmint-vendor-store .pv-empty strong { color: var(--pv-ink); }

/* ============ ABOUT ============ */
.pharmint-vendor-store .pv-about {
    background: var(--pv-card);
    border: 1px solid var(--pv-hair);
    border-radius: var(--pv-radius-lg);
    padding: 36px 40px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    margin-top: 56px;
    align-items: start;
}
@media (max-width: 780px) {
    .pharmint-vendor-store .pv-about { grid-template-columns: 1fr; padding: 28px; gap: 20px; }
}
.pharmint-vendor-store .pv-about-k {
    font-size: 13px;
    font-weight: 500;
    color: var(--pv-ink-2);
}
.pharmint-vendor-store .pv-about-body {
    font-size: 16px;
    line-height: 1.5em;
    color: var(--pv-ink);
    max-width: 62ch;
    letter-spacing: -0.05px;
}
.pharmint-vendor-store .pv-about-body p { margin: 0 0 14px; }
.pharmint-vendor-store .pv-about-body p:last-child { margin-bottom: 0; }

.pharmint-vendor-store .pv-compliance {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}
.pharmint-vendor-store .pv-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px 5px 8px;
    background: var(--pv-success-bg);
    color: var(--pv-success);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: -0.05px;
}
.pharmint-vendor-store .pv-chip.amber { background: var(--pv-amber-bg); color: var(--pv-amber); }
.pharmint-vendor-store .pv-chip.orange { background: var(--pv-accent-bg); color: var(--pv-accent-text); }
.pharmint-vendor-store .pv-chip .icon svg { width: 12px; height: 12px; }

/* ============ MOTION ============ */
@media (prefers-reduced-motion: reduce) {
    .pharmint-vendor-store * { transition: none !important; animation: none !important; }
}
