/* ============================================================
   Polarya Research — Custom Storefront CSS
   All selectors namespaced under .polarya-* to avoid conflicts
   with the active WordPress theme.
   ============================================================ */

/* ── Reset / base ─────────────────────────────────────────── */
.polarya-wrap *,
.polarya-wrap *::before,
.polarya-wrap *::after {
    box-sizing: border-box;
}

/* ── Design tokens ──────────────────────────────────────────── */
.polarya-wrap {
    --pr-black:       #0a0a0a;
    --pr-near-black:  #111111;
    --pr-card:        #161616;
    --pr-border:      #252525;
    --pr-border-lt:   #2e2e2e;
    --pr-text:        #f0f0f0;
    --pr-muted:       #888888;
    --pr-dim:         #555555;
    --pr-accent:      #5af0c4;
    --pr-accent-dk:   #3ecba0;
    --pr-accent-glow: rgba(90,240,196,0.12);
    --pr-radius:      10px;
    --pr-radius-sm:   6px;
    background: var(--pr-black);
    color: var(--pr-text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* Ticker also needs tokens (sits outside .polarya-wrap) */
.polarya-ticker-wrap,
.polarya-toast {
    --pr-accent:      #5af0c4;
    --pr-accent-dk:   #3ecba0;
    --pr-card:        #161616;
    --pr-border:      #252525;
    --pr-border-lt:   #2e2e2e;
    --pr-text:        #f0f0f0;
    --pr-accent-glow: rgba(90,240,196,0.12);
}

/* ── Ticker ─────────────────────────────────────────────────── */
.polarya-ticker-wrap {
    background: var(--pr-accent);
    overflow: hidden;
    padding: 9px 0;
}
.polarya-ticker-track {
    display: flex;
    white-space: nowrap;
    animation: polarya-ticker 36s linear infinite;
    width: max-content;
}
.polarya-ticker-track:hover { animation-play-state: paused; }
.polarya-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 36px;
    color: #0a2e22;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}
.polarya-ticker-dot {
    width: 4px; height: 4px;
    background: #0a2e22;
    border-radius: 50%;
    opacity: 0.45;
    flex-shrink: 0;
}
@keyframes polarya-ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Shared helpers ─────────────────────────────────────────── */
.polarya-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pr-accent);
    margin-bottom: 8px;
}
.polarya-section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0;
}
.polarya-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 13px 24px;
    border-radius: var(--pr-radius-sm);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    font-family: 'Inter', sans-serif;
}
.polarya-btn--primary {
    background: var(--pr-accent);
    color: #0a2e22;
}
.polarya-btn--primary:hover {
    background: var(--pr-accent-dk);
    transform: translateY(-1px);
    color: #0a2e22;
    text-decoration: none;
}
.polarya-btn--outline {
    background: transparent;
    color: var(--pr-text);
    border: 1px solid var(--pr-border-lt);
}
.polarya-btn--outline:hover {
    border-color: #444;
    background: #1a1a1a;
    color: var(--pr-text);
    text-decoration: none;
}

/* ── Hero ───────────────────────────────────────────────────── */
.polarya-hero { padding: 72px 0 56px; }
.polarya-hero-inner {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
    align-items: center;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
}
.polarya-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pr-accent);
    margin-bottom: 20px;
}
.polarya-eyebrow-dot {
    width: 7px; height: 7px;
    background: var(--pr-accent);
    border-radius: 50%;
    animation: polarya-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes polarya-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.65); }
}
.polarya-hero-h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 54px;
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 0 20px;
}
.polarya-hero-sub {
    font-size: 15.5px;
    color: var(--pr-muted);
    max-width: 480px;
    line-height: 1.7;
    margin: 0 0 32px;
}
.polarya-hero-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.polarya-hero-stats {
    display: flex;
    gap: 28px;
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid var(--pr-border);
}
.polarya-stat-num {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.polarya-stat-label {
    display: block;
    font-size: 12px;
    color: var(--pr-muted);
    margin-top: 4px;
}

/* Hero right card */
.polarya-hero-right { position: relative; }
.polarya-hero-card {
    background: var(--pr-card);
    border: 1px solid var(--pr-border);
    border-radius: 16px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}
.polarya-hero-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    background: var(--pr-accent-glow);
    border-radius: 50%;
    pointer-events: none;
}
.polarya-hero-card-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pr-accent);
    margin-bottom: 14px;
}
.polarya-hero-vial {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--pr-border);
    text-decoration: none;
    transition: background 0.15s;
    border-radius: 4px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
}
.polarya-hero-vial:last-of-type { border-bottom: none; }
.polarya-hero-vial:hover { background: rgba(255,255,255,0.03); }
.polarya-vial-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: #1e2e28;
    border: 1px solid #2a3d35;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.polarya-vial-info { flex: 1; min-width: 0; }
.polarya-vial-name {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--pr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.polarya-vial-sub {
    display: block;
    font-size: 11.5px;
    color: var(--pr-muted);
}
.polarya-vial-price { font-size: 14px; font-weight: 700; color: var(--pr-accent); flex-shrink: 0; }
/* override WC price HTML */
.polarya-vial-price .woocommerce-Price-amount { font-size: 14px; font-weight: 700; color: var(--pr-accent); }
.polarya-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(90,240,196,0.08);
    border: 1px solid rgba(90,240,196,0.2);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--pr-accent);
    margin-top: 16px;
}

/* ── Trust bar ──────────────────────────────────────────────── */
.polarya-trust-bar {
    border-top: 1px solid var(--pr-border);
    border-bottom: 1px solid var(--pr-border);
    background: #0f0f0f;
}
.polarya-trust-inner {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.polarya-trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px;
    border-right: 1px solid var(--pr-border);
}
.polarya-trust-item:first-child { padding-left: 0; }
.polarya-trust-item:last-child  { border-right: none; }
.polarya-trust-icon {
    width: 38px; height: 38px;
    border-radius: 8px;
    background: var(--pr-accent-glow);
    border: 1px solid rgba(90,240,196,0.2);
    display: flex; align-items: center; justify-content: center;
    color: var(--pr-accent);
    flex-shrink: 0;
}
.polarya-trust-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--pr-text);
    line-height: 1.3;
}
.polarya-trust-sub {
    font-size: 11.5px;
    color: var(--pr-muted);
    margin-top: 2px;
}

/* ── Catalog ────────────────────────────────────────────────── */
.polarya-catalog {
    max-width: 1260px;
    margin: 0 auto;
    padding: 68px 24px;
}
.polarya-catalog-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
}

/* Filter bar */
.polarya-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.polarya-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--pr-border);
    background: transparent;
    color: var(--pr-muted);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.01em;
}
.polarya-filter-btn:hover {
    border-color: var(--pr-border-lt);
    color: var(--pr-text);
}
.polarya-filter-btn.active {
    background: var(--pr-accent-glow);
    border-color: rgba(90,240,196,0.4);
    color: var(--pr-accent);
}

/* Loading */
.polarya-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--pr-muted);
    font-size: 14px;
    padding: 60px 0;
    grid-column: 1 / -1;
}
.polarya-spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--pr-border-lt);
    border-top-color: var(--pr-accent);
    border-radius: 50%;
    animation: polarya-spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes polarya-spin { to { transform: rotate(360deg); } }

/* Product grid */
.polarya-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    gap: 16px;
}

/* Product card */
.polarya-product-card {
    background: var(--pr-card);
    border: 1px solid var(--pr-border);
    border-radius: var(--pr-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.2s;
    list-style: none;
}
.polarya-product-card:hover {
    border-color: rgba(90,240,196,0.3);
    transform: translateY(-2px);
}
.polarya-product-thumb {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: #141414;
    position: relative;
    text-decoration: none;
}
.polarya-product-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.polarya-product-thumb:hover img { transform: scale(1.04); }
.polarya-product-tag {
    position: absolute;
    top: 11px; left: 11px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 4px;
    background: rgba(90,240,196,0.15);
    color: var(--pr-accent);
    border: 1px solid rgba(90,240,196,0.25);
}
.polarya-out-of-stock-badge {
    position: absolute;
    top: 11px; right: 11px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 4px;
    background: rgba(255,77,77,0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255,77,77,0.25);
}
.polarya-product-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.polarya-product-research {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--pr-dim);
    margin-bottom: 5px;
}
.polarya-product-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15.5px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.25;
}
.polarya-product-name a {
    color: inherit;
    text-decoration: none;
}
.polarya-product-name a:hover { color: var(--pr-accent); }
.polarya-product-desc {
    font-size: 12px;
    color: var(--pr-muted);
    line-height: 1.55;
    flex: 1;
    margin-bottom: 14px;
}
.polarya-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.polarya-product-price { font-size: 17px; font-weight: 700; color: var(--pr-text); }
/* WooCommerce price HTML overrides */
.polarya-product-price .woocommerce-Price-amount { font-size: 17px; font-weight: 700; color: var(--pr-text); }
.polarya-product-price del { opacity: 0.45; font-size: 13px; }
.polarya-product-price ins { text-decoration: none; }
.polarya-product-sku {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--pr-dim);
    margin-top: 2px;
}
.polarya-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--pr-accent-glow);
    border: 1px solid rgba(90,240,196,0.25);
    color: var(--pr-accent);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--pr-radius-sm);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}
.polarya-btn-add:hover {
    background: rgba(90,240,196,0.2);
    border-color: rgba(90,240,196,0.5);
    color: var(--pr-accent);
    text-decoration: none;
}
.polarya-btn-add--view {
    background: transparent;
    border-color: var(--pr-border-lt);
    color: var(--pr-muted);
}
.polarya-btn-add--view:hover {
    background: #1e1e1e;
    color: var(--pr-text);
    border-color: #444;
}
.polarya-btn-add--loading { opacity: 0.6; pointer-events: none; }

/* Pagination */
.polarya-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}
.polarya-page-btn {
    padding: 9px 16px;
    background: transparent;
    border: 1px solid var(--pr-border);
    border-radius: var(--pr-radius-sm);
    color: var(--pr-muted);
    font-size: 13px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}
.polarya-page-btn:hover { border-color: var(--pr-border-lt); color: var(--pr-text); }
.polarya-page-btn.active {
    background: var(--pr-accent-glow);
    border-color: rgba(90,240,196,0.4);
    color: var(--pr-accent);
}

/* ── Promo ──────────────────────────────────────────────────── */
.polarya-promo {
    padding: 0 0 72px;
}
.polarya-promo-box {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
}
.polarya-promo-box > * {
    background: var(--pr-card);
    border: 1px solid var(--pr-border);
    border-radius: 14px;
    padding: 48px 52px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    position: relative;
    overflow: hidden;
}
/* The box div itself */
.polarya-promo-box {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
}
/* rewrite for direct child */
.polarya-promo-inner {
    background: var(--pr-card);
    border: 1px solid var(--pr-border);
    border-radius: 14px;
    padding: 48px 52px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    position: relative;
    overflow: hidden;
    max-width: 1260px;
    margin: 0 auto;
}
.polarya-promo-inner::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(90,240,196,0.07), transparent 70%);
    pointer-events: none;
}
.polarya-promo-label {
    display: inline-block;
    background: var(--pr-accent);
    color: #0a2e22;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 14px;
}
.polarya-promo-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 10px;
}
.polarya-promo-body {
    font-size: 14px;
    color: var(--pr-muted);
    line-height: 1.65;
    margin: 0;
}
.polarya-promo-codes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 260px;
}
.polarya-promo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0d0d0d;
    border: 1px solid var(--pr-border-lt);
    border-radius: var(--pr-radius-sm);
    padding: 10px 14px;
    gap: 12px;
}
.polarya-promo-discount {
    font-size: 14px;
    font-weight: 700;
    color: var(--pr-accent);
}
.polarya-promo-min {
    font-size: 11.5px;
    color: var(--pr-muted);
}
.polarya-code-pill {
    background: #1a2e26;
    border: 1px solid rgba(90,240,196,0.2);
    color: var(--pr-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    padding: 5px 11px;
    border-radius: 4px;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
    text-transform: uppercase;
}
.polarya-code-pill:hover { background: #223d30; }
.polarya-code-pill.copied { background: rgba(90,240,196,0.2); }

/* ── Resources ──────────────────────────────────────────────── */
.polarya-resources {
    background: #0f0f0f;
    border-top: 1px solid var(--pr-border);
    padding: 72px 0;
}
.polarya-resources-inner {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
}
.polarya-resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 36px;
}
.polarya-resource-card {
    background: var(--pr-card);
    border: 1px solid var(--pr-border);
    border-radius: var(--pr-radius);
    padding: 28px;
    transition: border-color 0.2s;
}
.polarya-resource-card:hover { border-color: rgba(90,240,196,0.25); }
.polarya-resource-icon {
    font-size: 26px;
    margin-bottom: 16px;
    display: block;
}
.polarya-resource-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px;
}
.polarya-resource-body {
    font-size: 13.5px;
    color: var(--pr-muted);
    line-height: 1.65;
    margin: 0 0 16px;
}
.polarya-resource-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--pr-accent);
    text-decoration: none;
}
.polarya-resource-link:hover { text-decoration: underline; color: var(--pr-accent); }

/* ── Toast ──────────────────────────────────────────────────── */
.polarya-toast {
    position: fixed;
    bottom: 24px; right: 24px;
    background: var(--pr-card);
    border: 1px solid rgba(90,240,196,0.3);
    border-radius: var(--pr-radius);
    padding: 13px 20px;
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    color: var(--pr-text);
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
    max-width: 320px;
}
.polarya-toast.polarya-toast--show { transform: translateY(0); opacity: 1; }
.polarya-toast-icon { font-size: 17px; flex-shrink: 0; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1050px) {
    .polarya-hero-inner { grid-template-columns: 1fr; }
    .polarya-hero-right { display: none; }
    .polarya-hero-h1 { font-size: 42px; }
    .polarya-trust-inner { grid-template-columns: 1fr 1fr; }
    .polarya-trust-item {
        border-right: none;
        border-bottom: 1px solid var(--pr-border);
        padding: 18px 0;
    }
    .polarya-trust-item:nth-child(2n) { padding-left: 24px; }
}
@media (max-width: 720px) {
    .polarya-hero { padding: 48px 0 40px; }
    .polarya-hero-h1 { font-size: 34px; }
    .polarya-resource-grid { grid-template-columns: 1fr; }
    .polarya-promo-inner { grid-template-columns: 1fr; }
    .polarya-section-title { font-size: 26px; }
    .polarya-trust-inner { grid-template-columns: 1fr; }
}

/* ── Homepage / theme wrapper resets ───────────────────────────────────────────
   These rules remove padding/max-width that most themes apply to their inner
   content wrappers, so the Polarya storefront renders full-width.
   Targets the most common theme wrapper class names. Safe to override further
   in Appearance → Customize → Additional CSS if your theme uses different ones.
   ─────────────────────────────────────────────────────────────────────────── */
.polarya-page-wrap {
    width: 100%;
    overflow-x: hidden;
}

/* Storefront / Astra / GeneratePress / OceanWP / Neve / Hello / Blocksy */
.polarya-page .site-main,
.polarya-page .content-area,
.polarya-page .entry-content,
.polarya-page .page-content,
.polarya-page article.page,
.polarya-page .ast-container,
.polarya-page .container,
.polarya-page .elementor-section-wrap {
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* Hide the page title that themes echo above content */
.polarya-page .entry-title,
.polarya-page .page-title,
.polarya-page .ast-page-title,
.polarya-page .site-header-content {
    display: none !important;
}

/* Breadcrumbs */
.polarya-page .woocommerce-breadcrumb,
.polarya-page .breadcrumbs {
    display: none !important;
}
