/* webjj-shop — mobile-first, minimaliste type Respire.co */

:root {
    --wjs-bg: #fff;
    --wjs-fg: #1a1a1f;
    --wjs-muted: #6b6b73;
    --wjs-line: #ecece8;
    --wjs-soft: #f6f5f1;
    --wjs-accent: #1a1a1f;
    --wjs-accent-fg: #ffffff;
    --wjs-promo: #7B5CF0;
    --wjs-out: #b54708;
    --wjs-radius: 6px;
    --wjs-pad: 16px;
    --wjs-max: 1240px;
    --wjs-font: inherit;
}

/* ============ Base ============ */
.wjs-page,
.wjs-page * {
    box-sizing: border-box;
}
.wjs-page {
    color: var(--wjs-fg);
    font-family: var(--wjs-font);
    line-height: 1.5;
    background: var(--wjs-bg);
}
.wjs-page img { max-width: 100%; height: auto; display: block; }
.wjs-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 32px 0 16px;
    letter-spacing: -0.01em;
}

/* ============ Breadcrumbs ============ */
.wjs-breadcrumbs {
    font-size: 13px;
    color: var(--wjs-muted);
    margin-bottom: 16px;
}
.wjs-breadcrumbs a {
    color: var(--wjs-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.wjs-breadcrumbs a:hover { border-bottom-color: currentColor; }
.wjs-breadcrumbs-sep { margin: 0 6px; opacity: 0.5; }

/* ============ Disclosure ============ */
.wjs-disclosure-line {
    font-size: 11px;
    color: var(--wjs-muted);
    margin: 6px 0 18px;
    line-height: 1.5;
    text-align: center;
    opacity: 0.7;
}
.wjs-disclosure-line a { color: inherit; text-decoration: underline; }
.wjs-disclosure-line span { margin-right: 4px; }

/* ============ FAQ de catégorie ============ */
.wjs-cat-faq {
    max-width: 760px;
    margin: 64px auto 32px;
    padding: 0 4px;
}
.wjs-cat-faq .wjs-section-title {
    text-align: center;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    margin-bottom: 24px;
}

/* ============ Admin warning (visible aux éditeurs seulement) ============ */
.wjs-admin-warning {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: var(--wjs-radius);
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 0.875rem;
}
.wjs-admin-warning p { margin: 4px 0; }
.wjs-admin-warning a { color: #7a4f01; text-decoration: underline; }

/* ============ Catégorie ============ */
.wjs-page-category {
    max-width: var(--wjs-max);
    margin: 0 auto;
    padding: 24px var(--wjs-pad);
}
.wjs-cat-header {
    text-align: center;
    margin: 8px auto 40px;
    max-width: 720px;
}
.wjs-cat-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 16px 0 12px;
}
.wjs-cat-intro {
    color: var(--wjs-muted);
    font-size: 1rem;
    line-height: 1.6;
}
.wjs-cat-intro p { margin: 8px 0; }

.wjs-empty {
    text-align: center;
    color: var(--wjs-muted);
    padding: 40px 20px;
}

/* ============ Grid produits (mobile-first) ============ */
.wjs-grid {
    display: grid;
    gap: 24px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px) {
    .wjs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
}
@media (min-width: 1024px) {
    .wjs-page-category[data-cols="4"] .wjs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .wjs-page-category[data-cols="3"] .wjs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ============ Card produit (Respire-style + hover Acheter) ============ */
.wjs-card {
    position: relative;
    transition: transform 320ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.wjs-card:hover {
    transform: translateY(-4px);
}

.wjs-card-media {
    position: relative;
    margin-bottom: 12px;
}
.wjs-card-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.wjs-card-image {
    position: relative;
    background: var(--wjs-soft);
    border-radius: var(--wjs-radius);
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.wjs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms cubic-bezier(0.2, 0.7, 0.3, 1);
    will-change: transform;
}
.wjs-card:hover .wjs-card-image img { transform: scale(1.06); }
.wjs-card-image-empty { width: 100%; height: 100%; background: var(--wjs-soft); }

.wjs-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 2;
}
.wjs-badge-promo { background: var(--wjs-promo); color: #fff; }
.wjs-badge-out   { background: #fff; color: var(--wjs-out); border: 1px solid var(--wjs-out); }

/* CTA qui slide-up au hover sur l'image */
.wjs-card-hover-cta {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 240ms ease, transform 320ms cubic-bezier(0.2, 0.7, 0.3, 1);
    pointer-events: none;
    z-index: 2;
}
.wjs-card:hover .wjs-card-hover-cta,
.wjs-card:focus-within .wjs-card-hover-cta {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.wjs-card-hover-cta .wjs-buy-card {
    width: 100%;
    min-height: 42px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    background: rgba(26, 26, 31, 0.92);
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

/* Mobile : pas de hover → bouton toujours visible mais compact */
@media (hover: none) {
    .wjs-card-hover-cta {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .wjs-card-hover-cta .wjs-buy-card {
        min-height: 38px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

.wjs-card-info {
    display: block;
    text-align: left;
    padding: 0 2px;
    text-decoration: none;
    color: inherit;
}
.wjs-card-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 4px;
    line-height: 1.3;
    letter-spacing: -0.005em;
    color: var(--wjs-fg);
    transition: color 200ms ease;
}
.wjs-card:hover .wjs-card-title { color: #000; }
.wjs-card-price {
    font-size: 0.9rem;
    color: var(--wjs-muted);
    display: flex;
    gap: 8px;
    align-items: baseline;
}
.wjs-card-compare {
    text-decoration: line-through;
    opacity: 0.55;
    font-size: 0.85em;
}
.wjs-card-amount { color: var(--wjs-fg); font-weight: 500; }
.wjs-card--out .wjs-card-amount { opacity: 0.5; }
.wjs-card--out .wjs-card-image img { opacity: 0.7; }

/* ============ Fiche produit ============ */
.wjs-page-product {
    max-width: var(--wjs-max);
    margin: 0 auto;
    padding: 16px var(--wjs-pad) 80px;
}
.wjs-prod-wrap { max-width: 1180px; margin: 0 auto; }
.wjs-prod-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 16px 0 40px;
}
@media (min-width: 900px) {
    .wjs-prod-hero {
        grid-template-columns: 1.1fr 1fr;
        gap: 56px;
        align-items: start;
    }
}

/* Galerie */
.wjs-gallery-main {
    background: var(--wjs-soft);
    border-radius: var(--wjs-radius);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    margin-bottom: 12px;
}
.wjs-gallery-main img {
    width: 100%; height: 100%; object-fit: cover;
}
.wjs-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}
.wjs-gallery-thumb {
    flex: 0 0 72px;
    width: 72px; height: 72px;
    background: var(--wjs-soft);
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: border-color 120ms ease;
}
.wjs-gallery-thumb.is-active { border-color: var(--wjs-fg); }
.wjs-gallery-thumb img {
    width: 100%; height: 100%; object-fit: cover;
}

/* Info */
.wjs-prod-vendor {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
    color: var(--wjs-muted);
    margin: 0 0 6px;
}
.wjs-prod-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin: 0 0 16px;
    letter-spacing: -0.015em;
    line-height: 1.2;
}
.wjs-prod-price {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 12px;
}
.wjs-prod-compare { text-decoration: line-through; color: var(--wjs-muted); }
.wjs-prod-amount {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.wjs-prod-stock {
    font-size: 0.875rem;
    color: var(--wjs-muted);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.wjs-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.wjs-dot-ok { background: #1b873f; }
.wjs-dot-ko { background: var(--wjs-out); }

/* Options */
.wjs-prod-options { margin-bottom: 20px; }
.wjs-prod-option { margin-bottom: 14px; }
.wjs-prod-option-label {
    display: block;
    font-size: 0.8rem;
    color: var(--wjs-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.wjs-prod-option-values { display: flex; flex-wrap: wrap; gap: 6px; }
.wjs-prod-option-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--wjs-line);
    border-radius: 4px;
    font: inherit;
    color: var(--wjs-fg);
    cursor: pointer;
    transition: all 120ms ease;
}
.wjs-prod-option-btn:hover { border-color: var(--wjs-fg); }
.wjs-prod-option-btn.is-active { background: var(--wjs-fg); color: var(--wjs-accent-fg); border-color: var(--wjs-fg); }

/* CTA buy button */
.wjs-prod-cta { margin: 20px 0 16px; }
.wjs-buy {
    background: var(--wjs-fg);
    color: var(--wjs-accent-fg);
    border: 0;
    border-radius: 4px;
    min-height: 52px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font: inherit;
    font-weight: 600;
    transition: opacity 160ms ease, transform 80ms ease;
    text-decoration: none;
}
.wjs-buy:hover { opacity: 0.92; }
.wjs-buy:active { transform: translateY(1px); }
.wjs-buy[disabled] { opacity: 0.5; cursor: not-allowed; }
.wjs-buy-arrow { transition: transform 200ms ease; }
.wjs-buy:hover .wjs-buy-arrow { transform: translateX(4px); }
.wjs-buy-fallback { text-decoration: none; }

/* Promo */
.wjs-prod-promo {
    background: var(--wjs-soft);
    border-radius: var(--wjs-radius);
    padding: 10px 14px;
    font-size: 0.85rem;
    margin: 12px 0 20px;
    text-align: center;
}
.wjs-prod-promo strong { color: var(--wjs-promo); }

/* Trust */
.wjs-prod-trust {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    font-size: 0.85rem;
    color: var(--wjs-muted);
}
.wjs-prod-trust li {
    padding: 6px 0;
    border-top: 1px solid var(--wjs-line);
    display: flex;
    gap: 10px;
    align-items: center;
}
.wjs-prod-trust li:last-child { border-bottom: 1px solid var(--wjs-line); }

/* Accordion */
.wjs-accordion {
    margin: 40px 0;
    border-top: 1px solid var(--wjs-line);
}
.wjs-acc-item { border-bottom: 1px solid var(--wjs-line); }
.wjs-acc-summary {
    cursor: pointer;
    padding: 18px 0;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}
.wjs-acc-summary::-webkit-details-marker { display: none; }
.wjs-acc-icon {
    font-size: 1.4rem;
    line-height: 1;
    color: var(--wjs-muted);
    transition: transform 240ms ease;
}
.wjs-acc-item[open] .wjs-acc-icon { transform: rotate(45deg); }
.wjs-acc-body {
    padding: 0 0 20px;
    color: var(--wjs-fg);
    font-size: 0.95rem;
    line-height: 1.65;
}
.wjs-acc-body p:first-child { margin-top: 0; }

/* Specs */
.wjs-specs { list-style: none; padding: 0; margin: 0; }
.wjs-specs li {
    padding: 8px 0;
    border-bottom: 1px solid var(--wjs-line);
    font-size: 0.9rem;
}
.wjs-specs li:last-child { border-bottom: 0; }

/* Related editorial */
.wjs-related-editorial { margin: 56px 0 24px; }
.wjs-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 720px) {
    .wjs-related-grid { grid-template-columns: repeat(3, 1fr); }
}
.wjs-related-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--wjs-soft);
    border-radius: var(--wjs-radius);
    overflow: hidden;
    transition: transform 200ms ease;
}
.wjs-related-card:hover { transform: translateY(-2px); }
.wjs-related-img { aspect-ratio: 16/9; overflow: hidden; }
.wjs-related-img img { width: 100%; height: 100%; object-fit: cover; }
.wjs-related-body { padding: 14px; }
.wjs-related-title { font-size: 0.95rem; font-weight: 600; margin: 0 0 4px; line-height: 1.3; }
.wjs-related-excerpt { font-size: 0.85rem; color: var(--wjs-muted); margin: 0; line-height: 1.45; }

/* Sticky CTA mobile */
.wjs-sticky-cta {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--wjs-line);
    padding: 10px 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    z-index: 9000;
    transform: translateY(100%);
    transition: transform 280ms ease;
}
.wjs-sticky-cta.is-visible { transform: translateY(0); }
.wjs-sticky-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.wjs-sticky-title {
    font-size: 0.8rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--wjs-fg);
}
.wjs-sticky-price {
    font-size: 0.9rem;
    color: var(--wjs-muted);
    font-weight: 600;
}
.wjs-buy-sticky {
    flex: 0 0 auto;
    width: auto;
    min-width: 130px;
    min-height: 44px;
    padding: 10px 18px;
    font-size: 0.9rem;
}
@media (min-width: 900px) {
    .wjs-sticky-cta { display: none; }
}
