/*
Theme Name: Sanivar Child
Template: astra
Version: 1.2
Author: Sanivar
Description: Custom product page for Meuble En PVC 100% category - Square gallery
*/

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Arabic:wght@400;500;600;700;800&display=swap');

/* ============================================
   SANIVAR PRODUCT PAGE STYLES
   All selectors prefixed with .sanivar-*
   to ensure zero leakage to other pages
   ============================================ */

.sanivar-product-wrapper {
    font-family: 'Noto Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #0f3e5f;
    line-height: 1.6;
}

/* --- Gallery: SQUARE (1:1) --- */
.sanivar-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.sanivar-main-image {
    width: 100%;
    aspect-ratio: 1 / 1;  /* CHANGED: was 4/3, now square */
    object-fit: contain;
    background: #f0f6f8;
    border-radius: 18px;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.sanivar-main-image:hover {
    transform: scale(1.02);
}

.sanivar-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.sanivar-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sanivar-thumbnails img:hover,
.sanivar-thumbnails img.active {
    border-color: #4487a8;
}

/* --- Product Info --- */
.sanivar-product-info {
    padding: 20px 0;
}

.sanivar-breadcrumb {
    font-size: 13px;
    color: #7a9aaa;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.sanivar-product-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f3e5f;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.sanivar-product-subtitle {
    font-size: 15px;
    color: #5a7a8a;
    margin-bottom: 20px;
    font-weight: 500;
}

/* --- Price --- */
.sanivar-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sanivar-price {
    font-size: 32px;
    font-weight: 800;
    color: #c0392b;
    letter-spacing: -0.02em;
}

.sanivar-price-unit {
    font-size: 16px;
    font-weight: 600;
    color: #c0392b;
}

.sanivar-old-price {
    font-size: 20px;
    color: #9ab;
    text-decoration: line-through;
    font-weight: 600;
}

/* --- Rating --- */
.sanivar-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.sanivar-stars {
    color: #f5b041;
    font-size: 18px;
    letter-spacing: 1px;
}

.sanivar-review-count {
    font-size: 13px;
    color: #7a9aaa;
}

/* --- WhatsApp CTA --- */
.sanivar-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: #fff !important;
    font-size: 17px;
    font-weight: 700;
    padding: 16px 32px;
    border-radius: 14px;
    text-decoration: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
    width: 100%;
    max-width: 400px;
    border: none;
    cursor: pointer;
    letter-spacing: -0.01em;
}

.sanivar-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
}

.sanivar-whatsapp-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    flex-shrink: 0;
}

.sanivar-whatsapp-note {
    font-size: 12px;
    color: #7a9aaa;
    margin-top: 8px;
    text-align: center;
}

/* --- Trust Badges --- */
.sanivar-trust-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.sanivar-trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0f6f8;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #0f3e5f;
}

.sanivar-trust-badge svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #4487a8;
}

/* --- Tabs --- */
.sanivar-tabs {
    margin-top: 32px;
    border-top: 1px solid #e0eaef;
    padding-top: 24px;
}

.sanivar-tab-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0eaef;
}

.sanivar-tab-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #7a9aaa;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.sanivar-tab-btn.active {
    color: #4487a8;
    border-bottom-color: #4487a8;
}

.sanivar-tab-btn:hover {
    color: #4487a8;
}

.sanivar-tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.sanivar-tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sanivar-tab-panel h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f3e5f;
    margin-bottom: 12px;
}

.sanivar-tab-panel p,
.sanivar-tab-panel li {
    font-size: 15px;
    color: #3a5a6a;
    line-height: 1.8;
}

.sanivar-tab-panel ul {
    padding-right: 20px;
    margin: 12px 0;
}

.sanivar-tab-panel li {
    margin-bottom: 8px;
}

/* --- FAQ Accordion --- */
.sanivar-faq-item {
    border-bottom: 1px solid #e0eaef;
    padding: 16px 0;
}

.sanivar-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: #0f3e5f;
    cursor: pointer;
    user-select: none;
}

.sanivar-faq-question::after {
    content: '+';
    font-size: 22px;
    color: #4487a8;
    font-weight: 400;
    transition: transform 0.2s ease;
}

.sanivar-faq-item.open .sanivar-faq-question::after {
    content: '−';
}

.sanivar-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 14px;
    color: #5a7a8a;
    line-height: 1.7;
}

.sanivar-faq-item.open .sanivar-faq-answer {
    max-height: 300px;
    padding-top: 12px;
}

/* --- How to Order Steps --- */
.sanivar-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sanivar-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f0f6f8;
    padding: 16px;
    border-radius: 14px;
}

.sanivar-step-num {
    width: 32px;
    height: 32px;
    background: #4487a8;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
}

.sanivar-step-text {
    font-size: 14px;
    color: #3a5a6a;
    line-height: 1.6;
    font-weight: 500;
}

/* --- Sticky Mobile CTA --- */
.sanivar-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 9999;
    border-top: 1px solid #e0eaef;
}

.sanivar-sticky-cta .sanivar-whatsapp-btn {
    max-width: 100%;
    padding: 14px 24px;
    font-size: 15px;
}

/* --- Responsive --- */
@media (min-width: 768px) {
    .sanivar-product-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: start;
    }
}

@media (max-width: 767px) {
    .sanivar-product-title {
        font-size: 22px;
    }
    .sanivar-price {
        font-size: 26px;
    }
    .sanivar-trust-section {
        grid-template-columns: 1fr;
    }
    .sanivar-sticky-cta {
        display: block;
    }
    .sanivar-product-info {
        padding-bottom: 80px;
    }
}
