:root {
    --lama-orange: #F5A623;
    --lama-orange2: #E8891A;
    --lama-orange3: #D4740F;
    --lama-brown: #2A1A0A;
    --lama-brown2: #4A3728;
    --lama-brown3: #7A6050;
    --lama-cream: #FEF3D8;
    --lama-white55: rgba(255,255,255,0.55);
    --lama-radius: 20px;
    --lama-shadow: 0 4px 18px rgba(74,55,40,0.12);
    --lama-shadow-h: 0 16px 40px rgba(74,55,40,0.22);
    --lama-font: 'Lora', Georgia, serif;
    --lama-display: 'Playfair Display', Georgia, serif;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

#lama-match-page,
#lama-match-page * {
    box-sizing: border-box;
}

#lama-match-page {
    font-family: var(--lama-font);
    overflow-x: hidden;
    background: #FAF5EC;
}

.lama-hero {
    background: linear-gradient(160deg, var(--lama-orange) 0%, var(--lama-orange2) 55%, var(--lama-orange3) 100%);
    position: relative;
    padding: 52px 0 64px;
    overflow: hidden;
}

.lama-hero::before,
.lama-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.lama-hero::before {
    top: -120px;
    right: -120px;
    width: 420px;
    height: 420px;
    background: rgba(255,255,255,0.07);
}

.lama-hero::after {
    bottom: -100px;
    left: -100px;
    width: 320px;
    height: 320px;
    background: rgba(255,255,255,0.05);
}

.lama-hero__inner,
.lama-results__inner,
.lama-helpful-copy__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.lama-badge {
    display: inline-block;
    background: rgba(42,26,10,0.15);
    border-radius: 30px;
    padding: 5px 16px;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--lama-brown);
    text-transform: uppercase;
}

.lama-h1 {
    font-family: var(--lama-display) !important;
    font-size: clamp(32px, 5.2vw, 58px) !important;
    font-weight: 900 !important;
    color: var(--lama-brown) !important;
    line-height: 1.08 !important;
    margin: 0 0 12px !important;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.lama-h2 {
    font-family: var(--lama-font) !important;
    font-size: clamp(15px, 2.3vw, 20px) !important;
    font-weight: 400 !important;
    font-style: italic !important;
    color: #4A3A28 !important;
    max-width: 700px;
    margin: 0 auto 10px !important;
    line-height: 1.6 !important;
    text-align: center;
}

.lama-desc {
    font-size: 14px;
    color: rgba(42,26,10,0.7);
    max-width: 520px;
    margin: 0 auto 18px;
    line-height: 1.6;
    font-style: italic;
    text-align: center;
}

#llama-sticky {
    position: fixed;
    right: max(16px, calc(50% - 480px - 150px));
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    z-index: 999;
    pointer-events: none;
    transition: width 0.25s ease, opacity 0.25s ease, transform 0.25s ease, top 0.25s ease;
    filter: drop-shadow(0 10px 28px rgba(74,55,40,0.24));
}

#llama-sticky.is-scrolled {
    opacity: 0.98;
}

#llama-sticky svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

#llama-bubble {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--lama-brown);
    color: var(--lama-cream);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.22s ease, background 0.22s ease;
    font-family: var(--lama-font);
    text-align: center;
}

#llama-bubble.visible {
    opacity: 1;
}

#llama-inline {
    display: none !important;
}

#speech-bubble {
    text-align: center;
    margin-bottom: 16px;
    display: none;
    animation: lamaFadeIn 0.3s ease;
}

.bubble-inner {
    display: inline-block;
    background: rgba(255,255,255,0.94);
    border-radius: 18px;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--lama-brown2);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(74,55,40,0.14);
    position: relative;
}

.bubble-inner::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-bottom-color: rgba(255,255,255,0.94);
    border-top: none;
}

#symptoms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.symptom-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 118px;
    padding: 16px 10px;
    border-radius: 18px;
    border: 2px solid rgba(255,255,255,0.45);
    background: var(--lama-white55);
    color: var(--lama-brown);
    cursor: pointer;
    font-family: var(--lama-font);
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: lamaCardIn 0.4s ease both;
    position: relative;
    overflow: hidden;
}

.symptom-btn:hover {
    transform: scale(1.04) translateY(-2px);
    background: rgba(255,255,255,0.75);
    box-shadow: 0 6px 18px rgba(42,26,10,0.15);
}

.symptom-btn.selected {
    background: var(--lama-brown);
    color: var(--lama-cream);
    border-color: var(--lama-brown);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(42,26,10,0.3);
}

.symptom-btn.selected::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 100%);
}

.symptom-icon {
    font-size: 23px;
    line-height: 1;
}

.symptom-label {
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.28;
    letter-spacing: 0.2px;
}

.symptom-check {
    font-size: 10px;
    background: var(--lama-orange);
    color: var(--lama-brown);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.symptom-btn.selected .symptom-check {
    display: flex;
}

.lama-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 28px;
}

#search-btn,
#reset-btn {
    border-radius: 999px;
    border: none;
    transition: all 0.24s ease;
}

#search-btn {
    padding: 17px 42px;
    background: rgba(42,26,10,0.28);
    color: var(--lama-cream);
    font-size: 16px;
    font-weight: 700;
    font-family: var(--lama-display);
    cursor: not-allowed;
    letter-spacing: 0.4px;
}

#search-btn.active {
    background: var(--lama-brown);
    cursor: pointer;
    box-shadow: 0 8px 26px rgba(42,26,10,0.32);
}

#search-btn.active:hover {
    transform: scale(1.04) translateY(-2px);
    box-shadow: 0 12px 32px rgba(42,26,10,0.42);
}

#search-btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(254,243,216,0.3);
    border-top-color: var(--lama-cream);
    border-radius: 50%;
    display: inline-block;
    animation: lamaSpin 0.75s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

#reset-btn {
    padding: 16px 24px;
    border: 2px solid rgba(42,26,10,0.25);
    background: transparent;
    color: var(--lama-brown);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--lama-font);
    align-items: center;
    justify-content: center;
}

#reset-btn:hover {
    background: rgba(255,255,255,0.28);
}

#lama-results {
    background: #FAF5EC;
    padding: 58px 0 34px;
}

.results-header {
    text-align: center;
    margin-bottom: 32px;
    animation: lamaFadeIn 0.4s ease;
}

#results-title {
    font-family: var(--lama-display);
    font-size: clamp(24px, 4vw, 36px);
    color: var(--lama-brown);
    margin: 0 0 8px;
}

#results-subtitle {
    font-style: italic;
    color: var(--lama-brown2);
    font-size: 15px;
    margin: 0;
}

#articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.lama-article-card,
.lama-product-card {
    text-decoration: none !important;
    color: inherit !important;
}

.lama-article-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--lama-radius);
    overflow: hidden;
    box-shadow: var(--lama-shadow);
    transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: lamaCardIn 0.45s ease both;
}

.lama-article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--lama-shadow-h);
}

.card-img {
    height: 170px;
    background: linear-gradient(135deg, var(--lama-orange), var(--lama-orange3));
    position: relative;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.lama-article-card:hover .card-img img {
    transform: scale(1.05);
}

.card-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.3;
}

.card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--lama-brown);
    color: var(--lama-cream);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.card-img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, rgba(0,0,0,0.15));
}

.card-body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-date {
    font-size: 11px;
    color: var(--lama-brown3);
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--lama-brown);
    line-height: 1.35;
}

.card-excerpt {
    font-size: 14px;
    color: var(--lama-brown3);
    line-height: 1.62;
    flex: 1;
    margin: 0;
}

.card-match {
    font-size: 12px;
    line-height: 1.45;
    color: var(--lama-brown2);
    background: #FFF5DF;
    border-radius: 12px;
    padding: 7px 10px;
}

.card-read {
    font-size: 13px;
    color: var(--lama-orange3);
    font-weight: 700;
    margin-top: 2px;
}

.products-section {
    margin-top: 50px;
}

.products-section__header {
    text-align: center;
    margin-bottom: 24px;
}

.products-badge {
    display: inline-block;
    background: var(--lama-brown);
    color: var(--lama-cream);
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.products-section__header h4 {
    font-family: var(--lama-display);
    font-size: clamp(18px, 3vw, 26px);
    color: var(--lama-brown);
    margin: 0;
}

#products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.lama-product-card {
    background: white;
    border-radius: var(--lama-radius);
    overflow: hidden;
    box-shadow: var(--lama-shadow);
    border: 2px solid transparent;
    transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: lamaCardIn 0.45s ease both;
    display: flex;
    flex-direction: column;
}

.lama-product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--lama-shadow-h);
    border-color: var(--lama-orange);
}

.product-img {
    height: 140px;
    background: var(--lama-cream);
    position: relative;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.product-body {
    padding: 14px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--lama-brown);
    line-height: 1.3;
}

.product-short {
    font-size: 12px;
    color: var(--lama-brown3);
    line-height: 1.5;
    flex: 1;
    margin: 0;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--lama-orange3);
    margin-top: 4px;
}

.product-btn {
    display: block;
    text-align: center;
    background: var(--lama-brown);
    color: var(--lama-cream);
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 8px;
}

.lama-empty {
    grid-column: 1 / -1;
    text-align: center;
    background: rgba(255,255,255,0.7);
    border-radius: var(--lama-radius);
    padding: 42px 20px;
}

.lama-empty .emoji {
    font-size: 48px;
    margin-bottom: 12px;
}

.lama-empty p {
    color: var(--lama-brown2);
    font-size: 15px;
    font-style: italic;
    margin: 0;
}

.lama-helpful-copy {
    background: #FAF5EC;
    padding: 8px 0 32px;
}

.lama-helpful-copy__inner {
    background: rgba(255,255,255,0.62);
    border: 1px solid rgba(42,26,10,0.08);
    border-radius: 20px;
    padding: 22px;
}

.lama-helpful-copy h3 {
    font-family: var(--lama-display);
    color: var(--lama-brown);
    margin: 0 0 8px;
    font-size: 24px;
}

.lama-helpful-copy p {
    color: var(--lama-brown2);
    line-height: 1.7;
    margin: 0;
    font-size: 14px;
}

.lama-disclaimer {
    text-align: center;
    font-size: 11px;
    color: rgba(42,26,10,0.56);
    padding: 18px 20px 26px;
    font-style: italic;
    background: #FAF5EC;
    font-family: var(--lama-font);
}

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

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

@keyframes lamaSpin {
    to { transform: rotate(360deg); }
}

@keyframes llamaFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes llamaBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-4px) rotate(-2deg); }
    75% { transform: translateY(-4px) rotate(2deg); }
}

@keyframes llamaWiggle {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(-7deg); }
    40% { transform: rotate(7deg); }
    60% { transform: rotate(-4deg); }
    80% { transform: rotate(4deg); }
    100% { transform: rotate(0deg); }
}

@keyframes llamaSparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes llamaBlink {
    0%, 88%, 100% { transform: scaleY(1); }
    94% { transform: scaleY(0.08); }
}

@keyframes llamaSweat {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

@media (max-width: 1120px) {
    #llama-sticky {
        right: 14px;
    }
}

@media (max-width: 960px) {
    .lama-hero {
        padding-top: 130px;
        padding-bottom: 56px;
    }

    #llama-sticky {
        position: fixed;
        top: 20px;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translateX(-50%);
        width: 86px;
        z-index: 999;
        opacity: 1;
        pointer-events: none;
        transition: top 0.25s ease, width 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
    }

    #llama-sticky.is-mobile {
        width: 86px;
    }

    #llama-sticky.is-mobile.is-scrolled {
        width: 76px;
        opacity: 0.98;
    }

    #llama-bubble {
        top: calc(100% + 4px);
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: auto;
        font-size: 10px;
        padding: 4px 10px;
        max-width: 150px;
        white-space: normal;
        text-align: center;
    }

    #symptoms-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .symptom-btn {
        min-height: 108px;
        padding: 14px 8px;
    }

    .symptom-label {
        font-size: 12px;
    }
}

@media (max-width: 720px) {
    #articles-grid,
    #products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .lama-hero__inner,
    .lama-results__inner,
    .lama-helpful-copy__inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .lama-badge {
        display: table;
        margin-left: auto;
        margin-right: auto;
    }

    .lama-desc {
        margin-bottom: 14px;
    }

    #symptoms-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .symptom-btn {
        min-height: 100px;
        border-radius: 16px;
    }

    .symptom-icon {
        font-size: 21px;
    }

    .symptom-label {
        font-size: 11px;
        line-height: 1.22;
    }

    #search-btn,
    #reset-btn {
        width: 100%;
        justify-content: center;
    }

    .lama-cta {
        flex-direction: column;
        align-items: stretch;
    }

    #llama-sticky {
        width: 74px;
        left: 50%;
        right: auto;
        top: 20px;
        bottom: auto;
        transform: translateX(-50%);
    }

    #llama-sticky.is-mobile.is-scrolled {
        width: 68px;
    }

    #llama-bubble {
        top: calc(100% + 4px);
        bottom: auto;
    }
}