/**
 * MTM Menu Drag - Styles (copiati da MTM Portfolio Mega Menu)
 */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&display=swap');

.mtm-mega-menu {
    display: flex;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    width: 100%;
    font-family: 'Archivo', Arial, sans-serif;
    min-height: 400px;
    padding: 30px 0 !important;
}

/* Colonne del mega menu */
.mtm-mega-menu-column {
    flex: 1;
    padding: 20px;
    min-height: 400px;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(112,112,112, .21);
}

.mtm-mega-menu-column:last-child {
    border-right: none;
}

.mtm-mega-menu-column h3,
.mtm-mega-menu-column h4 {
    margin: 0 0 30px 0;
    color: #25333D;
    font-family: 'Archivo' !important;
    font-weight: 900 !important;
    font-size: 22px !important;
    line-height: 1;
    text-transform: uppercase !important;
    letter-spacing: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* Prima colonna - Categorie - 40% */
.mtm-categories-column {
    width: 40%;
    background: #ffffff;
    display: block !important;
    padding: 0 20px !important;
}

/* Suddivisione categorie in due colonne */
.mtm-categories-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
}

.mtm-category-item {
    margin: 0;
}

.mtm-category-item:hover {
    background: #e8e8e8;
}

.mtm-category-item.active {
    background: #fff;
}

.mtm-category-item.active .mtm-category-link {
    color: #d41e1e;
    font-weight: bold;
    display: flex !important;
}

.mtm-category-link,
.mtm-product-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    text-decoration: none;
    color: #25333D !important;
    background: transparent;
    font-size: 13px !important;
    border: none;
    font-family: 'Archivo', Arial, sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    text-transform: uppercase;
}

.mtm-category-link:hover {
    text-decoration: none;
    color: #000;
}

.mtm-category-item.active .mtm-category-link,
.mtm-product-item.active .mtm-product-link {
    background: #DC1A0B;
    color: #ffffff !important;
}

.mtm-category-item.active .mtm-category-link::before {
    background: #ffffff;
    border-color: #ffffff !important;
}

.mtm-category-count {
    float: right;
    background: #007cba;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: normal;
}

.mtm-category-item.active .mtm-category-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Seconda colonna - Prodotti - 20% */
.mtm-products-column {
    width: 20%;
    background: #ffffff;
    display: block !important;
    padding: 0 20px !important;
}

.mtm-category-title {
    color: #007cba;
    margin-bottom: 20px;
}

.mtm-products-list {
    list-style: none;
    margin: 0;
    padding: 0 !important;
}

.mtm-product-item {
    margin-bottom: 2px;
}

.mtm-product-item:hover {
    background: #f0f0f0;
}

.mtm-product-item.active {
    background: #fff;
}

.mtm-product-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    background: transparent;
    border: none;
    font-family: 'Archivo' !important;
    text-transform: uppercase !important;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1.4;
    width: 100%;
}

.mtm-product-link .product-title-text {
    display: flex;
    align-items: center;
    flex: 1;
}

.mtm-product-link .product-title-text::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #DC1A0B;
    border-radius: 50%;
    margin-right: 12px;
    background: transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mtm-product-link .product-arrow-icon {
    width: 16px;
    height: 12px;
    fill: #DC1A0B;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
    display: none;
}

.mtm-product-link:hover {
    text-decoration: none;
    color: #333;
}

.mtm-product-item.active .mtm-product-link {
    background: #DC1A0B;
    color: #ffffff;
}

.mtm-product-item.active .mtm-product-link .product-title-text::before {
    background: #ffffff;
    border-color: #ffffff;
}

.mtm-product-item.active .mtm-product-link .product-arrow-icon {
    fill: #ffffff;
    display: block;
}

/* Freccia SVG per categorie */
.mtm-category-link .product-arrow-icon {
    width: 16px;
    height: 12px;
    fill: #DC1A0B;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
    display: none;
}

.mtm-category-link .product-title-text {
    display: flex;
    align-items: center;
    flex: 1;
}

.mtm-category-link .product-title-text::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #DC1A0B;
    border-radius: 50%;
    margin-right: 15px;
    background: transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mtm-category-item.active .mtm-category-link .product-title-text::before {
    background: #ffffff;
    border-color: #ffffff !important;
}

/* Freccia SVG per categorie attive */
.mtm-category-item.active .mtm-category-link .product-arrow-icon {
    fill: #ffffff;
    display: block;
}

/* Terza colonna - Dettagli prodotto - 40% */
.mtm-product-details-column {
    width: 40%;
    background: #fff;
    display: block !important;
    padding:0 20px !important
}

.mtm-product-details {
    display: none;
}

.mtm-product-details.active {
    display: block;
}

.mtm-product-title {
    margin: 0 0 10px 0;
    font-family: 'Archivo' !important;
    text-transform: uppercase !important;
    letter-spacing: -5px !important;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.mtm-product-category {
    margin: 0 0 15px 0;
    font-family: 'Archivo' !important;
    text-transform: uppercase !important;
    font-size: 16px;
    color: #666;
    text-transform: uppercase;
}

.mtm-product-description {
    margin: 0 0 20px 0;
    font-family: 'Archivo' !important;
    text-transform: uppercase !important;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.mtm-product-image {
        width: 100%;
    margin: 10px auto 0 !important;
    max-width: 80%;
    height: auto;
}

.mtm-product-image img {
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.mtm-product-image img:hover {
    transform: scale(1.05);
}

.mtm-product-details .mtm-product-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

.mtm-product-details .mtm-product-link .product-title-text {
    flex: 1;
    text-align: left;
}

.mtm-product-details .mtm-product-link .product-title-text::before {
    display: none;
}

.mtm-product-details .mtm-product-link .product-arrow-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
    margin-left: 8px;
    display: block !important;
}

.mtm-product-details .mtm-product-link .product-title-text:after{
    content:'';
    position: absolute;
    left: 0;
    width:100%;
    border-color: #DD180B !important;
    transform-origin: 0px 0px;
    bottom: -3px;
    transition: transform 0.35s cubic-bezier(0.52, 0.01, 0.16, 1);
    transform: scaleX(0);
    border-top: 2px solid #000;
}
.mtm-product-details .mtm-product-link:hover .product-title-text::after{
    backface-visibility: hidden;
    -webkit-transform: scaleX(1);
    transform: scaleX(1);
}
.mtm-product-details .mtm-product-link:before{
    content:none !important;
}

/* Stili per il link "Scopri il prodotto" nei dettagli */
.mtm-product-details-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
    color: #384459 !important;
    text-transform: uppercase !important;
    font-weight: 700;
}

.mtm-product-details-link .product-title-text {
    flex: 1;
    text-align: left;
    position: relative;
}

.mtm-product-details-link .product-title-text::before {
    display: none;
}

.mtm-product-details-link .product-arrow-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
    margin-left: 8px;
    display: block !important;
}

.mtm-product-details-link .product-title-text:after{
    content:'';
    position: absolute;
    left: 0;
    width:100%;
    border-color: #DD180B !important;
    transform-origin: 0px 0px;
    bottom: -3px;
    transition: transform 0.35s cubic-bezier(0.52, 0.01, 0.16, 1);
    transform: scaleX(0);
    border-top: 2px solid #000;
}

.mtm-product-details-link:hover .product-title-text::after{
    backface-visibility: hidden;
    -webkit-transform: scaleX(1);
    transform: scaleX(1);
}

.mtm-product-details-link:before{
    content:none !important;
}

.mtm-product-link-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #d41e1e;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.2s ease;
}

.mtm-product-link-btn:hover {
    background: #b01818;
}


/* Stati di caricamento */
.mtm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.mtm-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: mtm-spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes mtm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messaggio di errore */
.mtm-mega-menu-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #c62828;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .mtm-mega-menu {
        flex-direction: column;
        max-width: 100%;
    }
    
    .mtm-mega-menu-column {
        border-right: none;
        min-height: auto;
    }
    
    .mtm-mega-menu-column:last-child {
        border-bottom: none;
    }
    
    .mtm-product-image {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .mtm-mega-menu-column {
        padding: 15px;
    }
    
    .mtm-category-link,
    .mtm-product-link {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .mtm-product-title {
        font-size: 18px;
    }
    
    .mtm-product-image {
        max-width: 120px;
    }
}

/* Animazioni di entrata */
.mtm-products-column.show,
.mtm-product-details-column.show {
    animation: mtm-slideIn 0.3s ease-out;
}

@keyframes mtm-slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stili per stati vuoti */
.mtm-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

.mtm-empty-state::before {
    content: '📦';
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}