/* =============================================================================
 * Quietplugs · Pages
 * Sekcje per-page z prototypu Figma, w naszej palecie B&W + Nunito Sans.
 *
 * Spis:
 *   · Hero (split + full)
 *   · Moments (4 use cases)
 *   · Products grid + product card
 *   · Founders
 *   · Reviews
 *   · Community bento
 *   · Newsletter section
 *   · Shop hero, categories, bar
 *   · PDP (gallery, info, swatches, sizes, accordion, trust)
 *   · WooCommerce cart/checkout/account minimal
 * ============================================================================= */


/* === Hero =============================================================== */

.hero {
    position: relative;
    padding: var(--s-7) 0 var(--s-9);
    overflow: hidden;
    /* Fullscreen hero — dolny border marquee przylega do dolnej krawędzi viewport.
       JS w theme.js mierzy faktyczną wysokość marquee (offsetHeight) i ustawia
       --marquee-h na :root. Fallback 80px na cold-load przed JS. 100svh = mobile-safe. */
    min-height: calc(100svh - var(--header-h-mobile) - var(--marquee-h, 80px));
    display: flex;
    align-items: center;
}
@media (min-width: 880px) {
    .hero {
        min-height: calc(100svh - var(--header-h-desktop) - var(--marquee-h, 80px));
    }
}
.hero > .container {
    width: 100%;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-7);
    align-items: center;
    position: relative;
    z-index: 1;
}
/* Mobile: zdjęcie nad copy (order: -1 podnosi visual na górę gridu). */
@media (max-width: 879px) {
    .hero__visual { order: -1; }
}
@media (min-width: 880px) {
    .hero__inner { grid-template-columns: 1.1fr 1fr; gap: var(--s-9); }
}

.hero__copy {
    display: flex; flex-direction: column; gap: var(--s-5);
}
/* Desktop: zawartość hero__copy wycentrowana W PIONIE.
   align-self: stretch — copy rozciąga się do pełnej wysokości row (nawet jeśli
   visual jest wyższy). justify-content: center na flex-column centruje
   children wertikalnie. */
@media (min-width: 880px) {
    .hero__copy {
        align-self: stretch;
        justify-content: center;
    }
}
/* Synchronizowane z .section-head__title (components.css) — ten sam clamp,
   line-height, letter-spacing, max-width. Hero h1 wygląda jak h2 sekcji. */
.hero__title {
    font-family: var(--ff-base);
    font-size: clamp(36px, 5vw, 64px);
    font-weight: var(--fw-semibold);
    line-height: 1;
    letter-spacing: var(--ls-display);
    max-width: 720px;
    color: var(--c-ink);
    margin: 0;
}
.hero__title em {
    /* weight dziedziczy z rodzica — jeden wygląd w obrębie tytułu */
    color: var(--c-ink-45);
}
/* Dynamiczny kolor słowa "kolor." — JS ustawia style.color = c.swatch.
   Transition daje płynny fade między swatchami (hover/select). */
#hero-title-color {
    transition: color var(--d-base) var(--ease);
}
.hero__lead {
    font-size: var(--fs-lg);
    font-weight: var(--fw-light);
    line-height: 1.5;
    max-width: 480px;
    color: var(--c-ink-65);
    margin: 0;
}
.hero__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-3);
    max-width: 460px;  /* tej samej szerokości co .picker, żeby cały blok hero copy był spójny */
}
/* .hero__features — usunięte z hero (dead code). */

.hero__visual {
    position: relative;
    aspect-ratio: 1 / 1;   /* 4/4 = 1:1 square */
    border-radius: var(--r-xl);
    overflow: hidden;
    background: transparent;
    isolation: isolate;
}
/* Dwie warstwy <img> stacked — crossfade na .is-active toggle (JS).
   Pattern identyczny jak .product-card__media — fade-in nowego obrazu
   bez "flash" pomiędzy starym a nowym. */
.hero__visual img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity var(--d-slow) var(--ease-emphasized);
    will-change: opacity;
}
.hero__visual img.is-active { opacity: 1; }

/* Subtelny float — produkt „unosi się w ciszy". Animacja na OBU warstwach,
   żeby crossfade nie wprowadzał skoku do pozycji 0. translateY tylko, 6s cycle. */
@media (prefers-reduced-motion: no-preference) {
    .hero__visual img {
        animation: hero-float 6s ease-in-out infinite;
    }
}
@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero__visual img { transition: none; animation: none; }
}
.hero__rings {
    position: absolute;
    left: 50%; top: 50%;
    width: 400px; height: 400px;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.5;
}
.hero__rings span {
    position: absolute;
    inset: 0;
    /* Kolor obwódki sterowany z JS (state.color.swatch); fallback do --c-ink. */
    border: 1px solid var(--ring-color, var(--c-ink));
    border-radius: 50%;
    animation: ring 5s ease-out infinite;
}
.hero__rings span:nth-child(2) { animation-delay: 1.66s; }
.hero__rings span:nth-child(3) { animation-delay: 3.33s; }
@keyframes ring {
    0%   { transform: scale(0.4); opacity: 0; }
    20%  { opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero__rings span { animation: none; }
}
/* === Moments ============================================================ */

.moments {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
}
@media (min-width: 580px)  { .moments { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .moments { grid-template-columns: repeat(4, 1fr); } }

/* .moment* → components.css (komponent card_moment, zgodnie z file_structure spec) */


/* === Products grid + card =============================================== */

.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-3);
}
@media (min-width: 768px)  { .products { gap: var(--s-4); } }
@media (min-width: 1024px) { .products { grid-template-columns: repeat(5, 1fr); } }
.products--shop { }
@media (min-width: 1024px) { .products--shop { grid-template-columns: repeat(5, 1fr); } }

/* Product Card → przeniesione do components.css (zgodnie z file_structure
   w design-system.json: komponenty należą do components.css, pages.css
   trzyma tylko page-specific tweaks/grids jak .products poniżej). */


/* === Founders =========================================================== */

.founders {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-7);
    align-items: center;
}
@media (min-width: 880px) {
    .founders { grid-template-columns: 1fr 1.2fr; }
}
.founders__media {
    border-radius: var(--r-xl);
    overflow: hidden;
    aspect-ratio: 3/2;  /* team.webp = 1536×1024 (3:2 landscape) */
    background: var(--c-ink-03);
}
.founders__media img { width: 100%; height: 100%; object-fit: cover; }
.founders__copy {
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
}
.founders__quote {
    font-family: var(--ff-base);
    font-size: clamp(28px, 3vw, 40px);
    font-weight: var(--fw-semibold);
    line-height: 1.15;
    letter-spacing: var(--ls-heading);
    color: var(--c-ink);
    margin: 0;
}
.founders__quote em {
    color: var(--c-ink-65);
}
.founders__body {
    color: var(--c-ink-65);
    max-width: 480px;
    font-size: var(--fs-md);
}
.founders__sign {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    margin-top: var(--s-2);
}
.founders__sign-name {
    font-family: var(--ff-base);
    font-size: 18px;
    font-weight: var(--fw-bold);
    color: var(--c-ink);
}
.founders__sign-role {
    font-family: var(--ff-base);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-ink-65);
}


/* === Reviews ============================================================ */

.reviews {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
}
@media (min-width: 880px) { .reviews { grid-template-columns: repeat(3, 1fr); } }

/* .review* → components.css (komponent review_card). .reviews-empty zostaje niżej. */


/* === Community ========================================================== */

/* .community* → components.css (komponent community_grid) */


/* === Newsletter section ================================================= */

/* .newsletter* → components.css (komponent newsletter_section) */


/* === Shop view ========================================================== */

.shop-hero {
    padding: var(--s-7) 0 var(--s-4);
}
.shop-hero__title {
    font-family: var(--ff-base);
    font-size: clamp(54px, 8vw, 120px);
    font-weight: var(--fw-semibold);
    line-height: 0.95;
    letter-spacing: var(--ls-display);
    color: var(--c-ink);
    max-width: 1200px;
}
.shop-hero__title em {
    color: var(--c-ink-45);
}
.shop-hero__sub {
    margin-top: var(--s-4);
    font-size: var(--fs-lg);
    color: var(--c-ink-65);
    max-width: 640px;
}

.shop-bar {
    position: sticky;
    top: var(--header-h-mobile);
    background: color-mix(in srgb, var(--c-bg) 92%, transparent);
    backdrop-filter: blur(10px);
    z-index: 50;
    padding: var(--s-3) 0;
    border-top: var(--bw) solid var(--c-ink-12);
    border-bottom: var(--bw) solid var(--c-ink-12);
    margin-bottom: var(--s-7);
}
@media (min-width: 1024px) { .shop-bar { top: var(--header-h-desktop); } }
.shop-bar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-4);
    flex-wrap: wrap;
}
.shop-chips {
    display: flex;
    gap: var(--s-2);
    flex-wrap: wrap;
}
.shop-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    height: 36px;
    padding: 0 var(--s-4);
    border-radius: var(--r-pill);
    border: var(--bw) solid var(--c-ink-25);
    background: transparent;
    font-family: var(--ff-base);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--c-ink);
    cursor: pointer;
    transition: all var(--d-fast) var(--ease);
    text-decoration: none;
}
.shop-chip:hover { background: var(--c-ink-06); }
.shop-chip.is-active { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }
.shop-chip__count {
    font-family: var(--ff-base);
    font-size: 10.5px;
    opacity: 0.6;
}
.shop-sort {
    display: flex;
    gap: 6px;
    align-items: center;
    font-family: var(--ff-base);
    font-size: 11.5px;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-ink-65);
}

.shop-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
    margin-bottom: var(--s-7);
}
@media (min-width: 580px)  { .shop-categories { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .shop-categories { grid-template-columns: repeat(4, 1fr); } }
.shop-cat {
    position: relative;
    border-radius: var(--r-lg);
    padding: var(--s-6);
    min-height: 220px;
    background: var(--c-ink-03);
    border: var(--bw) solid var(--c-ink-12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: transform var(--d-base) var(--ease);
    text-decoration: none;
    color: inherit;
}
.shop-cat:hover { transform: translateY(-2px); }
.shop-cat__title {
    font-family: var(--ff-base);
    font-size: 32px;
    font-weight: var(--fw-semibold);
    line-height: 1;
    letter-spacing: var(--ls-display);
    color: var(--c-ink);
    margin: 0;
}
.shop-cat__title em {
    color: var(--c-ink-65);
}
.shop-cat__count {
    font-family: var(--ff-base);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-ink-65);
    margin-top: var(--s-2);
}


/* === PDP (single product) =============================================== */

.pdp {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-7);
    padding-top: var(--s-4);
    position: relative;
}
@media (min-width: 880px) {
    .pdp { grid-template-columns: 1.2fr 1fr; gap: var(--s-7); }
}

/* PDP gallery — wszystkie zdjęcia widoczne: 1 na pełną szerokość, reszta po 2 w rzędzie */
.pdp-gallery {
    width: 100%;
}
.pdp-gallery__items {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
}
@media (min-width: 768px) {
    .pdp-gallery__items {
        grid-template-columns: 1fr 1fr;
        gap: var(--s-4);
    }
    .pdp-gallery__items > .pdp-gallery__cell--hero {
        grid-column: 1 / -1;
    }
}
.pdp-gallery__cell {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--r-md);
    background: var(--c-ink-03);
    overflow: hidden;
}
.pdp-gallery__cell--hero {
    border-radius: var(--r-xl);
}
.pdp-gallery__cell img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--d-med, .45s) var(--ease, ease);
    will-change: transform;
}
.pdp-gallery__cell:hover img {
    transform: scale(1.06);
}
@media (hover: none) {
    .pdp-gallery__cell:hover img { transform: none; }
}
.pdp-gallery__chip {
    position: absolute;
    top: 20px; left: 20px;
    padding: 8px 14px;
    background: var(--c-bg);
    border: var(--bw) solid var(--c-ink-12);
    border-radius: var(--r-pill);
    font-family: var(--ff-base);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pdp-info {
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
    max-width: 480px;
}
@media (min-width: 1024px) {
    .pdp-info { position: sticky; top: calc(var(--header-h-desktop) + 24px); }
}
.pdp-info__crumb {
    font-family: var(--ff-base);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-ink-65);
    margin: 0;
}
.pdp-info__title {
    font-family: var(--ff-base);
    font-size: clamp(42px, 5.2vw, 76px);
    font-weight: var(--fw-semibold);
    line-height: 0.95;
    letter-spacing: var(--ls-display);
    color: var(--c-ink);
    margin: 0;
}
.pdp-info__title em {
    color: var(--c-ink-45);
}
.pdp-info__sub {
    font-size: var(--fs-lg);
    color: var(--c-ink-65);
    line-height: 1.5;
    margin: 0;
}
.pdp-info__price {
    display: flex;
    align-items: baseline;
    gap: var(--s-3);
    flex-wrap: wrap;
}
.pdp-info__price b {
    font-family: var(--ff-base);
    font-size: 32px;
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-heading);
    color: var(--c-ink);
}
.pdp-info__price s { color: var(--c-ink-45); font-size: var(--fs-lg); font-weight: var(--fw-light); }
.pdp-info__price small {
    font-family: var(--ff-base);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-ink-65);
}

.pdp-section {
    border-top: var(--bw) solid var(--c-ink-12);
    padding-top: var(--s-5);
}
.pdp-section__label {
    font-family: var(--ff-base);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-ink-65);
    margin-bottom: var(--s-3);
    display: flex;
    justify-content: space-between;
}

.pdp-swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.pdp-swatch {
    width: 56px; height: 56px;
    border-radius: 50%;
    border: var(--bw) solid var(--c-ink-25);
    cursor: pointer;
    position: relative;
    background: var(--c-ink-06);
    transition: transform var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
    padding: 0;
    overflow: hidden;
}
.pdp-swatch.is-active { border-color: var(--c-ink); border-width: 2px; }
.pdp-swatch:hover { transform: translateY(-1px); }
.pdp-swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Image-swatches: bez tła — same zdjęcia */
.pdp-swatches--image .pdp-swatch--image {
    width: 64px; height: 64px;
    border-radius: var(--r-md);
    background: transparent;
}

.pdp-sizes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.pdp-size {
    padding: 14px 12px;
    border: var(--bw) solid var(--c-ink-25);
    border-radius: var(--r-md);
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: all var(--d-fast) var(--ease);
    color: var(--c-ink);
}
.pdp-size.is-active { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }
.pdp-size__name {
    font-family: var(--ff-base);
    font-size: 17px;
    font-weight: var(--fw-bold);
    margin-bottom: 2px;
}
.pdp-size__sub {
    font-family: var(--ff-base);
    font-size: 10px;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.7;
}

.pdp-cta {
    display: flex;
    gap: 10px;
}
.pdp-cta .btn--primary { flex: 1; }

.pdp-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-3);
    list-style: none;
    margin: 0;
    padding: 0;
}
.pdp-trust li {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pdp-trust li b {
    font-family: var(--ff-base);
    font-size: 18px;
    font-weight: var(--fw-bold);
    color: var(--c-ink);
}
.pdp-trust li span {
    font-family: var(--ff-base);
    font-size: 10.5px;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-ink-65);
}

.pdp-acc {
    border-top: var(--bw) solid var(--c-ink-12);
    padding: var(--s-4) 0;
}
.pdp-acc summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: var(--ff-base);
    font-size: 18px;
    font-weight: var(--fw-bold);
    color: var(--c-ink);
}
.pdp-acc summary::-webkit-details-marker { display: none; }
.pdp-acc summary::after {
    content: "+";
    font-size: 24px;
    font-family: var(--ff-base);
    font-weight: var(--fw-light);
    color: var(--c-ink-65);
}
.pdp-acc[open] summary::after { content: "–"; }
.pdp-acc__body {
    margin-top: var(--s-3);
    font-size: var(--fs-md);
    color: var(--c-ink-65);
    line-height: 1.6;
}
.pdp-spec {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: var(--s-3);
    list-style: none;
    padding: 0;
}
.pdp-spec li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: var(--bw) solid var(--c-ink-12);
    font-size: var(--fs-sm);
}
.pdp-spec li b {
    font-weight: var(--fw-bold);
    color: var(--c-ink);
    font-size: 12px;
    letter-spacing: 0.04em;
}


/* === WooCommerce minimal overrides ====================================== */

.woocommerce-notices-wrapper { margin-bottom: var(--s-5); }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-sm);
    font-size: var(--fs-md);
    margin-bottom: var(--s-4);
    list-style: none;
    border-left: 3px solid var(--c-ink);
    background: var(--c-ink-06);
}
.woocommerce-message { border-left-color: var(--c-success); }
.woocommerce-error   { border-left-color: var(--c-error); background: rgba(179, 38, 30, 0.06); color: var(--c-error); }

.woocommerce form .form-row label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.woocommerce-account .woocommerce-MyAccount-navigation { padding-bottom: var(--s-5); }
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex; gap: var(--s-2); flex-wrap: wrap; list-style: none; margin: 0; padding: 0;
}
.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: inline-flex;
    height: 36px;
    padding: 0 var(--s-4);
    border-radius: var(--r-pill);
    background: var(--c-ink-06);
    color: var(--c-ink);
    align-items: center;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a {
    background: var(--c-ink);
    color: var(--c-bg);
}

table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--s-5);
}
table.shop_table th, table.shop_table td {
    padding: var(--s-3) var(--s-2);
    text-align: left;
    font-size: var(--fs-sm);
    border-bottom: var(--bw) solid var(--c-ink-12);
}
table.shop_table thead th { font-weight: var(--fw-bold); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-ink-65); }


/* === Helpers ============================================================ */

.scroll-fade { animation: scroll-fade 0.8s ease both; }
@keyframes scroll-fade {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .scroll-fade { animation: none; }
}


/* .color-card → USUNIĘTE (R2 refactor sekcji products na .stories/.story). */


/* === Reviews — stan pusty (bez fikcji) ================================== */

.reviews-empty {
    border: var(--bw) dashed var(--c-ink-25);
    border-radius: var(--r-lg);
    padding: var(--s-8) var(--s-6);
    text-align: center;
}
.reviews-empty__text {
    font-family: var(--ff-base);
    font-size: var(--fs-md);
    font-weight: var(--fw-light);
    color: var(--c-ink-65);
    margin: 0;
}


/* === Community — placeholder kafelki: USUNIĘTE (P3, dead code po P1) ==== */
