:root {
    --wood-dark: #3a220d;
    --wood-base: #834f22;
    --wood-light: #b47541;
    --paper-base: #f7e6c4;
    --paper-dark: #d5bd9b;
    --text-color: #3b2814;
    --btn-green: #4caf50;
    --btn-green-hover: #45a049;
    --btn-border: #1a3c1c;
    --border-width: 4px;
}

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

body {
    background-color: #557153; /* Grassy valley green */
    background-image: radial-gradient(#6c8b6a 15%, transparent 16%), radial-gradient(#6c8b6a 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    font-family: 'VT323', monospace;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

.pixel-text {
    font-family: 'Pixelify Sans', sans-serif;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.4);
}

.container {
    max-width: 800px;
    width: 90%;
    margin: 40px auto;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* --- Wooden Boards --- */
.wooden-board {
    background-color: var(--wood-base);
    border: var(--border-width) solid var(--wood-dark);
    box-shadow: 
        inset 4px 4px 0 var(--wood-light),
        inset -4px -4px 0 var(--wood-dark),
        6px 6px 0 rgba(0,0,0,0.3);
    position: relative;
    padding: 20px;
}

.wooden-board::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 12px;
    height: 12px;
    background: #111;
    border-radius: 50%;
    box-shadow: calc(100% - 24px) 0 0 #111; /* Right top nail */
}

/* --- Header Section --- */
.main-header {
    text-align: center;
    padding-top: 30px;
    padding-bottom: 20px;
    border-radius: 4px;
}

.logo-container {
    width: 160px;
    height: 160px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: var(--paper-base);
    border: 4px solid var(--wood-dark);
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.store-title {
    color: #fff;
    font-size: 2.8rem;
    text-shadow: 2px 2px 0 var(--wood-dark), -2px -2px 0 var(--wood-dark), 2px -2px 0 var(--wood-dark), -2px 2px 0 var(--wood-dark);
    margin-bottom: 10px;
}

.subtitle {
    color: #ffecd2;
    font-size: 1.4rem;
    font-family: 'VT323', monospace;
    text-shadow: 1px 1px 0 #000;
}

/* --- Main Content (Menu Board) --- */
.menu-board {
    background-color: var(--wood-base);
    border: var(--border-width) solid var(--wood-dark);
    box-shadow: 
        inset 4px 4px 0 var(--wood-light),
        inset -4px -4px 0 var(--wood-dark),
        6px 6px 0 rgba(0,0,0,0.3);
    padding: 16px;
    border-radius: 4px;
}

.paper-inner {
    background-color: var(--paper-base);
    border: 3px solid var(--paper-dark);
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.welcome-title {
    font-size: 2.2rem;
    color: #8B4513; /* SaddleBrown */
    margin-bottom: 15px;
    text-shadow: none;
}

.description {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--text-color);
    font-family: 'VT323', monospace;
    text-shadow: none;
}

/* --- Shop Item Grid --- */
.catalog-shell {
    margin: 28px 0 12px;
    padding: 18px;
    border: 3px solid var(--wood-base);
    background:
        linear-gradient(180deg, rgba(255, 250, 239, 0.95), rgba(234, 214, 176, 0.95));
    box-shadow:
        inset 0 0 0 3px rgba(255, 255, 255, 0.35),
        0 4px 0 rgba(58, 34, 13, 0.18);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    text-align: left;
}

.section-kicker {
    font-size: 0.95rem;
    text-transform: uppercase;
    color: #8e5d2f;
    text-shadow: none;
}

.section-title {
    font-size: 1.9rem;
    color: #5c3513;
    text-shadow: none;
}

.section-badge {
    flex-shrink: 0;
    padding: 8px 12px;
    color: #fff9e7;
    background: #6c8543;
    border: 3px solid #304212;
    box-shadow: inset 2px 2px 0 rgba(255,255,255,0.25);
    text-shadow: none;
}

.shop-status {
    min-height: 30px;
    margin-bottom: 16px;
    padding: 10px 12px;
    color: #5c3513;
    background: rgba(255, 255, 255, 0.42);
    border: 2px dashed rgba(92, 53, 19, 0.35);
    font-size: 1rem;
    text-shadow: none;
}

.shop-status.is-error {
    color: #7a2f20;
    background: rgba(255, 232, 226, 0.9);
    border-color: rgba(122, 47, 32, 0.35);
}

.shop-status.is-success {
    color: #385321;
    background: rgba(241, 251, 231, 0.95);
    border-color: rgba(56, 83, 33, 0.35);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.listing-card {
    width: 100%;
    background:
        linear-gradient(180deg, #fbf1d6 0%, #ecd2a5 100%);
    border: 3px solid var(--wood-base);
    box-shadow: 
        inset 3px 3px 0 rgba(0,0,0,0.1),
        inset -3px -3px 0 rgba(255,255,255,0.4),
        4px 4px 0 rgba(58, 34, 13, 0.22);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow:
        inset 3px 3px 0 rgba(0,0,0,0.1),
        inset -3px -3px 0 rgba(255,255,255,0.4),
        6px 6px 0 rgba(58, 34, 13, 0.28);
}

.listing-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.listing-art-frame {
    position: relative;
    aspect-ratio: 1 / 1;
    padding: 12px;
    background:
        linear-gradient(180deg, rgba(124, 164, 96, 0.22), rgba(255,255,255,0.2)),
        repeating-linear-gradient(
            45deg,
            rgba(255,255,255,0.12),
            rgba(255,255,255,0.12) 8px,
            rgba(255,255,255,0.02) 8px,
            rgba(255,255,255,0.02) 16px
        );
    border-bottom: 3px solid rgba(131, 79, 34, 0.55);
}

.listing-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid rgba(58, 34, 13, 0.25);
    background: rgba(255,255,255,0.5);
}

.listing-sparkle {
    position: absolute;
    top: 8px;
    right: 10px;
    color: #fff7c4;
    text-shadow:
        0 0 8px rgba(255, 230, 117, 0.85),
        1px 1px 0 rgba(58, 34, 13, 0.35);
    animation: twinkle 2.6s ease-in-out infinite;
}

.listing-body {
    padding: 14px 14px 16px;
    text-align: left;
}

.listing-title {
    min-height: 52px;
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: #4b2f16;
    text-shadow: none;
}

.listing-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.listing-price {
    font-size: 1.1rem;
    color: #2f5a22;
    text-shadow: none;
}

.listing-cta {
    font-size: 0.95rem;
    color: #8e5d2f;
    text-shadow: none;
}

.shop-empty {
    grid-column: 1 / -1;
    padding: 18px;
    background: rgba(255,255,255,0.55);
    border: 3px dashed rgba(58, 34, 13, 0.2);
    color: #5c3513;
    text-shadow: none;
}

.shop-empty a {
    color: inherit;
}

.noscript-note {
    margin: 18px 0 0;
    padding: 12px 14px;
    border: 2px dashed rgba(58, 34, 13, 0.2);
    background: rgba(255, 255, 255, 0.55);
    color: #5c3513;
    text-shadow: none;
}

.seo-sections {
    display: grid;
    gap: 18px;
    margin: 26px 0 10px;
    text-align: left;
}

.seo-panel {
    padding: 18px;
    border: 3px solid rgba(131, 79, 34, 0.45);
    background:
        linear-gradient(180deg, rgba(255, 253, 246, 0.92), rgba(242, 225, 194, 0.92));
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.35),
        0 3px 0 rgba(58, 34, 13, 0.15);
}

.seo-title {
    margin-bottom: 10px;
    font-size: 1.45rem;
    color: #6b3f1f;
    text-shadow: none;
}

.seo-panel p {
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--text-color);
}

.seo-panel p + p {
    margin-top: 10px;
}

.seo-list {
    margin-top: 12px;
    padding-left: 22px;
    color: var(--text-color);
}

.seo-list li + li {
    margin-top: 8px;
}

.faq-panel {
    gap: 12px;
}

.faq-item + .faq-item {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(131, 79, 34, 0.35);
}

.faq-item h4 {
    margin-bottom: 6px;
    font-size: 1.1rem;
    color: #5c3513;
}

/* --- Shop Button --- */
.shop-action {
    margin: 30px 0;
}

.pixel-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--btn-green);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    font-size: 1.6rem;
    font-family: 'Pixelify Sans', sans-serif;
    border: var(--border-width) solid var(--btn-border);
    box-shadow: 
        inset 4px 4px 0 rgba(255,255,255,0.3),
        inset -4px -4px 0 rgba(0,0,0,0.2),
        4px 4px 0 var(--wood-dark);
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    border-radius: 4px;
}

.pixel-btn:hover {
    background-color: var(--btn-green-hover);
    transform: translateY(2px) translateX(2px);
    box-shadow: 
        inset 4px 4px 0 rgba(255,255,255,0.3),
        inset -4px -4px 0 rgba(0,0,0,0.2),
        2px 2px 0 var(--wood-dark);
}

.btn-text {
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.cart-icon {
    width: 24px;
    height: 24px;
    filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.5));
}

/* --- Decorations --- */
.decorations {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.decorations svg {
    width: 32px;
    height: 32px;
}

.footer-text {
    text-align: center;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    margin-top: 20px;
}

.footer-text p + p {
    margin-top: 6px;
}

.footer-links a {
    color: #fff7cf;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.wave-character {
    position: fixed;
    right: 14px;
    bottom: -5px;
    z-index: 25;
    pointer-events: none;
    user-select: none;
}

.wave-character img {
    display: block;
    width: min(220px, 28vw);
    height: auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

/* --- Animations --- */
.bouncy {
    animation: bounce 3s ease-in-out infinite;
}

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

@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-50px) rotate(45deg); opacity: 0; }
}

@keyframes twinkle {
    0%, 100% { transform: scale(1); opacity: 0.15; }
    50% { transform: scale(1.2); opacity: 0.45; }
}

@keyframes pawFade {
    0% { opacity: 0; transform: scale(0.9) translateY(5px); }
    15% { opacity: 0.15; transform: scale(1) translateY(0); }
    85% { opacity: 0.15; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(1.05) translateY(-2px); }
}

/* Background SVGs container */
#background-animations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.anim-svg {
    position: absolute;
}

.anim-leaf {
    animation: floatUp 20s linear infinite;
    fill: #7cb342;
    opacity: 0.35;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.1));
}

.anim-sparkle {
    animation: twinkle 4s ease-in-out infinite;
    fill: #ffe066;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.1));
}

.anim-paw {
    animation: pawFade 6s ease-in-out forwards;
    fill: #3b2814;
    filter: drop-shadow(1px 1px 0 rgba(255,255,255,0.2));
}

/* Responsive */
@media (max-width: 600px) {
    .store-title {
        font-size: 2rem;
    }
    .wave-character {
        right: 8px;
        bottom: 6px;
    }
    .wave-character img {
        width: min(150px, 34vw);
    }
    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .pixel-btn {
        padding: 10px 20px;
        font-size: 1.2rem;
    }
    .logo-container {
        width: 120px;
        height: 120px;
    }
    .catalog-shell {
        padding: 14px;
    }
    .shop-grid {
        grid-template-columns: 1fr;
    }
    .seo-panel {
        padding: 15px;
    }
}
