/* === VARIABILI CSS === */
:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --accent-color: #ffc107;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* === ICONE E-COMMERCE MINIMALI === */
/* Solo stili minimi per le icone utente e carrello */
.nav-menu .ecommerce-user,
.nav-menu .ecommerce-cart {
    margin-left: 10px;
}

.nav-menu .ecommerce-cart .cart-count {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 1px 4px;
    font-size: 10px;
    font-weight: bold;
    min-width: 12px;
    text-align: center;
    line-height: 1;
    margin-left: 2px;
}

/* === NAVBAR STILI IDENTICI ALLA HOMEPAGE === */
.nav-menu {
    display: flex !important;
    list-style: none !important;
    gap: 1.5rem !important;
    align-items: center !important;
}

.nav-menu a {
    text-decoration: none !important;
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 6px !important;
    position: relative !important;
    white-space: nowrap !important;
    font-size: 0.95rem !important;
}

.nav-menu a:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.1) !important;
    transform: translateY(-1px) !important;
}

.nav-menu a.active {
    color: #ffd700 !important;
    background: rgba(255,215,0,0.1) !important;
}

/* === STILI CATALOGO SPECIFICI === */
/* Selettori specifici per il catalogo per sovrascrivere style.css */
.catalog-main .products-grid,
#products-container.products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    padding: 1rem 0 !important;
    width: 100% !important;
}

/* Disabilita COMPLETAMENTE TUTTI gli effetti per i prodotti del catalogo */
.catalog-main .product-card,
.catalog-main .product-card *,
.catalog-main .product-card:hover,
.catalog-main .product-card:hover *,
.catalog-main .product-card:active,
.catalog-main .product-card:active *,
#products-container .product-card,
#products-container .product-card *,
#products-container .product-card:hover,
#products-container .product-card:hover *,
#products-container .product-card:active,
#products-container .product-card:active * {
    transition: none !important;
    transform: translateY(0px) !important;
    animation: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    -webkit-transform: translateY(0px) !important;
    -moz-transform: translateY(0px) !important;
    -ms-transform: translateY(0px) !important;
    -o-transform: translateY(0px) !important;
}

/* Forza la posizione statica per evitare qualsiasi movimento */
.catalog-main .product-card:hover,
#products-container .product-card:hover {
    transform: translateY(0px) !important;
    -webkit-transform: translateY(0px) !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
}

/* OVERRIDE SPECIFICO per il CSS principale che ha .product-card:hover */
body .catalog-main .product-card:hover,
body #products-container .product-card:hover,
body .ecommerce-container .product-card:hover {
    transform: translateY(0px) !important;
    -webkit-transform: translateY(0px) !important;
    -moz-transform: translateY(0px) !important;
    -ms-transform: translateY(0px) !important;
    -o-transform: translateY(0px) !important;
    transition: none !important;
    animation: none !important;
}

/* Stili specifici per le card del catalogo */
.catalog-main .product-card,
#products-container .product-card {
    background: white !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
}

.catalog-main .product-card img,
#products-container .product-card img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    margin-bottom: 1rem !important;
}

.catalog-main .product-card h3,
#products-container .product-card h3 {
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
    color: #333 !important;
}

.catalog-main .product-card .price,
#products-container .product-card .price {
    font-size: 1.2rem !important;
    font-weight: bold !important;
    color: #2c5aa0 !important;
    margin-top: auto !important;
}

/* === STILI BASE CATALOGO === */
/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f8f9fa;
}

/* Container principale */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Bottoni base */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3f73;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Form controls */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.2);
}

/* Select */
select.form-control {
    background: white;
    cursor: pointer;
}

/* Checkbox */
input[type="checkbox"] {
    margin-right: 8px;
}

/* Utilities */
.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

/* === FOOTER E-COMMERCE === */
.ecommerce-footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.ecommerce-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #ffc107;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffc107;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffc107;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: #95a5a6;
    font-size: 0.9rem;
    margin: 0;
}

/* === BREADCRUMB === */
.breadcrumb {
    background: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.breadcrumb-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb-content a {
    color: #2c5aa0;
    text-decoration: none;
}

.breadcrumb-content a:hover {
    text-decoration: underline;
}

.breadcrumb-content span {
    color: #6c757d;
}

/* === LAYOUT CATALOGO === */
.catalog-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.catalog-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.catalog-main {
    min-height: 600px;
}

/* === BREADCRUMB === */
.breadcrumb {
    padding: 1rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* === HEADER CATALOGO === */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.catalog-info h1 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.results-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.catalog-controls {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-controls label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.view-controls {
    display: flex;
    gap: 0.5rem;
}

.view-controls .btn.active {
    background: var(--primary-color);
    color: white;
}

/* === FILTRI SIDEBAR === */
.filter-group {
    margin-bottom: 2rem;
}

.filter-group h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1rem;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-range input {
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

.filter-actions {
    margin-top: 2rem;
}

/* === RICERCA === */
.search-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-box input {
    width: 200px;
}

/* === DISABILITA TUTTI GLI EFFETTI === */
.product-card,
.product-card *,
.product-card:hover,
.product-card:hover *,
.product-image,
.product-image img,
.btn-add-cart,
.btn-details {
    transition: none !important;
    transform: none !important;
    animation: none !important;
}

/* === GRIGLIA PRODOTTI === */
.products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 2rem !important;
    margin-bottom: 3rem;
    width: 100%;
}

/* Forza il layout griglia anche se ci sono conflitti */
#products-container.products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 2rem !important;
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* === CARD PRODOTTO === */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    position: relative;
}

/* Hover effect completamente rimosso */

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Effetti hover rimossi per richiesta utente */

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-badge.out-of-stock {
    background: var(--danger-color);
}

.product-badge.sale {
    background: var(--warning-color);
    color: var(--text-color);
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.3;
}

.product-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.price-current {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.price-original {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-add-cart {
    flex: 1;
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
}

/* Hover effect bottoni rimosso */

.btn-add-cart:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.btn-details {
    padding: 0.75rem 1rem;
    background: var(--secondary-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    text-align: center;
}

/* Hover effect bottone dettagli rimosso */

/* === VISTA LISTA === */
.product-card.list-view {
    display: flex;
    height: 150px;
}

.product-card.list-view .product-image {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.product-card.list-view .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card.list-view .product-description {
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.product-card.list-view .product-actions {
    align-self: flex-end;
    width: auto;
}

/* === PAGINAZIONE === */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.pagination li {
    display: flex;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active span {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .disabled a {
    color: var(--text-light);
    cursor: not-allowed;
}

.pagination .disabled a:hover {
    background: transparent;
    color: var(--text-light);
    border-color: var(--border-color);
}

/* === LOADING === */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.loading-container p {
    margin-top: 1rem;
    color: var(--text-light);
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* === FOOTER E-COMMERCE === */
.ecommerce-footer {
    background: var(--text-color);
    color: white;
    margin-top: 4rem;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    color: #ccc;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .catalog-layout {
        grid-template-columns: 250px 1fr;
        gap: 1.5rem;
    }
    
    .search-box input {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .catalog-sidebar {
        position: static;
        order: 2;
    }
    
    .catalog-main {
        order: 1;
    }
    
    .catalog-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .catalog-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .search-box {
        flex-direction: column;
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .product-card.list-view {
        flex-direction: column;
        height: auto;
    }
    
    .product-card.list-view .product-image {
        width: 100%;
        height: 200px;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}
