/*
Theme Name:   Bugungel
Theme URI:    https://bugungel.xyz
Description:  Mobile-first food delivery marketplace theme for Bugungel.
Version:      1.0.0
Author:       Bugungel
Author URI:   https://bugungel.xyz
Text Domain:  bugungel
Domain Path:  /languages
Requires PHP: 8.0
Tested up to: 6.5
License:      GPL v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html

Bugungel – Gıda pazaryeri teması.
*/

/* ── CSS Variables (Design Tokens) ─────────────────────────────── */
:root {
    /* Brand */
    --bg-primary: #FF6B35;
    --bg-primary-dk: #E85D2C;
    --bg-secondary: #1B2631;
    --bg-accent: #27AE60;
    --bg-accent-dk: #219653;
    --bg-danger: #E74C3C;

    /* Neutrals */
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-gray-100: #F0F2F5;
    --bg-gray-200: #E4E6EB;
    --bg-gray-400: #8D99AE;
    --bg-gray-600: #6C757D;
    --bg-gray-800: #343A40;
    --bg-black: #212529;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-brand: 'Outfit', var(--font-main);

    /* Spacing */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-12: 48px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, .06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, .12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, .16);

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-overlay: 400;
    --z-modal: 500;

    /* Transitions */
    --ease-out: cubic-bezier(.25, .8, .25, 1);
    --ease-spring: cubic-bezier(.68, -.55, .27, 1.55);
}

/* ── Reset & Base ──────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    color: var(--bg-black);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--bg-primary);
    text-decoration: none;
    transition: color .2s var(--ease-out);
}

a:hover {
    color: var(--bg-primary-dk);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ── Utility Classes ───────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-4);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-5);
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all .2s var(--ease-out);
    white-space: nowrap;
}

.btn:active {
    transform: scale(.97);
}

.btn--primary {
    background: var(--bg-primary);
    color: var(--bg-white);
}

.btn--primary:hover {
    background: var(--bg-primary-dk);
    color: var(--bg-white);
}

.btn--secondary {
    background: var(--bg-secondary);
    color: var(--bg-white);
}

.btn--secondary:hover {
    opacity: .9;
    color: var(--bg-white);
}

.btn--accent {
    background: var(--bg-accent);
    color: var(--bg-white);
}

.btn--accent:hover {
    background: var(--bg-accent-dk);
    color: var(--bg-white);
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--bg-gray-200);
    color: var(--bg-gray-800);
}

.btn--outline:hover {
    border-color: var(--bg-primary);
    color: var(--bg-primary);
}

.btn--sm {
    padding: var(--sp-2) var(--sp-3);
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn--lg {
    padding: var(--sp-4) var(--sp-8);
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn--block {
    display: flex;
    width: 100%;
}

.btn--pill {
    border-radius: var(--radius-full);
}

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card__img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.card__body {
    padding: var(--sp-4);
}

.card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--bg-black);
    margin-bottom: var(--sp-1);
}

.card__meta {
    font-size: 13px;
    color: var(--bg-gray-600);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: var(--bg-white);
    box-shadow: var(--shadow-xs);
    padding: var(--sp-3) 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
}

.site-header__logo {
    font-family: var(--font-brand);
    font-size: 24px;
    font-weight: 800;
    color: var(--bg-primary);
    letter-spacing: -0.5px;
}

.site-header__logo span {
    color: var(--bg-secondary);
}

/* ── Search Bar ────────────────────────────────────────────────── */
.search-bar {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: var(--sp-3) var(--sp-4) var(--sp-3) 40px;
    font-size: 14px;
    border: 2px solid var(--bg-gray-200);
    border-radius: var(--radius-full);
    background: var(--bg-gray-100);
    color: var(--bg-black);
    transition: all .2s var(--ease-out);
    outline: none;
}

.search-bar input:focus {
    border-color: var(--bg-primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, .12);
}

.search-bar__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bg-gray-400);
    pointer-events: none;
}

/* ── Category Pills ────────────────────────────────────────────── */
.category-pills {
    display: flex;
    gap: var(--sp-2);
    overflow-x: auto;
    scrollbar-width: none;
    padding: var(--sp-3) 0;
    -webkit-overflow-scrolling: touch;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.category-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-2) var(--sp-4);
    background: var(--bg-white);
    border: 2px solid var(--bg-gray-200);
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 600;
    color: var(--bg-gray-800);
    white-space: nowrap;
    cursor: pointer;
    transition: all .2s var(--ease-out);
    min-width: 80px;
    text-align: center;
}

.category-pill:hover,
.category-pill--active {
    border-color: var(--bg-primary);
    color: var(--bg-primary);
    background: rgba(255, 107, 53, .06);
}

.category-pill__emoji {
    font-size: 22px;
}

/* ── Vendor Grid ───────────────────────────────────────────────── */
.vendor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--sp-5);
    padding: var(--sp-5) 0;
}

.vendor-card {
    position: relative;
}

.vendor-card__badge {
    position: absolute;
    top: var(--sp-3);
    left: var(--sp-3);
    background: var(--bg-accent);
    color: var(--bg-white);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.vendor-card__rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 13px;
}

.vendor-card__rating svg {
    fill: #F59E0B;
    width: 14px;
    height: 14px;
}

.vendor-card__delivery {
    font-size: 12px;
    color: var(--bg-gray-600);
}

/* ── Bottom Nav (Mobile) ───────────────────────────────────────── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: var(--bg-white);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .08);
    padding: var(--sp-2) 0 calc(var(--sp-2) + env(safe-area-inset-bottom, 0px));
}

.bottom-nav__items {
    display: flex;
    justify-content: space-around;
    list-style: none;
}

.bottom-nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--bg-gray-400);
    padding: var(--sp-1) var(--sp-2);
    transition: color .2s;
}

.bottom-nav__link--active,
.bottom-nav__link:hover {
    color: var(--bg-primary);
}

.bottom-nav__link svg {
    width: 22px;
    height: 22px;
}

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-secondary);
    color: rgba(255, 255, 255, .7);
    padding: var(--sp-10) 0 var(--sp-6);
    margin-top: var(--sp-12);
    font-size: 14px;
}

.site-footer a {
    color: rgba(255, 255, 255, .9);
}

.site-footer a:hover {
    color: var(--bg-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--sp-8);
}

.footer-grid h4 {
    color: var(--bg-white);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: var(--sp-4);
}

.footer-grid ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.footer-bottom {
    margin-top: var(--sp-8);
    padding-top: var(--sp-6);
    border-top: 1px solid rgba(255, 255, 255, .1);
    text-align: center;
    font-size: 13px;
}

/* ── Page Sections ─────────────────────────────────────────────── */
.section {
    padding: var(--sp-8) 0;
}

.section__title {
    font-family: var(--font-brand);
    font-size: 22px;
    font-weight: 800;
    color: var(--bg-black);
    margin-bottom: var(--sp-4);
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, #FF8F65 100%);
    color: var(--bg-white);
    padding: var(--sp-10) 0;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    text-align: center;
}

.hero__title {
    font-family: var(--font-brand);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--sp-3);
}

.hero__subtitle {
    font-size: 16px;
    opacity: .9;
    margin-bottom: var(--sp-6);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .bottom-nav {
        display: block;
    }

    body {
        padding-bottom: 64px;
    }

    .site-header__logo {
        font-size: 20px;
    }

    .hero {
        padding: var(--sp-8) 0;
    }

    .hero__title {
        font-size: 22px;
    }

    .hero__subtitle {
        font-size: 14px;
    }

    .section__title {
        font-size: 18px;
    }

    .vendor-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: var(--sp-3);
    }

    .card__body {
        padding: var(--sp-3);
    }

    .card__title {
        font-size: 14px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .vendor-grid {
        grid-template-columns: 1fr;
    }

    .search-bar {
        max-width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ── WooCommerce Overrides ─────────────────────────────────────── */
.woocommerce .button,
.woocommerce button.button {
    background-color: var(--bg-primary) !important;
    color: var(--bg-white) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    border: none !important;
    transition: all .2s var(--ease-out) !important;
}

.woocommerce .button:hover,
.woocommerce button.button:hover {
    background-color: var(--bg-primary-dk) !important;
}

.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--bg-primary) !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--bg-primary) !important;
}

/* Price */
.woocommerce .price .amount {
    color: var(--bg-primary);
    font-weight: 700;
}