/**
 * Hot Deal Styles
 *
 * @author    PartsPC
 * @copyright PartsPC
 * @license   AFL-3.0
 */

.hotdeal-section {
    --hotdeal-bg: #dc0000;
    --hotdeal-text: #ffffff;
    background: var(--hotdeal-bg);
    color: var(--hotdeal-text);
    padding: 0;
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
}

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

/* Header */
.hotdeal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
    gap: 15px;
}

.hotdeal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hotdeal-title i {
    font-size: 2rem;
    animation: pulse 1.5s infinite;
}

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

/* Countdown */
.hotdeal-countdown {
    display: flex;
    align-items: center;
    gap: 5px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 6px;
    min-width: 60px;
}

.countdown-value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    line-height: 1;
}

.countdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    opacity: 0.8;
    margin-top: 4px;
}

.countdown-separator {
    font-size: 1.8rem;
    font-weight: 700;
    opacity: 0.7;
}

/* Content */
.hotdeal-content {
    display: flex;
    gap: 30px;
    padding: 25px;
    background: #fff;
    color: #333;
}

/* Image */
.hotdeal-image {
    flex: 0 0 300px;
    position: relative;
}

.hotdeal-image a {
    display: block;
    position: relative;
}

.hotdeal-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.hotdeal-image a:hover img {
    transform: scale(1.03);
}

.hotdeal-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--hotdeal-bg);
    color: var(--hotdeal-text);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Info */
.hotdeal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hotdeal-product-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.hotdeal-product-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.hotdeal-product-name a:hover {
    color: var(--hotdeal-bg);
}

.hotdeal-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Prices */
.hotdeal-prices {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.price-old {
    font-size: 1.1rem;
    color: #999;
    text-decoration: line-through;
}

.price-new {
    font-size: 2rem;
    font-weight: 700;
    color: var(--hotdeal-bg);
}

.price-save {
    background: #28a745;
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Stock bar */
.hotdeal-stock {
    margin-bottom: 25px;
}

.stock-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.stock-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.stock-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.stock-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
}

.stock-sold {
    color: #ee5a24;
    font-weight: 600;
}

.stock-left {
    color: #28a745;
    font-weight: 600;
}

/* Button */
.hotdeal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--hotdeal-bg);
    color: var(--hotdeal-text);
    padding: 15px 40px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    align-self: flex-start;
    cursor: pointer;
}

.hotdeal-btn:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hotdeal-btn i {
    font-size: 1.3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hotdeal-header {
        justify-content: center;
        text-align: center;
    }

    .hotdeal-title {
        width: 100%;
        justify-content: center;
    }

    .hotdeal-content {
        flex-direction: column;
        padding: 20px;
    }

    .hotdeal-image {
        flex: none;
        max-width: 100%;
    }

    .hotdeal-product-name {
        font-size: 1.2rem;
    }

    .price-new {
        font-size: 1.5rem;
    }

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

    .countdown-item {
        padding: 6px 10px;
        min-width: 50px;
    }

    .countdown-value {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .hotdeal-title {
        font-size: 1.2rem;
    }

    .countdown-item {
        padding: 5px 8px;
        min-width: 45px;
    }

    .countdown-value {
        font-size: 1.2rem;
    }

    .countdown-label {
        font-size: 0.6rem;
    }

    .hotdeal-prices {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Empty state - brak aktywnej oferty */
.hotdeal-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 50px 30px;
    background: #fff;
    color: #333;
    text-align: center;
}

.hotdeal-empty-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 50%;
    flex-shrink: 0;
}

.hotdeal-empty-icon i {
    font-size: 3rem;
    color: var(--hotdeal-bg);
    animation: pulse 2s infinite;
}

.hotdeal-empty-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
}

.hotdeal-empty-text p {
    font-size: 1rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .hotdeal-empty {
        flex-direction: column;
        padding: 40px 20px;
        gap: 20px;
    }

    .hotdeal-empty-icon {
        width: 80px;
        height: 80px;
    }

    .hotdeal-empty-icon i {
        font-size: 2.5rem;
    }

    .hotdeal-empty-text h3 {
        font-size: 1.2rem;
    }

    .hotdeal-empty-text p {
        font-size: 0.9rem;
    }
}

/* Expired state */
.hotdeal-section.expired {
    opacity: 0.6;
    pointer-events: none;
}

.hotdeal-section.expired .hotdeal-btn {
    background: #999;
}

.hotdeal-section.expired::after {
    content: 'OFERTA WYGASŁA';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

/* =====================================================
   DEBUG PANEL STYLES
   ===================================================== */
.hotdeal-debug-panel {
    background: #1a1a2e;
    border: 3px solid #e74c3c;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 800px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    color: #ecf0f1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.hotdeal-debug-header {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.hotdeal-debug-header strong {
    font-size: 16px;
    letter-spacing: 1px;
}

.hotdeal-debug-toggle {
    font-size: 18px;
    transition: transform 0.3s;
}

.hotdeal-debug-panel.collapsed .hotdeal-debug-toggle {
    transform: rotate(-90deg);
}

.hotdeal-debug-panel.collapsed .hotdeal-debug-content {
    display: none;
}

.hotdeal-debug-content {
    padding: 15px;
    max-height: 600px;
    overflow-y: auto;
}

.hotdeal-debug-table {
    width: 100%;
    border-collapse: collapse;
}

.hotdeal-debug-table th,
.hotdeal-debug-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #34495e;
}

.hotdeal-debug-table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

.hotdeal-debug-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.hotdeal-debug-table code {
    background: #2c3e50;
    padding: 3px 8px;
    border-radius: 4px;
    color: #3498db;
    font-family: inherit;
}

.hotdeal-debug-table .debug-ok {
    color: #2ecc71;
    font-weight: 700;
}

.hotdeal-debug-table .debug-error {
    color: #e74c3c;
    font-weight: 700;
}

.hotdeal-debug-table .debug-warning {
    color: #f39c12;
    font-weight: 700;
}

/* Scrollbar styling for debug panel */
.hotdeal-debug-content::-webkit-scrollbar {
    width: 8px;
}

.hotdeal-debug-content::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.hotdeal-debug-content::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 4px;
}

.hotdeal-debug-content::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}
