/* ========================================
   INIZIO BLOCCO 1 - RESET E BASE
   ======================================== */

.qdb-offerte-grid,
.qdb-partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

/* ========================================
   FINE BLOCCO 1 - RESET E BASE
   ======================================== */


/* ========================================
   INIZIO BLOCCO 2 - CARD OFFERTA
   ======================================== */

.qdb-offerta-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.qdb-offerta-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f0f0f1;
}

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

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

.qdb-offerta-discount {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.qdb-partner-logo {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: white;
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    max-width: 80px;
    max-height: 40px;
}

.qdb-partner-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.qdb-offerta-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.qdb-offerta-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.qdb-offerta-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.qdb-offerta-title a:hover {
    color: #ff6b35;
}

.qdb-offerta-partner-name {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 15px;
}

.qdb-offerta-description {
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

.qdb-offerta-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.qdb-coupon-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.qdb-coupon-code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    letter-spacing: 1px;
}

.qdb-copy-btn {
    background: #2271b1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.qdb-copy-btn:hover {
    background: #135e96;
    transform: scale(1.05);
}

.qdb-copy-btn.copied {
    background: #46b450;
}

.qdb-offerta-actions {
    display: flex;
    gap: 10px;
}

.qdb-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

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

.qdb-btn-primary:hover {
    background: #e55a2b;
    color: white;
    transform: translateY(-2px);
}

.qdb-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.qdb-btn-secondary:hover {
    background: #dee2e6;
    color: #2c3e50;
}

/* ========================================
   FINE BLOCCO 2 - CARD OFFERTA
   ======================================== */


/* ========================================
   INIZIO BLOCCO 3 - CARD PARTNER
   ======================================== */

.qdb-partner-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.qdb-partner-header {
    position: relative;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
}

.qdb-partner-logo-large {
    width: 120px;
    height: 80px;
    margin: 0 auto 15px;
    background: white;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qdb-partner-logo-large img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.qdb-partner-name {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.qdb-partner-body {
    padding: 20px;
}

.qdb-partner-category {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.qdb-partner-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.qdb-partner-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.qdb-partner-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #495057;
}

.qdb-partner-meta-icon {
    font-size: 16px;
}

.qdb-partner-offers-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ff6b35;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 15px;
}

.qdb-partner-actions {
    display: flex;
    gap: 10px;
}

/* ========================================
   FINE BLOCCO 3 - CARD PARTNER
   ======================================== */


/* ========================================
   INIZIO BLOCCO 4 - FILTRI
   ======================================== */

.qdb-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.qdb-filter-btn {
    padding: 10px 20px;
    border: 2px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.qdb-filter-btn:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

.qdb-filter-btn.active {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

/* ========================================
   FINE BLOCCO 4 - FILTRI
   ======================================== */


/* ========================================
   INIZIO BLOCCO 5 - ARCHIVIO OFFERTE
   ======================================== */

.qdb-archive-header {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 40px;
}

.qdb-archive-title {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.qdb-archive-description {
    font-size: 18px;
    margin: 0;
    opacity: 0.9;
}

.qdb-no-offers {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.qdb-no-offers-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.qdb-no-offers-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.qdb-no-offers-text {
    font-size: 16px;
    color: #6c757d;
}

/* ========================================
   FINE BLOCCO 5 - ARCHIVIO OFFERTE
   ======================================== */


/* ========================================
   INIZIO BLOCCO 6 - SINGLE OFFERTA
   ======================================== */

.qdb-single-offerta {
    max-width: 1000px;
    margin: 0 auto;
}

.qdb-single-header {
    position: relative;
    margin-bottom: 40px;
}

.qdb-single-image {
    width: 100%;
    aspect-ratio: 21/9;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.qdb-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qdb-single-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 30px;
}

.qdb-meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.qdb-meta-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
}

.qdb-meta-value {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.qdb-single-content {
    padding: 30px;
    background: white;
    border-radius: 12px;
    margin-bottom: 30px;
}

.qdb-single-sidebar {
    position: sticky;
    top: 20px;
}

.qdb-sidebar-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.qdb-sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #2c3e50;
}

/* ========================================
   FINE BLOCCO 6 - SINGLE OFFERTA
   ======================================== */


/* ========================================
   INIZIO BLOCCO 7 - RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .qdb-offerte-grid,
    .qdb-partner-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .qdb-archive-title {
        font-size: 32px;
    }
    
    .qdb-archive-description {
        font-size: 16px;
    }
    
    .qdb-filters {
        justify-content: center;
    }
    
    .qdb-offerta-actions {
        flex-direction: column;
    }
    
    .qdb-single-meta {
        gap: 20px;
    }
    
    .qdb-offerta-discount {
        top: 10px;
        right: 10px;
        font-size: 20px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .qdb-offerta-card,
    .qdb-partner-card {
        border-radius: 8px;
    }
    
    .qdb-offerta-content,
    .qdb-partner-body {
        padding: 15px;
    }
    
    .qdb-archive-header {
        padding: 40px 20px;
    }
    
    .qdb-archive-title {
        font-size: 28px;
    }
}

/* ========================================
   FINE BLOCCO 7 - RESPONSIVE
   ======================================== */


/* ========================================
   INIZIO BLOCCO 8 - UTILITY CLASSES
   ======================================== */

.qdb-hidden {
    display: none !important;
}

.qdb-text-center {
    text-align: center;
}

.qdb-mt-20 {
    margin-top: 20px;
}

.qdb-mb-20 {
    margin-bottom: 20px;
}

/* ========================================
   FINE BLOCCO 8 - UTILITY CLASSES
   ======================================== */