/* Nero Clube Products Widget Styles */

.neroclube-products-wrapper {
    width: 100%;
}

/* Filter Bar */
.neroclube-filter-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    padding: 0;
}

.neroclube-filter-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
}

.neroclube-filter-dropdown label {
    font-size: 14px;
    color: #666666;
    font-weight: 500;
    margin: 0;
}

.neroclube-sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    font-size: 14px;
    color: #333333;
    min-width: 180px;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23333" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 30px;
}

.neroclube-sort-select:focus {
    outline: 2px solid #007cba;
    outline-offset: 1px;
    border-color: #007cba;
}

.neroclube-sort-select:hover {
    border-color: #007cba;
}

.neroclube-products-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Grid columns configuration */
.neroclube-columns-1 {
    grid-template-columns: 1fr;
}

.neroclube-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.neroclube-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.neroclube-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.neroclube-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.neroclube-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .neroclube-columns-4,
    .neroclube-columns-5,
    .neroclube-columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .neroclube-columns-3,
    .neroclube-columns-4,
    .neroclube-columns-5,
    .neroclube-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .neroclube-products-grid {
        gap: 15px;
    }
    
    .neroclube-product-content {
        padding: 15px;
        min-height: 100px;
    }
    
    .neroclube-product-title {
        font-size: 15px;
        height: 40px;
    }
    
    .neroclube-product-price {
        font-size: 16px;
    }
    
    .neroclube-add-to-cart,
    .neroclube-view-product {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .neroclube-filter-bar {
        margin-bottom: 15px;
    }
    
    .neroclube-filter-dropdown {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }
    
    .neroclube-sort-select {
        min-width: 160px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .neroclube-columns-2,
    .neroclube-columns-3,
    .neroclube-columns-4,
    .neroclube-columns-5,
    .neroclube-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .neroclube-products-grid {
        gap: 12px;
    }
    
    .neroclube-product-content {
        padding: 12px;
        min-height: 90px;
    }
    
    .neroclube-product-title {
        font-size: 14px;
        height: 38px;
    }
    
    .neroclube-product-price {
        font-size: 15px;
    }
    
    .neroclube-add-to-cart,
    .neroclube-view-product {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .neroclube-sort-select {
        min-width: 140px;
        font-size: 12px;
        padding: 6px 8px;
        padding-right: 25px;
    }
}

/* Product item */
.neroclube-product-item {
    position: relative;
    width: 100%;
}

/* Product card */
.neroclube-product-card {
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.neroclube-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

/* Pre-launch badge */
.neroclube-prelaunch-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #000000;
    color: #ffffff;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    z-index: 10;
    letter-spacing: 0.3px;
    line-height: 1;
}

/* Product image */
.neroclube-product-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 aspect ratio (square) - more professional look */
    overflow: hidden;
    background: #f8f8f8;
}

.neroclube-product-image a,
.neroclube-product-image img,
.neroclube-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.neroclube-product-image img {
    object-fit: cover;
    transition: transform 0.3s ease;
}

.neroclube-product-card:hover .neroclube-product-image img {
    transform: scale(1.05);
}

.neroclube-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.neroclube-no-image svg {
    opacity: 0.5;
}

/* Product content */
.neroclube-product-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 120px;
}

/* Product title */
.neroclube-product-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: #333333;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    height: 44px; /* Fixed height for consistency */
}

.neroclube-product-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.neroclube-product-title a:hover {
    color: #007cba;
}

/* Product price */
.neroclube-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 12px 0;
}

/* Product button */
.neroclube-product-button {
    margin-top: auto;
}

.neroclube-add-to-cart,
.neroclube-view-product {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.neroclube-add-to-cart:hover,
.neroclube-view-product:hover {
    background-color: #333333;
    color: #ffffff;
    transform: translateY(-1px);
}

.neroclube-product-price .woocommerce-Price-amount {
    font-weight: 600;
}

.neroclube-product-price del {
    color: #999999;
    font-weight: 400;
    margin-right: 8px;
}

.neroclube-product-price ins {
    text-decoration: none;
    color: #e74c3c;
}

/* Sale badge for discounted products */
.neroclube-product-card .onsale {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e74c3c;
    color: #ffffff;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50%;
    z-index: 10;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

/* Error and no products messages */
.neroclube-error,
.neroclube-no-products {
    padding: 20px;
    text-align: center;
    background: #f8f8f8;
    border-radius: 8px;
    color: #666666;
    font-style: italic;
}

.neroclube-error {
    background: #ffe6e6;
    color: #d63638;
    border: 1px solid #ff8a8a;
}

/* Loading state */
.neroclube-product-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.neroclube-product-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: neroclube-spin 1s linear infinite;
}

@keyframes neroclube-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom scrollbar for overflow content */
.neroclube-products-grid::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.neroclube-products-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.neroclube-products-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.neroclube-products-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Print styles */
@media print {
    .neroclube-prelaunch-badge {
        background: #000000 !important;
        color: #ffffff !important;
    }
    
    .neroclube-product-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .neroclube-product-card {
        border: 2px solid #000000;
    }
    
    .neroclube-product-title a {
        color: #000000;
    }
    
    .neroclube-product-title a:hover {
        color: #0066cc;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .neroclube-product-card,
    .neroclube-product-image img {
        transition: none;
    }
    
    .neroclube-product-card:hover {
        transform: none;
    }
    
    .neroclube-product-card:hover .neroclube-product-image img {
        transform: none;
    }
}

/* Focus styles for accessibility */
.neroclube-product-title a:focus,
.neroclube-product-image a:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .neroclube-product-card {
        background: #2c2c2c;
        color: #ffffff;
    }
    
    .neroclube-product-title,
    .neroclube-product-price {
        color: #ffffff;
    }
    
    .neroclube-product-title a:hover {
        color: #66b3ff;
    }
    
    .neroclube-no-image {
        background: #404040;
    }
}