/* ==================== PRODUCTS PAGE WIDGET - MATCHING MAIN PAGE STYLE ==================== */

/* Force Arial font everywhere to override any <pre>/<code> inheritance */
.fos-products-page,
.fos-products-page * {
    font-family: 'Arial', sans-serif !important;
}

.fos-products-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f5f5 !important;
}

/* Section Titles - Match main page */
.fos-section-title {
    font-size: 2.2em;
    font-weight: 900;
    color: #8B0000;
    text-align: left;
    margin: 40px 0 20px 0;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

/* Filters Section - Match main page styling */
.fos-products-filters {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fos-search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.fos-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.fos-search-input:focus {
    border-color: #8B0000;
    outline: none;
}

.fos-search-btn {
    background: transparent;
    color: #2830a7;
    border: 2px solid #2830a7;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fos-search-btn:hover {
    background: #2830a7;
    color: white;
    transform: translateY(-2px);
}
/* Category Filters - Accordion Style */
.fos-category-filters h3 {
    margin: 0 0 15px 0;
    color: #8B0000;
    font-size: 1.4em;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 2px solid #eee;
}

.fos-category-filters h3::after {
    content: '▼';
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.fos-category-filters.active h3::after {
    transform: rotate(180deg);
}

.fos-filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-bottom 0.3s ease;
}

.fos-category-filters.active .fos-filter-checkboxes {
    max-height: 500px; /* Adjust based on your content */
    margin-bottom: 20px;
}

.fos-filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 0;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.fos-filter-checkbox:last-child {
    border-bottom: none;
}

.fos-filter-checkbox input[type="checkbox"] {
    display: none;
}

.fos-filter-checkbox .checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.fos-filter-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #8B0000;
    border-color: #8B0000;
}

.fos-filter-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fos-filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 2px solid #eee;
}

.fos-filter-btn {
    padding: 12px 20px;
    border: 2px solid #2830a7;
    background: transparent;
    color: #2830a7;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fos-filter-btn:hover {
    background: #2830a7;
    color: white;
    transform: translateY(-2px);
}

.fos-filter-btn.primary {
    background: #2830a7;
    color: white;
}

.fos-filter-btn.primary:hover {
    background: #1a237e;
    border-color: #1a237e;
}

/* Products Grid Container */
.fos-products-grid-container {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Products Grid - Match main page flexbox */
.fos-products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

/* Product Item - Match main page product card */
.fos-product-item {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    width: calc(33.333% - 17px);
    margin-bottom: 6px;
    flex-grow: 0;
    flex-shrink: 0;
}

.fos-product-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.fos-product-image {
    height: 200px;
    overflow: hidden;
    background: #f8f8f8;
}

.fos-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    background: #f8f8f8;
}

.fos-product-item:hover .fos-product-image img {
    transform: scale(1.05);
}

/* Product Info - Match main page */
.fos-product-info {
    padding: 20px;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fos-product-title {
    margin: 0 0 12px;
    font-size: 1.4em;
    font-weight: 800;
    color: #8B0000;
    line-height: 1.2;
}

.fos-product-description {
    font-size: 0.95em;
    color: #666;
    margin: 0 0 15px;
    line-height: 1.4;
    font-weight: 500;
}

.fos-product-categories {
    margin-bottom: 15px;
}

.fos-product-category {
    display: inline-block;
    background: #f8f8f8;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
    margin-right: 8px;
    margin-bottom: 8px;
}

.fos-product-price {
    font-size: 1.6em;
    font-weight: 900;
    color: #2830a7;
    margin-bottom: 15px;
}

/* Product Actions - Match main page add row */
.fos-product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.fos-product-qty {
    width: 70px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 1em;
}

.fos-add-to-cart {
    flex: 1;
    padding: 12px 20px;
    background: #8B0000;
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.fos-add-to-cart:hover {
    background: #a00;
    transform: translateY(-2px);
}

/* No Products Message */
.fos-no-products {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-size: 1.2em;
}

/* Special Deals Section - Match main page */
.fos-special-section {
    margin: 50px 0;
}

.fos-special-carousel {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding: 0 10px 25px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.fos-special-carousel::-webkit-scrollbar {
    height: 8px;
}

.fos-special-carousel::-webkit-scrollbar-thumb {
    background: #8B0000;
    border-radius: 4px;
}

.fos-special-deal-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    display: flex;
    min-width: 350px;
    padding: 20px;
    transition: transform 0.3s;
    scroll-snap-align: start;
    flex-shrink: 0;
    position: relative;
}

.fos-special-deal-card:hover {
    transform: translateY(-8px);
}

.fos-special-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85em;
}

.fos-special-deal-card.upcoming .fos-special-badge {
    background: #ffc107;
    color: #333;
}

.fos-special-deal-img {
    width: 140px;
    height: 140px;
    overflow: hidden;
    border-radius: 15px;
    flex-shrink: 0;
}

.fos-special-deal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fos-special-deal-info {
    padding-left: 20px;
    flex: 1;
    text-align: left;
}

.fos-special-title {
    margin: 0 0 10px;
    font-size: 1.5em;
    font-weight: 800;
    color: #8B0000;
}

.fos-special-desc {
    font-size: 0.95em;
    color: #666;
    margin: 0 0 15px;
    line-height: 1.4;
}

.fos-special-price {
    font-size: 1.6em;
    font-weight: 900;
    color: #2830a7;
    margin-bottom: 15px;
}

.fos-timer {
    font-size: 1em;
    font-weight: 600;
    color: #dc3545;
    margin-bottom: 15px;
    background: #fff3f3;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
}

.fos-timer.upcoming {
    color: #ffc107;
    background: #fffdf3;
}

/* Featured Section - Match main page */
.fos-featured-section {
    margin: 50px 0;
}

.fos-carousel {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding: 0 10px 25px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.fos-carousel::-webkit-scrollbar {
    height: 8px;
}

.fos-carousel::-webkit-scrollbar-thumb {
    background: #8B0000;
    border-radius: 4px;
}

.fos-featured-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    display: flex;
    min-width: 350px;
    padding: 20px;
    transition: transform 0.3s;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.fos-featured-card:hover {
    transform: translateY(-8px);
}

.fos-featured-img {
    width: 140px;
    height: 140px;
    overflow: hidden;
    border-radius: 15px;
    flex-shrink: 0;
}

.fos-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fos-featured-info {
    padding-left: 20px;
    flex: 1;
    text-align: left;
}

.fos-featured-info h3 {
    margin: 0 0 10px;
    font-size: 1.5em;
    font-weight: 800;
    color: #8B0000;
}

/* Placeholder */
.fos-placeholder {
    height: 100%;
    background: linear-gradient(45deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 200%;
    animation: placeholder 2s infinite;
}

@keyframes placeholder {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 992px) {
    .fos-product-item {
        width: calc(50% - 12.5px);
    }
}

@media (max-width: 768px) {
    .fos-products-page {
        padding: 15px;
    }
    
    .fos-products-filters {
        padding: 20px;
    }
    
    .fos-search-box {
        flex-direction: column;
    }
    
    .fos-filter-checkboxes {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .fos-products-grid {
        gap: 20px;
    }
    
    .fos-filter-actions {
        justify-content: center;
    }
    
    .fos-special-deal-content {
        flex-direction: column;
        text-align: center;
    }
    
    .fos-special-deal-img {
        width: 150px;
        height: 150px;
    }
    
    .fos-featured-card {
        flex-direction: column;
        text-align: center;
    }
    
    .fos-featured-img {
        width: 120px;
        height: 120px;
        margin: 0 auto 15px;
    }
    
    .fos-featured-info {
        padding-left: 0;
    }
}

@media (max-width: 600px) {
    .fos-product-item {
        width: 100%;
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .fos-products-grid {
        gap: 20px;
    }
    
    .fos-special-deal-card {
        min-width: 85%;
    }
    
    .fos-featured-card {
        min-width: 280px;
    }
}