/* FAQ Styles */
* {
    box-sizing: border-box;
}

.faq-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.faq-header {
    text-align: center;
    margin-bottom: 40px;
}

.faq-header h1 {
    font-size: 2.5em;
    color: #222;
    margin-bottom: 10px;
    font-weight: 600;
}

.faq-header p {
    font-size: 1.1em;
    color: #666;
    margin: 0;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.search-clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 20px;
    display: none;
    user-select: none;
}

.search-input:not(:placeholder-shown) + .search-clear {
    display: block;
}

/* Product Filter */
.product-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.product-filter::-webkit-scrollbar {
    height: 4px;
}

.product-filter::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.product-filter::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.product-btn {
    padding: 10px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    color: #555;
    font-family: inherit;
}

.product-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    transform: translateY(-1px);
}

.product-btn.active {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.product-count {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 12px;
    font-size: 13px;
}

.product-btn.active .product-count {
    background: rgba(255,255,255,0.3);
}

/* Results Info */
.results-info {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

/* FAQ Container */
.faq-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* FAQ Items */
.faq-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item:hover {
    background: #fafafa;
    margin: 0 -20px;
    padding: 20px;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.faq-question h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex: 1;
    padding-right: 20px;
    margin: 0;
    line-height: 1.4;
}

.faq-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.faq-icon::after {
    content: '+';
    font-size: 20px;
    color: #e74c3c;
    font-weight: 300;
}

.faq-item.active .faq-icon {
    background: #e74c3c;
    transform: rotate(45deg);
}

.faq-item.active .faq-icon::after {
    color: white;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding-top: 15px;
}

.faq-answer-content {
    color: #555;
    line-height: 1.8;
}

.faq-answer-content p {
    margin-bottom: 12px;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

.faq-answer-content ul,
.faq-answer-content ol {
    margin: 12px 0;
    padding-left: 25px;
}

.faq-answer-content li {
    margin-bottom: 8px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.quick-action {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
}

.quick-action:hover {
    color: #e74c3c;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #666;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f0f0f0;
    border-top-color: #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .faq-wrapper {
        padding: 20px 15px;
    }
    
    .faq-header h1 {
        font-size: 2em;
    }
    
    .faq-container {
        padding: 20px;
        border-radius: 12px;
    }
    
    .faq-question h3 {
        font-size: 16px;
    }
    
    .product-filter {
        margin-bottom: 20px;
    }
    
    .product-btn {
        padding: 8px 18px;
        font-size: 14px;
    }
    
    .faq-item:hover {
        margin: 0 -15px;
        padding: 20px 15px;
    }
}

/* Print Styles */
@media print {
    .search-box,
    .product-filter,
    .quick-actions,
    .results-info {
        display: none !important;
    }
    
    .faq-wrapper {
        max-width: 100%;
    }
    
    .faq-item {
        page-break-inside: avoid;
    }
    
    .faq-answer {
        max-height: none !important;
        display: block !important;
    }
    
    .faq-icon {
        display: none;
    }
}