/* ==========================================================================
   Excel Calculator Product Page Styles
   Scoped to .excel-product-page wrapper (set by wc_product_class)
   Pattern-matched from dcf-calculator.css for design consistency
   ========================================================================== */

/* ---------- CSS Variables ---------- */
.excel-product-page {
    --ep-primary: #2563eb;
    --ep-primary-dark: #1e40af;
    --ep-text: #1f2937;
    --ep-text-muted: #6b7280;
    --ep-text-body: #374151;
    --ep-border: #e5e7eb;
    --ep-bg-light: #f9fafb;
    --ep-bg-lighter: #f8fafc;
    --ep-check: #15803d;
    --ep-dash: #9ca3af;
}

/* ---------- Animations ---------- */
@keyframes epFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.excel-product-page .excel-card {
    animation: epFadeInUp 0.6s ease-out both;
}

.excel-product-page .col-lg-5 .excel-card:nth-child(1) { animation-delay: 0ms; }
.excel-product-page .col-lg-5 .excel-card:nth-child(2) { animation-delay: 100ms; }
.excel-product-page .col-lg-5 .excel-card:nth-child(3) { animation-delay: 200ms; }
.excel-product-page .col-lg-7 .excel-card:nth-child(1) { animation-delay: 50ms; }
.excel-product-page .col-lg-7 .excel-card:nth-child(2) { animation-delay: 150ms; }
.excel-product-page .col-lg-7 .excel-card:nth-child(3) { animation-delay: 250ms; }

.excel-product-page .faq-accordion .accordion-item:nth-child(1) { animation: epFadeInUp 0.6s ease-out 350ms both; }
.excel-product-page .faq-accordion .accordion-item:nth-child(2) { animation: epFadeInUp 0.6s ease-out 400ms both; }
.excel-product-page .faq-accordion .accordion-item:nth-child(3) { animation: epFadeInUp 0.6s ease-out 450ms both; }
.excel-product-page .faq-accordion .accordion-item:nth-child(4) { animation: epFadeInUp 0.6s ease-out 500ms both; }
.excel-product-page .faq-accordion .accordion-item:nth-child(5) { animation: epFadeInUp 0.6s ease-out 550ms both; }
.excel-product-page .faq-accordion .accordion-item:nth-child(6) { animation: epFadeInUp 0.6s ease-out 600ms both; }

/* ---------- Hero Section ---------- */
.excel-product-page .excel-hero-section {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 3rem 0;
}

.excel-product-page .excel-hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white !important;
}

.excel-product-page .excel-hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.95;
    color: white;
}

.excel-product-page .excel-hero-section .text-white-50 {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 1rem;
}

/* ---------- Breadcrumb ---------- */
.excel-product-page .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.excel-product-page .breadcrumb a {
    color: var(--ep-primary);
    text-decoration: none;
}

.excel-product-page .breadcrumb a:hover {
    text-decoration: underline;
}

.excel-product-page .breadcrumb-item.active {
    color: var(--ep-text-muted);
}

/* ---------- Card Styles ---------- */
.excel-product-page .excel-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.excel-product-page .excel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.excel-product-page .excel-card .card-header {
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-primary-dark) 100%);
    color: white;
    font-weight: 600;
    border-bottom: none;
    padding: 0.85rem 1.25rem;
}

.excel-product-page .excel-card .card-header h2 {
    color: white;
    margin: 0;
    font-size: 1rem;
}

.excel-product-page .excel-card .card-header i {
    opacity: 0.9;
}

/* ---------- Product Image ---------- */
.excel-product-page .excel-product-image {
    border-radius: 12px 12px 0 0;
    display: block;
}

/* ---------- Feature Checklist ---------- */
.excel-product-page .excel-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.excel-product-page .excel-feature-list li {
    position: relative;
    padding: 0.6rem 0 0.6rem 2rem;
    border-bottom: 1px solid var(--ep-border);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ep-text);
}

.excel-product-page .excel-feature-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.excel-product-page .excel-feature-list li::before {
    content: "\2713";
    position: absolute;
    left: 0.25rem;
    top: 0.6rem;
    color: var(--ep-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* ---------- Cross-link CTA Card ---------- */
.excel-product-page .excel-crosslink-card {
    text-align: center;
}

.excel-product-page .crosslink-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 24px;
}

.excel-product-page .crosslink-text strong {
    display: block;
    font-size: 1rem;
    color: var(--ep-text);
    margin-bottom: 0.25rem;
}

.excel-product-page .crosslink-text span {
    font-size: 0.9rem;
    color: var(--ep-text-muted);
    line-height: 1.4;
}

.excel-product-page .excel-crosslink-btn {
    display: inline-block;
    background: transparent;
    color: var(--ep-primary);
    border: 2px solid var(--ep-primary);
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
}

.excel-product-page .excel-crosslink-btn:hover {
    background: var(--ep-primary);
    color: white;
}

/* ---------- Pricing / Download Section ---------- */
.excel-product-page .excel-pricing-section .woocommerce-product-rating {
    margin-bottom: 1rem;
}

.excel-product-page .excel-pricing-section .price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ep-primary);
    margin-bottom: 0.75rem;
}

.excel-product-page .excel-pricing-section .price del {
    color: var(--ep-text-muted);
    font-size: 1.25rem;
}

.excel-product-page .excel-pricing-section .woocommerce-product-details__short-description {
    font-size: 0.95rem;
    color: var(--ep-text-body);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.excel-product-page .excel-pricing-section .variations_form {
    margin-bottom: 0;
}

.excel-product-page .excel-pricing-section .variations {
    margin-bottom: 1rem;
}

.excel-product-page .excel-pricing-section .variations td {
    padding: 0.5rem 0;
}

.excel-product-page .excel-pricing-section .variations label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ep-text);
}

.excel-product-page .excel-pricing-section .variations select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.excel-product-page .excel-pricing-section .variations select:focus {
    border-color: var(--ep-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* Hide Add to Cart by default (FOUC prevention).
   $0 is pre-selected, so Free Download should show first.
   JS in woocommerce.php toggles visibility after page load. */
.excel-product-page .excel-pricing-section .single_variation_wrap {
    display: none;
}

.excel-product-page .excel-pricing-section .single_add_to_cart_button {
    background: var(--ep-primary) !important;
    border-color: var(--ep-primary) !important;
    color: white !important;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    flex: 1;
    transition: background 0.2s ease;
    width: 100%;
}

.excel-product-page .excel-pricing-section .single_add_to_cart_button:hover {
    background: var(--ep-primary-dark) !important;
    border-color: var(--ep-primary-dark) !important;
}

.excel-product-page .excel-pricing-section .btn-download {
    background: var(--ep-primary) !important;
    border-color: var(--ep-primary) !important;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    width: 100%;
}

.excel-product-page .excel-pricing-section .btn-download:hover {
    background: var(--ep-primary-dark) !important;
    border-color: var(--ep-primary-dark) !important;
}

.excel-product-page .excel-pricing-section .reset_variations {
    font-size: 0.85rem;
    color: var(--ep-text-muted);
}

/* Woo Variation Swatches compatibility */
.excel-product-page .excel-pricing-section .variable-items-wrapper {
    margin-bottom: 1rem;
}

/* ---------- Comparison Table ---------- */
.excel-product-page .excel-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.excel-product-page .excel-comparison-table th {
    background: var(--ep-primary);
    color: #fff;
    padding: 0.65rem 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.excel-product-page .excel-comparison-table th:first-child {
    text-align: left;
    width: 55%;
    border-radius: 6px 0 0 0;
}

.excel-product-page .excel-comparison-table th:last-child {
    border-radius: 0 6px 0 0;
}

.excel-product-page .excel-comparison-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--ep-border);
    text-align: center;
    color: var(--ep-text);
}

.excel-product-page .excel-comparison-table td:first-child {
    text-align: left;
}

.excel-product-page .excel-comparison-table .check {
    color: var(--ep-check);
    font-weight: 700;
    font-size: 1.1rem;
}

.excel-product-page .excel-comparison-table .dash {
    color: var(--ep-dash);
    font-size: 1rem;
}

.excel-product-page .excel-comparison-table tbody tr:hover {
    background: var(--ep-bg-lighter);
}

.excel-product-page .excel-comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- Product Description ---------- */
.excel-product-page .excel-description-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ep-text-body);
}

.excel-product-page .excel-description-content h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ep-text);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.excel-product-page .excel-description-content h2:first-child {
    margin-top: 0;
}

.excel-product-page .excel-description-content ul {
    padding-left: 1.25rem;
}

.excel-product-page .excel-description-content li {
    margin-bottom: 0.35rem;
}

.excel-product-page .excel-description-content a {
    color: var(--ep-primary);
    text-decoration: none;
    font-weight: 600;
}

.excel-product-page .excel-description-content a:hover {
    text-decoration: underline;
    color: var(--ep-primary-dark);
}

/* ---------- FAQ Accordion ---------- */
.excel-product-page .faq-accordion .accordion-item {
    border: 1px solid var(--ep-border);
    margin-bottom: 0.5rem;
    border-radius: 8px !important;
    overflow: hidden;
}

.excel-product-page .faq-accordion .accordion-button {
    font-weight: 600;
    color: var(--ep-text);
    background: var(--ep-bg-light);
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
}

.excel-product-page .faq-accordion .accordion-button:not(.collapsed) {
    background: var(--ep-primary);
    color: white;
    box-shadow: none;
}

.excel-product-page .faq-accordion .accordion-button::after {
    filter: none;
}

.excel-product-page .faq-accordion .accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

.excel-product-page .faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.excel-product-page .faq-accordion .accordion-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ep-text-body);
    padding: 1rem 1.25rem;
}

.excel-product-page .faq-accordion .accordion-body p {
    margin: 0;
}

/* ---------- Reviews Section ---------- */
.excel-product-page .woocommerce-Reviews h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ep-text);
}

/* ---------- WooCommerce Overrides ---------- */
/* Hide default WooCommerce product gallery/image wrapper if it somehow renders */
.excel-product-page .woocommerce-product-gallery {
    display: none;
}

/* Hide product_title if it leaks from WooCommerce hooks */
.excel-product-page .excel-pricing-section .product_title {
    display: none;
}

/* Override WooCommerce default float layout */
.excel-product-page > .images,
.excel-product-page > .summary,
.excel-product-page .excel-pricing-section {
    float: none !important;
    width: 100% !important;
}

/* Hide WooCommerce product meta if it leaks */
.excel-product-page .excel-pricing-section .product_meta {
    display: none;
}

/* Hide the single.php post header that wraps WooCommerce product content */
.single-product .post-head {
    display: none;
}

.single-product .single-post-content {
    padding-top: 0;
}

/* Quantity + Add to Cart button layout */
.excel-product-page .excel-pricing-section .woocommerce-variation-add-to-cart {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.excel-product-page .excel-pricing-section .quantity .qty {
    width: 70px;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    text-align: center;
    font-size: 1rem;
}

/* Duplicate add-to-cart button rules removed — consolidated into primary rule above (line ~270) */

/* ---------- Free Download + Back Button Layout ---------- */
.excel-product-page .excel-pricing-section .free-download-form-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.excel-product-page .excel-pricing-section .free-download-form-wrap .btn-download {
    flex: 1 1 100%;
    text-align: center;
}

.excel-product-page .excel-pricing-section .free-download-form-wrap .back-vari {
    flex: 1 1 100%;
    text-align: center;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 991px) {
    .excel-product-page .excel-hero-section {
        padding: 2rem 0;
    }

    .excel-product-page .excel-hero-section h1 {
        font-size: 2rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .excel-product-page .excel-hero-section h1 {
        font-size: 1.75rem;
    }

    .excel-product-page .excel-hero-section .lead {
        font-size: 1rem;
    }

    .excel-product-page .excel-description-content {
        font-size: 0.9rem;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .excel-product-page .excel-hero-section {
        padding: 1.5rem 0;
    }

    .excel-product-page .excel-hero-section h1 {
        font-size: 1.5rem;
    }

    .excel-product-page .excel-card .card-body {
        padding: 1rem;
    }

    .excel-product-page .excel-comparison-table th,
    .excel-product-page .excel-comparison-table td {
        padding: 0.4rem 0.5rem;
        font-size: 0.85rem;
    }

    .excel-product-page .faq-accordion .accordion-button {
        font-size: 0.9rem;
        padding: 0.85rem 1rem;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .excel-product-page .excel-card,
    .excel-product-page .faq-accordion .accordion-item {
        animation: none;
        opacity: 1;
    }

    .excel-product-page .excel-card:hover {
        transform: none;
    }
}
