/* ============================================================
   Homepage Revamp v2 — new sections only (Hero Slider, Why
   PrimeWood, Featured Categories, Best Sellers, Manufacturing,
   Workshop Video, CTA). Loaded ONLY from store/home.html.
   Reuses the project's existing CSS custom properties:
   --primary-color / --secondary-color / --primary-soft /
   --primary-glow / --primary-tint / --primary-tint-2
   (defined inline in home.html's <style> block).
   ============================================================ */

/* ---------- Shared section header ---------- */
.pw-section { padding-block: clamp(3rem, 6vw, 5rem); }
.pw-section-header { text-align: center; margin-bottom: clamp(2rem, 4vw, 3rem); }
.pw-section-header p { color: #6b7280; margin-top: .5rem; }
.pw-icon { display: inline-flex; }
.pw-icon svg { width: 1em; height: 1em; }

/* ============================================================
   1. HERO SLIDER
   ============================================================ */
.pw-hero {
    position: relative;
    height: 100dvh;
    min-height: 600px;
    max-height: 100vh;
    width: 100%;
    overflow: hidden;
    background: #111;
    isolation: isolate;
}
.pw-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease;
    z-index: 0;
}
.pw-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}
.pw-hero-slide-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.pw-hero-slide-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
}
.pw-hero-slide.is-active .pw-hero-slide-media img {
    animation: pw-kenburns 8s ease-out forwards;
}
@keyframes pw-kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}
.pw-hero-overlay {
    position: absolute;
    inset: 0;
    background: #000;
    pointer-events: none;
}
.pw-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    padding-inline: clamp(1.5rem, 6vw, 6rem);
}
.pw-hero-content.pos-center { justify-content: center; text-align: center; }
.pw-hero-content.pos-left { justify-content: flex-start; text-align: start; }
.pw-hero-content.pos-right { justify-content: flex-end; text-align: end; }
.pw-hero-text {
    max-width: 640px;
    color: #fff;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s ease .2s, transform .8s ease .2s;
}
.pw-hero-slide.is-active .pw-hero-text {
    opacity: 1;
    transform: translateY(0);
}
.pw-hero-text h2 {
    font-size: clamp(1.9rem, 1.3rem + 3vw, 3.6rem);
    font-weight: 800;
    line-height: 1.15;
    text-shadow: 0 4px 20px rgba(0,0,0,.5);
    margin-bottom: 1rem;
}
.pw-hero-text p {
    font-size: clamp(1rem, .9rem + .4vw, 1.25rem);
    text-shadow: 0 2px 10px rgba(0,0,0,.5);
    margin-bottom: 1.75rem;
    line-height: 1.7;
}
.pw-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
    padding: .9rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .3s ease, background .3s ease, color .3s ease;
}
.pw-hero-btn:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
    transform: translateY(-4px);
}
.pw-hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,.16);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .3s ease;
}
.pw-hero-nav:hover { background: rgba(255,255,255,.3); }
.pw-hero-prev { inset-inline-start: 20px; }
.pw-hero-next { inset-inline-end: 20px; }
[dir="rtl"] .pw-hero-prev svg,
[dir="rtl"] .pw-hero-next svg { transform: scaleX(-1); }
.pw-hero-dots {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}
.pw-hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.45);
    border: none;
    cursor: pointer;
    transition: background .3s ease, transform .3s ease;
}
.pw-hero-dot.is-active {
    background: #fff;
    transform: scale(1.3);
}
@media (max-width: 768px) {
    .pw-hero { height: 85dvh; min-height: 520px; margin-top: -90px; }
    .pw-hero-nav { width: 38px; height: 38px; }
}

/* ============================================================
   2. WHY PRIMEWOOD
   ============================================================ */
.pw-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.75rem;
    max-width: 1200px;
    margin: 0 auto;
}
.pw-why-card {
    background: #fff;
    border-radius: 18px;
    padding: 2.2rem 1.5rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.05);
    border: 1px solid rgba(0,0,0,.05);
    transition: transform .4s ease, box-shadow .4s ease;
}
.pw-why-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,.1);
}
.pw-why-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.2rem;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .4s ease;
}
.pw-why-icon svg { width: 30px; height: 30px; }
.pw-why-card:hover .pw-why-icon { transform: rotate(-8deg) scale(1.08); }
.pw-why-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--primary-color); margin-bottom: .6rem; }
.pw-why-card p { color: #6b7280; font-size: .95rem; line-height: 1.7; margin: 0; }
.pw-why-card a.pw-why-link { position: absolute; inset: 0; }

/* ============================================================
   3. FEATURED CATEGORIES
   ============================================================ */
.pw-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 1.25rem;
    max-width: 1300px;
    margin: 0 auto;
}
.pw-cat-tile {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    grid-column: span 1;
    grid-row: span 1;
    display: block;
    text-decoration: none;
}
.pw-cat-tile.size-large {
    grid-column: span 2;
    grid-row: span 2;
}
.pw-cat-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.pw-cat-tile:hover img { transform: scale(1.1); }
.pw-cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.05) 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
}
.pw-cat-info h3 { color: #fff; font-weight: 700; font-size: 1.1rem; margin: 0 0 .25rem; }
.pw-cat-info p { color: rgba(255,255,255,.85); font-size: .85rem; margin: 0 0 .5rem; }
.pw-cat-explore {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .35s ease, transform .35s ease;
}
.pw-cat-tile:hover .pw-cat-explore { opacity: 1; transform: translateY(0); }
@media (max-width: 992px) {
    .pw-cat-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
    .pw-cat-tile.size-large { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 576px) {
    .pw-cat-grid { grid-template-columns: 1fr; }
    .pw-cat-tile.size-large { grid-column: span 1; }
}

/* ============================================================
   4. BEST SELLERS
   ============================================================ */
.pw-bs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1300px;
    margin: 0 auto 2rem;
}
.pw-bs-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
    border: 1px solid rgba(0,0,0,.05);
    transition: transform .35s ease, box-shadow .35s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}
.pw-bs-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(0,0,0,.12);
    color: inherit;
}
.pw-bs-img-wrap { position: relative; aspect-ratio: 1/1; overflow: hidden; background: #f3f4f6; }
.pw-bs-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pw-bs-card:hover .pw-bs-img-wrap img { transform: scale(1.06); }
.pw-bs-badge {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: #dc2626;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}
.pw-bs-badge.out-of-stock { background: #6b7280; }
.pw-bs-body { padding: 1rem 1.1rem 1.2rem; }
.pw-bs-body h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .4rem; color: #1f2937; }
.pw-bs-price { display: flex; align-items: baseline; gap: .5rem; }
.pw-bs-price .old { text-decoration: line-through; color: #9ca3af; font-size: .85rem; }
.pw-bs-price .current { color: var(--primary-color); font-weight: 800; font-size: 1.05rem; }
@media (max-width: 992px) {
    .pw-bs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .pw-bs-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: .5rem;
    }
    .pw-bs-grid .pw-bs-card { min-width: 62%; scroll-snap-align: start; }
}

/* ============================================================
   5. MANUFACTURING TIMELINE
   ============================================================ */
.pw-timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
}
.pw-timeline::before {
    content: '';
    position: absolute;
    top: 34px;
    inset-inline-start: 5%;
    inset-inline-end: 5%;
    height: 2px;
    background: var(--primary-soft);
    z-index: 0;
}
.pw-timeline-step {
    position: relative;
    z-index: 1;
    flex: 1;
    text-align: center;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}
.pw-timeline-step.is-visible { opacity: 1; transform: translateY(0); }
.pw-timeline-badge {
    width: 68px;
    height: 68px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px var(--primary-glow);
}
.pw-timeline-badge svg { width: 28px; height: 28px; }
.pw-timeline-num {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--primary-soft);
    padding: 2px 10px;
    border-radius: 999px;
    margin-bottom: .5rem;
}
.pw-timeline-step h3 { font-size: 1rem; font-weight: 700; color: #1f2937; margin: 0 0 .4rem; }
.pw-timeline-step p { font-size: .88rem; color: #6b7280; line-height: 1.6; margin: 0; }
.pw-timeline-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; margin-bottom: .8rem; }
@media (max-width: 900px) {
    .pw-timeline { flex-direction: column; }
    .pw-timeline::before { display: none; }
    .pw-timeline-step { display: flex; align-items: flex-start; gap: 1rem; text-align: start; }
    .pw-timeline-badge { margin: 0; flex-shrink: 0; }
}

/* ============================================================
   6. WORKSHOP VIDEO
   ============================================================ */
.pw-video-wrap {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}
.pw-video-wrap.pos-center { grid-template-columns: 1fr; text-align: center; }
.pw-video-poster {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    background: #000;
}
.pw-video-poster img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.pw-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pw-video-play-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
    transition: transform .3s ease;
}
.pw-video-poster:hover .pw-video-play-btn { transform: scale(1.1); }
.pw-video-play-btn svg { width: 30px; height: 30px; margin-inline-start: 4px; }
.pw-video-text h2 { color: var(--primary-color); }
.pw-video-text p { color: #6b7280; line-height: 1.8; }

.pw-video-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.85);
}
.pw-video-modal.is-open { display: flex; }
.pw-video-modal-inner {
    width: min(92vw, 1000px);
    aspect-ratio: 16/9;
    position: relative;
}
.pw-video-modal-inner video,
.pw-video-modal-inner iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 10px;
    background: #000;
}
.pw-video-modal-close {
    position: absolute;
    top: -44px;
    inset-inline-end: 0;
    color: #fff;
    background: rgba(255,255,255,.15);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
@media (max-width: 900px) {
    .pw-video-wrap { grid-template-columns: 1fr; }
}

/* ============================================================
   7. BIG CTA
   ============================================================ */
.pw-cta {
    position: relative;
    padding-block: clamp(4rem, 9vw, 7rem);
    background-color: var(--primary-color);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}
@media (max-width: 768px) {
    .pw-cta { background-attachment: scroll; }
}
.pw-cta-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.pw-cta-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    color: #fff;
}
.pw-cta.align-left .pw-cta-content { margin-inline-start: 0; text-align: start; }
.pw-cta.align-right .pw-cta-content { margin-inline-end: 0; text-align: end; margin-inline-start: auto; }
.pw-cta.align-center .pw-cta-content { text-align: center; }
.pw-cta-content h2 {
    font-size: clamp(1.8rem, 1.3rem + 2.5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.pw-cta-content p { font-size: 1.1rem; margin-bottom: 2rem; line-height: 1.7; opacity: .95; }
.pw-cta-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    color: var(--primary-color);
    padding: .95rem 2.4rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .3s ease;
}
.pw-cta-btn:hover { transform: translateY(-4px); color: var(--primary-color); }
.pw-cta-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0,0,0,.15);
    transform: scale(0);
    animation: pw-ripple .6s ease-out;
    pointer-events: none;
}
@keyframes pw-ripple {
    to { transform: scale(3); opacity: 0; }
}

/* ============================================================
   Global reduced-motion override for all new sections
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .pw-hero-slide,
    .pw-hero-slide-media img,
    .pw-hero-text,
    .pw-why-card,
    .pw-why-icon,
    .pw-cat-tile img,
    .pw-cat-explore,
    .pw-bs-card,
    .pw-bs-img-wrap img,
    .pw-timeline-step,
    .pw-video-play-btn,
    .pw-cta-btn {
        transition: none !important;
        animation: none !important;
    }
    .pw-hero-slide.is-active .pw-hero-slide-media img { transform: none !important; }
    .pw-timeline-step { opacity: 1 !important; transform: none !important; }
    .pw-cta { background-attachment: scroll !important; }
}
