/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; }

/* ===================== VARIABLES ===================== */
:root {
    --primary: #1B998B;
    --primary-dark: #157A6E;
    --secondary: #0A2342;
    --accent: #FF6B35;
    --text: #0D1B2A;
    --text-muted: #6c757d;
    --bg: #F0F7F5;
    --white: #ffffff;
    --border: #e2ece9;
    --shadow: 0 2px 16px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(27,153,139,0.18);
    --radius: 12px;
    --radius-sm: 6px;
}

/* ===================== LAYOUT ===================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ===================== HEADER ===================== */
.header { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 100; }
.header-top { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.header-top-inner { display: flex; align-items: center; gap: 1.5rem; }

.logo a { display: flex; align-items: center; gap: 0.5rem; font-size: 1.6rem; font-weight: 800; text-decoration: none; }
.logo-img { width: 46px; height: 46px; object-fit: contain; border-radius: 50%; display: block; }
.logo-text { color: var(--primary); letter-spacing: -0.5px; }

.header-search { flex: 1; max-width: 500px; position: relative; }
.search-box { display: flex; align-items: center; background: #f1f3f4; border-radius: 50px; padding: 0.4rem 0.4rem 0.4rem 1rem; border: 2px solid transparent; transition: all 0.2s; }
.search-box:focus-within { border-color: var(--primary); background: var(--white); }
.search-box i { color: var(--text-muted); margin-right: 0.5rem; }
.search-box input { flex: 1; border: none; background: transparent; font-size: 0.9rem; outline: none; }
.search-box button { background: var(--primary); color: white; border: none; padding: 0.45rem 1.2rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600; transition: background 0.2s; }
.search-box button:hover { background: var(--primary-dark); }

/* Live search dropdown */
.search-dropdown {
    display: none;
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    border: 1.5px solid #e9ecef;
    z-index: 9999; overflow: hidden;
}
.search-dropdown.open { display: block; }
.sd-item {
    display: flex; align-items: center; gap: .85rem;
    padding: .65rem 1rem; text-decoration: none; color: inherit;
    transition: background .12s; border-bottom: 1px solid #f4f4f6;
}
.sd-item:last-child { border-bottom: none; }
.sd-item:hover, .sd-item.active { background: #EAF6F4; }
.sd-thumb {
    width: 54px; height: 40px; border-radius: 8px; object-fit: cover;
    flex-shrink: 0; background: #f1f3f4;
}
.sd-thumb-ph {
    width: 54px; height: 40px; border-radius: 8px; flex-shrink: 0;
    background: #f1f3f4; display: flex; align-items: center;
    justify-content: center; font-size: 1.2rem;
}
.sd-info { flex: 1; min-width: 0; }
.sd-title {
    font-size: .87rem; font-weight: 700; color: #1a1a2e;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: .15rem;
}
.sd-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.sd-cat { font-size: .72rem; color: #888; }
.sd-price { font-size: .82rem; font-weight: 800; color: var(--primary); }
.sd-old { font-size: .72rem; color: #aaa; text-decoration: line-through; }
.sd-badge {
    background: var(--primary); color: #fff;
    font-size: .68rem; font-weight: 800;
    padding: .1rem .4rem; border-radius: 4px; flex-shrink: 0;
}
.sd-empty {
    padding: 1.2rem 1rem; text-align: center;
    font-size: .88rem; color: #aaa;
}
.sd-footer {
    padding: .6rem 1rem; background: #fafafa;
    border-top: 1px solid #f0f0f0; text-align: center;
}
.sd-footer a {
    font-size: .82rem; font-weight: 700; color: var(--primary); text-decoration: none;
}
.sd-footer a:hover { text-decoration: underline; }

.header-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.btn-link { background: none; border: none; color: var(--text); font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; border-radius: var(--radius-sm); transition: background 0.2s; }
.btn-link:hover { background: #f1f3f4; }
.btn-link-active { color: var(--primary); font-weight: 700; }
.btn-admin { color: var(--primary); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); padding: 0.4rem 1.2rem; border-radius: 50px; font-weight: 600; font-size: 0.9rem; transition: all 0.2s; }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-primary { background: var(--primary); color: white; padding: 0.4rem 1.2rem; border-radius: 50px; font-weight: 600; font-size: 0.9rem; border: none; transition: all 0.2s; display: inline-block; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.header-nav { background: var(--white); padding: 0; border-bottom: 1px solid #f0f0f0; position: relative; z-index: 200; }
.nav-inner { display: flex; align-items: center; gap: 1rem; }
.city-selector { display: flex; align-items: center; gap: 0.4rem; color: var(--primary); font-weight: 600; font-size: 0.85rem; padding: 0.6rem 0; white-space: nowrap; }
.city-selector select { border: none; color: var(--primary); font-weight: 600; font-size: 0.85rem; cursor: pointer; outline: none; background: transparent; }
.nav-categories { display: flex; list-style: none; gap: 0; flex-wrap: nowrap; }
.nav-item { position: relative; }
.nav-item > a {
    display: flex; align-items: center; gap: 0.3rem;
    padding: 0.75rem 0.85rem; font-size: 0.85rem;
    color: var(--text); font-weight: 500; white-space: nowrap;
    border-bottom: 2px solid transparent; transition: all 0.2s;
}
.nav-item > a:hover,
.nav-item > a.active,
.nav-item:hover > a { color: var(--primary); border-bottom-color: var(--primary); }
.nav-arrow {
    font-size: .65rem; margin-left: .1rem; color: #aaa;
    transition: transform .2s;
}
.nav-item:hover .nav-arrow { transform: rotate(180deg); color: var(--primary); }

/* ── Dropdown ── */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    z-index: 999;
    padding: .5rem 0 .6rem;
    animation: dropFadeIn .18s ease;
}
@keyframes dropFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* Arrow pointer */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -6px; left: 50%; transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #e8e8e8;
}
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: -5px; left: 50%; transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #fff;
}
.nav-item:hover .nav-dropdown { display: block; }

.dropdown-header {
    padding: .4rem .9rem .5rem;
    border-bottom: 1px solid #f3f3f3;
    margin-bottom: .3rem;
}
.dropdown-see-all {
    font-size: .78rem; font-weight: 700; color: var(--primary);
    display: flex; align-items: center; gap: .3rem;
    transition: gap .15s;
}
.dropdown-see-all:hover { gap: .55rem; }
.dropdown-see-all i { font-size: .7rem; }

.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}
.dropdown-item {
    display: flex; align-items: center; gap: .5rem;
    padding: .48rem .9rem;
    font-size: .83rem; color: #333; font-weight: 500;
    transition: background .12s, color .12s;
    border-radius: 6px;
    margin: 0 .3rem;
}
.dropdown-item:hover { background: #EAF6F4; color: var(--primary); }
.dd-icon { font-size: 1rem; line-height: 1; flex-shrink: 0; }
.dd-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===================== ALERTS ===================== */
.alert { padding: 0.8rem 1rem; border-radius: var(--radius-sm); margin: 0.5rem 0; font-weight: 500; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ===================== HERO ===================== */
.hero {
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
    color: white;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    padding: 2.5rem 0;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10,35,66,.88) 40%, rgba(27,153,139,.25) 100%);
    pointer-events: none;
}
.hero .container { position: relative; z-index: 1; width: 100%; }
.hero-content { max-width: 560px; }
.hero h1 { font-size: 2.4rem; font-weight: 800; line-height: 1.15; margin-bottom: .75rem; }
.hero h1 span { color: #7FFFD4; }
.hero p { font-size: 1.05rem; opacity: 0.92; margin-bottom: 1.5rem; }
.hero-search { display: flex; background: white; border-radius: 50px; overflow: hidden; max-width: 460px; margin-bottom: 1.5rem; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.hero-search input { flex: 1; border: none; padding: .85rem 1.25rem; font-size: .95rem; outline: none; color: var(--text); }
.hero-search button { background: var(--primary); color: white; border: none; padding: .85rem 1.5rem; font-weight: 700; font-size: .95rem; white-space: nowrap; transition: background 0.2s; }
.hero-search button:hover { background: var(--primary-dark); }
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.3rem; font-weight: 800; }
.stat span { font-size: 0.85rem; opacity: 0.8; }

/* ===================== SECTIONS ===================== */
.section { padding: 4rem 0; }
.section-title { font-size: 1.8rem; font-weight: 700; color: var(--text); margin-bottom: 1.5rem; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.view-all { color: var(--primary); font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.3rem; }
.view-all:hover { text-decoration: underline; }
.text-center { text-align: center; }

/* ===================== CATEGORIES ===================== */
.categories-section { background: var(--white); }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1rem; }
.category-card { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center; transition: all 0.2s; cursor: pointer; }
.category-card:hover { border-color: var(--cat-color, var(--primary)); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.category-card:hover .category-icon { transform: scale(1.2); }
.category-icon { font-size: 2rem; margin-bottom: 0.5rem; transition: transform 0.2s; }
.category-name { font-weight: 600; font-size: 0.85rem; color: var(--text); margin-bottom: 0.2rem; }
.category-count { font-size: 0.75rem; color: var(--text-muted); }

/* ===================== DEALS GRID ===================== */
.deals-grid { display: grid; gap: 1.5rem; }
.deals-grid-3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.deals-grid-4 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ===================== DEAL CARD ===================== */
.deal-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all 0.25s; }
.deal-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.deal-card-image { position: relative; display: block; overflow: hidden; aspect-ratio: 16/10; }
.deal-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.deal-card:hover .deal-card-image img { transform: scale(1.05); }
.badge { position: absolute; top: 10px; font-size: 0.75rem; font-weight: 700; padding: 0.3rem 0.6rem; border-radius: 50px; }
.badge-hot { right: 10px; background: #ff6b35; color: white; }
.badge-discount { left: 10px; background: var(--primary); color: white; }
.deal-card-body { padding: 1rem; }
.deal-category { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; font-size: 0.8rem; font-weight: 600; }
.deal-city { color: var(--text-muted); font-weight: 400; }
.deal-title { font-size: 0.95rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.3rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal-title a:hover { color: var(--primary); }
.deal-company { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.deal-progress { margin-bottom: 0.75rem; }
.progress-bar { height: 5px; background: #f0f0f0; border-radius: 50px; overflow: hidden; margin-bottom: 0.3rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 50px; transition: width 0.3s; }
.progress-text { font-size: 0.75rem; color: var(--text-muted); }
/* ===================== STAR RATING ===================== */
.star-widget {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .65rem;
    flex-wrap: wrap;
}
.stars-row {
    display: flex;
    gap: 2px;
    cursor: pointer;
}
.star-icon {
    font-size: 1rem;
    color: #ddd;
    transition: color .12s, transform .1s;
}
.star-icon.fas { color: #f5a623; }
.star-icon.active { color: #f5a623; }
.star-icon.hover  { color: #ffc84a; transform: scale(1.15); }
.stars-row:hover .star-icon { color: #ffc84a; }
.stars-row .star-icon:hover ~ .star-icon { color: #ddd; }

.rating-info {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .78rem;
    color: #555;
}
.rating-info strong { color: #f5a623; font-size: .82rem; }
.rating-count { color: #aaa; }
.rating-empty { color: #bbb; font-size: .75rem; }

/* Large variant (deal detail page) */
.star-widget-lg {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
    margin: 1.2rem 0 1rem;
    padding: 1rem 1.1rem;
    background: #fffbf0;
    border: 1.5px solid #fde8a0;
    border-radius: 12px;
}
.rating-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .2rem;
}
.avg-big {
    font-size: 2rem;
    font-weight: 800;
    color: #f5a623;
    line-height: 1;
}
.avg-stars-static { display: flex; gap: 2px; }
.avg-stars-static .fas.filled { color: #f5a623; font-size: .95rem; }
.avg-stars-static .fas.empty  { color: #ddd;    font-size: .95rem; }
.rating-count-lg { font-size: .8rem; color: #999; }
.rating-prompt {
    font-size: .85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: .1rem;
}
.stars-row-lg .star-icon { font-size: 1.7rem; }
.star-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 8.5rem;
    font-size: .65rem;
    color: #bbb;
    margin-top: -.1rem;
}

/* ---- Vote countdown ---- */
.deal-countdown {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    font-weight: 600;
    color: #e07b00;
    background: #fff8ee;
    border: 1px solid #fde8c0;
    border-radius: 6px;
    padding: .3rem .6rem;
    margin-bottom: .6rem;
}
.deal-countdown i { font-size: .75rem; }
.deal-countdown .countdown-display {
    font-family: 'Courier New', monospace;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
}
.deal-countdown.urgent {
    color: #c0392b;
    background: #fff0ef;
    border-color: #ffcdd2;
    animation: pulse-countdown .9s ease-in-out infinite alternate;
}
.deal-countdown.expired {
    color: #888;
    background: #f5f5f5;
    border-color: #e0e0e0;
    font-style: italic;
}
@keyframes pulse-countdown {
    from { opacity: 1; }
    to   { opacity: .6; }
}
.deal-price { display: flex; justify-content: space-between; align-items: center; }
.prices { display: flex; flex-direction: column; }
.price-old { font-size: 0.8rem; color: var(--text-muted); text-decoration: line-through; }
.price-new { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.btn-buy { background: var(--primary); color: white; padding: 0.5rem 1.2rem; border-radius: 50px; font-weight: 700; font-size: 0.85rem; transition: all 0.2s; }
.btn-buy:hover { background: var(--primary-dark); transform: scale(1.05); }

/* ===================== NEARBY SECTION ===================== */
.nearby-section { background: linear-gradient(135deg, #F0F7F5, #E6F3F0); padding: 4rem 0; border-left: 4px solid #1B998B; }

/* ===================== HOT DEALS SECTION ===================== */
.hot-deals-section { background: linear-gradient(135deg, #FFF8F0, #FFF2E5); padding: 4rem 0; }

/* ===================== HOW IT WORKS ===================== */
.how-it-works {
    background: linear-gradient(160deg, #071E3D 0%, #0A2342 50%, #0D3B35 100%);
    color: white;
    position: relative;
    overflow: hidden;
}
.how-it-works::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(27,153,139,0.22) 0%, transparent 70%);
    pointer-events: none;
}
.how-it-works .container { position: relative; z-index: 1; }
.how-it-works .section-title { color: white; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-top: 2rem; }
.step { text-align: center; }
.step-number { width: 36px; height: 36px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; margin: 0 auto 1rem; box-shadow: 0 0 16px rgba(27,153,139,0.5); }
.step-icon { font-size: 2.5rem; margin-bottom: 1rem; color: #7FFFD4; }
.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.step p { opacity: 0.8; font-size: 0.9rem; }

/* ===================== NEWSLETTER ===================== */
.newsletter-section { background: linear-gradient(135deg, #071E3D 0%, #0A2342 60%, #0D3B35 100%); color: white; padding: 4rem 0; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.newsletter-text h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.newsletter-text p { opacity: 0.9; }
.newsletter-form { display: flex; gap: 0; background: white; border-radius: 50px; overflow: hidden; max-width: 400px; flex: 1; }
.newsletter-form input { flex: 1; border: none; padding: 0.9rem 1.5rem; font-size: 1rem; outline: none; color: var(--text); }
.newsletter-form button { background: var(--primary); color: white; border: none; padding: 0.9rem 1.5rem; font-weight: 700; white-space: nowrap; transition: background 0.2s; }
.newsletter-form button:hover { background: var(--primary-dark); }

/* ===================== PAGE HEADER ===================== */
.page-header { background: linear-gradient(135deg, var(--secondary) 0%, #0D4D45 100%); color: white; padding: 2.5rem 0; }
.page-header h1 { font-size: 2rem; font-weight: 700; }
.page-header p { opacity: 0.8; margin-top: 0.3rem; }

/* ===================== DEALS LAYOUT (sidebar + main) ===================== */
.deals-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; padding: 2rem 0; }
.filters-sidebar { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); height: fit-content; }
.filter-group { margin-bottom: 1.5rem; }
.filter-group h4 { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 0.75rem; }
.filter-label { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; font-size: 0.9rem; cursor: pointer; }
.filter-label:hover { color: var(--primary); }
.filter-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; outline: none; }
.filter-input:focus { border-color: var(--primary); }
.btn-filter { width: 100%; background: var(--primary); color: white; border: none; padding: 0.7rem; border-radius: var(--radius-sm); font-weight: 600; margin-top: 0.5rem; transition: background 0.2s; }
.btn-filter:hover { background: var(--primary-dark); }
.btn-reset { display: block; width: 100%; text-align: center; padding: 0.5rem; color: var(--text-muted); font-size: 0.85rem; margin-top: 0.4rem; }
.btn-reset:hover { color: var(--primary); }
.cat-link { display: block; padding: 0.4rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.875rem; transition: all 0.2s; }
.cat-link:hover, .cat-link.active { background: #EAF6F4; color: var(--primary); font-weight: 600; }

/* ===================== PAGINATION ===================== */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; flex-wrap: wrap; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; transition: all 0.2s; cursor: pointer; border: 1px solid var(--border); background: var(--white); }
.page-btn:hover:not(.disabled):not(.active) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-wrapper { margin-top: 2rem; }

/* ===================== DEAL DETAIL ===================== */
.breadcrumb { padding: 1rem 0; font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.deal-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.deal-detail-images .main-image { position: relative; border-radius: var(--radius); overflow: hidden; }
.deal-detail-images .main-image img { width: 100%; max-height: 400px; object-fit: cover; }
.discount-badge-large { position: absolute; top: 1rem; right: 1rem; background: var(--primary); color: white; font-size: 1.3rem; font-weight: 800; padding: 0.4rem 0.8rem; border-radius: var(--radius-sm); }
.hot-badge { position: absolute; top: 1rem; left: 1rem; background: #ff6b35; color: white; font-weight: 700; padding: 0.3rem 0.7rem; border-radius: 50px; }
.image-thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; overflow-x: auto; }
.image-thumbs .thumb { width: 80px; height: 60px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; transition: border-color 0.2s; }
.image-thumbs .thumb:hover { border-color: var(--primary); }

.deal-meta { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.deal-cat-badge { padding: 0.3rem 0.8rem; border-radius: 50px; font-size: 0.8rem; font-weight: 600; }
.deal-city-badge { padding: 0.3rem 0.8rem; border-radius: 50px; font-size: 0.8rem; background: #f0f4f8; color: var(--text-muted); }
.deal-detail-title { font-size: 1.8rem; font-weight: 800; line-height: 1.3; margin-bottom: 1rem; }
.company-info { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.75rem; background: #f8f9fa; border-radius: var(--radius-sm); margin-bottom: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }
.deal-detail-price-box { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.price-comparison { display: flex; gap: 2rem; margin-bottom: 1rem; }
.old-price-section, .savings-section { display: flex; flex-direction: column; }
.label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 600; margin-bottom: 0.2rem; }
.old-price { font-size: 1.1rem; text-decoration: line-through; color: var(--text-muted); }
.savings-amount { font-size: 1.1rem; font-weight: 700; color: #4caf50; }
.new-price-big { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.new-price-big span:first-child { font-size: 1.8rem; font-weight: 900; color: var(--primary); }
.discount-tag { background: var(--primary); color: white; padding: 0.3rem 0.8rem; border-radius: 50px; font-size: 1rem; font-weight: 700; }
.quantity-section { margin-bottom: 1rem; }
.progress-bar-large { height: 8px; background: #f0f0f0; border-radius: 50px; overflow: hidden; margin-bottom: 0.5rem; }
.quantity-info { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); }
.expires-info { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.deal-countdown-lg {
    font-size: .95rem;
    padding: .6rem 1rem;
    gap: .5rem;
    margin-bottom: 1.2rem;
    border-radius: 8px;
}
.deal-countdown-lg .countdown-display {
    font-size: 1.25rem;
    letter-spacing: .06em;
}
.deal-countdown-lg .expires-date {
    font-size: .8rem;
    color: #aaa;
    font-weight: 400;
    margin-left: .25rem;
}
.btn-buy-large { width: 100%; background: var(--primary); color: white; border: none; padding: 1rem; border-radius: var(--radius-sm); font-size: 1.1rem; font-weight: 700; transition: all 0.2s; margin-bottom: 0.75rem; }
.btn-buy-large:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-sold-out { background: #ccc; cursor: not-allowed; }
.btn-sold-out:hover { transform: none; background: #ccc; }
.btn-phone { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; border: 2px solid var(--primary); color: var(--primary); padding: 0.8rem; border-radius: var(--radius-sm); font-weight: 600; transition: all 0.2s; }
.btn-phone:hover { background: #EAF6F4; }

/* Deal description tabs */
.deal-description-section { margin-bottom: 3rem; }
.deal-description-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn { background: none; border: none; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab-btn.active, .tab-btn:hover { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.deal-description { line-height: 1.8; }
.deal-description p { margin-bottom: 1rem; }
.deal-description ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.conditions-list { padding-left: 1.5rem; }
.conditions-list li { margin-bottom: 0.5rem; }
.related-deals { margin-bottom: 3rem; }
.related-deals h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }

/* ===================== CATEGORY HEADER ===================== */
.category-header { display: flex; align-items: center; gap: 1.5rem; }
.category-icon-large { font-size: 3.5rem; }

/* ===================== SOCIAL AUTH NAV DROPDOWN ===================== */
.auth-nav-wrap {
    position: relative;
}
.auth-nav-toggle {
    display: inline-flex; align-items: center; gap: .4rem;
    font-family: inherit;
}
.auth-nav-drop {
    display: none;
    position: absolute; top: calc(100% + 10px); right: 0;
    background: #fff;
    border: 1.5px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    padding: 1rem;
    min-width: 240px;
    z-index: 9999;
    animation: dropFadeIn .18s ease;
}
.auth-nav-drop::before {
    content: '';
    position: absolute; top: -8px; right: 18px;
    width: 14px; height: 14px;
    background: #fff;
    border-left: 1.5px solid #e9ecef;
    border-top: 1.5px solid #e9ecef;
    transform: rotate(45deg);
}
.auth-nav-wrap.open .auth-nav-drop { display: block; }

.auth-drop-title {
    font-size: .75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: #aaa; margin-bottom: .65rem;
    padding-bottom: .5rem; border-bottom: 1px solid #f0f0f0;
}

.auth-social-btn {
    display: flex; align-items: center; gap: .65rem;
    padding: .62rem .9rem; border-radius: 8px;
    font-size: .88rem; font-weight: 600;
    margin-bottom: .45rem; transition: all .15s;
    text-decoration: none;
    border: 1.5px solid transparent;
}
.social-icon { width: 20px; height: 20px; flex-shrink: 0; }

.auth-social-btn.google {
    background: #fff; color: #3c4043;
    border-color: #dadce0;
}
.auth-social-btn.google:hover { background: #f8f9fa; border-color: #4285f4; color: #1a1a2e; }

.auth-social-btn.facebook {
    background: #1877F2; color: #fff;
    border-color: #1877F2;
}
.auth-social-btn.facebook:hover { background: #166fe5; }

.auth-drop-divider {
    display: flex; align-items: center; gap: .5rem;
    font-size: .75rem; color: #bbb; margin: .55rem 0;
}
.auth-drop-divider span { white-space: nowrap; }
.auth-drop-divider::before, .auth-drop-divider::after {
    content: ''; flex: 1; height: 1px; background: #e9ecef;
}

.auth-email-link {
    display: flex; align-items: center; gap: .5rem;
    font-size: .85rem; color: #555; text-decoration: none;
    padding: .45rem .5rem; border-radius: 6px;
    transition: background .12s, color .12s;
}
.auth-email-link:hover { background: #f8f9fa; color: var(--primary); }
.auth-email-link i { color: #aaa; font-size: .8rem; }

/* ===================== AUTH ===================== */
.auth-wrapper { min-height: calc(100vh - 200px); display: flex; align-items: center; justify-content: center; padding: 3rem 1rem; background: linear-gradient(135deg, #0A2342 0%, #1B998B 100%); }
.auth-card { background: var(--white); border-radius: var(--radius); padding: 2.5rem; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header .logo { justify-content: center; margin-bottom: 1rem; }
.auth-header h2 { font-size: 1.6rem; font-weight: 700; }
.auth-header p { color: var(--text-muted); margin-top: 0.3rem; }
.auth-form .form-group { margin-bottom: 1.2rem; }
.auth-form label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem; }
.auth-form input, .auth-form select { width: 100%; padding: 0.7rem 0.9rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; transition: border-color 0.2s; outline: none; }
.auth-form input:focus, .auth-form select:focus { border-color: var(--primary); }
.form-check { display: flex; align-items: center; }
.form-check label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; cursor: pointer; }
.btn-auth { width: 100%; background: var(--primary); color: white; border: none; padding: 0.9rem; border-radius: var(--radius-sm); font-size: 1rem; font-weight: 700; transition: background 0.2s; margin-top: 0.5rem; }
.btn-auth:hover { background: var(--primary-dark); }
.auth-footer { text-align: center; margin-top: 1.5rem; color: var(--text-muted); font-size: 0.9rem; }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ===================== DASHBOARD ===================== */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; padding: 2rem 0; }
.dashboard-sidebar { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); height: fit-content; }
.user-card { display: flex; gap: 1rem; align-items: flex-start; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.user-avatar { font-size: 3rem; color: var(--text-muted); }
.user-info { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; color: var(--text-muted); }
.user-info strong { color: var(--text); font-size: 1rem; }
.dashboard-nav a { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--text); transition: all 0.2s; margin-bottom: 0.3rem; }
.dashboard-nav a:hover, .dashboard-nav a.active { background: #EAF6F4; color: var(--primary); font-weight: 600; }
.dashboard-content h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; }
.coupons-list { display: flex; flex-direction: column; gap: 1rem; }
.coupon-item { background: var(--white); border-radius: var(--radius); padding: 1rem; display: flex; gap: 1rem; align-items: center; box-shadow: var(--shadow); border-left: 4px solid var(--primary); }
.coupon-item.used { border-left-color: #ccc; opacity: 0.7; }
.coupon-image img { width: 100px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); }
.coupon-details { flex: 1; }
.coupon-details h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.3rem; }
.coupon-details p { font-size: 0.85rem; color: var(--text-muted); }
.coupon-category { font-size: 0.75rem; font-weight: 600; color: var(--primary); }
.coupon-code-section { text-align: right; }
.coupon-code { font-family: monospace; font-size: 1.1rem; font-weight: 800; background: #f0f4f8; padding: 0.4rem 0.8rem; border-radius: var(--radius-sm); letter-spacing: 1px; margin-bottom: 0.5rem; }
.coupon-status { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 50px; display: inline-block; }
.status-active { background: #d4edda; color: #155724; }
.status-used { background: #e2e3e5; color: #383d41; }
.coupon-price { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.3rem; }
.coupon-date { font-size: 0.75rem; color: var(--text-muted); }

/* ===================== EMPTY STATE ===================== */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state i, .empty-state span { font-size: 4rem; color: #dee2e6; margin-bottom: 1rem; display: block; }
.empty-state h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ===================== FOOTER ===================== */
.footer { background: var(--secondary); color: #a8b2c3; padding: 4rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand .logo-text { color: white; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.5rem; }
.social-links { display: flex; gap: 0.75rem; }
.social-links a { width: 38px; height: 38px; background: rgba(255,255,255,0.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; transition: background 0.2s; font-size: 1rem; }
.social-links a:hover { background: var(--primary); }
.footer-links h4 { color: white; font-size: 0.95rem; font-weight: 700; margin-bottom: 1rem; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 0.6rem; }
.footer-links ul li a { color: #a8b2c3; font-size: 0.9rem; transition: color 0.2s; }
.footer-links ul li a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; display: flex; justify-content: space-between; font-size: 0.85rem; color: #7a8aa0; flex-wrap: wrap; gap: 0.5rem; }

/* ===================== HAMBURGER & MOBILE NAV ===================== */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 1.5px solid var(--border);
    padding: .45rem .55rem;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s, border-color .2s;
}
.nav-hamburger:hover { background: #f5f5f5; border-color: #ccc; }
.nav-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all .25s;
}
body.nav-open { overflow: hidden; }

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 299;
}
.mobile-nav-overlay.open { display: block; }

.mobile-nav-drawer {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 290px;
    max-width: 88vw;
    background: #fff;
    z-index: 300;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    box-shadow: 4px 0 30px rgba(0,0,0,.15);
}
.mobile-nav-drawer.open { transform: translateX(0); }

.mnd-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.mnd-logo {
    display: flex; align-items: center; gap: .5rem;
    font-size: 1.1rem; font-weight: 800;
    color: var(--primary); text-decoration: none;
}
.mnd-close {
    background: none; border: none;
    font-size: 1.15rem; color: #888;
    padding: .4rem .5rem; border-radius: 6px;
    cursor: pointer; line-height: 1; transition: all .15s;
}
.mnd-close:hover { background: #f5f5f5; color: var(--primary); }

.mnd-city {
    display: flex; align-items: center; gap: .5rem;
    padding: .75rem 1.1rem;
    border-bottom: 1px solid #f0f0f0;
    color: var(--primary); font-weight: 600; font-size: .85rem;
    flex-shrink: 0;
}
.mnd-city select {
    flex: 1; border: none; background: transparent;
    color: var(--primary); font-weight: 600; font-size: .85rem;
    outline: none; cursor: pointer;
}

.mnd-section-title {
    font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    color: #bbb; padding: .85rem 1.1rem .3rem; margin: 0;
}
.mnd-nav { flex: 1; }
.mnd-nav ul { list-style: none; }
.mnd-nav ul li a {
    display: flex; align-items: center; gap: .65rem;
    padding: .72rem 1.1rem;
    font-size: .9rem; font-weight: 500; color: var(--text);
    text-decoration: none;
    transition: background .12s, color .12s;
    border-bottom: 1px solid #fafafa;
}
.mnd-nav ul li a:hover { background: #EAF6F4; color: var(--primary); }
.mnd-icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }

.mnd-auth {
    padding: 1rem 1.1rem;
    border-top: 1px solid #f0f0f0;
    display: flex; flex-direction: column; gap: .55rem;
    flex-shrink: 0;
}
.mnd-auth-btn {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem; border-radius: 8px;
    font-weight: 700; font-size: .9rem;
    text-decoration: none; transition: all .2s;
}
.mnd-auth-btn.outline { border: 2px solid var(--primary); color: var(--primary); }
.mnd-auth-btn.outline:hover { background: #EAF6F4; }
.mnd-auth-btn.primary { background: var(--primary); color: #fff; border: none; }
.mnd-auth-btn.primary:hover { background: var(--primary-dark); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .deal-detail { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Header */
    .header-top-inner { flex-wrap: wrap; }
    .header-search { order: 3; width: 100%; max-width: 100%; }
    .nav-categories { display: none; }
    .nav-hamburger { display: flex; }
    .header-actions { gap: .5rem; }

    /* Hero */
    .hero { min-height: 260px; background-position: 60% center; padding: 1.75rem 0; }
    .hero h1 { font-size: 1.6rem; }
    .hero-content { max-width: 100%; }
    .hero-stats { gap: 1rem; flex-wrap: wrap; }
    .hero-search { max-width: 100%; }

    /* Deals */
    .deals-layout { grid-template-columns: 1fr; }
    .filters-sidebar { display: none; }
    .deals-grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .deals-grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

    /* Deal detail */
    .deal-detail { grid-template-columns: 1fr; gap: 1.5rem; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .newsletter-inner { flex-direction: column; }

    /* Dashboard */
    .dashboard-layout { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .container { padding: 0 .75rem; }

    /* Hero */
    .hero { min-height: 210px; }
    .hero h1 { font-size: 1.3rem; }
    .hero p { font-size: .88rem; margin-bottom: 1rem; }
    .hero-stats { gap: .6rem; }
    .stat strong { font-size: 1rem; }
    .stat span { font-size: .75rem; }

    /* Sections */
    .section-title { font-size: 1.3rem; }
    .section { padding: 2.5rem 0; }

    /* Deals grid: 2 per row */
    .deals-grid-3, .deals-grid-4 { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .deal-card-body { padding: .65rem; }
    .deal-title { font-size: .84rem; }
    .deal-company { font-size: .73rem; }
    .price-new { font-size: 1rem; }
    .btn-buy { padding: .38rem .75rem; font-size: .78rem; }
    .badge { font-size: .67rem; padding: .2rem .42rem; }

    /* Auth buttons compact */
    .btn-outline, .btn-primary { padding: .38rem .85rem; font-size: .84rem; }

    /* Deal detail */
    .deal-detail-title { font-size: 1.3rem; }
    .new-price-big span:first-child { font-size: 1.4rem; }
    .btn-buy-large, .btn-phone { min-height: 48px; }
    .price-comparison { gap: .75rem; flex-wrap: wrap; }

    /* Newsletter */
    .newsletter-form { flex-direction: column; border-radius: 10px; max-width: 100%; }
    .newsletter-form input, .newsletter-form button { border-radius: 8px; }
    .newsletter-text h2 { font-size: 1.4rem; }

    /* Footer */
    .footer { padding: 3rem 0 2rem; }

    /* Tabs scrollable */
    .deal-description-tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
    .deal-description-tabs::-webkit-scrollbar { display: none; }
    .tab-btn { white-space: nowrap; padding: .65rem 1rem; font-size: .88rem; }

    /* Categories grid */
    .categories-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .65rem; }
    .category-card { padding: 1rem .75rem; }
    .category-icon { font-size: 1.6rem; }
    .category-name { font-size: .78rem; }

    /* Page header */
    .page-header h1 { font-size: 1.5rem; }
    .page-header { padding: 1.75rem 0; }
}
