/* 
file: assets/css/gear-snippets.css
Stili per i gear boxes negli articoli 
*/

/* ═══════════════════════════════════════════════
   GEAR BOX BASE STYLES
   ═══════════════════════════════════════════════ */

.gear-box {
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease;
}

.gear-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
}

/* Animazione ingresso */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════
   CARD HEADERS
   ═══════════════════════════════════════════════ */

.gear-box .card-header {
    border-bottom: 2px solid rgba(0,0,0,0.1);
    font-size: 1rem;
}

/* Featured Product - Warning/Gold */
.gear-box .bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%) !important;
}

/* Product List - Primary/Blue */
.gear-box .bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%) !important;
}

/* Category Showcase - Info/Cyan */
.gear-box .bg-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #31d2f2 100%) !important;
}

/* ═══════════════════════════════════════════════
   PRODUCT IMAGES
   ═══════════════════════════════════════════════ */

.gear-box img {
    transition: transform 0.3s ease;
}

.gear-box:hover img {
    transform: scale(1.05);
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */

.gear-box .btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
}

.gear-box .btn-warning:hover {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
    transform: translateY(-2px);
}

.gear-box .btn-outline-warning {
    border: 2px solid #ffc107;
    color: #ffc107;
    font-weight: 600;
    transition: all 0.3s ease;
}

.gear-box .btn-outline-warning:hover {
    background: #ffc107;
    color: #000;
    transform: translateX(5px);
}

/* ═══════════════════════════════════════════════
   PRICE STYLING
   ═══════════════════════════════════════════════ */

.gear-box .text-success {
    color: #198754 !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ═══════════════════════════════════════════════
   AFFILIATE DISCLAIMER
   ═══════════════════════════════════════════════ */

.gear-box .small.text-muted {
    font-size: 0.8rem;
    line-height: 1.4;
}

.gear-box .border-top {
    border-color: rgba(0,0,0,0.08) !important;
}

/* ═══════════════════════════════════════════════
   ALERT BOXES (Quick Links & CTA)
   ═══════════════════════════════════════════════ */

.gear-box.alert {
    border-width: 2px;
    border-left-width: 5px;
}

.gear-box.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-color: #ffc107;
}

.gear-box.alert-info {
    background: linear-gradient(135deg, #cff4fc 0%, #9eeaf9 100%);
    border-color: #0dcaf0;
}

.gear-box.alert a {
    font-weight: 600;
    text-decoration: underline;
    transition: all 0.2s ease;
}

.gear-box.alert a:hover {
    text-decoration: none;
    padding-left: 5px;
}

/* ═══════════════════════════════════════════════
   PRODUCT LIST ITEMS
   ═══════════════════════════════════════════════ */

.gear-box ul li {
    transition: background-color 0.2s ease;
}

.gear-box ul li:hover {
    background-color: rgba(0,0,0,0.02);
    border-radius: 8px;
    padding: 8px;
    margin: -8px;
}

.gear-box ul li:last-child {
    border-bottom: none !important;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {
    .gear-box {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0 !important;
    }
    
    .gear-box .card-body {
        padding: 1rem;
    }
    
    .gear-box img {
        max-height: 100px !important;
    }
    
    .gear-box h5,
    .gear-box h6 {
        font-size: 1rem;
    }
}

/* ═══════════════════════════════════════════════
   SPECIAL EFFECTS
   ═══════════════════════════════════════════════ */

/* Badge "NEW" per prodotti nuovi */
.gear-box .badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
}

/* Sale/Discount highlight */
.gear-box .discount-badge {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
}

/* Icon styling */
.gear-box .bi {
    vertical-align: middle;
}

/* Hover effect for the entire card */
.gear-box.card:hover {
    border-color: #ffc107 !important;
}

/* ═══════════════════════════════════════════════
   INTEGRATION WITH ARTICLE CONTENT
   ═══════════════════════════════════════════════ */

/* Spacing dentro il flusso dell'articolo */
.article-content .gear-box {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

/* First gear box più vicino al testo precedente */
.article-content .gear-box:first-of-type {
    margin-top: 1.5rem;
}

/* Print styles - nascondi i gear boxes quando si stampa */
@media print {
    .gear-box {
        display: none;
    }
}

/* ═══════════════════════════════════════════════
   DARK MODE SUPPORT (opzionale, se implementi dark mode)
   ═══════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
    .gear-box {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }
    
    .gear-box .card-header {
        border-bottom-color: rgba(255,255,255,0.1);
    }
    
    .gear-box .text-muted {
        color: #a0a0a0 !important;
    }
}