/**
 * Product FAQ Module - Frontend Styles
 */

.product-faq-container {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.product-faq-container .card-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
}

.product-faq-accordion {
    margin-top: 1rem;
}

.product-faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.product-faq-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Override Bootstrap card-header styles */
.product-faq-item .card-header,
.product-faq-container .product-faq-item .card-header,
#productFaqAccordion .card-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #e0e0e0 !important;
    padding: 0 !important;
    transition: none !important;
}

/* Override all button styles for FAQ items */
.product-faq-item .card-header .btn-link,
.product-faq-item .card-header button.btn-link,
.product-faq-item .card-header .btn.btn-link,
#productFaqAccordion .card-header .btn-link,
#productFaqAccordion .card-header button.btn-link {
    color: #000000 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    padding: 1rem 1.5rem !important;
    width: 100% !important;
    text-align: left !important;
    position: relative;
    transition: background-color 0.3s ease !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: #f8f9fa !important;
    background: #f8f9fa !important;
    border: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.product-faq-item .card-header .btn-link:hover,
.product-faq-item .card-header button.btn-link:hover,
#productFaqAccordion .card-header .btn-link:hover {
    background-color: #e9ecef !important;
    background: #e9ecef !important;
    text-decoration: none !important;
    color: #000000 !important;
}

.product-faq-item .card-header .btn-link[aria-expanded="true"],
.product-faq-item .card-header .btn-link:not(.collapsed),
.product-faq-item .card-header button.btn-link[aria-expanded="true"],
.product-faq-item .card-header button.btn-link:not(.collapsed),
#productFaqAccordion .card-header .btn-link[aria-expanded="true"],
#productFaqAccordion .card-header .btn-link:not(.collapsed) {
    background-color: #f8f9fa !important;
    background: #f8f9fa !important;
}

.product-faq-item .card-header .btn-link[aria-expanded="true"]:hover,
.product-faq-item .card-header .btn-link:not(.collapsed):hover,
.product-faq-item .card-header button.btn-link[aria-expanded="true"]:hover,
.product-faq-item .card-header button.btn-link:not(.collapsed):hover {
    background-color: #e9ecef !important;
    background: #e9ecef !important;
}

/* Ensure card-header background matches button when open */
.product-faq-item .card-header:has(button[aria-expanded="true"]) {
    background-color: #e5e5e5 !important;
}

/* Fallback for browsers without :has() support */
.product-faq-item .card-header button[aria-expanded="true"] ~ * {
    /* This won't work, but we use the button background instead */
}

.product-faq-item .card-header .btn-link:focus {
    box-shadow: none;
    outline: none;
}

.faq-question-text {
    font-size: 1.1rem;
    text-transform: none;
    flex: 1;
}

.faq-toggle-icon {
    display: inline-block;
    color: #ffc107;
    font-size: 1rem;
    margin-left: 10px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.product-faq-item .card-body {
    padding: 1.5rem;
}

.faq-answer {
    line-height: 1.6;
    color: #000000;
    font-size: 1rem;
}

.faq-recommended-products {
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.faq-recommended-products h5 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 1rem;
}

.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-card .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1rem;
}

.product-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-card .card-title .product-link {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-card .card-title .product-link:hover {
    color: #000000;
    text-decoration: none;
}

.product-card .card-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    color: #000000;
}


.product-card .btn-primary {
    width: 100%;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-faq-container {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .product-faq-item .card-header .btn-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .faq-question-text {
        font-size: 1rem;
    }

    .faq-answer {
        font-size: 0.95rem;
    }

    .faq-recommended-products .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .faq-recommended-products .col-md-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .product-card .card-img-top {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .product-faq-container .card-header h3 {
        font-size: 1.25rem;
    }

    .faq-recommended-products .col-lg-4 {
        margin-bottom: 1rem;
    }
}

/* Loading state */
.product-faq-loading {
    text-align: center;
    padding: 3rem 2rem;
    color: #000000;
}

.product-faq-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

.product-faq-loading p {
    margin-top: 1rem;
    font-size: 1rem;
}

/* Content container */
.product-faq-content {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

