/* Grid mode — inherits from storm.css .product-thumb styles */
.featured-card-singles-grid .products-grid {
    display: grid;
    gap: 24px;
}
.featured-card-singles-grid .product-thumb {
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured-card-singles-grid .product-thumb:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(98, 0, 234, 0.15);
}
.featured-card-singles-grid .product-thumb .image {
    position: relative;
    padding-top: 139%;
    background: #1a1a2e;
    overflow: hidden;
}
.featured-card-singles-grid .product-thumb .image img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.featured-card-singles-grid .product-thumb:hover .image img {
    transform: scale(1.05);
}
.featured-card-singles-grid .caption {
    padding: 12px;
    text-align: center;
}
.featured-card-singles-grid .card-title {
    font-family: var(--font-tech, 'Rajdhani', sans-serif);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.featured-card-singles-grid .card-price {
    font-weight: 700;
    color: #1a8c1a;
    font-size: 0.95rem;
    margin-top: 4px;
}
/* Button group */
.featured-card-singles-grid .button-group {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s, transform 0.3s;
}
.featured-card-singles-grid .product-thumb:hover .button-group {
    opacity: 1;
    transform: translateX(0);
}
.featured-card-singles-grid .btn-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.featured-card-singles-grid .btn-action:hover {
    background: var(--accent-primary, #6200ea);
    color: white;
}

/* Fan mode */
.card-fan-viewport {
    padding: 10px 0 70px;
    overflow: hidden;
    position: relative;
}

/* Navigation controls — hidden by default, shown via JS */
.fan-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(98, 0, 234, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 16px;
    color: #6200ea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
}
.fan-nav.visible {
    opacity: 1;
    pointer-events: auto;
}
.fan-nav:hover {
    background: #6200ea;
    color: #fff;
    border-color: #6200ea;
    box-shadow: 0 6px 20px rgba(98, 0, 234, 0.3);
}
.fan-nav-prev { left: 12px; }
.fan-nav-next { right: 12px; }
.fan-nav-close {
    top: 8px;
    right: 8px;
    left: auto;
    transform: none;
    width: 36px;
    height: 36px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(200, 0, 0, 0.3);
    color: #c00;
}
.fan-nav-close:hover {
    background: #c00;
    color: #fff;
    border-color: #c00;
}

/* Fan container cursor hint when inactive */
.card-fan-container {
    cursor: pointer;
}
.fan-active .card-fan-container {
    cursor: default;
}
.card-fan-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    perspective: 1200px;
    min-height: 270px;
    position: relative;
}
.card-fan-item {
    position: absolute;
    width: 180px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom center;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3));
}
.card-fan-item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    pointer-events: none;
}
.card-fan-item.active {
    filter: drop-shadow(0 20px 40px rgba(98, 0, 234, 0.4));
}

/* Responsive — Grid: override inline columns for smaller screens */
@media (max-width: 991px) {
    .product-grid[style*="repeat(5"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    .product-grid[style*="repeat(6"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}
@media (max-width: 768px) {
    .product-grid[style*="repeat"] {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
    }
    .card-fan-item { width: 120px; }
    .card-fan-container { min-height: 220px; }
    .card-fan-viewport { padding: 10px 0 50px; }
    .fan-nav { width: 36px; height: 36px; font-size: 13px; }
    .fan-nav-prev { left: 4px; }
    .fan-nav-next { right: 4px; }
    .fan-nav-close { width: 30px; height: 30px; font-size: 12px; top: 4px; right: 4px; }
    .fan-heading { font-size: 1.2rem; }
}
@media (max-width: 480px) {
    .product-grid[style*="repeat"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .card-fan-item { width: 80px; }
    .card-fan-container { min-height: 180px; }
    .card-fan-viewport { padding: 8px 0 40px; }
}
