/**
 * Product Detail Page Styles - ArchFinishes
 * Complete styling matching the mockup
 */

/* CSS Variables - ArchFinishes Palette */
:root {
    --af-pdp-primary: #C65A3A;
    --af-pdp-primary-hover: #b04e31;
    --af-pdp-text: #121212;
    --af-pdp-text-muted: #6B7280;
    --af-pdp-bg: #FAF7F2;
    --af-pdp-surface: #FFFFFF;
    --af-pdp-border: #E5E7EB;
    --af-pdp-gold: #D4A853;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.af-product-page {
    background: var(--af-pdp-bg);
    padding-bottom: 80px;
    overflow-x: hidden;
}


.af-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}


.af-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--af-pdp-text);
    margin: 0 0 20px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION - Gallery + Info
   ═══════════════════════════════════════════════════════════════════════════ */
.af-pdp-hero {
    padding: 32px 0;
}

.af-pdp-main {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 48px;
    align-items: start;
}

/* Gallery */
.af-pdp-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.af-gallery-main {
    aspect-ratio: 4/3;
    border-radius: 16px;
    overflow: hidden;
    background: var(--af-pdp-surface);
}

.af-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.af-gallery-thumbs {
    display: flex;
    gap: 8px;
}

.af-thumb {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    background: var(--af-pdp-surface);
}

.af-thumb.active {
    border-color: var(--af-pdp-primary);
}

.af-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info Column */
.af-pdp-info {
    background: var(--af-pdp-surface);
    border-radius: 16px;
    padding: 28px;
    position: sticky;
    top: 100px;
    box-sizing: border-box;
    width: 100%;
}


.af-pdp-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--af-pdp-primary);
    margin: 0 0 12px 0;
    line-height: 1.25;
}

.af-pdp-price {
    margin-bottom: 16px;
}

.af-price-current {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--af-pdp-text);
}

.af-price-original {
    font-size: 1.125rem;
    color: var(--af-pdp-text-muted);
    text-decoration: line-through;
    margin-left: 12px;
}

/* Badges */
.af-pdp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.af-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.af-badge .material-symbols-outlined {
    font-size: 14px;
}

.af-badge-download {
    background: #E8F5E9;
    color: #2E7D32;
}

.af-badge-bestseller {
    background: #FFF8E1;
    color: #F57C00;
}

/* Meta Row */
.af-pdp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 24px;
}


.af-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    color: var(--af-pdp-text-muted);
}

.af-meta-item .material-symbols-outlined {
    font-size: 16px;
}

.af-meta-item strong {
    color: var(--af-pdp-text);
}

/* Benefits List */
.af-pdp-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.af-pdp-benefits li {
    padding: 6px 0 6px 20px;
    font-size: 0.875rem;
    color: var(--af-pdp-text-muted);
    position: relative;
}

.af-pdp-benefits li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--af-pdp-primary);
}

/* CTA Buttons */
.af-pdp-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.af-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.af-btn-primary {
    background: var(--af-pdp-primary);
    color: #fff;
}

.af-btn-primary:hover {
    background: var(--af-pdp-primary-hover);
}

.af-btn-outline {
    background: transparent;
    color: var(--af-pdp-text);
    border: 1px solid var(--af-pdp-border);
}

.af-btn-outline:hover {
    border-color: var(--af-pdp-text);
}

.af-btn-large {
    padding: 14px 28px;
}

.af-pdp-secondary-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.af-btn-ghost {
    background: transparent;
    color: var(--af-pdp-text-muted);
    border: 1px solid var(--af-pdp-border);
    flex: 1;
    font-size: 0.8125rem;
}

.af-btn-ghost .material-symbols-outlined {
    font-size: 16px;
}

.af-pdp-note {
    font-size: 0.75rem;
    color: var(--af-pdp-text-muted);
    text-align: center;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DETAILS SECTION - What You Get + Drawing Previews
   ═══════════════════════════════════════════════════════════════════════════ */
.af-pdp-details {
    padding: 40px 0;
    border-bottom: 1px solid var(--af-pdp-border);
}

.af-pdp-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

/* What You Get */
.af-wyg-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.af-wyg-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--af-pdp-border);
}

.af-wyg-list li:last-child {
    border-bottom: none;
}

.af-wyg-list .material-symbols-outlined {
    font-size: 20px;
    color: var(--af-pdp-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.af-wyg-list strong {
    display: block;
    font-size: 0.875rem;
    color: var(--af-pdp-text);
}

.af-wyg-list span {
    font-size: 0.8125rem;
    color: var(--af-pdp-text-muted);
}

/* Drawing Previews */
.af-previews-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.af-preview-card {
    text-align: center;
}

.af-preview-img {
    aspect-ratio: 4/3;
    border-radius: 8px;
    background: #E8DED1;
    margin-bottom: 8px;
}

.af-preview-card span {
    font-size: 0.75rem;
    color: var(--af-pdp-text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPECS + HOW TO USE
   ═══════════════════════════════════════════════════════════════════════════ */
.af-pdp-specs-how {
    padding: 40px 0;
    border-bottom: 1px solid var(--af-pdp-border);
}

/* Specs Table */
.af-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.af-specs-table tr {
    border-bottom: 1px solid var(--af-pdp-border);
}

.af-specs-table tr:last-child {
    border-bottom: none;
}

.af-specs-table td {
    padding: 12px 0;
    font-size: 0.875rem;
}

.af-specs-table td:first-child {
    color: var(--af-pdp-text-muted);
    width: 40%;
}

.af-specs-table td:last-child {
    color: var(--af-pdp-text);
    font-weight: 500;
}

/* How to Use Steps */
.af-steps {
    display: flex;
    gap: 24px;
}

.af-step {
    flex: 1;
    text-align: center;
}

.af-step-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--af-pdp-surface);
    border: 1px solid var(--af-pdp-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.af-step-icon .material-symbols-outlined {
    font-size: 24px;
    color: var(--af-pdp-text);
}

.af-step strong {
    display: block;
    font-size: 0.8125rem;
    color: var(--af-pdp-text);
    margin-bottom: 4px;
}

.af-step span {
    font-size: 0.75rem;
    color: var(--af-pdp-text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MATERIALS NOTE
   ═══════════════════════════════════════════════════════════════════════════ */
.af-pdp-materials {
    padding: 40px 0;
    border-bottom: 1px solid var(--af-pdp-border);
}

.af-materials-text {
    font-size: 0.9375rem;
    color: var(--af-pdp-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   REVIEWS + FAQ
   ═══════════════════════════════════════════════════════════════════════════ */
.af-pdp-reviews-faq {
    padding: 40px 0;
    border-bottom: 1px solid var(--af-pdp-border);
}

/* Reviews */
.af-rating-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.af-rating-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--af-pdp-text);
}

.af-rating-count {
    font-size: 0.875rem;
    color: var(--af-pdp-text-muted);
}

.af-recent-link {
    font-size: 0.8125rem;
    color: var(--af-pdp-primary);
    text-decoration: none;
    margin-left: auto;
}

.af-review-cards {
    display: flex;
    gap: 16px;
}

.af-review-card {
    flex: 1;
    background: var(--af-pdp-surface);
    border-radius: 12px;
    padding: 16px;
}

.af-review-stars {
    color: var(--af-pdp-gold);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.af-review-card p {
    font-size: 0.8125rem;
    color: var(--af-pdp-text);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.af-reviewer {
    font-size: 0.75rem;
    color: var(--af-pdp-text-muted);
}

/* FAQ */
.af-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.af-faq-item {
    background: var(--af-pdp-surface);
    border-radius: 8px;
    overflow: hidden;
}

.af-faq-item summary {
    padding: 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--af-pdp-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

.af-faq-item summary::after {
    content: "∨";
    font-size: 1rem;
    color: var(--af-pdp-text-muted);
    transition: transform 0.2s;
}

.af-faq-item[open] summary::after {
    transform: rotate(180deg);
}

.af-faq-item summary::-webkit-details-marker {
    display: none;
}

.af-faq-item p {
    padding: 0 16px 16px;
    font-size: 0.875rem;
    color: var(--af-pdp-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RELATED PRODUCTS
   ═══════════════════════════════════════════════════════════════════════════ */
.af-pdp-related {
    padding: 40px 0;
}

.af-related-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.af-related-card {
    background: var(--af-pdp-surface);
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.af-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.af-related-img {
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.af-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.af-related-card h3 {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--af-pdp-text);
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.af-related-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--af-pdp-text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .af-pdp-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .af-pdp-info {
        position: static;
        width: 100%;
        max-width: 100%;
    }

    .af-pdp-gallery {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .af-gallery-main {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .af-related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}



@media (max-width: 768px) {
    .af-pdp-two-col {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .af-pdp-cta {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .af-btn {
        width: 100%;
        justify-content: center;
    }


    .af-previews-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .af-steps {
        flex-direction: column;
        gap: 16px;
    }

    .af-review-cards {
        flex-direction: column;
    }

    .af-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .af-gallery-main {
        aspect-ratio: 1/1;
        border-radius: 12px;
    }

    .af-gallery-thumbs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .af-gallery-thumbs::-webkit-scrollbar {
        height: 4px;
    }

    .af-pdp-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 16px;
        margin-bottom: 20px;
    }

    .af-pdp-secondary-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .af-btn-ghost {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
}
