:root {
    --bg-main: #16171f;
    --bg-card: #20222d;
    --bg-card-hover: #262936;
    --bg-input: #1a1e26;
    --primary-green: #52b76b;
    --primary-green-hover: #45a05b;
    --text-light: #ffffff;
    --text-muted: #9496a5;
    --border-color: rgba(255, 255, 255, 0.05);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: radial-gradient(circle at top, #212330, var(--bg-main) 60%);
    color: var(--text-light);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(82, 183, 107, 0.15);
    color: #52b76b;
    border: 1px solid rgba(82, 183, 107, 0.3);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-info {
    background-color: rgba(68, 97, 235, 0.15);
    color: #818cf8;
    border: 1px solid rgba(68, 97, 235, 0.3);
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-light);
    text-decoration: none;
}

.logo svg {
    width: 28px;
    height: 28px;
    color: var(--primary-green);
}

.nav-links {
    display: flex;
    gap: 30px;
    height: 100%;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--text-light); }

.nav-links a.active { color: var(--primary-green); }

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-green);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-icon {
    cursor: pointer;
    color: var(--text-muted);
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
}

.profile-btn img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.cart-nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.cart-nav-btn:hover,
.cart-nav-btn.active {
    color: #68ab4e;
    border-color: rgba(104,171,78,0.4);
    background: rgba(104,171,78,0.08);
}

.cart-count-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    background: #eb4034;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.hero-subtitle span {
    color: var(--text-light);
    font-weight: 600;
}

.hero h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 30px;
    font-weight: 700;
}

.search-bar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 5px;
    width: 100%;
    max-width: 500px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 10px 20px;
    width: 100%;
    outline: none;
    font-size: 1rem;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-btn {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}

.search-btn:hover { background-color: var(--primary-green-hover); }

.dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    opacity: 0.3;
}

.dot.active {
    background-color: var(--primary-green);
    opacity: 1;
}

/* Small Cards */
.small-cards-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.small-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 15px;
    width: 140px;
    text-align: center;
    position: relative;
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
}

.small-card:hover {
    transform: translateY(-5px);
    background-color: var(--bg-card-hover);
}

.badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background-color: #3b3f54;
    color: #aeb4d0;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.small-card img.flag {
    width: 50px;
    height: 35px;
    min-width: 50px;
    min-height: 35px;
    max-width: 50px;
    max-height: 35px;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    margin-bottom: 15px;
    display: block;
}

.small-card h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.small-card .price {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.btn-grey {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: none;
    padding: 8px;
    width: 100%;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-grey:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text-light);
}

/* Popular Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.section-header a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.popular-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.popular-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.popular-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.country-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.country-info img {
    width: 24px;
    height: 18px;
    min-width: 24px;
    min-height: 18px;
    max-width: 24px;
    max-height: 18px;
    border-radius: 3px;
    object-fit: cover;
    display: block;
}

.country-info span {
    font-weight: 600;
    font-size: 1.05rem;
}

.badge-green {
    background-color: rgba(82, 183, 107, 0.15);
    color: var(--primary-green);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.popular-card .desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.popular-card .desc span { color: var(--primary-green); }

.popular-card .price {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.btn-green {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.95rem;
}

.btn-green:hover { background-color: var(--primary-green-hover); }

/* Store Page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.page-title span {
    color: var(--text-muted);
    font-weight: 400;
}

.layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* Store Sidebar */
.store-sidebar {
    background-color: #212530;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #282c38;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 15px;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 5px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-item input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: '\2713';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 30px;
}

.range-slider {
    width: 100%;
    margin-top: 10px;
    appearance: none;
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    outline: none;
    accent-color: var(--primary-green);
}

.range-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 4px solid var(--primary-green);
}

.range-value {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
    text-align: right;
}

/* Products Grid */
.products-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.products-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.card {
    background-color: #282c38;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    transition: background 0.2s, transform 0.2s;
}

.card:hover {
    background-color: #2f3442;
    transform: translateY(-3px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.card-header img {
    width: 30px;
    height: 20px;
    min-width: 30px;
    min-height: 20px;
    max-width: 30px;
    max-height: 20px;
    border-radius: 3px;
    object-fit: cover;
    display: block;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-details {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer .price {
    font-size: 1.3rem;
    font-weight: 700;
}

.btn-details {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-details:hover { background-color: var(--primary-green-hover); }

/* Auth Forms */
.auth-container {
    max-width: 440px;
    margin: 60px auto;
}

.auth-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
}

.auth-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card .subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 15px;
    color: var(--text-light);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus { border-color: var(--primary-green); }

.form-error {
    color: #f87171;
    font-size: 0.85rem;
    margin-top: 5px;
}

.btn-submit {
    width: 100%;
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn-submit:hover { background-color: var(--primary-green-hover); }

.auth-links {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary-green);
    text-decoration: none;
}

.auth-links a:hover { text-decoration: underline; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 10px;
}

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.85rem;
}

.page-btn:hover { background-color: rgba(255, 255, 255, 0.05); }

.page-btn.active {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
}

/* ============================================================
   Mobile navigation drawer (≤768px hamburger menu)
   ============================================================ */
.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, border-color 0.15s;
}
.mobile-nav-toggle:hover { background: rgba(255,255,255,0.1); }

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.mobile-nav-overlay.show { opacity: 1; pointer-events: auto; }

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(85vw, 320px);
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0,0,0,0.4);
    overflow-y: auto;
}
.mobile-nav-drawer.open { transform: translateX(0); }

.mobile-nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
}
.mobile-nav-drawer-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.mobile-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s, border-color 0.15s;
}
.mobile-nav-close:hover { color: var(--text-light); border-color: rgba(255,255,255,0.2); }

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 2px;
    flex: 1;
}
.mobile-nav-links a {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.15s, color 0.15s;
    min-height: 44px;
}
.mobile-nav-links a:hover { background: rgba(255,255,255,0.04); color: var(--text-light); }
.mobile-nav-links a.active {
    background: rgba(82, 183, 107, 0.1);
    color: var(--primary-green);
}
.mobile-nav-logout { color: #f87171 !important; }
.mobile-nav-logout:hover { background: rgba(239, 68, 68, 0.08) !important; }

.mobile-nav-langs {
    padding: 16px 20px 24px;
    border-top: 1px solid var(--border-color);
}
.mobile-nav-langs-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.mobile-nav-langs-row { display: flex; gap: 6px; flex-wrap: wrap; }
.mobile-nav-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s;
}
.mobile-nav-lang:hover { color: var(--text-light); border-color: rgba(255,255,255,0.2); }
.mobile-nav-lang.current {
    background: rgba(82,183,107,0.12);
    border-color: rgba(82,183,107,0.4);
    color: var(--primary-green);
}

body.no-scroll { overflow: hidden; }

/* ============================================================
   Responsive — Tablet & Mobile
   ============================================================ */

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

@media (max-width: 768px) {
    /* Container & nav */
    .container { padding: 0 16px; }
    nav { height: 64px; }
    .logo { font-size: 1.05rem; }
    .logo svg { width: 24px; height: 24px; }

    /* Desktop nav-links gizli; hamburger devreye girer */
    .nav-links { display: none; }
    .mobile-nav-toggle { display: flex; }

    /* Header'da gereksiz desktop elementleri sakla */
    .search-icon { display: none; }
    .lang-switcher { display: none; }

    /* Profile button kompakt */
    .profile-btn { padding: 6px 10px; font-size: 0.85rem; gap: 6px; }
    .profile-btn-text { display: none; }
    .profile-btn-caret { display: none; }
    .profile-btn img { width: 26px; height: 26px; }

    /* Cart button */
    .cart-nav-btn { width: 40px; height: 40px; }

    /* Nav actions gap'ı küçült */
    .nav-actions { gap: 8px; }

    /* Hero */
    .hero { padding: 40px 0 30px; }
    .hero h1 { font-size: 1.5rem; margin-bottom: 20px; }
    .hero-subtitle { font-size: 0.85rem; }
    .search-bar { max-width: 100%; padding: 4px; }
    .search-bar input { padding: 10px 14px; font-size: 0.95rem; }
    .search-btn { padding: 10px 18px; font-size: 0.85rem; }

    /* Grids */
    .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .small-card { width: 120px; }

    /* Auth pages */
    .auth-container { margin: 24px auto; max-width: 100%; padding: 0 16px; }
    .auth-card { padding: 28px 22px; border-radius: 12px; }
    .auth-card h2 { font-size: 1.3rem; }
    .auth-card .subtitle { font-size: 0.88rem; margin-bottom: 22px; }

    /* Pagination */
    .pagination { flex-direction: column; align-items: center; gap: 12px; padding: 12px 0; }
}

@media (max-width: 480px) {
    /* Container & nav */
    .container { padding: 0 12px; }
    nav { height: 58px; }
    .logo { font-size: 0.98rem; }

    /* Hero */
    .hero { padding: 28px 0 20px; }
    .hero h1 { font-size: 1.25rem; line-height: 1.35; margin-bottom: 16px; }
    .hero-subtitle { font-size: 0.78rem; margin-bottom: 12px; }

    /* Auth pages — agresif padding düşüşü */
    .auth-card { padding: 22px 18px; border-radius: 10px; }
    .auth-card h2 { font-size: 1.2rem; }
    .form-group { margin-bottom: 16px; }
    .form-control { padding: 12px 13px; font-size: 0.95rem; }
    .btn-submit { padding: 13px; font-size: 0.95rem; }

    /* Grids */
    .products-grid { grid-template-columns: 1fr; }
    .small-cards-row { gap: 8px; }
    .small-card { width: 100px; padding: 14px 10px; }

    /* Mobile nav drawer küçük ekran */
    .mobile-nav-drawer { width: 88vw; }

    /* Cart button küçült */
    .cart-nav-btn { width: 38px; height: 38px; }
    .profile-btn img { width: 28px; height: 28px; }
    .profile-btn { padding: 4px 4px; }

    /* Mobile nav-actions sıkışırsa gap'ı azalt */
    .nav-actions { gap: 6px; }
}

/* ============================================================
   Yatay scroll yedeği — root seviye taşma engellensin
   ============================================================ */
html, body { overflow-x: hidden; }
