/**
 * ============================================
 * FILE: public/assets/css/style.css
 * Buxio - CSS Completo per tutte le pagine
 * ============================================
 */

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Oxygen';
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding-bottom: 50px;
    color: #333;
}

/* ==================== HEADER ==================== */
header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo */
.logo {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    text-decoration: none;
}

.logo-books {
    display: flex;
    gap: 3px;
    align-items: flex-end;
}

.logo-book {
    width: 12px;
    border-radius: 1px;
}

.logo-book:nth-child(1) { height: 28px; background: #667eea; }
.logo-book:nth-child(2) { height: 32px; background: #764ba2; }
.logo-book:nth-child(3) { height: 26px; background: #f093fb; }
.logo-book:nth-child(4) { height: 30px; background: #667eea; }

.logo-text {
    font-family: Georgia, serif;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-left: 10px;
}

/* Search Box */
.search-container {
    flex: 1;
    max-width: 600px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 20px;
    pointer-events: none;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #667eea;
}

/* ==================== HERO ==================== */
.hero {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 30px 40px;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 30px;
}

.suggest-btn {
    padding: 15px 40px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.suggest-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    color: white;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

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

.breadcrumb span {
    margin: 0 10px;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 30px 40px;
    color: white;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.page-header .meta {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px 40px;
}

/* ==================== CONTROLS ==================== */
.controls {
    max-width: 1400px;
    margin: 0 auto 30px;
    padding: 0 30px;
}

.controls-inner {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: #666;
    margin-right: 5px;
}

.filter-btn {
    padding: 8px 18px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

select.filter-btn {
    padding: 8px 35px 8px 15px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* ==================== TABS ==================== */
.tabs {
    background: white;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.tab {
    flex: 1;
    padding: 15px 25px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.tab:hover {
    background: #f5f5f5;
}

.tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ==================== CATEGORY SECTION ==================== */
.category-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.category-title {
    font-size: 2rem;
    color: #333;
    font-weight: 700;
}

.view-all-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ==================== CAROUSEL ==================== */
.carousel-container {
    position: relative;
    overflow: hidden;
    margin: 0 -10px;
}

.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f0f0f0;
}

.carousel::-webkit-scrollbar {
    height: 8px;
}

.carousel::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.carousel::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #667eea;
    transition: all 0.3s;
    z-index: 10;
}

.carousel-nav:hover {
    background: #667eea;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: -15px;
}

.carousel-nav.next {
    right: -15px;
}

/* ==================== BOOKS GRID ==================== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* ==================== BOOK CARD ==================== */
.book-card {
    min-width: 280px;
    max-width: 280px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.book-cover-container {
    height: 200px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.book-cover {
    max-width: 130px;
    max-height: 180px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.book-cover-placeholder {
    font-size: 4rem;
    color: #999;
}

.book-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-description {
    font-size: 0.9rem;
    color: #777;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #666;
}

.tag.isbn {
    background: #e3f2fd;
    color: #1976d2;
    font-family: monospace;
}

.tag.source {
    background: #e3f2fd;
    color: #1976d2;
}

.book-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

.amazon-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #FF9900;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
}

.amazon-btn:hover {
    background: #e88600;
    transform: scale(1.05);
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
    color: #666;
}

.stars {
    color: #ffc107;
}

/* ==================== BOOK DETAIL PAGE ==================== */
.book-detail {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.book-hero {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    padding: 40px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.book-cover-large {
    width: 100%;
    max-width: 350px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.book-main-info h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.2;
}

.book-author-large {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 20px;
}

.rating-large {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 1.2rem;
}

.stars-large {
    color: #ffc107;
    font-size: 1.5rem;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #e88600;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #667eea;
    color: white;
}

.btn-secondary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.book-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 5px;
}

.meta-value {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.book-content {
    padding: 40px;
}

.section-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.book-description-full {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 40px;
}

.categories-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.category-tag {
    padding: 8px 18px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.category-tag:hover {
    background: #1976d2;
    color: white;
    transform: translateY(-2px);
}

.affiliate-notice {
    background: #fff3cd;
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
    font-size: 0.9rem;
    color: #856404;
}

/* ==================== TRENDING SECTION ==================== */
.trending-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.trending-section h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trending-tag {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.trending-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.trending-tag .count {
    opacity: 0.8;
    font-size: 0.85rem;
    margin-left: 5px;
}

/* ==================== SUGGESTIONS ==================== */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.suggestion-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.suggestion-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.suggestion-header {
    margin-bottom: 15px;
}

.suggestion-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.suggestion-author {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
}

.suggestion-category {
    display: inline-block;
    padding: 5px 15px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.suggestion-text {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin: 15px 0;
}

.suggestion-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #999;
}

.suggestion-votes {
    display: flex;
    gap: 15px;
    align-items: center;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 600;
}

.vote-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.vote-btn.upvoted {
    border-color: #4caf50;
    background: #4caf50;
    color: white;
}

.vote-btn.downvoted {
    border-color: #f44336;
    background: #f44336;
    color: white;
}

.vote-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.modal-header p {
    color: #666;
    font-size: 1rem;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: #666;
    transition: all 0.3s;
}

.close-modal:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group .hint {
    font-size: 0.85rem;
    color: #999;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* ==================== LOADING & EMPTY STATES ==================== */
.loading,
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.loading {
    color: #666;
}

.spinner,
.loading-spinner {
    border: 4px solid #f0f0f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h2,
.empty-state h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.empty-state p {
    color: #666;
}

/* ==================== STATS ==================== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.stat-card p {
    color: #666;
    font-size: 0.9rem;
}

/* ==================== FOOTER ==================== */
footer {
    max-width: 1400px;
    margin: 60px auto 0;
    padding: 30px;
    text-align: center;
    color: white;
    opacity: 0.9;
}

footer p {
    margin: 5px 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    /* Header */
    .header-content {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .logo-text {
        font-size: 24px;
    }

    .logo-book {
        width: 10px;
    }

    .logo-book:nth-child(1) { height: 22px; }
    .logo-book:nth-child(2) { height: 26px; }
    .logo-book:nth-child(3) { height: 20px; }
    .logo-book:nth-child(4) { height: 24px; }

    .search-container {
        width: 100%;
        max-width: 100%;
    }

    .search-box input {
        padding: 12px 45px 12px 15px;
        font-size: 15px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
    }

    /* Hero */
    .hero {
        padding: 40px 20px 30px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .suggest-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    /* Page Header */
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header .meta {
        font-size: 1rem;
    }

    /* Container */
    .container {
        padding: 0 15px 40px;
    }

    /* Controls */
    .controls-inner {
        padding: 15px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
        justify-content: center;
    }

    /* Category Section */
    .category-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }

    .category-title {
        font-size: 1.3rem;
    }

    .view-all-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        width: 100%;
        text-align: center;
    }

    /* Carousel */
    .carousel-container {
        margin: 0 -5px;
    }

    .carousel {
        gap: 12px;
        padding: 5px;
    }

    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .carousel-nav.prev {
        left: -5px;
    }

    .carousel-nav.next {
        right: -5px;
    }

    /* Book Card - Mobile Compact */
    .book-card {
        min-width: 160px;
        max-width: 160px;
    }

    .book-cover-container {
        height: 140px;
    }

    .book-cover {
        max-width: 90px;
        max-height: 120px;
    }

    .book-cover-placeholder {
        font-size: 3rem;
    }

    .book-info {
        padding: 12px;
        display: flex;
        flex-direction: column;
        min-height: 140px;
    }

    .book-title {
        font-size: 0.9rem;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
    }

    .book-author {
        font-size: 0.8rem;
        margin-bottom: 10px;
        -webkit-line-clamp: 1;
    }

    .book-footer {
        padding-top: 10px;
        flex-direction: row;
        gap: 8px;
        align-items: center;
        margin-top: auto;
    }

    .amazon-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        flex: 1;
    }

    .book-rating {
        font-size: 0.8rem;
        justify-content: center;
    }

    /* Books Grid */
    .books-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .books-grid .book-card {
        min-width: 100%;
        max-width: 100%;
    }

    .books-grid .book-cover-container {
        height: 250px;
    }

    .books-grid .book-cover {
        max-width: 160px;
        max-height: 230px;
    }

    .books-grid .book-cover-placeholder {
        font-size: 5rem;
    }

    .books-grid .book-info {
        padding: 20px;
        min-height: auto;
    }

    .books-grid .book-title {
        font-size: 1.2rem;
    }

    .books-grid .book-author {
        font-size: 1rem;
    }

    /* Book Detail */
    .book-hero {
        grid-template-columns: 1fr;
        padding: 25px;
        gap: 25px;
    }

    .book-cover-large {
        max-width: 100%;
    }

    .book-main-info h1 {
        font-size: 1.8rem;
    }

    .book-author-large {
        font-size: 1.2rem;
    }

    .rating-large {
        font-size: 1rem;
    }

    .stars-large {
        font-size: 1.2rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 12px 25px;
        font-size: 1rem;
    }

    .book-meta-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .book-content {
        padding: 25px 20px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .book-description-full {
        font-size: 1rem;
    }

    /* Suggestions Grid */
    .suggestions-grid {
        grid-template-columns: 1fr;
    }

    /* Tabs */
    .tabs {
        flex-direction: column;
    }

    .tab {
        width: 100%;
        text-align: center;
    }

    /* Modal */
    .modal-content {
        padding: 30px 20px;
        max-height: 85vh;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .close-modal {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Stats */
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Trending */
    .trending-section {
        padding: 20px;
    }

    .trending-section h3 {
        font-size: 1.2rem;
    }

    .trending-tag {
        font-size: 0.85rem;
        padding: 8px 15px;
    }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .book-card {
        min-width: 220px;
        max-width: 220px;
    }

    .book-cover-container {
        height: 180px;
    }

    .category-section {
        padding: 30px 25px;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .suggestions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    header,
    .hero,
    .breadcrumb,
    .controls,
    .carousel-nav,
    .amazon-btn,
    .cta-buttons,
    .vote-btn,
    footer {
        display: none;
    }

    .book-detail,
    .category-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .book-card {
        break-inside: avoid;
    }
}

/* ==================== UTILITIES ==================== */
.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: #667eea;
    color: white;
}

::-moz-selection {
    background: #667eea;
    color: white;
}

/* Focus Visible (Accessibility) */
*:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Disabled State */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* 
    Uncomment to enable dark mode
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .book-card,
    .category-section,
    .book-detail,
    .modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    */
}

.amz-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  border: 1.5px solid #FF9900;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.amz-pill:hover {
  background: rgba(255, 153, 0, 0.10);
  color: #666;
}

.amz-pill:active {
  transform: scale(0.97);
}

/* Badge "a" arancione */
.amz-pill .amz-logo {
  font-size: 11px;
  font-weight: 700;
  background: #FF9900;
  color: #111;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: -0.01em;
  line-height: 1.5;
  flex-shrink: 0;
}

/* Icona freccia esterna */
.amz-pill .ext-icon {
  opacity: 0.55;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
  /* SVG inline, niente dipendenze esterne */


/* ==================== END OF STYLES ==================== */