﻿/* ============================================================
   Peri Single Product Page Styles
   
   Note: Header & footer styles are loaded from base-parts/
   (enqueued automatically for all page types)
   ============================================================ */

/* ============================================================
   Astra overrides
   ============================================================ */
/* Break content out of the default container */
.ast-container:has(.peri-single-product) {
    max-width: 100% !important;
    padding: 0 !important;
    width: 100% !important;
}

/* 100vw breakout: expand sections to full viewport width */
.peri-section-hero,
.peri-section-features,
.peri-section-video,
.peri-section-faq {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}


/* ------------------------------------------------------------
   3. Page wrapper & shared layout
   ------------------------------------------------------------ */
.peri-single-product {
    width: 100%;
    background-color: #ffffff;
}

/* Centered content column  used by all sections */
.peri-section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section title (gradient div) */
.peri-section-label {
    display: block;
    width: 100%;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 2rem;
    text-align: center;
    padding: 0.25rem 0;
}


/* ------------------------------------------------------------
   4. Section 1: Hero
   ------------------------------------------------------------ */

/* Background image wrapper with white overlay */
.peri-bg-wrapper {
    width: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.peri-bg-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.peri-section-hero {
    width: 100%;
    padding: 2rem 0;
    position: relative;
}

.peri-hero-inner {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Product image with zoom-on-hover */
.peri-hero-image {
    flex: 0 0 22%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.peri-hero-image img {
    width: 100%;
    max-width: 332px;
    height: auto;
    aspect-ratio: 332 / 383;
    object-fit: cover;
    display: block;
    transition: transform 0.1s ease-out;
    transform-origin: top left;
}

/* Details card */
.peri-hero-details-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 32px;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    color: #374C6C;
}

/* SKU & Category share identical typography */
.peri-hero-sku,
.peri-hero-category {
    font-family: "Montserrat", sans-serif !important;
    font-size: 34px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin: 0 !important;
}

.peri-hero-tagline {
    font-style: italic;
    font-size: 0.95rem;
    margin: 0;
}

/* Description & Best-for share base text styles */
.peri-hero-description,
.peri-hero-best-for {
    font-size: 16px;
    margin: 0;
}

.peri-hero-description { line-height: 1.55; }

.peri-hero-best-for strong { font-weight: 700; margin-right: 0.25rem; }
.peri-hero-best-for em     { font-style: italic; color: var(--global-headtitle-color); }

.peri-hero-price {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
    color: #32255e;
    padding-top: 0.5rem;
    margin: 0;
}

/* Prevents WooCommerce from resetting the inherited values */
.peri-hero-price .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
}

/* Hide View Cart Link */
.peri-hero-add-to-cart a.added_to_cart {
    display: none !important;
}

/* ------------------------------------------------------------
   5. Section 2: Features
   ------------------------------------------------------------ */
.peri-section-features {
    width: 100%;
}

.peri-features-grid {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.peri-features-img-col {
    flex: 0 0 48%;
}

.peri-features-img-col img {
    width: 100%;
    height: auto;
    display: block;
}

.peri-features-accordion-col { flex: 1; }


/* ------------------------------------------------------------
   6. Accordion (shared by Features & FAQ)
   ------------------------------------------------------------ */
.peri-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a3a52;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.peri-accordion-header::-webkit-details-marker { display: none; }

/* Features: icon before text — align left together */
.peri-features-accordion-col .peri-accordion-header {
    justify-content: flex-start;
    gap: 0.5rem;
}

.peri-accordion-icon {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* Chevron arrow using ::before */
.peri-accordion-icon::before {
    content: '';
    position: absolute;
    top: 55%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #1a3a52;
    border-bottom: 2px solid #1a3a52;
    transform: translate(-50%, -50%) rotate(45deg);
    transition: transform 0.2s ease;
}

details[open] .peri-accordion-icon::before {
    transform: translate(-50%, -50%) rotate(-135deg);
}

.peri-accordion-body {
    padding: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}


/* ------------------------------------------------------------
   7. Section 3: Video
   ------------------------------------------------------------ */
.peri-section-video {
    width: 100%;
}

.peri-section-video .peri-section-inner {
    padding-top: 4rem;
}

.peri-section-faq .peri-section-inner {
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.peri-video-title {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    margin: 0 0 1.5rem;
}

.peri-video-player {
    width: 100%;
    max-width: 1200px;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}


/* ------------------------------------------------------------
   8. Section 4: FAQ
   ------------------------------------------------------------ */
.peri-section-faq {
    width: 100%;
}


/* ------------------------------------------------------------
   9. Info box
   ------------------------------------------------------------ */
.peri-info-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
}

.info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #555;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    color: #555;
    line-height: 1;
}


/* ------------------------------------------------------------
   10. Responsive: Tablet (≤900px)
   ------------------------------------------------------------ */
@media (max-width: 900px) {
    .peri-hero-inner,
    .peri-features-grid {
        flex-direction: column;
    }

    .peri-hero-image,
    .peri-features-img-col {
        flex: 0 0 auto;
        width: 100%;
    }

    .peri-hero-sku,
    .peri-hero-category { font-size: 26px !important; line-height: 1.3 !important; }
    .peri-hero-price    { font-size: 1.3rem; }
}


/* ------------------------------------------------------------
   11. Responsive: Mobile (≤768px)
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .peri-section-inner { padding: 0 1rem; }
    .peri-section-video .peri-section-inner,
    .peri-section-faq .peri-section-inner { padding-top: 1.5rem; }
    .peri-hero-inner    { padding: 1.5rem 1rem; }

    .peri-video-title   { font-size: 1.2rem; }
    .peri-section-label { font-size: 1.4rem; }
}

