/*
Theme Name: ACME Industrial Tools
Theme URI: https://salvatoremaltese.it
Description: Tema professionale per catalogo strumenti industriali ACME.
Author: smal
Version: 1.1
Text Domain: acme-theme
*/

:root {
    --primary-navy: #2c3e50;    /* Grigio Acciaio Scuro */
    --primary-orange: #e67e22;  /* Arancione Meccanico */
    --primary-purple: #34495e;  /* Grigio Profondo */
    --primary-yellow: #f1c40f;  /* Giallo Segnaletica */
    --primary-green: #27ae60;   /* Verde Sicurezza */
    --bg-light: #f4f7f6;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
}

/* === BASE STYLES === */
body {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    margin: 0;
    padding: 0;
}

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

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* === HEADER & NAVIGATION === */
.site-header {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-purple) 100%);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo h1 { margin: 0; }
.site-logo a {
    color: var(--white);
    font-size: 2rem;
    font-weight: 700;
}
.site-logo span { color: var(--primary-yellow); }

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--white);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    background: var(--primary-yellow);
    color: var(--primary-navy);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
}

/* === HERO SECTION === */
.hero-section {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-purple) 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: var(--primary-orange);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 5px 20px rgba(230, 126, 34, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    background: var(--primary-yellow);
    color: var(--primary-navy);
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.4);
}

/* === CATEGORIES GRID (HOME) === */
.categories-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--primary-navy);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.category-header {
    padding: 40px 20px;
    text-align: center;
    color: var(--white);
    background: var(--primary-navy);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-icon { font-size: 3rem; margin-bottom: 10px; }

/* Category Colors */
.category-trapani-avvitatori { background: var(--primary-orange); }
.category-generatori { background: var(--primary-navy); }
.category-lavorazione-legno { background: var(--primary-green); }
.category-utensili-pneumatici { background: var(--primary-yellow); color: var(--primary-navy); }
.category-sistemi-taglio { background: #c0392b; }

/* === PRODUCTS ARCHIVE (FILTERS & GRID) === */
.products-section { padding: 60px 0; }

/* Filtri a Pillola */
.filter-pill {
    display: inline-block;
    padding: 10px 22px;
    background: #fff;
    color: var(--primary-navy);
    border: 1px solid #dcdde1;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none !important;
}

.filter-pill:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    transform: translateY(-2px);
}

.filter-pill.active {
    background: var(--primary-navy);
    color: #fff;
    border-color: var(--primary-navy);
    box-shadow: 0 4px 10px rgba(44, 62, 80, 0.2);
}

/* Griglia Prodotti */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    transition: opacity 0.4s ease;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    color: var(--text-dark);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #eee;
    display: block;
}

.product-info { padding: 20px; }
.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-navy);
}

.product-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Paginazione AJAX */
#acme-pill-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 60px;
}

.pill-nav {
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border-radius: 20px;
    border: 2px solid #dcdde1;
    background: #fff;
    color: var(--primary-navy);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.pill-nav:hover {
    border-color: var(--primary-navy);
    transform: scale(1.1);
}

.pill-nav.active {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    color: #fff;
    min-width: 70px;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

/* === SINGLE PRODUCT & SLIDER === */
.single-product-content { padding: 60px 0; }
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.product-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.product-slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.product-slide { min-width: 100%; }
.product-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
}
.slider-nav.prev { left: 15px; }
.slider-nav.next { right: 15px; }

.slider-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
}
.dot.active { background: var(--primary-orange); transform: scale(1.2); }

/* === FOOTER (FIXATO PER 4 COLONNE AUTOMATICHE) === */
.site-footer {
    background: var(--primary-navy);
    color: var(--white);
    /*padding: 60px 0 20px;*/
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: start;
}

/* FIX: Se i widget sono tutti in sidebar-1, forziamo i loro contenitori a non rompere la griglia */
.footer-content > div:not(.footer-column-automatic) {
    display: contents; 
}

.site-footer .widget, 
.footer-column-automatic {
    margin-bottom: 30px;
}

.site-footer .widget-title {
    color: var(--primary-orange);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    /*border-bottom: 2px solid rgba(230, 126, 34, 0.2);*/
    padding-bottom: 8px;
    display: block;
}

.site-footer .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .widget ul li {
    margin-bottom: 12px;
}

.site-footer .widget ul li a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.site-footer .widget ul li a:hover {
    color: var(--primary-yellow);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

/* === RESPONSIVE & ANIMATIONS === */
@media (max-width: 992px) {
    .product-main { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: repeat(2, 1fr); }
    .footer-content > div:not(.footer-column-automatic) { display: block; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--primary-navy);
        padding: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }
    .main-navigation.active { display: block; }
    .main-navigation ul { flex-direction: column; gap: 10px; }
    .hero-content h2 { font-size: 2.2rem; }
    .footer-content { grid-template-columns: 1fr; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}