/* static/css/product.css - product pages (templates/product_detail.html). */

/* ---------- Hero ---------- */
.pd-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: calc(var(--header-height) + 1.75rem) 0 3rem;
    color: #F4F1EA;
    background-color: var(--primary-deep);
    background-image:
        radial-gradient(50rem 32rem at 90% 0%, rgba(226, 174, 72, 0.14), transparent 60%),
        radial-gradient(44rem 30rem at 0% 100%, rgba(62, 140, 57, 0.16), transparent 60%),
        linear-gradient(180deg, var(--primary-navy) 0%, var(--primary-deep) 100%);
}
.pd-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 24px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 24px);
    mask-image: radial-gradient(ellipse at 70% 30%, #000 15%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 15%, transparent 70%);
}
.pd-hero .home-eyebrow { color: var(--accent-yellow); }

.pd-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    margin: 0 0 2.25rem;
    padding: 0;
    font-size: 0.88rem;
}
.pd-breadcrumb li { display: flex; align-items: center; color: #B9C5D3; }
.pd-breadcrumb li:not(:last-child)::after { content: '›'; margin-left: 0.4rem; opacity: 0.6; }
.pd-breadcrumb a { color: #B9C5D3; text-decoration: none; }
.pd-breadcrumb a:hover { color: #fff; }
.pd-breadcrumb [aria-current="page"] { color: #fff; font-weight: 600; }

.pd-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2.5rem 4rem;
    align-items: center;
}
.pd-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
    color: #fff;
    margin: 0 0 1.25rem;
    animation: pd-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pd-lead {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #C9D3DF;
    max-width: 38rem;
    margin: 0 0 1.5rem;
    animation: pd-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.pd-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 2rem;
    padding: 0;
    animation: pd-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.pd-chips li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.pd-chips i { color: var(--leaf); font-size: 0.8em; }
.pd-hero .home-hero-actions { animation: pd-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both; }

/* Photo in a tilted frame that follows the pointer (product.js). */
.pd-media {
    position: relative;
    aspect-ratio: 1;
    border-radius: 26px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, -6deg));
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    animation: pd-media-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
.pd-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.04) translate(calc(var(--ry-n, 0) * -10px), calc(var(--rx-n, 0) * 10px));
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
/* A soft sheen that moves with the tilt. */
.pd-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.14) 50%, transparent 65%);
    background-size: 250% 100%;
    background-position: calc(50% + var(--ry-n, 0) * 40%) 0;
    pointer-events: none;
    transition: background-position 0.5s ease;
}
.pd-media-badge {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-deep);
    background: rgba(250, 247, 241, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.pd-media-badge i { color: var(--leaf-dark); }

@keyframes pd-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}
@keyframes pd-media-in {
    from { opacity: 0; transform: perspective(1100px) rotateY(-18deg) translateY(24px); }
}

/* Headline specifications: the numbers a buyer looks for first. */
.pd-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1px;
    margin: 3rem 0 0;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.pd-spec {
    padding: 1.3rem 1.4rem;
    background: rgba(10, 28, 51, 0.88);
    animation: pd-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}
.pd-spec dt {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9FB0C3;
    margin-bottom: 0.4rem;
}
.pd-spec dd {
    margin: 0;
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.2;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.pd-specs-note {
    margin: 0.85rem 0 0;
    font-size: 0.85rem;
    color: #9FB0C3;
}

/* ---------- Overview + enquiry card ---------- */
.pd-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 3rem 5rem;
    align-items: start;
}
.pd-article h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    letter-spacing: -0.015em;
    color: var(--primary-navy);
    margin: 0 0 1.25rem;
}
.pd-article p:not(.home-eyebrow) {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 44rem;
    margin: 0 0 1.15rem;
}
.pd-enquiry {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    padding: 2rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(16, 41, 74, 0.1);
    box-shadow: 0 24px 48px rgba(16, 41, 74, 0.08);
}
.pd-enquiry h2 {
    font-size: 1.25rem;
    color: var(--primary-navy);
    margin: 0 0 1.25rem;
}
.pd-enquiry ol {
    list-style: none;
    counter-reset: ask;
    margin: 0 0 1.5rem;
    padding: 0;
}
.pd-enquiry li {
    counter-increment: ask;
    position: relative;
    padding: 0 0 1rem 2.6rem;
}
.pd-enquiry li::before {
    content: counter(ask);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.8rem;
    height: 1.8rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(226, 174, 72, 0.22);
    color: var(--primary-navy);
    font-weight: 700;
    font-size: 0.85rem;
}
.pd-enquiry strong { display: block; color: var(--primary-navy); font-size: 0.98rem; }
.pd-enquiry li span { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.pd-enquiry .home-btn { width: 100%; justify-content: center; }
.pd-enquiry-alt { margin: 0.85rem 0 0; text-align: center; font-size: 0.9rem; color: var(--text-muted); }
.pd-enquiry-alt a { color: var(--brand-blue); font-weight: 600; text-decoration: none; }

/* ---------- Applications ---------- */
.pd-apps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
}
.pd-apps li {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 9rem;
    padding: 1.4rem 1.5rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(16, 41, 74, 0.08);
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1.12rem;
    color: var(--primary-navy);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pd-apps li:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(16, 41, 74, 0.1); }
.pd-apps-num {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--leaf-dark);
}

/* ---------- FAQ ---------- */
.pd-faq {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 2rem 4rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .pd-hero-grid,
    .pd-overview,
    .pd-faq { grid-template-columns: minmax(0, 1fr); }
    .pd-media { max-width: 560px; aspect-ratio: 4 / 3; }
    .pd-enquiry { position: static; }
}
@media (max-width: 600px) {
    .pd-hero { padding-top: calc(var(--header-height) + 1.25rem); }
    .pd-hero .home-hero-actions .home-btn { flex: 1 1 100%; justify-content: center; }
    .pd-specs { grid-template-columns: 1fr 1fr; }
    .pd-spec { padding: 1rem; }
    .pd-enquiry { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pd-hero h1, .pd-lead, .pd-chips, .pd-hero .home-hero-actions, .pd-media, .pd-spec { animation: none; }
    .pd-media, .pd-media img, .pd-apps li { transition: none; }
}
