@import url('https://fonts.googleapis.com/css?family=Fredoka:400,500,600,700&subset=latin,latin-ext&display=swap');

/* ============================================================
   Big Cookie — Didelis Sausainis  |  Pixel-matched to sketch
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Exact colors from the sketch */
    --bg-main: #f0e8da;
    --bg-section: #ebe3d4;
    --bg-card: #f5efe4;
    --brown-dark: #2c1a0e;
    --brown: #5c3d2e;
    --brown-mid: #8a7260;
    --brown-light: #b8a898;
    --text-dark: #2c1a0e;
    --text-body: #6b5a4a;
    --text-muted: #9a8878;
    --white: #fff;
    --font-display: 'Nunito', 'Playfair Display', Georgia, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --max-w: 1100px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: #f0e6d8 url('../images/background.png') repeat;
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   BUTTON — cookie-brown pill shape matching sketch
   ============================================================ */
.btn {
    display: inline-block;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.25s, box-shadow 0.25s;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn--primary {
    background: linear-gradient(180deg, #f0ca6e 0%, #e6c168 40%, #d4a840 70%, #c28028 100%);
    color: #471b07;
    padding: 0.85rem 2.2rem;
    box-shadow: none;
    text-shadow: none;
}

.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: url('../images/btn-texture.png') repeat;
    background-size: 200px;
    opacity: 0.35;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.btn--primary:hover {
    background: linear-gradient(180deg, #f5d27a 0%, #ebc972 40%, #dab34a 70%, #cc8a32 100%);
    box-shadow: none;
}

.btn--full {
    width: 100%;
    text-align: center;
}

/* ============================================================
   SECTION TITLE — bold serif, dark, centered
   ============================================================ */
.section-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

/* ============================================================
   HERO — matches sketch: text left, huge cookie right
   ============================================================ */
.hero {
    background: #f0e6d8 url('../images/background.png') repeat;
    padding: 3rem 0 2rem 1.5rem;
    overflow: hidden;
}

.hero__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 50% 60%;
    align-items: center;
    gap: 0;
}

.hero__text {
    position: relative;
    z-index: 2;
}

.hero__title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: clamp(2.6rem, 6.5vw, 4.5rem);
    line-height: 1.05;
    color: #3b1a0d;
    margin-bottom: 1rem;
    transform: rotate(-1.5deg);
}

.hero__subtitle {
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    color: var(--text-body);
    margin-bottom: 1.8rem;
    line-height: 1.65;
}

.hero__note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
    font-style: italic;
}

.hero__image {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    overflow: visible;
    margin-left: -10%;
    margin-right: -6rem;
}

.hero__image img {
    width: 140%;
    max-width: none;
    object-fit: contain;
}

h1:focus { outline: none; }


/* ============================================================
   CAROUSEL — NO card bg, just images + text on beige
   ============================================================ */
.carousel-section {
    padding: 3.5rem 1.5rem;
    background: var(--bg-section);
    border-top: 1px solid rgba(0,0,0,0.04);
}

.carousel {
    max-width: var(--max-w);
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.carousel__track {
    display: flex;
    gap: 2.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0;
    flex: 1;
    justify-content: center;
}

.carousel__track::-webkit-scrollbar { display: none; }

.carousel__card {
    flex: 0 0 auto;
    scroll-snap-align: center;
    text-align: center;
    /* NO background, NO card, NO shadow — just image + text */
}

.carousel__card img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    margin: 0 auto 0.7rem;
}

.carousel__name {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-dark);
}

/* Thin circle arrows like in the sketch */
.carousel__arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--brown-light);
    background: transparent;
    color: var(--brown-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.carousel__arrow:hover {
    border-color: var(--brown);
    color: var(--brown);
}

/* ============================================================
   ORDER FORM — box image left, warm card right
   ============================================================ */
.order-section {
    padding: 3.5rem 1.5rem;
    background: var(--bg-main);
}

.order-section__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2.5rem;
}

.order-section__image img {
    width: 100%;
    max-width: 440px;
    object-fit: cover;
}

/* Warm dough-colored card matching sketch */
.order-section__form-card {
    background: #ece0c8;
    border-radius: 20px;
    padding: 2.2rem 2rem;
    box-shadow: 0 4px 20px rgba(44, 26, 14, 0.08);
    border: 1px solid #ddd0b8;
}

.order-section__heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.3rem, 2.8vw, 1.65rem);
    color: var(--text-dark);
    margin-bottom: 0.6rem;
    line-height: 1.25;
}

.order-section__price {
    font-size: 0.9rem;
    color: var(--text-body);
    margin-bottom: 0.15rem;
}

.order-section__price strong {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.05rem;
}

.order-section__label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.order-section__selects {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.order-section__selects select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d5cbb8;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--white);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239a8878' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
}

.order-section__selects select:focus {
    outline: none;
    border-color: var(--brown);
}

.order-section__delivery {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
    justify-content: center;
}

.order-section__delivery svg { flex-shrink: 0; }

/* ============================================================
   POPULAR FLAVORS — big round images
   ============================================================ */
.popular {
    padding: 3.5rem 1.5rem;
    background: var(--bg-section);
    border-top: 1px solid rgba(0,0,0,0.04);
}

.popular__grid {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.popular__item { text-align: center; }

.popular__item img {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 0.8rem;
}

.popular__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* ============================================================
   FOOTER — dark brown bar
   ============================================================ */
.site-footer {
    background: var(--brown-dark);
    color: rgba(255,255,255,0.65);
    padding: 2.5rem 1.5rem;
}

.site-footer__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    text-align: center;
}

.site-footer__brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 0.4rem;
    letter-spacing: 0.04em;
}

.site-footer__contact { font-size: 0.85rem; margin-bottom: 0.8rem; }

.site-footer__social {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.site-footer__link {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
}

.site-footer__link:hover { color: var(--white); }

.site-footer__copy { font-size: 0.72rem; opacity: 0.4; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero__image { order: -1; margin-right: 0; }
    .hero__image img { width: 100%; max-width: 340px; margin: 0 auto; }
    .hero__subtitle br { display: none; }

    .order-section__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .order-section__image { order: -1; }
    .order-section__image img { max-width: 300px; margin: 0 auto; }

    .popular__grid { grid-template-columns: repeat(2, 1fr); }
    .carousel__arrow { display: none; }
}

@media (max-width: 480px) {
    .hero { padding: 1.5rem 1rem; }
    .carousel-section,
    .order-section,
    .popular { padding: 2.5rem 1rem; }
    .popular__grid { gap: 1rem; }
}

/* Blazor error boundary */
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "Įvyko klaida."; }
