/* ==========================================================================
   MAIN STYLES - Göreme Künefecisi
   Requires theme.css loaded before this file.
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    background:
        radial-gradient(circle at 15% 10%, var(--radial-1), transparent 40%),
        radial-gradient(circle at 85% 90%, var(--radial-2), transparent 45%),
        var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background 0.4s ease, color 0.4s ease;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.8rem 2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}
.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--logo-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: 2px;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.language-switch {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    background: rgba(139, 90, 43, 0.18);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}
.language-switch:hover {
    background: rgba(139, 90, 43, 0.35);
    border-color: var(--border-hover);
}
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-light);
    background: rgba(139, 90, 43, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    font: inherit;
}
.theme-toggle:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 90, 43, 0.35);
    color: #fff;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
.lang-option { transition: opacity 0.3s; }
.lang-option.active { font-weight: 700; color: var(--primary-light); }
.lang-separator { opacity: 0.5; margin: 0 2px; }

/* ========== HERO ========== */
.hero {
    padding: 8rem 2rem 3rem;
    text-align: center;
    background: linear-gradient(180deg, var(--hero-grad-start) 0%, var(--hero-grad-end) 100%);
    position: relative;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 6px;
    background: var(--hero-title-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 30px rgba(201, 162, 103, 0.15);
}
.hero h1::before,
.hero h1::after {
    content: '\2756';
    color: var(--accent);
    font-size: 0.9rem;
    opacity: 0.6;
    margin: 0 0.8rem;
    vertical-align: middle;
    -webkit-text-fill-color: var(--accent);
}
.hero p {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
}
.hero-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-warm), var(--primary));
    padding: 3px;
    box-shadow: 0 8px 32px rgba(201, 162, 103, 0.28), inset 0 0 0 1px rgba(245, 230, 211, 0.2);
    animation: pulse 2s ease-in-out infinite;
    overflow: hidden;
    position: relative;
}
.hero-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.15);
    display: block;
    border: none;
    margin: 0;
    padding: 0;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(201, 162, 103, 0.28); }
    50% { box-shadow: 0 8px 48px rgba(212, 165, 116, 0.5); }
}

/* ========== SEARCH ========== */
.search-section {
    max-width: 600px;
    margin: -1.5rem auto 0;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}
.search-container {
    display: flex;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color 0.3s;
}
.search-container:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 30px rgba(212, 165, 116, 0.15);
}
.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    outline: none;
}
.search-input::placeholder { color: var(--placeholder-color); }
.search-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s;
}
.search-btn:hover { color: var(--primary-light); }

/* ========== CATEGORY NAVIGATION ========== */
.category-nav {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1.5rem;
}
.category-pills {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}
.category-pill {
    padding: 0.6rem 1.4rem;
    border-radius: 25px;
    background: rgba(139, 90, 43, 0.15);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
}
.category-pill:hover, .category-pill.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 90, 43, 0.45);
}

/* ========== CATEGORY CARDS (TOP GRID) ========== */
.categories-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 0.5rem;
}
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}
.category-card {
    flex: 0 0 calc((100% - 3 * 1.5rem) / 4);
    max-width: calc((100% - 3 * 1.5rem) / 4);
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem 1.2rem;
    text-decoration: none;
    color: var(--text-light);
    text-align: center;
    transition: transform 0.35s cubic-bezier(.4,2,.6,1), border-color 0.3s ease, box-shadow 0.35s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.category-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(201, 162, 103, 0.18);
}
.category-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--image-bg-start), var(--image-bg-end));
}
.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}
.category-card:hover .category-card-image img {
    transform: scale(1.05);
}
.category-card-image--empty {
    background:
        radial-gradient(circle at center, rgba(201, 162, 103, 0.08), transparent 65%),
        linear-gradient(135deg, var(--image-bg-start), var(--image-bg-end));
}
.category-card-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
}

/* ========== MENU SECTIONS ========== */
.menu-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}
.menu-category {
    margin-bottom: 3rem;
}
.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--border);
}
.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.category-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-light);
}
.category-name-en {
    font-size: 0.85rem;
    color: var(--text-desc);
    font-weight: 400;
    font-family: 'Poppins', sans-serif;
}

/* ========== PRODUCT CARDS ========== */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

body.searching #search-results { display: grid; }
#search-results:empty { display: none; }
.product-item {
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(.4,2,.6,1), box-shadow 0.35s ease, border-color 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    position: relative;
}
.product-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(201, 162, 103, 0.35), transparent 40%, transparent 60%, rgba(139, 90, 43, 0.25));
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
}
.product-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(201, 162, 103, 0.35);
    border-color: var(--border-hover);
}
.product-item:hover .product-image img {
    transform: scale(1.08);
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, var(--image-bg-start), var(--image-bg-end));
    position: relative;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(.4,2,.6,1);
}
.product-image.no-image-fallback img {
    object-fit: contain !important;
}
.product-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, var(--image-overlay) 100%);
    pointer-events: none;
}
.product-image.no-image,
.product-image.no-image-fallback {
    background:
        radial-gradient(circle at center, rgba(201, 162, 103, 0.15), transparent 65%),
        linear-gradient(135deg, var(--image-bg-start), var(--image-bg-end));
}
.product-image--empty {
    background:
        radial-gradient(circle at center, rgba(201, 162, 103, 0.08), transparent 65%),
        linear-gradient(135deg, var(--image-bg-start), var(--image-bg-end));
}
.product-image--empty::after {
    display: none;
}
.product-image.no-image-fallback img {
    object-fit: contain;
    padding: 22%;
    transform: none !important;
}
.product-image.no-image-fallback::after { display: none; }
.product-details {
    padding: 1.1rem 1.2rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.3;
    letter-spacing: 0.3px;
}
.product-desc {
    font-size: 0.85rem;
    color: var(--text-desc);
    line-height: 1.55;
    flex: 1;
}

.product-pricing {
    display: block;
    margin-top: 0.4rem;
}
.product-price {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: transform 0.3s ease, color 0.3s ease;
}
.product-item:hover .product-price {
    transform: scale(1.05);
    color: var(--text-light);
    transform-origin: left center;
}

.sold-out-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #E07A5F;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.35rem 0.8rem;
    background: rgba(224, 122, 95, 0.12);
    border: 1px solid rgba(224, 122, 95, 0.35);
    border-radius: 20px;
}

.size-prices {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.size-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.3;
    min-width: 82px;
}
.size-tag.small-tag {
    background: rgba(139, 90, 43, 0.28);
    border: 1px solid rgba(201, 162, 103, 0.4);
}
.size-tag.large-tag {
    background: rgba(232, 184, 125, 0.18);
    border: 1px solid rgba(232, 184, 125, 0.45);
}
.size-label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 0.18rem;
}
.size-price {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary-light);
}
.size-tag.large-tag .size-price {
    color: var(--accent-warm);
}

.product-item.out-of-stock .product-image img,
.product-item.out-of-stock .product-name,
.product-item.out-of-stock .product-desc {
    opacity: 0.55;
    filter: grayscale(0.3);
}

/* ========== NO RESULTS ========== */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    display: none;
}
.no-results.show { display: block; }
.no-results p { font-size: 1.1rem; opacity: 0.6; }

/* ========== SOCIAL BUTTONS ========== */
.social-float {
    position: fixed;
    bottom: 2rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    z-index: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.social-float:hover {
    transform: translateY(-4px) scale(1.1);
}
.social-float svg { width: 26px; height: 26px; }
.instagram-float {
    right: 2rem;
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}
.whatsapp-float {
    right: 2rem;
    bottom: 5.5rem;
    background: #25D366;
}

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(139, 90, 43, 0.75);
    border: 1px solid var(--border);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 500;
    backdrop-filter: blur(10px);
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: var(--primary);
    transform: translateY(-3px);
}
.back-to-top svg { width: 20px; height: 20px; fill: currentColor; }

/* ========== FOOTER ========== */
.footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
}
body.content-ready .footer {
    opacity: 1;
}
.footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 0.3rem;
}
.footer-desc {
    color: var(--text-desc);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}
.footer-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    margin: 0 auto 1rem;
    border-radius: 1px;
}
.footer-credits {
    font-size: 0.8rem;
    color: var(--text-desc);
    opacity: 0.7;
}
.footer-credits span { font-weight: 600; color: var(--text-muted); }
.footer-credits a {
    color: var(--primary-light);
    text-decoration: none;
}
.footer-credits a:hover { text-decoration: underline; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header { padding: 0.7rem 1rem; }
    .logo { font-size: 1.2rem; }
    .header-right { gap: 0.5rem; }
    .theme-toggle { width: 36px; height: 36px; }
    .theme-toggle svg { width: 16px; height: 16px; }
    .language-switch {
        height: 36px;
        padding: 0 0.7rem;
        font-size: 0.75rem;
        line-height: 1;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        gap: 3px;
    }
    .lang-separator { margin: 0; }
    .hero { padding: 7rem 1rem 2.5rem; }
    .hero h1 { font-size: 2rem; letter-spacing: 3px; }
    .hero p { font-size: 0.85rem; letter-spacing: 2px; }
    .hero-logo { width: 100px; height: 100px; }
    .search-section { margin-top: -1rem; }
    .search-input { padding: 0.8rem 1.2rem; font-size: 0.9rem; }
    .category-nav { padding: 1rem 0.5rem; }
    .category-pills {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.6rem;
    }
    .category-pill {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    .menu-content { padding: 1.5rem 1rem 3rem; }
    .category-name { font-size: 1.3rem; }
    .categories-section { padding: 1.5rem 1rem 0.25rem; }
    .categories-grid { gap: 0.9rem; }
    .category-card {
        flex: 0 0 calc((100% - 0.9rem) / 2);
        max-width: calc((100% - 0.9rem) / 2);
        padding: 0.9rem 0.7rem;
        border-radius: 14px;
    }
    .category-card-image { border-radius: 10px; margin-bottom: 0.7rem; }
    .category-card-name { font-size: 0.95rem; }
    .product-list { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .product-details { padding: 0.9rem 1rem 1rem; }
    .product-name { font-size: 1.05rem; }
    .product-desc { font-size: 0.8rem; }
    .product-price { font-size: 1.25rem; }
    .social-float { width: 46px; height: 46px; }
    .social-float svg { width: 22px; height: 22px; }
    .instagram-float { right: 1rem; bottom: 1.5rem; }
    .whatsapp-float { right: 1rem; bottom: 4.5rem; }
    .back-to-top { left: 1rem; bottom: 1.5rem; width: 40px; height: 40px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.7rem; }
    .categories-grid { gap: 0.7rem; }
    .category-card {
        flex: 0 0 calc((100% - 0.7rem) / 2);
        max-width: calc((100% - 0.7rem) / 2);
        padding: 0.7rem 0.5rem;
    }
    .category-card-name { font-size: 0.85rem; }
    .product-list { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .product-details { padding: 0.7rem 0.8rem 0.9rem; }
    .product-name { font-size: 0.95rem; }
    .product-price { font-size: 1.1rem; }
    .size-prices { gap: 0.4rem; }
    .size-tag { padding: 0.3rem 0.6rem; font-size: 0.7rem; min-width: 55px; }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.menu-category {
    animation: fadeInUp 0.5s ease forwards;
}
