/* ===== Product Category Grid ===== */
.fc-product-cat-grid {
    display: grid;
    gap: 20px 12px;
    grid-template-columns: repeat(8, 1fr);
}

/* Responsive */
@media (max-width: 1200px) {
    .fc-product-cat-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
@media (max-width: 900px) {
    .fc-product-cat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 600px) {
    .fc-product-cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 400px) {
    .fc-product-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.fc-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 10px;
    transition: transform 0.2s ease;
}

.fc-cat-item:hover {
    transform: translateY(-4px);
}

.fc-cat-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}

.fc-cat-thumb img {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.fc-cat-name {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    color: #333;
    line-height: 1.4;
}

/* ===== Product Slider ===== */
.fc-product-slider-wrap {
    position: relative;
    padding: 0;
}

.fc-product-slider .swiper-button-next,
.fc-product-slider .swiper-button-prev {
    color: #333;
    background: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    top: 38%;
}

.fc-product-slider .swiper-button-next::after,
.fc-product-slider .swiper-button-prev::after {
    font-size: 14px;
    font-weight: 700;
}

/* Card */
.fc-product-card {
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s ease;
}

.fc-product-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

/* Image */
.fc-card-img-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f7f7f7;
}

.fc-card-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: opacity 0.35s ease;
}

.fc-img-hover {
    opacity: 0;
}

.fc-card-img-wrap:hover .fc-img-main {
    opacity: 0;
}

.fc-card-img-wrap:hover .fc-img-hover {
    opacity: 1;
}

/* Card Body */
.fc-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.fc-brand {
    font-size: 12px;
    font-weight: 700;
    color: #0073e6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #222;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fc-card-title:hover {
    color: #e30;
}

/* Prices */
.fc-prices {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fc-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fc-price-original {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.fc-badge-discount {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #e00;
    padding: 1px 6px;
    border-radius: 4px;
}

.fc-price-sale {
    font-size: 16px;
    font-weight: 700;
    color: #e00;
}

.fc-price-sale .woocommerce-Price-amount,
.fc-price-original .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
}

/* Call Button */
.fc-call-btn {
    display: block;
    margin-top: auto;
    padding: 8px 10px;
    background: #fff5f5;
    border: 1px solid #f8d0d0;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    color: #c00;
    line-height: 1.5;
    transition: background 0.2s ease;
}

.fc-call-btn:hover {
    background: #ffe0e0;
    color: #900;
}

.fc-call-btn small {
    font-size: 11px;
    color: #888;
    font-weight: 400;
}

@media (max-width: 768px) {
    .fc-product-slider-wrap {
        padding: 0 28px;
    }
}

/* =====================================================
   Product Filter Shortcode
   ===================================================== */

/* Breadcrumb */
.fc-breadcrumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 18px;
}
.fc-breadcrumb a {
    color: #555;
    text-decoration: none;
}
.fc-breadcrumb a:hover { color: #e00; }
.fc-breadcrumb .fc-sep { margin: 0 6px; color: #ccc; }
.fc-breadcrumb span { color: #222; font-weight: 600; }

/* Controls bar */
.fc-filter-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 18px;
}

.fc-filter-left  { display: flex; align-items: center; gap: 8px; }
.fc-filter-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Brand button */
.fc-brand-filter-wrap { position: relative; }

.fc-brand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    position: relative;
}
.fc-brand-btn:hover          { border-color: #333; }
.fc-brand-btn.has-filter     { border-color: var(--fs-color-primary); color: var(--fs-color-primary); }
.fc-brand-btn.is-open        { border-color: #333; }
.fc-brand-btn.is-open .fc-chevron { transform: rotate(180deg); }

.fc-chevron { transition: transform 0.2s ease; flex-shrink: 0; }

.fc-active-dot {
    display: none;
    width: 8px; height: 8px;
    background: var(--fs-color-primary);
    border-radius: 50%;
}
.fc-active-dot.show { display: inline-block; }

/* Brand dropdown */
.fc-brand-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 360px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    padding: 16px;
    z-index: 500;
}
.fc-brand-dropdown.open { display: block; }

.fc-brand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.fc-brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    cursor: pointer;
    min-height: 56px;
    margin: 0;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.fc-brand-item:hover    { border-color: #aaa; }
.fc-brand-item.selected { border-color: var(--fs-color-primary); box-shadow: 0 0 0 2px rgba(39,174,96,0.15); }
.fc-brand-item img      { max-width: 100%; max-height: 36px; object-fit: contain; }
.fc-brand-text          { font-size: 12px; font-weight: 700; color: #333; text-align: center; }

/* Sort */
.fc-sort-wrap  { display: flex; align-items: center; gap: 6px; }
.fc-sort-label { font-size: 13px; color: #888; white-space: nowrap; margin-bottom: 0; }

.fc-sort-select {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    color: #333;
    background: #fff;
    cursor: pointer;
    outline: none;
    margin-bottom: 0;
}
.fc-sort-select:focus { border-color: #333; }

/* Result count */
.fc-result-count { font-size: 13px; color: #666; white-space: nowrap; }
.fc-result-count strong { color: #222; }

/* Selected filters bar */
.fc-selected-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 14px;
}
.fc-selected-label { font-size: 12px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.5px; }

.fc-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
}
.fc-tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    color: #999;
    padding: 0;
    margin: 0;
}
.fc-tag-remove:hover { color: var(--fs-color-primary); }

.fc-clear-all {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--fs-color-primary);
    font-weight: 600;
    padding: 0;
    text-decoration: underline;
    margin: 0 0 0 10px;
}

/* Grid wrap & loading */
.fc-grid-wrap {
    position: relative;
    min-height: 200px;
}

.fc-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.75);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.fc-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #f0f0f0;
    border-top-color: #e00;
    border-radius: 50%;
    animation: fc-spin 0.7s linear infinite;
}
@keyframes fc-spin { to { transform: rotate(360deg); } }

/* Products grid */
.fc-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    transition: opacity 0.2s ease;
}

/* Product item card */
.fc-product-item {
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}
.fc-product-item:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.09); }

.fc-product-item .fc-card-img-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f7f7f7;
}
.fc-product-item .fc-card-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: opacity 0.35s ease;
}
.fc-product-item .fc-img-hover { opacity: 0; }
.fc-product-item .fc-card-img-wrap:hover .fc-img-main  { opacity: 0; }
.fc-product-item .fc-card-img-wrap:hover .fc-img-hover { opacity: 1; }

.fc-product-item .fc-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

/* Pagination */
.fc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.fc-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: #333;
    transition: background 0.15s, border-color 0.15s;
}
.fc-page-btn:hover  { border-color: #333; background: #f5f5f5; }
.fc-page-btn.active { background: #e00; color: #fff; border-color: #e00; font-weight: 700; }
.fc-page-ellipsis   { font-size: 14px; color: #999; padding: 0 4px; }

.fc-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 15px;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1200px) {
    .fc-products-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
    .fc-products-grid { grid-template-columns: repeat(3, 1fr); }
    .fc-brand-dropdown { min-width: 300px; }
    .fc-brand-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .fc-products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .fc-filter-controls { flex-direction: column; align-items: flex-start; }
    .fc-brand-dropdown { min-width: 280px; }
    .fc-brand-grid { grid-template-columns: repeat(2, 1fr); }
    .fc-result-count { font-size: 12px; }
}
