/* ─── DESIGN TOKENS & SYSTEM ──────────────────────────────────────────────── */
:root {
    --bg-primary: #f9f9fa;
    --bg-secondary: #f1f2f6;
    --bg-card: #ffffff;
    --border-color: rgba(201, 155, 83, 0.2);
    --border-hover: rgba(201, 155, 83, 0.55);
    
    --accent-gold: #c99b53;
    --accent-gold-rgb: 201, 155, 83;
    --text-primary: #1f2229;
    --text-secondary: #6b7080;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image: 
        radial-gradient(at 0% 0%, rgba(201, 155, 83, 0.18) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(162, 224, 219, 0.18) 0px, transparent 50%);
}

.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─── HEADER ───────────────────────────────────────────────────────────────── */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
    margin-bottom: 35px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 8px rgba(var(--accent-gold-rgb), 0.3));
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.sub-header {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 5px;
    color: var(--accent-gold);
    font-weight: 600;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

.last-updated-badge {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* ─── HERO CARD ────────────────────────────────────────────────────────────── */
.hero-overview {
    margin-bottom: 20px;
}

.hero-card {
    background: linear-gradient(135deg, rgba(var(--accent-gold-rgb), 0.04) 0%, rgba(var(--accent-gold-rgb), 0.01) 100%);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-text h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 6px;
}

.hero-text p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    max-width: 900px;
}

/* ─── FILTER PANEL ────────────────────────────────────────────────────────── */
.filter-panel {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 35px;
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    gap: 12px;
}

.search-icon {
    color: var(--accent-gold);
    font-size: 1rem;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.store-filters {
    display: flex;
    gap: 8px;
    background: var(--bg-primary);
    padding: 5px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.filter-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 15px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent-gold);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(var(--accent-gold-rgb), 0.3);
}

/* ─── DEALS FEED (VERTICAL LIST) ───────────────────────────────────────────── */
.deals-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px;
}

/* Deal Item Row Card */
.deal-row {
    display: grid;
    grid-template-columns: 150px 1fr 220px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    align-items: center;
}

.deal-row:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 25px rgba(31, 34, 41, 0.06);
}

/* Thumbnail */
.deal-img-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 150px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.deal-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.deal-row:hover .deal-img {
    transform: scale(1.08);
}

/* Discount Rate Tag overlay */
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #f3a152 0%, #d8b26c 100%);
    color: #0a0a0e;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Middle info column */
.deal-info-col {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.deal-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.source-badge {
    font-size: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(31, 34, 41, 0.04);
    border: 1px solid rgba(31, 34, 41, 0.08);
}

/* Dynamic colors based on source store */
.source-badge[data-source="Amazon.com.tr"] {
    color: #ff9900;
    border-color: rgba(255, 153, 0, 0.3);
    background: rgba(255, 153, 0, 0.05);
}

.source-badge[data-source="Trendyol"] {
    color: #f27a1a;
    border-color: rgba(242, 122, 26, 0.3);
    background: rgba(242, 122, 26, 0.05);
}

.source-badge[data-source="Hepsiburada"] {
    color: #ff6000;
    border-color: rgba(255, 96, 0, 0.3);
    background: rgba(255, 96, 0, 0.05);
}

.deal-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.deal-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Right Pricing & Button column */
.deal-action-col {
    padding: 25px;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    height: 100%;
}

.pricing-info {
    display: flex;
    flex-direction: column;
}

.orig-price {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.disc-price {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.deal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #d8b26c 0%, #c99b53 100%);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(201, 155, 83, 0.2);
}

.deal-btn:hover {
    background: var(--text-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(31, 34, 41, 0.15);
}

/* ─── FOOTER ───────────────────────────────────────────────────────────────── */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    margin-top: auto;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.brand-handle {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--accent-gold);
}

/* ─── RESPONSIVE LAYOUT ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .deal-row {
        grid-template-columns: 120px 1fr;
    }
    
    .deal-action-col {
        grid-column: span 2;
        border-left: none;
        border-top: 1px solid var(--border-color);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 25px;
    }
    
    .filter-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .app-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .last-updated-badge {
        align-self: flex-end;
    }
    
    .deal-row {
        grid-template-columns: 1fr;
    }
    
    .deal-img-container {
        height: 180px;
    }
    
    .deal-action-col {
        flex-direction: column;
        align-items: stretch;
    }
    
    .app-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .store-filters {
        flex-wrap: wrap;
    }
}

/* ─── LIGHTBOX MODAL ───────────────────────────────────────────────────────── */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(249, 249, 250, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.modal-content {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 50px rgba(31, 34, 41, 0.12);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-modal.active .modal-content {
    transform: scale(1);
}

.modal-caption {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    max-width: 600px;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

/* Make product image look clickable */
.deal-img {
    cursor: zoom-in !important;
}

/* ─── SIDEBAR ADS (DESKTOP ONLY) ───────────────────────────────────────────── */
.sidebar-ad {
    display: none;
    position: fixed;
    top: 80px;
    width: 200px;
    height: calc(100vh - 120px);
    max-height: 720px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px 12px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    box-shadow: 0 15px 35px rgba(31, 34, 41, 0.06);
    z-index: 99;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-ad::-webkit-scrollbar {
    display: none;
}

.sidebar-ad {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar-ad:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(31, 34, 41, 0.1);
}

.left-ad {
    left: calc(50% - 600px - 225px);
}

.right-ad {
    right: calc(50% - 600px - 225px);
}

.ad-header {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-gold);
    text-transform: uppercase;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.skyscraper-items-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skyscraper-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: rgba(31, 34, 41, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.skyscraper-item:hover {
    border-color: var(--accent-gold);
    background: rgba(201, 155, 83, 0.08);
    transform: translateY(-2px);
}

.skyscraper-item-img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.skyscraper-item-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.skyscraper-item-price {
    font-size: 0.75rem;
    color: var(--accent-gold);
    font-weight: 700;
}

@media (min-width: 1680px) {
    .sidebar-ad {
        display: flex;
    }
}

/* ─── VOTING & CHART MODAL STYLES ────────────────────────────────────────── */
.deal-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.vote-group {
    display: flex;
    gap: 8px;
}

.vote-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    user-select: none;
}

.vote-btn.hot-btn:hover, .vote-btn.hot-btn.active {
    border-color: #d46a53;
    color: #ffffff;
    background: #d46a53;
    box-shadow: 0 4px 10px rgba(212, 106, 83, 0.2);
}

.vote-btn.cold-btn:hover, .vote-btn.cold-btn.active {
    border-color: #007aff;
    color: #ffffff;
    background: #007aff;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.2);
}

.history-btn {
    background: transparent;
    border: 1px dashed var(--accent-gold);
    color: var(--accent-gold);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-btn:hover {
    background: var(--accent-gold);
    color: #ffffff;
    border-style: solid;
}

/* Chart Modal Styles */
.chart-modal-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 60px rgba(31, 34, 41, 0.12);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-modal.active .chart-modal-wrapper {
    transform: scale(1);
}

.chart-modal-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.chart-modal-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.canvas-container {
    width: 100%;
    height: 300px;
    position: relative;
    margin-top: 10px;
}

.modal-close-chart {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.modal-close-chart:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

/* ─── SORT & SLIDER CONTROLS ────────────────────────────────────────────── */
.sort-box {
    flex: 1 1 200px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}

.sort-box label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sort-box select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    width: 100%;
    cursor: pointer;
}

.price-slider-box {
    flex: 2 1 280px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
}

.price-slider-box label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.price-slider-box input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    cursor: pointer;
}

.price-slider-box input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-gold);
    cursor: pointer;
    transition: transform 0.1s;
}

.price-slider-box input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* ─── DEAL ALARMS ───────────────────────────────────────────────────────── */
.alarm-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.alarm-toggle-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.alarm-toggle-btn.active {
    background: rgba(216, 178, 108, 0.1);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.deal-alarm-form {
    grid-column: 1 / span 3;
    background: rgba(216, 178, 108, 0.04);
    border-top: 1px solid var(--border-color);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    animation: slideDown 0.3s ease-out forwards;
}

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

.alarm-form-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.alarm-form-inputs {
    display: flex;
    gap: 10px;
}

.deal-alarm-target-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    outline: none;
    width: 140px;
    font-family: var(--font-body);
}

.deal-alarm-target-input:focus {
    border-color: var(--accent-gold);
}

.deal-alarm-set-btn {
    background: var(--accent-gold);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition);
    font-family: var(--font-heading);
}

.deal-alarm-set-btn:hover {
    background: var(--text-primary);
}

.alarm-active-badge {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    padding: 3px 8px;
    font-size: 0.72rem;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

/* Custom Alert Banner */
.custom-alert-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1c1d21;
    color: #ffffff;
    border: 1px solid var(--accent-gold);
    padding: 14px 28px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: alertSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: auto;
}

.custom-alert-banner i {
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.custom-alert-banner.fade-out {
    animation: alertSlideOut 0.4s ease forwards;
}

@keyframes alertSlideIn {
    from {
        top: -100px;
        opacity: 0;
    }
    to {
        top: 20px;
        opacity: 1;
    }
}

@keyframes alertSlideOut {
    from {
        top: 20px;
        opacity: 1;
    }
    to {
        top: -100px;
        opacity: 0;
    }
}

