/* Responsive styles per Spazio Genesi Duty Free */


        .comic-container {
            perspective: 2000px;
            display: inline-block;
            margin: 40px;
        }

        .comic {
            width: 280px;
            height: 420px;
            position: relative;
            transform-style: preserve-3d;
            transition: all 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
            cursor: pointer;
        }

        .comic:hover {
            transform: rotateY(-15deg) translateX(10px) translateZ(20px);
        }

        .comic-cover {
            position: absolute;
            width: 100%;
            height: 100%;
            background: white;
            border: 3px solid #333;
            border-radius: 8px 3px 3px 8px;
            box-shadow: 
                0 5px 25px rgba(0,0,0,0.3),
                inset 0 0 30px rgba(0,0,0,0.1);
            transform-style: preserve-3d;
            backface-visibility: hidden;
            overflow: hidden;
            z-index: 3;
            transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

        .comic:hover .comic-cover {
            transform: rotateY(-45deg) translateZ(10px);
            transform-origin: left center;
        }

        .comic-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 5px 1px 1px 5px;
        }

        /* Effetto pagine sottili */
        .comic-pages {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            transform-style: preserve-3d;
        }

        .page {
            position: absolute;
            width: 100%;
            height: 100%;
            background: #f8f8f8;
            border: 1px solid #e0e0e0;
            border-radius: 8px 3px 3px 8px;
            transform-origin: left center;
            box-shadow: 
                inset 5px 0 10px rgba(0,0,0,0.05),
                0 2px 5px rgba(0,0,0,0.1);
        }

        /* Prima pagina che si solleva */
        .page-1 {
            z-index: 2;
            transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) 0.1s;
            background: linear-gradient(90deg, #f5f5f5 95%, #e8e8e8 100%);
        }

        .comic:hover .page-1 {
            transform: rotateY(-25deg) translateZ(5px);
        }

        /* Seconda pagina */
        .page-2 {
            z-index: 1;
            transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.2s;
            background: linear-gradient(90deg, #f0f0f0 95%, #e0e0e0 100%);
        }

        .comic:hover .page-2 {
            transform: rotateY(-15deg) translateZ(2px);
        }

        /* Terza pagina */
        .page-3 {
            z-index: 0;
            transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.3s;
            background: linear-gradient(90deg, #e8e8e8 95%, #d8d8d8 100%);
        }

        .comic:hover .page-3 {
            transform: rotateY(-8deg) translateZ(1px);
        }

        /* Bordo pagine laterale */
        .pages-edge {
            position: absolute;
            right: -8px;
            top: 5%;
            width: 12px;
            height: 90%;
            background: repeating-linear-gradient(
                to bottom,
                #f8f8f8 0px,
                #f8f8f8 2px,
                #e0e0e0 2px,
                #e0e0e0 4px,
                #d0d0d0 4px,
                #d0d0d0 6px
            );
            transform: rotateY(90deg);
            border-radius: 0 2px 2px 0;
            box-shadow: 2px 0 5px rgba(0,0,0,0.1);
            z-index: 4;
        }

        /* Effetto di curvatura della copertina */
        .comic-cover::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(
                90deg,
                transparent 0%,
                rgba(255,255,255,0.1) 10%,
                rgba(255,255,255,0.05) 50%,
                rgba(0,0,0,0.05) 90%,
                rgba(0,0,0,0.1) 100%
            );
            z-index: 2;
            border-radius: 5px 1px 1px 5px;
        }

        /* Titolo fumetto */
        .comic-title {
            position: absolute;
            bottom: 15px;
            left: 0;
            right: 0;
            text-align: center;
            color: #fff;
            font-family: 'Comic Sans MS', cursive;
            font-size: 18px;
            font-weight: bold;
            text-shadow: 
                2px 2px 0 #000,
                -1px -1px 0 #000,
                1px -1px 0 #000,
                -1px 1px 0 #000;
            padding: 0 15px;
            z-index: 3;
        }

        /* Effetto di luce sull'hover */
        .comic::after {
            content: '';
            position: absolute;
            top: -10px;
            left: -10px;
            right: -10px;
            bottom: -10px;
            background: radial-gradient(
                circle at center,
                rgba(255,255,255,0.3) 0%,
                transparent 70%
            );
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: -1;
            pointer-events: none;
        }

        .comic:hover::after {
            opacity: 1;
        }
      


        .comic-card {
            background: #fff;
            border: 4px solid #000;
            border-radius: 8px;
            box-shadow: 10px 10px 0 #000;
            padding: 20px;
        }
        .book-cover {
            max-width: 100%;
            transform: perspective(600px) rotateY(-5deg);
            box-shadow: 10px 10px 20px rgba(0,0,0,0.3);
            transition: transform 0.3s ease;
            border: 3px solid #000;
        }
        .book-cover:hover {
            transform: perspective(600px) rotateY(0deg);
        }
        
        .badge-comic {
            background-color: #ff4757;
            color: #fff;
            font-size: 1rem;
            border-radius: 0;
            padding: 6px 12px;
            box-shadow: 3px 3px 0 #000;
        }
        .btn-comic {
            background-color: #1d3557;
            color: #fff;
            font-weight: bold;
            border: 2px solid #000;
            box-shadow: 4px 4px 0 #000;
            transition: transform 0.2s ease;
        }
        .btn-comic:hover {
            transform: scale(1.05);
            background-color: #457b9d;
        }

        /* EFFETTO LIBRO SFOGLIATO PER IMMAGINI IN TABELLA */
.libro-sfogliabile {
    position: relative;
    display: inline-block;
    perspective: 1200px;
    cursor: pointer;
    margin: 10px;
}

.libro-sfogliabile img {
    width: 200px;
    height: 280px;
    object-fit: cover;
    border-radius: 5px 15px 15px 5px;
    box-shadow: 
        0 10px 25px rgba(0,0,0,0.3),
        inset 5px 0 10px rgba(0,0,0,0.2),
        inset 0 0 15px rgba(0,0,0,0.1);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    position: relative;
    z-index: 10;
}

/* Effetto dorso del libro con pseudo-elemento */
.libro-sfogliabile::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5%;
    width: 12px;
    height: 90%;
    background: linear-gradient(90deg, 
        #5D4037 0%, 
        #8D6E63 30%, 
        #5D4037 100%);
    border-radius: 3px 0 0 3px;
    box-shadow: 
        inset -2px 0 5px rgba(0,0,0,0.5),
        2px 0 8px rgba(0,0,0,0.3);
    transform: translateX(-12px);
    z-index: 5;
    transition: transform 0.6s ease;
}

/* Effetto pagine con pseudo-elemento */
.libro-sfogliabile::after {
    content: '';
    position: absolute;
    left: 0;
    top: 8%;
    width: 94%;
    height: 84%;
    background: #f8f8f8;
    border-radius: 3px 0 0 3px;
    box-shadow: 
        inset 0 0 15px rgba(0,0,0,0.1),
        0 0 8px rgba(0,0,0,0.2);
    transform: translateZ(-5px) translateX(-2px);
    z-index: 1;
    transition: transform 0.6s ease;
}

/* HOVER EFFECT - Sfogliamento */
.libro-sfogliabile:hover img {
    transform: rotateY(-25deg) translateX(10px) translateZ(15px);
    box-shadow: 
        15px 10px 35px rgba(0,0,0,0.4),
        inset 8px 0 15px rgba(0,0,0,0.3),
        inset 0 0 20px rgba(0,0,0,0.2);
    filter: brightness(1.05) contrast(1.1);
}

.libro-sfogliabile:hover::before {
    transform: translateX(-15px) rotateY(-10deg);
}

.libro-sfogliabile:hover::after {
    transform: translateZ(-8px) translateX(-5px) rotateY(-5deg);
}

/* Versione per fumetti (più sottile) */
.libro-sfogliabile.fumetto img {
    border-radius: 8px 3px 3px 8px;
    box-shadow: 
        0 8px 20px rgba(0,0,0,0.25),
        inset 3px 0 8px rgba(0,0,0,0.15);
}

.libro-sfogliabile.fumetto::before {
    width: 8px;
    background: linear-gradient(90deg, 
        #333 0%, 
        #666 30%, 
        #333 100%);
}

.libro-sfogliabile.fumetto::after {
    background: repeating-linear-gradient(
        to bottom,
        #f8f8f8 0px,
        #f8f8f8 2px,
        #e8e8e8 2px,
        #e8e8e8 4px
    );
}

.libro-sfogliabile.fumetto:hover img {
    transform: rotateY(-30deg) translateX(8px) translateZ(12px);
}

/* Adattamento per diverse dimensioni */
.libro-sfogliabile.piccolo img {
    width: 150px;
    height: 210px;
}

.libro-sfogliabile.grande img {
    width: 250px;
    height: 350px;
}

/* Per tabelle responsive */
td .libro-sfogliabile {
    display: block;
    margin: 5px auto;
}

/* Assicurati che funzioni con Bootstrap */
.libro-sfogliabile img {
    border: none !important;
}

.libro-sfogliabile * {
    box-sizing: border-box;
}

/* Se le immagini sono già in celle con classe specifica */
td.product-image-cell {
    position: relative;
    perspective: 1200px;
}

td.product-image-cell img {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    border-radius: 5px 15px 15px 5px;
    box-shadow: 
        0 10px 25px rgba(0,0,0,0.3),
        inset 5px 0 10px rgba(0,0,0,0.2);
}

td.product-image-cell:hover img {
    transform: rotateY(-25deg) translateX(10px) translateZ(15px);
    box-shadow: 
        15px 10px 35px rgba(0,0,0,0.4),
        inset 8px 0 15px rgba(0,0,0,0.3);
}








/* Mobile First Adjustments */
@media (max-width: 768px) {
  /* Header e navigazione */
  .cover-container {
    padding: 1rem !important;
  }
  
  .masthead-brand {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
  }
  
  .nav-masthead {
    flex-wrap: wrap;
    justify-content: center !important;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  /* Tabella e datatable */
  .datatable-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .datatable-table {
    font-size: 0.85rem;
  }
  
  .datatable-table th,
  .datatable-table td {
    padding: 0.5rem 0.3rem;
  }
  
  /* Nascondi alcune colonne su mobile */
  .datatable-table th:nth-child(4), /* Categorie */
  .datatable-table td:nth-child(4) {
    display: none;
  }
  
  /* Riduci dimensioni immagini */
  .product-image-cell {
    max-width: 60px !important;
  }
  
  /* Controlli datatable */
  .datatable-top,
  .datatable-bottom {
    flex-direction: column;
    align-items: stretch;
  }
  
  .datatable-dropdown,
  .datatable-search {
    margin-bottom: 0.5rem;
  }
  
  .datatable-search input {
    width: 100% !important;
  }
  
  /* Modal per i dettagli libro */
  .modal-dialog {
    margin: 0.5rem;
  }
  
  .modal-body .row {
    flex-direction: column;
  }
  
  .modal-body .col-md-4,
  .modal-body .col-md-8 {
    width: 100%;
    max-width: 100%;
  }
  
  .modal-body .col-md-4 {
    margin-bottom: 1rem;
  }
  
  /* Footer */
  .mastfoot {
    font-size: 0.85rem;
  }
  
  .mastfoot svg {
    height: 30px;
    margin: 0.5rem 0;
  }
  
  .mastfoot p {
    margin-bottom: 0.75rem;
  }
}

/* Tablet e schermi medi */
@media (min-width: 769px) and (max-width: 1024px) {
  .cover-container {
    padding: 1.5rem !important;
  }
  
  .datatable-table {
    font-size: 0.9rem;
  }
  
  .product-image-cell {
    max-width: 70px !important;
  }
  
  /* Riduci spazio colonne meno importanti */
  .datatable-table th:nth-child(5),
  .datatable-table td:nth-child(5) {
    width: 8% !important;
  }
}

/* Ottimizzazioni per dispositivi touch */
@media (hover: none) and (pointer: coarse) {
  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  
  .datatable-sorter,
  .datatable-selector,
  .btn {
    min-height: 44px; /* Dimensione minima per touch */
    min-width: 44px;
  }
  
  .product-image-cell {
    padding: 5px;
  }
}

/* Miglioramenti generali per mobile */
@media (max-width: 576px) {
  /* Header più compatto */
  .inner {
    padding: 0;
  }
  
  .nav {
    flex-direction: column;
    align-items: center;
  }
  
  .nav-link {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  /* Riduci ulteriormente la tabella */
  .datatable-table th:nth-child(3), /* Autore */
  .datatable-table td:nth-child(3) {
    display: none;
  }
  
  /* Info della tabella */
  .datatable-info {
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 0.5rem;
  }
  
  /* Paginazione */
  .datatable-pagination-list li {
    margin: 0 2px;
  }
  
  .datatable-pagination-list .datatable-pagination-list-item a {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
  
  /* Footer più compatto */
  .mastfoot .inner {
    padding: 0.5rem;
  }
}

/* Per schermi molto piccoli (es. iPhone SE) */
@media (max-width: 375px) {
  .masthead-brand {
    font-size: 1.2rem;
  }
  
  .datatable-table {
    font-size: 0.75rem;
  }
  
  .product-image-cell {
    max-width: 50px !important;
  }
  
  .modal-title {
    font-size: 1.1rem;
  }
}

/* Ottimizzazioni per landscape su mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .cover-container {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
  
  .masthead {
    margin-bottom: 0.5rem !important;
  }
  
  .datatable-wrapper {
    max-height: 50vh;
    overflow-y: auto;
  }
}

/* Miglioramento per la leggibilità del testo */
body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Previene lo zoom su input su iOS */
@media screen and (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px !important; /* Previene lo zoom automatico su iOS */
  }
}