/*
 * Product Detail Page Styles — Electrosol Solar
 * Extends style.css using the same brand tokens.
 * No overrides to existing theme classes.
 */

/* ── Product Hero ──────────────────────────────────── */
.prod-hero {
    position: relative;
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, var(--primary), #0a2f6b);
    overflow: hidden;
    margin-top: 72px; /* navbar height */
}

.prod-hero__overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.prod-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.prod-hero__tag {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 1rem;
}

.prod-hero__content h1 {
    color: #fff;
    margin-bottom: 0.75rem;
}

.prod-hero__tagline {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.prod-hero__desc {
    font-size: 1.05rem;
    opacity: 0.88;
    color: #fff;
    max-width: 520px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.prod-hero__ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.prod-hero__image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prod-hero__image-wrap::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center, rgba(255, 193, 7, 0.15), transparent 70%);
    pointer-events: none;
}

.prod-hero__image {
    border-radius: 1.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 540px;
    object-fit: cover;
    aspect-ratio: 16/10;
}

/* ── Breadcrumb ────────────────────────────────────── */
.prod-breadcrumb {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.prod-breadcrumb__list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.prod-breadcrumb__list a {
    color: var(--primary);
    font-weight: 500;
    transition: opacity 0.2s;
}

.prod-breadcrumb__list a:hover { opacity: 0.7; }

.prod-breadcrumb__list li:last-child span {
    color: var(--muted);
    font-weight: 400;
}

.prod-breadcrumb__sep { color: var(--muted); }

/* ── Product Overview ──────────────────────────────── */
.prod-overview__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
}

.prod-overview__card {
    position: relative;
}

.prod-overview__card--accent {
    background: linear-gradient(135deg, var(--primary), #0a2f6b);
    color: #fff;
    border: none;
}

.prod-overview__card--accent h3,
.prod-overview__card--accent p {
    color: #fff;
}

.prod-overview__icon {
    width: 52px;
    height: 52px;
    background: #EFF6FF;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1rem;
}

.prod-overview__icon--accent {
    background: rgba(255, 255, 255, 0.15);
    color: var(--secondary);
}

.prod-overview__card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

.prod-overview__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prod-overview__list li {
    font-size: 0.9rem;
    color: var(--muted);
    padding-left: 1.4rem;
    position: relative;
    line-height: 1.5;
}

.prod-overview__list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.prod-overview__card--accent .prod-overview__list li { color: rgba(255,255,255,0.85); }
.prod-overview__card--accent .prod-overview__list li::before { color: var(--secondary); }

/* ── Highlights ────────────────────────────────────── */
.prod-highlights__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.prod-highlight-card {
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.prod-highlight-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.18);
}

/* ── Specifications Table ──────────────────────────── */
.prod-specs__wrap {
    max-width: 800px;
    margin: 0 auto;
}

.prod-specs__table-wrap {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow-x: auto;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.prod-specs__table {
    width: 100%;
    border-collapse: collapse;
}

.prod-specs__th {
    background: var(--primary);
    color: #fff;
    text-align: left;
    padding: 1rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

.prod-specs__th:last-child { text-align: right; }

.prod-specs__row td {
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.925rem;
    vertical-align: middle;
}

.prod-specs__row:last-child td { border-bottom: none; }

.prod-specs__row--even { background: var(--bg); }
.prod-specs__row:hover td { background: #EFF6FF; }

.prod-specs__label {
    font-weight: 600;
    color: var(--text);
    width: 55%;
}

.prod-specs__value {
    color: var(--muted);
    text-align: right;
}

.prod-specs__note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.825rem;
    color: var(--muted);
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.prod-specs__note svg { flex-shrink: 0; margin-top: 1px; color: var(--primary); }

/* ── Variants ──────────────────────────────────────── */
.prod-variants__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
}

.prod-variant-card {
    overflow: hidden;
    padding: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.prod-variant-card__img-wrap {
    position: relative;
    overflow: hidden;
}

.prod-variant-card__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.35s;
}

.prod-variant-card:hover .prod-variant-card__img { transform: scale(1.05); }

.prod-variant-card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary);
    color: #1a1a1a;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
}

.prod-variant-card__body {
    padding: 1.5rem;
}

.prod-variant-card__body h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.prod-variant-card__body p {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.prod-variant-card__btn {
    width: 100%;
    justify-content: center;
}

/* ── Features Alternating Layout ──────────────────── */
.prod-feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

.prod-feature-row:last-child { margin-bottom: 0; }

.prod-feature-row--reverse { direction: rtl; }
.prod-feature-row--reverse > * { direction: ltr; }

.prod-feature-row__img-wrap {
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(11, 61, 145, 0.12);
}

.prod-feature-row__img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    transition: transform 0.4s;
}

.prod-feature-row__img-wrap:hover .prod-feature-row__img { transform: scale(1.03); }

.prod-feature-row__num {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.prod-feature-row__content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.875rem;
    line-height: 1.3;
}

.prod-feature-row__content p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

/* ── Applications Grid ─────────────────────────────── */
.prod-apps__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
}

.prod-app-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 1rem;
    text-align: center;
    transition: all 0.2s;
    cursor: default;
}

.prod-app-card:hover {
    border-color: var(--primary);
    background: #EFF6FF;
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(11, 61, 145, 0.1);
}

.prod-app-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.prod-app-card__label {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text);
}

/* ── Installation Timeline ─────────────────────────── */
.prod-install__timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 780px;
    margin: 0 auto 2.5rem;
}

.prod-install__step {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}

.prod-install__step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.prod-install__step-num {
    width: 52px;
    height: 52px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(11, 61, 145, 0.3);
    position: relative;
    z-index: 1;
}

.prod-install__step-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    margin: 0 auto;
    min-height: 2rem;
}

.prod-install__step-content {
    flex: 1;
    margin-bottom: 1.5rem;
}

.prod-install__step-content h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.prod-install__step-content p {
    font-size: 0.9rem;
    color: var(--muted);
}

.prod-install__cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Certifications ────────────────────────────────── */
.prod-certs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.prod-cert-card {
    text-align: center;
    padding: 2rem 1.25rem;
    transition: all 0.2s;
}

.prod-cert-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.15);
    transform: translateY(-4px);
}

.prod-cert-card__logo {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.prod-cert-card__logo img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

.prod-cert-card__initials {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--primary);
    background: #EFF6FF;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prod-cert-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.prod-cert-card p {
    font-size: 0.8rem;
    color: var(--muted);
}

/* ── Gallery ───────────────────────────────────────── */
.prod-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.prod-gallery__item { border-radius: var(--radius); overflow: hidden; }

.prod-gallery__trigger {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: zoom-in;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.prod-gallery__img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.35s;
    display: block;
}

.prod-gallery__trigger:hover .prod-gallery__img { transform: scale(1.07); }

.prod-gallery__overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 61, 145, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
}

.prod-gallery__trigger:hover .prod-gallery__overlay { opacity: 1; }

/* Lightbox */
.prod-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prod-lightbox[hidden] { display: none; }

.prod-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
}

.prod-lightbox__wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 90vw;
    max-height: 90vh;
}

.prod-lightbox__img-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.prod-lightbox__img {
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}

.prod-lightbox__caption {
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    margin-top: 0.75rem;
    text-align: center;
}

.prod-lightbox__close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.prod-lightbox__close:hover { background: rgba(255,255,255,0.25); }

.prod-lightbox__nav {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.prod-lightbox__nav:hover { background: rgba(255,255,255,0.25); }

/* ── FAQs ──────────────────────────────────────────── */
.prod-faqs__grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2.5rem;
    align-items: start;
}

.prod-faqs__contact {
    text-align: center;
    padding: 2rem;
}

.prod-faqs__contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.prod-faqs__contact h3 { margin-bottom: 0.75rem; font-size: 1.15rem; }
.prod-faqs__contact p  { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.5rem; }

.wa-outline {
    background: #25D366 !important;
    color: #fff !important;
}

/* ── Testimonials ──────────────────────────────────── */
.prod-testimonials__wrap { position: relative; }

.prod-testimonials__slider { scroll-padding: 0; }

.prod-testimonials__photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.prod-testimonials__controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.prod-testimonials__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    transition: all 0.2s;
}

.prod-testimonials__btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ── Related Products ──────────────────────────────── */
.prod-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.75rem;
}

.prod-related-card {
    overflow: hidden;
    padding: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.prod-related-card__img-wrap { overflow: hidden; }

.prod-related-card__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.35s;
}

.prod-related-card:hover .prod-related-card__img { transform: scale(1.05); }

.prod-related-card__body {
    padding: 1.5rem;
}

.prod-related-card__body h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.prod-related-card__body p {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

/* ── CTA Banner ────────────────────────────────────── */
.prod-cta-banner__btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.prod-cta-banner__wa {
    background: #25D366;
    color: #fff;
    gap: 0.5rem;
}

.prod-cta-banner__wa:hover { background: #20bd5a; }

/* ── Inquiry Form ──────────────────────────────────── */
.prod-inquiry__grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    align-items: start;
}

.prod-inquiry__form-wrap {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.prod-inquiry__form label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.prod-inquiry__form label span { color: #e53e3e; }

.prod-inquiry__submit {
    width: 100%;
    justify-content: center;
    margin-top: 0.25rem;
}

.prod-inquiry__error {
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
    padding: 0.875rem 1.25rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.prod-inquiry__error a { color: var(--primary); font-weight: 700; }

.prod-inquiry__success { display: flex !important; align-items: center; gap: 0.5rem; }
.prod-inquiry__success[hidden] { display: none !important; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1024px) {
    .prod-hero__inner          { grid-template-columns: 1fr; gap: 2.5rem; }
    .prod-hero__image-wrap     { max-width: 520px; margin: 0 auto; }
    .prod-overview__grid       { grid-template-columns: 1fr; }
    .prod-feature-row          { grid-template-columns: 1fr; gap: 2rem; }
    .prod-feature-row--reverse { direction: ltr; }
    .prod-faqs__grid           { grid-template-columns: 1fr; }
    .prod-inquiry__grid        { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .prod-hero { padding: 5rem 0 3rem; }
    .prod-hero__ctas { flex-direction: column; align-items: flex-start; }
    .prod-hero__ctas .btn { width: 100%; justify-content: center; }
    .prod-highlights__grid     { grid-template-columns: repeat(2, 1fr); }
    .prod-apps__grid           { grid-template-columns: repeat(3, 1fr); }
    .prod-gallery__grid        { grid-template-columns: repeat(2, 1fr); }
    .prod-cta-banner__btns     { flex-direction: column; }
    .prod-cta-banner__btns .btn { width: 100%; justify-content: center; }
    .prod-install__step { gap: 1rem; }
    .prod-install__cta { flex-direction: column; align-items: stretch; }
    .prod-install__cta .btn { justify-content: center; }
    .prod-lightbox__img { max-width: 95vw; }
    .prod-lightbox__nav { display: none; }
}

@media (max-width: 480px) {
    .prod-highlights__grid { grid-template-columns: 1fr; }
    .prod-apps__grid       { grid-template-columns: repeat(2, 1fr); }
    .prod-gallery__grid    { grid-template-columns: 1fr; }
    .prod-variants__grid   { grid-template-columns: 1fr; }
    .prod-related__grid    { grid-template-columns: 1fr; }
    .prod-certs__grid      { grid-template-columns: repeat(2, 1fr); }
}

/* ── Scroll Fade-in Animations ─────────────────────── */
.prod--fade-init {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.prod--visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children in grids */
.prod-highlights__grid    .prod--fade-init:nth-child(2) { transition-delay: 0.07s; }
.prod-highlights__grid    .prod--fade-init:nth-child(3) { transition-delay: 0.14s; }
.prod-highlights__grid    .prod--fade-init:nth-child(4) { transition-delay: 0.21s; }
.prod-highlights__grid    .prod--fade-init:nth-child(5) { transition-delay: 0.28s; }
.prod-highlights__grid    .prod--fade-init:nth-child(6) { transition-delay: 0.35s; }
.prod-highlights__grid    .prod--fade-init:nth-child(7) { transition-delay: 0.42s; }
.prod-highlights__grid    .prod--fade-init:nth-child(8) { transition-delay: 0.49s; }
.prod-variants__grid      .prod--fade-init:nth-child(2) { transition-delay: 0.08s; }
.prod-variants__grid      .prod--fade-init:nth-child(3) { transition-delay: 0.16s; }
.prod-variants__grid      .prod--fade-init:nth-child(4) { transition-delay: 0.24s; }
.prod-apps__grid          .prod--fade-init:nth-child(2) { transition-delay: 0.06s; }
.prod-apps__grid          .prod--fade-init:nth-child(3) { transition-delay: 0.12s; }
.prod-apps__grid          .prod--fade-init:nth-child(4) { transition-delay: 0.18s; }
.prod-apps__grid          .prod--fade-init:nth-child(5) { transition-delay: 0.24s; }
.prod-apps__grid          .prod--fade-init:nth-child(6) { transition-delay: 0.30s; }
.prod-related__grid       .prod--fade-init:nth-child(2) { transition-delay: 0.1s; }
.prod-related__grid       .prod--fade-init:nth-child(3) { transition-delay: 0.2s; }
.prod-related__grid       .prod--fade-init:nth-child(4) { transition-delay: 0.3s; }
