/* Catalog Public - Frontend CSS */

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

body.catalog-public {
    font-family: var(--font-body, 'Inter', sans-serif);
    color: var(--text-color, #1F2937);
    background: var(--body-bg, #FFFFFF);
    line-height: 1.6;
}

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

/* Cover image */
.catalog-cover {
    position: relative;
    height: 300px;
    background-size: cover;
    background-position: center;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.5));
}

/* Header */
.catalog-header {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-color);
}

.logo-container {
    margin-bottom: 1.5rem;
}

.catalog-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.catalog-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--title-color, #1F2937);
}

.catalog-description {
    font-size: 1.125rem;
    color: var(--description-color, #6B7280);
    margin-bottom: 1.5rem;
}

.company-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.info-item i {
    color: var(--primary-color);
}

.info-item a {
    color: inherit;
    text-decoration: none;
}

.info-item a:hover {
    color: var(--primary-color);
}

.opening-hours {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #F9FAFB;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

/* Sections grid */
.catalog-main {
    padding: 2rem 0 4rem;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.section-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg, white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.section-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.section-card:hover .section-image img {
    transform: scale(1.05);
}

.section-icon {
    padding: 2rem;
    text-align: center;
    background: #F9FAFB;
}

.section-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.section-content {
    padding: 1.5rem;
    flex: 1;
}

.section-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1rem;
}

.section-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #9CA3AF;
}

/* Anteprime prodotti nella sezione */
.section-items-preview {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #E5E7EB;
}

.section-items-preview .item-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 2px solid var(--card-bg, white);
}

.section-items-preview .item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-items-preview .item-thumb.more-items {
    background: var(--primary-color, #3B82F6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-items-preview .item-thumb.more-items span {
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
}

.section-arrow {
    padding: 1rem 1.5rem;
    text-align: right;
    color: var(--primary-color);
}

/* Header Sticky Unificato */
.catalog-sticky-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 80px;
}

/* Logo a sinistra */
.header-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.company-logo-image {
    width: auto;
    height: 60px;
    max-width: 120px;
    object-fit: contain;
    display: block;
}

/* Breadcrumb al centro */
.header-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
}

.breadcrumb-link-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6B7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.breadcrumb-link-top:hover {
    background: #F3F4F6;
    color: var(--primary-color, #3B82F6);
}

.breadcrumb-link-top i {
    font-size: 1rem;
}

/* Language switcher e Theme toggle a destra */
.header-lang {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    background: #F3F4F6;
    border-radius: 8px;
}

.theme-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.theme-btn:hover {
    background: #E5E7EB;
    color: #1F2937;
}

.theme-btn.active {
    background: var(--primary-color, #3B82F6);
    color: white;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: #6B7280;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.lang-btn:hover {
    background: #F3F4F6;
    color: #1F2937;
}

.lang-btn.active {
    background: var(--primary-color, #3B82F6);
    color: white;
}

/* Footer */
.catalog-footer {
    padding: 3rem 0 2rem;
    background: #F9FAFB;
    border-top: 1px solid #E5E7EB;
    text-align: center;
}

.footer-ashbooking {
    margin-bottom: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid #E5E7EB;
}

.footer-ashbooking img {
    max-width: 100%;
    height: auto;
    margin: 0.5rem;
}

.footer-ashbooking a {
    display: inline-block;
    margin: 0.5rem;
    transition: transform 0.2s;
}

.footer-ashbooking a:hover {
    transform: scale(1.05);
}

.powered-by {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1rem;
}


/* Responsive */
@media (max-width: 768px) {
    .sections-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-title {
        font-size: 1.5rem;
    }
    
    .company-info {
        flex-direction: column;
        align-items: center;
    }
    
    .catalog-cover {
        height: 200px;
    }
    
    /* Header sticky responsive su mobile */
    .header-content {
        grid-template-columns: auto 1fr auto;
        padding: 0.5rem;
        min-height: 60px;
        gap: 0.5rem;
    }
    
    .company-logo-image {
        height: 45px;
        max-width: 80px;
    }
    
    .breadcrumb-link-top {
        font-size: 0.75rem;
        gap: 0.375rem;
        padding: 0.375rem 0.75rem;
    }
    
    .breadcrumb-link-top span {
        display: none; /* Nascondi testo su mobile, mostra solo icona */
    }
    
    .breadcrumb-link-top i {
        font-size: 1.25rem;
    }
    
    .theme-toggle {
        padding: 0.125rem;
        gap: 0.125rem;
    }
    
    .theme-btn {
        width: 32px;
        height: 32px;
        padding: 0.25rem;
        font-size: 0.75rem;
    }
    
    .lang-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        min-width: 35px;
    }
    
    /* Footer ASH-Booking responsive */
    .footer-ashbooking {
        padding: 1.5rem 0;
    }
    
    .footer-ashbooking img {
        max-width: 80%;
    }
}

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #E5E7EB;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
