/* ═══════════════════════════════════════════════════════
   YeşilSepet — Homepage Styles (Green Transformation)
   ═══════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    --green-900: #1a3a15;
    --green-800: #2D5A27;
    --green-700: #357a2e;
    --green-600: #3d8b34;
    --green-500: #4CAF50;
    --green-400: #66BB6A;
    --green-300: #81C784;
    --green-200: #A5D6A7;
    --green-100: #C8E6C9;
    --green-50:  #E8F5E9;
    --amber-500: #FF9800;
    --amber-400: #FFB74D;
    --red-500:   #EF5350;
    --dark-900:  #0d1f0b;
    --dark-800:  #1a2e17;
    --glass-bg:  rgba(255,255,255,0.08);
    --glass-border: rgba(255,255,255,0.15);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
}

/* ── Reset Extras ── */
*, *::before, *::after { box-sizing: border-box; }

body.ys-home {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: #f0fdf4;
    color: #1e293b;
    overflow-x: hidden;
}

/* ── Scrollbar ── */
body.ys-home::-webkit-scrollbar { width: 8px; }
body.ys-home::-webkit-scrollbar-track { background: var(--green-50); }
body.ys-home::-webkit-scrollbar-thumb { background: var(--green-400); border-radius: 4px; }

/* ═══════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════ */
.ys-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(26, 58, 21, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
}

.ys-navbar.scrolled {
    background: rgba(13, 31, 11, 0.95);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.ys-navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.ys-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.ys-brand-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(76, 175, 80, 0.6));
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(76, 175, 80, 0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(76, 175, 80, 0.8)); }
}

.ys-nav-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.ys-nav-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.ys-nav-btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.4);
    color: #fff;
}
.ys-nav-btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    transform: translateY(-1px);
}

.ys-nav-btn-solid {
    background: linear-gradient(135deg, var(--green-500), var(--green-400));
    color: #fff;
    box-shadow: 0 4px 15px rgba(76,175,80,0.3);
}
.ys-nav-btn-solid:hover {
    background: linear-gradient(135deg, var(--green-400), var(--green-300));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76,175,80,0.4);
}

.ys-nav-user {
    color: var(--green-200);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ═══════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════ */
.ys-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ys-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ys-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35) saturate(1.2);
}

.ys-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(13,31,11,0.5) 0%,
        rgba(26,58,21,0.3) 40%,
        rgba(45,90,39,0.4) 70%,
        rgba(13,31,11,0.7) 100%
    );
    z-index: 1;
}

.ys-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 900px;
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ys-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    background: rgba(76,175,80,0.15);
    border: 1px solid rgba(76,175,80,0.3);
    color: var(--green-300);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    letter-spacing: 0.02em;
}

.ys-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 1.2rem;
    letter-spacing: -0.03em;
}

.ys-hero h1 .accent {
    background: linear-gradient(135deg, var(--green-400), var(--amber-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ys-hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Impact Counter ── */
.ys-impact-counter {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.ys-impact-card {
    background: linear-gradient(135deg, rgba(34, 90, 40, 0.55), rgba(20, 55, 25, 0.65));
    border: 2px solid rgba(76, 175, 80, 0.55);
    border-radius: 28px;
    padding: 2.8rem 4rem;
    min-width: 320px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(76,175,80,0.15);
}

.ys-impact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(76,175,80,0.18), transparent 60%);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.ys-impact-card:hover {
    transform: translateY(-6px);
    border-color: rgba(76,175,80,0.7);
    box-shadow: 0 24px 48px rgba(0,0,0,0.4), 0 0 40px rgba(76,175,80,0.2);
}
.ys-impact-card:hover::before { opacity: 1; }

.ys-impact-icon {
    font-size: 3.2rem;
    margin-bottom: 0.75rem;
    display: block;
    filter: drop-shadow(0 0 12px rgba(76,175,80,0.6));
}

.ys-impact-value {
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 16px rgba(76,175,80,0.4);
}

.ys-impact-value .unit {
    font-size: 1.4rem;
    font-weight: 600;
    color: #86efac;
    margin-left: 0.35rem;
}

.ys-impact-label {
    font-size: 1rem;
    color: rgba(255,255,255,0.75);
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

/* Hero CTA */
.ys-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ys-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--green-500), var(--green-400));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(76,175,80,0.3);
}
.ys-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(76,175,80,0.4);
}

.ys-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 1.5px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}
.ys-btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

/* ── Scroll indicator ── */
.ys-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s ease-in-out infinite;
}
.ys-scroll-indicator span {
    display: block;
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    position: relative;
}
.ys-scroll-indicator span::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    background: var(--green-400);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-dot 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}
@keyframes scroll-dot {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ═══════════════════════════════════════
   SECTION LAYOUT
   ═══════════════════════════════════════ */
.ys-section {
    padding: 5rem 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
}

.ys-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.ys-section-tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    background: var(--green-100);
    color: var(--green-800);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.ys-section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--green-900);
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.ys-section-desc {
    font-size: 1.05rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ═══════════════════════════════════════
   STORE CARDS
   ═══════════════════════════════════════ */
.ys-stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ys-store-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.ys-store-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green-500), var(--green-300));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.ys-store-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--green-200);
}
.ys-store-card:hover::before { transform: scaleX(1); }

.ys-store-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.ys-store-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.ys-store-icon.market    { background: #e8f5e9; }
.ys-store-icon.bakery    { background: #fff3e0; }
.ys-store-icon.restaurant{ background: #fce4ec; }
.ys-store-icon.grocery   { background: #e8f5e9; }

.ys-store-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.2rem;
}

.ys-store-type {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.ys-store-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    color: #64748b;
}

.ys-store-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ys-store-btn {
    width: 100%;
    padding: 0.7rem;
    border-radius: 12px;
    border: 1.5px solid var(--green-500);
    background: transparent;
    color: var(--green-700);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: block;
    text-decoration: none;
}
.ys-store-btn:hover {
    background: var(--green-500);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76,175,80,0.3);
}

.ys-stores-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
    font-size: 1.05rem;
}

/* ═══════════════════════════════════════
   PRODUCT CARDS
   ═══════════════════════════════════════ */
.ys-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
}

.ys-product-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}
.ys-product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--green-200);
}

.ys-product-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--green-50), #f0fdf4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ys-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ys-product-image .placeholder-icon {
    font-size: 4rem;
    opacity: 0.3;
}

/* Badges on product image */
.ys-product-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.ys-badge-discount {
    background: var(--red-500);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
}

.ys-badge-co2 {
    background: rgba(45,90,39,0.9);
    color: var(--green-200);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(8px);
}

.ys-product-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ys-product-seller {
    font-size: 0.75rem;
    color: var(--green-600);
    font-weight: 600;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ys-product-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.ys-product-pricing {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.ys-price-current {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--green-700);
}

.ys-price-original {
    font-size: 0.9rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.ys-product-stock {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ys-stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}
.ys-stock-dot.low  { background: var(--amber-500); animation: blink 1.2s ease-in-out infinite; }
.ys-stock-dot.ok   { background: var(--green-500); }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%  { opacity: 0.3; }
}

.ys-product-footer { margin-top: auto; }

.ys-add-cart-btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--green-600), var(--green-500));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.ys-add-cart-btn:hover {
    background: linear-gradient(135deg, var(--green-500), var(--green-400));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76,175,80,0.3);
}
.ys-add-cart-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.ys-add-cart-btn.success {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.ys-products-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
    font-size: 1.05rem;
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.ys-footer {
    background: var(--dark-900);
    color: rgba(255,255,255,0.6);
    padding: 3rem 1.5rem 1.5rem;
}

.ys-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.ys-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.ys-footer-links {
    display: flex;
    gap: 1.5rem;
}
.ys-footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.ys-footer-links a:hover { color: var(--green-400); }

.ys-footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.8rem;
}

/* ═══════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════ */
.ys-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    padding: 1rem 1.5rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 360px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.ys-toast.show {
    transform: translateY(0);
    opacity: 1;
}
.ys-toast.success {
    background: linear-gradient(135deg, var(--green-600), var(--green-500));
    color: #fff;
}
.ys-toast.error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .ys-navbar-inner { height: 60px; padding: 0 1rem; }
    .ys-brand { font-size: 1.2rem; }
    .ys-nav-btn { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

    .ys-hero-content { padding: 1.5rem 1rem; }
    .ys-hero h1 { font-size: 1.8rem; }
    .ys-hero-subtitle { font-size: 0.95rem; }

    .ys-impact-counter { flex-direction: column; align-items: center; }
    .ys-impact-card { min-width: 220px; padding: 1.6rem 2.2rem; }
    .ys-impact-value { font-size: 2.6rem; }

    .ys-section { padding: 3rem 1rem; }

    .ys-stores-grid,
    .ys-products-grid {
        grid-template-columns: 1fr;
    }

    .ys-hero-cta { flex-direction: column; align-items: center; }

    .ys-footer-inner { flex-direction: column; text-align: center; }
    .ys-footer-links { justify-content: center; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .ys-stores-grid,
    .ys-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Fade-in animation for sections ── */
.ys-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.ys-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
