/* ========================================
   COMMUNITY DEALS PAGE - HOTUKDEALS STYLE
   ======================================== */

/* Page Container */
.deals-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header Section */
.deals-header-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 24px;
}

.deals-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.deals-tabs {
    display: flex;
    gap: 8px;
}

.deals-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-round);
    transition: all 0.2s;
}

.deals-tab:hover {
    color: var(--text-main);
    background: var(--bg-surface);
}

.deals-tab.active {
    color: #ff7900;
    background: rgba(255, 121, 0, 0.1);
}

.deals-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-round);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--bg-card);
    border-color: var(--brand-primary);
}

.post-deal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #ff7900;
    color: white;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-round);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.post-deal-btn:hover {
    background: #e66a00;
    transform: translateY(-1px);
}

.deals-subheader {
    margin-top: 8px;
}

.deals-section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

.deals-section-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Main Layout */
.deals-layout {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 24px;
    align-items: start;
}

.deals-sidebar-left {
    position: sticky;
    top: 80px;
}

.desktop-filter-form {
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .deals-layout {
        grid-template-columns: 1fr;
    }

    .deals-sidebar-left,
    .deals-sidebar-right {
        display: none;
    }

    .filter-btn {
        display: flex;
    }
}

/* Deal List */
.deals-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.deals-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-round);
    padding: 10px 14px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-round);
    border: 1px solid transparent;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--bg-surface);
}

.pagination-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-page {
    font-weight: 800;
    color: var(--text-muted);
    font-size: 13px;
}

/* Deal Row (Horizontal Card) */
.deal-row {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.deal-row:hover {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

/* Deal Image */
.deal-row-image {
    flex-shrink: 0;
    width: 160px;
    height: 140px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
}

.deal-row-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .deal-row {
        flex-direction: column;
        gap: 16px;
    }

    .deal-row-image {
        width: 100%;
        height: 180px;
    }
}

/* Deal Content */
.deal-row-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Meta Row */
.deal-row-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* Temperature Badge */
.temp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-round);
    font-size: 14px;
    font-weight: 800;
    cursor: default;
}

.temp-badge i {
    font-size: 12px;
}

.temp-badge.hot {
    background: linear-gradient(135deg, #ff3b30 0%, #ff6b6b 100%);
    color: white;
}

.temp-badge.warm {
    background: linear-gradient(135deg, #ff7900 0%, #ffaa00 100%);
    color: white;
}

.temp-badge.cold {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
}

.deal-time-ago {
    font-size: 13px;
    color: var(--text-muted);
}

/* Title */
.deal-row-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Info Row */
.deal-row-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
    font-size: 14px;
}

.deal-price {
    font-size: 18px;
    font-weight: 800;
    color: #ff7900;
}

.deal-retailer {
    color: var(--text-muted);
}

.deal-retailer strong {
    color: var(--text-main);
}

.retailer-label {
    font-size: 13px;
}

.deal-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-default);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.deal-category-chip:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.deal-poster {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.deal-poster i {
    font-size: 16px;
}

.deal-poster strong {
    color: var(--text-main);
}

/* Description */
.deal-row-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
.deal-row-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

@media (max-width: 640px) {
    .deal-row-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.deal-row-actions {
    display: flex;
    gap: 16px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.action-item:hover {
    color: var(--brand-primary);
}

/* Get Deal Button */
.deal-row-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.deal-coupon-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px dashed var(--border-focus);
    border-radius: var(--radius-round);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ff7900;
    color: white;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-round);
    text-decoration: none;
    transition: all 0.2s;
}

.read-more-btn:hover {
    background: #e66a00;
    transform: scale(1.02);
}

.read-more-btn i {
    font-size: 12px;
}

/* Right Sidebar */
.deals-sidebar-right {
    position: sticky;
    top: 80px;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--elevation-1);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border-subtle);
}

.widget-header h4 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.widget-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

.widget-close:hover {
    color: var(--text-main);
}

.widget-content {
    padding: 12px;
}

/* Card Polish */
.filters-widget .widget-content {
    padding: 16px;
}

.filters-widget .filter-group {
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.filters-widget .filter-group:last-child,
.filters-widget .filter-group:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.filters-widget .filter-group label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.filters-widget .apply-filters-btn {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-round);
    box-shadow: var(--elevation-1);
}

/* Hot Deal Items in Sidebar */
.hot-deal-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background 0.2s;
}

.hot-deal-item:hover {
    background: var(--bg-surface);
}

.hot-deal-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-surface);
}

.hot-deal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-deal-info {
    flex: 1;
    min-width: 0;
}

.hot-deal-temp {
    display: inline-block;
    padding: 2px 8px;
    background: #ff7900;
    color: white;
    font-size: 12px;
    font-weight: 800;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.hot-deal-temp.super-hot {
    background: linear-gradient(135deg, #ff3b30 0%, #ff6b6b 100%);
}

.hot-deal-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.hot-deal-price {
    font-size: 14px;
    font-weight: 800;
    color: #ff7900;
}

.widget-footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    color: #ff7900;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid var(--border-subtle);
    transition: background 0.2s;
}

.widget-footer-link:hover {
    background: var(--bg-surface);
}

/* Filter Sidebar (Mobile) */
.filter-sidebar {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: var(--surface-muted);
    z-index: 3000;
    padding: 16px;
    transition: right 0.3s ease;
    overflow-y: auto;
}

body.filters-open .filter-sidebar {
    right: 0;
}

.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2999;
}

body.filters-open .filter-overlay {
    display: block;
}

@media (max-width: 1024px) {
    .filter-sidebar {
        display: block;
    }
}

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

.filter-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.filter-select,
.price-input {
    width: 100%;
    background: var(--surface-muted);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-10);
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-main);
    transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.filter-select:focus,
.price-input:focus {
    outline: none;
    box-shadow: var(--ring);
    border-color: var(--brand-primary);
    background: var(--bg-card);
}

.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-range-inputs span {
    font-size: 12px;
    color: var(--text-muted);
}

.apply-filters-btn {
    width: 100%;
    padding: 14px;
    background: #ff7900;
    color: white;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-round);
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.2s;
}

.apply-filters-btn:hover {
    background: #e66a00;
}

/* Empty State */
.deals-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    box-shadow: var(--elevation-1);
}

.deals-empty-state .empty-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.deals-empty-state h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.deals-empty-state p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0 0 24px 0;
}

/* Ad Slots */
.ad-slot-inline {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 8px 0;
    text-align: center;
}

.ad-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.ad-placeholder {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.03);
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

/* Sidebar Ad */
.sidebar-ad-widget {
    margin-bottom: 24px;
}

.ad-label-sidebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.ad-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
}

.ad-link:hover {
    color: var(--text-main);
}

.ad-container-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
}

.ad-placeholder-sidebar {
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.ad-placeholder-sidebar i {
    font-size: 32px;
    opacity: 0.5;
}

/* Vouchers Widget */
.vouchers-widget {
    margin-top: 24px;
}

.voucher-store-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
}

.voucher-store-item:hover {
    background: var(--bg-surface);
}

.store-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.store-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.voucher-store-item i.fa-chevron-right {
    font-size: 12px;
    color: var(--text-muted);
}
