/* ═══════════════════════════════════════
   AFIYETSE — Global Styles
   ═══════════════════════════════════════ */

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #fff8f0; color: #1a1a1a; }
a { text-decoration: none; color: inherit; }

/* ── CSS Variables ── */
:root {
    --orange: #e65c00;
    --orange-hover: #c94f00;
    --orange-light: #fff3e8;
    --orange-border: #f5a623;
    --cream: #fff8f0;
    --text: #1a1a1a;
    --muted: #888;
    --border: #f0e0d0;
    --white: #fff;
    --radius: 12px;
    --radius-lg: 16px;
}

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.navbar {
    background: var(--white);
    border-bottom: 2px solid var(--orange-border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(230,92,0,0.07);
    overflow: visible;
}

.navbar-logo { display: flex; align-items: center; gap: 10px; }
.navbar-logo img { height: 44px; width: auto; }
.navbar-logo span { font-size: 22px; font-weight: 800; color: var(--orange); letter-spacing: -0.5px; }

.navbar-right { display: flex; align-items: center; gap: 16px; }

/* Lang switcher */
.lang-switcher { display: flex; gap: 4px; }
.lang-switcher a {
    padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
    color: #666; border: 1px solid #e5e5e5; transition: all 0.2s;
}
.lang-switcher a.active,
.lang-switcher a:hover { background: var(--orange); color: white; border-color: var(--orange); }

/* Mobil lang switcher */
.navbar-lang-mobile { display: none; gap: 4px; }
.navbar-lang-mobile a {
    padding: 3px 7px; border-radius: 20px; font-size: 11px; font-weight: 600;
    color: #666; border: 1px solid #e5e5e5; transition: all 0.2s;
}
.navbar-lang-mobile a.active,
.navbar-lang-mobile a:hover { background: var(--orange); color: white; border-color: var(--orange); }

/* Buttons */
.btn-login {
    padding: 8px 20px; border-radius: 50px; font-size: 14px; font-weight: 600;
    color: var(--orange); border: 2px solid var(--orange); transition: all 0.2s;
}
.btn-login:hover { background: var(--orange); color: white; }

.btn-register {
    padding: 8px 20px; border-radius: 50px; font-size: 14px; font-weight: 600;
    background: var(--orange); color: white; border: 2px solid var(--orange); transition: all 0.2s;
}
.btn-register:hover { background: var(--orange-hover); border-color: var(--orange-hover); }

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
    display: flex; align-items: center; gap: 8px;
    background: none; border: 1.5px solid var(--orange-border);
    border-radius: 50px; padding: 6px 14px 6px 6px;
    cursor: pointer; transition: all 0.2s;
}
.nav-dropdown-btn:hover { background: var(--orange-light); }
.nav-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--orange); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; font-weight: 700; flex-shrink: 0;
}
.nav-username {
    font-size: 0.88rem; font-weight: 600; color: #333;
    max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-dropdown-menu {
    display: none;
    position: absolute; top: calc(100% + 8px); right: 0;
    background: white; border-radius: var(--radius);
    border: 1.5px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    min-width: 200px; z-index: 1000; overflow: hidden;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-item {
    display: block; padding: 12px 16px; color: #333;
    text-decoration: none; font-size: 0.9rem; transition: background 0.15s;
    width: 100%; text-align: left; background: none; border: none; cursor: pointer;
}
.nav-dropdown-item:hover { background: #fff8f0; color: var(--orange); }
.nav-dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }
.nav-dropdown-logout { color: var(--orange); font-weight: 600; }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
    display: block; width: 24px; height: 2.5px;
    background: var(--orange); border-radius: 2px; transition: all 0.3s;
}

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed; top: 60px; left: 0; right: 0;
    background: white; border-bottom: 2px solid var(--orange-border);
    z-index: 999; padding: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.mobile-menu.open { display: block; }
.mobile-menu-item {
    display: block; padding: 12px 8px; color: #333;
    text-decoration: none; font-size: 0.95rem;
    border-bottom: 1px solid #faf0e8;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
    background: #2d2d2d; color: rgba(255,255,255,0.7);
    text-align: center; padding: 24px; font-size: 13px; margin-top: 60px;
}
.footer a { color: var(--orange-border); }

/* ══════════════════════════════════════
   BOTTOM NAV
══════════════════════════════════════ */
.bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: white; border-top: 1px solid var(--border);
    padding: 8px 0 16px; z-index: 999;
    justify-content: space-around; align-items: center;
}
.bottom-nav-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 3px; text-decoration: none; cursor: pointer; padding: 4px 12px;
}
.bottom-nav-icon { font-size: 22px; }
.bottom-nav-label { font-size: 10px; font-weight: 500; color: #8A6A50; }
.bottom-nav-item.active .bottom-nav-label { color: var(--orange); font-weight: 600; }
.bottom-nav-add { position: relative; margin-top: -16px; }
.bottom-nav-plus {
    width: 44px; height: 44px; background: var(--orange); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: white; box-shadow: 0 4px 12px rgba(230,92,0,0.4);
}

/* ══════════════════════════════════════
   BUTTONS (Global)
══════════════════════════════════════ */
.btn-primary {
    display: inline-block; background: var(--orange); color: white;
    padding: 12px 28px; border-radius: var(--radius);
    font-weight: 700; transition: background 0.2s;
}
.btn-primary:hover { background: var(--orange-hover); }

.btn-submit {
    width: 100%; background: var(--orange); color: white; border: none;
    border-radius: var(--radius); padding: 14px; font-size: 1rem;
    font-weight: 700; cursor: pointer; transition: background 0.2s;
}
.btn-submit:hover { background: var(--orange-hover); }

.btn-whatsapp {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: #25D366; color: white; text-decoration: none;
    border-radius: var(--radius); padding: 14px 24px;
    font-size: 1rem; font-weight: 700; transition: background 0.2s;
}
.btn-whatsapp:hover { background: #1ebe5d; }

/* Alerts */
.alert-success { background: #d4edda; color: #155724; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; }
.alert-error { background: #f8d7da; color: #721c24; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; }

/* ══════════════════════════════════════
   PRODUCT GRID (Shared)
══════════════════════════════════════ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    padding-bottom: 48px;
}

.product-card {
    background: white; border-radius: var(--radius-lg); overflow: hidden;
    text-decoration: none; color: #333; border: 1.5px solid var(--border);
    transition: all 0.2s ease; display: flex; flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(230,92,0,0.15);
    border-color: var(--orange-border);
}

.product-image { width: 100%; height: 180px; overflow: hidden; background: var(--orange-light); }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-no-image {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; background: var(--orange-light);
}
.product-info { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-category { font-size: 0.75rem; color: var(--orange-border); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.product-title { font-size: 1rem; font-weight: 700; color: #222; line-height: 1.3; margin: 0; }
.product-seller { font-size: 0.82rem; color: var(--muted); margin: 0; }
.product-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border);
}
.product-price { font-size: 1.1rem; font-weight: 700; color: var(--orange); }

/* ══════════════════════════════════════
   PRODUCTS PAGE
══════════════════════════════════════ */
.products-page { background: var(--cream); min-height: 80vh; }

.filter-bar {
    background: white; border-bottom: 1px solid var(--border);
    padding: 16px 0; position: sticky; top: 68px; z-index: 90;
}
.filter-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-form select,
.filter-form input[type="number"] {
    border: 1.5px solid var(--orange-border); border-radius: 8px;
    padding: 8px 12px; font-size: 0.9rem; background: white; color: #333; outline: none;
}
.filter-form select:focus,
.filter-form input:focus { border-color: var(--orange); }
.price-range { display: flex; align-items: center; gap: 6px; }
.price-range input { width: 90px; }
.btn-filter {
    background: var(--orange); color: white; border: none;
    border-radius: 8px; padding: 8px 16px; cursor: pointer; font-weight: 600;
}
.btn-clear { color: var(--orange); text-decoration: none; font-size: 0.85rem; font-weight: 600; }

.products-header { display: flex; align-items: center; justify-content: space-between; padding: 32px 0 20px; }
.products-header h1 { font-size: 1.6rem; font-weight: 700; color: var(--orange); }
.product-count { color: var(--muted); font-size: 0.9rem; }

.no-products { text-align: center; padding: 80px 0; color: var(--muted); }
.no-products p { font-size: 1.2rem; margin-bottom: 20px; }
.pagination-wrap { padding: 32px 0; display: flex; justify-content: center; }

/* ══════════════════════════════════════
   PRODUCT FORM
══════════════════════════════════════ */
.product-form .form-group { margin-bottom: 20px; }
.product-form label { display: block; font-weight: 600; color: #444; margin-bottom: 6px; font-size: 0.9rem; }
.product-form input[type="text"],
.product-form input[type="number"],
.product-form select,
.product-form textarea {
    width: 100%; border: 1.5px solid #e0d0c0; border-radius: var(--radius);
    padding: 10px 14px; font-size: 0.95rem; color: #333;
    background: white; outline: none; transition: border-color 0.2s;
}
.product-form input:focus,
.product-form select:focus,
.product-form textarea:focus { border-color: var(--orange); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.radio-group { display: flex; gap: 20px; flex-wrap: wrap; }
.radio-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 400 !important; color: #555 !important; }
.image-upload-area {
    border: 2px dashed var(--orange-border); border-radius: var(--radius);
    padding: 32px; text-align: center; background: #fffaf5; transition: border-color 0.2s;
}
.image-upload-area:hover { border-color: var(--orange); }

/* ══════════════════════════════════════
   PRODUCT DETAIL
══════════════════════════════════════ */
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-detail-image { border-radius: var(--radius-lg); overflow: hidden; background: var(--orange-light); aspect-ratio: 1; }
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-no-image { width: 100%; height: 100%; min-height: 300px; display: flex; align-items: center; justify-content: center; font-size: 5rem; }
.product-detail-category { font-size: 0.8rem; color: var(--orange-border); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.product-detail-title { font-size: 1.8rem; font-weight: 700; color: #222; margin: 8px 0 16px; line-height: 1.3; }
.product-detail-price { font-size: 2rem; font-weight: 700; color: var(--orange); margin-bottom: 12px; }
.product-detail-delivery { font-size: 0.9rem; color: #666; margin-bottom: 20px; padding: 8px 12px; background: white; border-radius: 8px; display: inline-block; border: 1px solid var(--border); }
.product-detail-description { margin: 20px 0; padding: 20px; background: white; border-radius: var(--radius); border: 1px solid var(--border); }
.product-detail-description h3 { font-size: 0.9rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 10px; }
.product-detail-description p { color: #444; line-height: 1.7; margin: 0; }

/* ══════════════════════════════════════
   SELLER
══════════════════════════════════════ */
.seller-card {
    display: flex; align-items: center; gap: 14px;
    background: white; border-radius: var(--radius); padding: 16px;
    border: 1.5px solid var(--border); flex-wrap: wrap;
}
.seller-card-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--orange); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: 700; overflow: hidden; flex-shrink: 0;
}
.seller-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.seller-card-info { flex: 1; }
.seller-card-name { font-weight: 700; color: #222; font-size: 0.95rem; }
.seller-card-city { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.seller-card-bio { font-size: 0.82rem; color: #666; margin-top: 4px; }
.seller-card-link { font-size: 0.82rem; color: var(--orange); text-decoration: none; font-weight: 600; white-space: nowrap; }

.seller-profile-card { background: white; border-radius: 20px; padding: 32px; display: flex; align-items: flex-start; gap: 24px; border: 1.5px solid var(--border); flex-wrap: wrap; }
.seller-profile-avatar { width: 90px; height: 90px; border-radius: 50%; background: var(--orange); color: white; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.seller-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.seller-profile-info { flex: 1; }
.seller-profile-name { font-size: 1.6rem; font-weight: 700; color: #222; margin: 0 0 6px; }
.seller-profile-location { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.seller-profile-bio { color: #555; font-size: 0.95rem; line-height: 1.6; margin: 0 0 16px; }
.seller-profile-stats { display: flex; gap: 24px; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-number { font-size: 1.4rem; font-weight: 700; color: var(--orange); }
.stat-label { font-size: 0.8rem; color: var(--muted); }
.seller-wa-btn { align-self: center; white-space: nowrap; }

/* ══════════════════════════════════════
   DASHBOARD
══════════════════════════════════════ */
.dashboard-product-list { display: flex; flex-direction: column; gap: 12px; }
.dashboard-product-item { background: white; border-radius: var(--radius); border: 1.5px solid var(--border); padding: 16px; display: flex; align-items: center; gap: 16px; }
.dashboard-product-image { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--orange-light); flex-shrink: 0; }
.dashboard-product-image img { width: 100%; height: 100%; object-fit: cover; }
.dashboard-product-info { flex: 1; }
.dashboard-product-title { font-weight: 700; color: #222; font-size: 0.95rem; }
.dashboard-product-meta { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.dashboard-product-actions { display: flex; gap: 8px; align-items: center; }
.btn-action { width: 36px; height: 36px; border-radius: 8px; border: none; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; text-decoration: none; background: #f5f5f5; transition: background 0.2s; }
.btn-action:hover { background: #e0e0e0; }
.btn-view { background: #e8f5e9; }
.btn-edit { background: #fff3e0; }
.btn-delete { background: #fce4ec; }

/* ══════════════════════════════════════
   ADMIN
══════════════════════════════════════ */
.btn-admin-nav { background: white; border: 1.5px solid var(--orange-border); color: var(--orange); border-radius: 8px; padding: 8px 16px; text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: all 0.2s; }
.btn-admin-nav:hover { background: var(--orange); color: white; border-color: var(--orange); }
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.admin-stat-card { background: white; border-radius: var(--radius-lg); padding: 24px; text-align: center; border: 1.5px solid var(--border); }
.admin-stat-icon { font-size: 2rem; margin-bottom: 8px; }
.admin-stat-number { font-size: 2rem; font-weight: 700; color: #222; }
.admin-stat-label { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.admin-table-wrap { background: white; border-radius: var(--radius-lg); border: 1.5px solid var(--border); overflow: hidden; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th { background: #fff8f0; padding: 12px 16px; text-align: left; font-weight: 700; color: #666; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid #faf0e8; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fffaf5; }
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.status-active { background: #d4edda; color: #155724; }
.status-pending { background: #fff3cd; color: #856404; }

/* ══════════════════════════════════════
   CONTAINER
══════════════════════════════════════ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 768px) {
    .navbar { padding: 0 12px; height: 60px; }
    .navbar-logo span { font-size: 18px; }
    .navbar-logo img { height: 36px; }
    .navbar-right { display: none; }
    .hamburger { display: flex; }
    .navbar-lang-mobile { display: flex; }
    .bottom-nav { display: flex; }
    body { padding-bottom: 72px; }
    .product-detail-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .seller-profile-card { padding: 20px; }
    .nav-username { display: none; }
}

@media (max-width: 600px) {
    .product-grid { grid-template-columns: 1fr; }
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
/* ── MOBİL NAV ── */
.mobile-nav-right { display: none; align-items: center; gap: 8px; }

.lang-dropdown { position: relative; }
.lang-dropdown-btn {
    background: none; border: 1.5px solid #f5a623;
    border-radius: 20px; padding: 5px 10px;
    font-size: 12px; font-weight: 600; color: #333;
    cursor: pointer; display: flex; align-items: center; gap: 4px;
}
.lang-dropdown-menu {
    display: none;
    position: absolute; top: calc(100% + 6px); right: 0;
    background: white; border-radius: 12px;
    border: 1.5px solid #f0e0d0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    overflow: hidden; z-index: 1000; min-width: 100px;
}
.lang-dropdown.open .lang-dropdown-menu { display: block; }
.lang-dropdown-menu a {
    display: block; padding: 10px 16px;
    font-size: 13px; font-weight: 600; color: #333;
    transition: background 0.15s;
}
.lang-dropdown-menu a:hover,
.lang-dropdown-menu a.active { background: #fff3e8; color: #e65c00; }

@media (max-width: 768px) {
    .mobile-nav-right { display: flex; }
    .navbar-right { display: none; }
    .hamburger { display: flex; }
}