/* ==========================================================================
   TIMBER & TINK TOYMAKERS PREMIUM DESIGN SYSTEM
   Sophisticated Heritage Styling, Thin Architectural Borders, Elegant Flat Layouts
   ========================================================================== */

/* --- Import Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Outfit:wght@300;400;500;600;700;800&family=Quicksand:wght@400;500;600;700&display=swap');

/* --- Sophisticated Heritage Design Variables --- */
:root {
    /* Muted Heirloom Color Palette (More Sophisticated than standard primaries) */
    --color-red: #C34A47;         /* Refined madder red */
    --color-red-hover: #A03835;
    --color-blue: #3E6B89;        /* Warm slate/spruce blue */
    --color-blue-hover: #2C4E66;
    --color-yellow: #DF9F48;      /* Warm ochre mustard */
    --color-yellow-hover: #C58836;
    --color-green: #538373;       /* Sage/spruce green */
    --color-green-hover: #3E6357;
    
    /* Elegant Clean Backgrounds */
    --bg-cream: #FAF7F2;          /* Clean soft warm linen */
    --bg-cream-dark: #F0EAE1;     /* Subtle accent cream */
    --bg-sand: #E5DEC9;
    --bg-slate: #1E2022;          /* Sophisticated deep dark slate charcoal */
    
    /* Text Colors */
    --text-dark: #2F2E2C;         /* Soft rich charcoal black */
    --text-light: #FFFFFF;
    --text-muted: #8E8A84;
    --text-wood: #5C4B3E;         /* Elegant warm chestnut */

    /* Design Details (Ditching the childish thick rounded elements) */
    --font-display: 'Fraunces', serif;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Quicksand', sans-serif;
    
    --radius-round: 50%;
    --radius-pill: 4px;           /* Clean modern crisp edges */
    --radius-lg: 8px;            /* Sleek architectural rounded grids */
    --radius-md: 6px;            /* Modern cards */
    --radius-sm: 4px;            /* Sleek catalog actions */
    
    --transition-speed: 0.25s;
    --border-thin: 1px solid rgba(47, 46, 44, 0.12);
    --border-dark: 1.5px solid #2F2E2C;
}

/* --- Resets & Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--text-dark);
    background-color: var(--bg-cream);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-dark);
}

.font-serif-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-style: italic;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed);
}

/* --- Text Utility Styles --- */
.text-center { text-align: center; }
.text-white { color: var(--text-light); }
.text-muted { color: var(--text-muted); }
.w-full { width: 100%; }

.section-header {
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-cream-dark);
    color: var(--text-wood);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
    border: 1px solid rgba(92, 75, 62, 0.08);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 3rem;
    color: var(--text-dark);
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-desc {
    max-width: 650px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- Clean Modern Flat Buttons --- */
.toy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    user-select: none;
    position: relative;
    border: var(--border-dark);
}

.btn-primary {
    background-color: var(--text-dark);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: #4A4946;
    border-color: #4A4946;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: var(--border-thin);
}

.btn-secondary:hover {
    background-color: rgba(47, 46, 44, 0.03);
    border-color: var(--text-dark);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(1px);
}

/* ==========================================================================
   NAVIGATION HEADER SECTION
   ========================================================================== */
.toy-header {
    background-color: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: var(--border-thin);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px 0;
}

.toy-header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toy-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Elegant Minimal Logo design */
.logo-gears {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-round);
    border: 2px solid var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.logo-text {
    line-height: 1.1;
}

.logo-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.45rem;
    color: var(--text-dark);
    display: block;
}

.logo-subtitle {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: block;
    margin-top: 1px;
}

.toy-nav {
    display: flex;
    gap: 35px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    padding: 4px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-dark);
    transition: width var(--transition-speed);
}

.nav-link:hover::after {
    width: 100%;
}

/* Elegant minimalist cart button */
.cart-trigger {
    background-color: transparent;
    color: var(--text-dark);
    border: var(--border-thin);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed) ease;
}

.cart-trigger:hover {
    background-color: rgba(47, 46, 44, 0.03);
    border-color: var(--text-dark);
}

.cart-badge {
    background-color: var(--text-dark);
    color: var(--text-light);
    width: 20px;
    height: 20px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 2px;
}

/* ==========================================================================
   SLIDING CART DRAWER LAYOUT
   ========================================================================== */
.toybox-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    visibility: hidden;
    transition: visibility 0.3s;
}

.toybox-drawer.active {
    visibility: visible;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(47, 46, 44, 0.25);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toybox-drawer.active .drawer-overlay {
    opacity: 1;
}

.drawer-content {
    position: absolute;
    top: 0;
    right: -460px;
    width: 460px;
    max-width: 100%;
    height: 100%;
    background-color: var(--bg-cream);
    border-left: var(--border-thin);
    box-shadow: -8px 0 24px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.toybox-drawer.active .drawer-content {
    right: 0;
}

.drawer-header {
    padding: 24px;
    border-bottom: var(--border-thin);
    background-color: var(--bg-cream-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.45rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-drawer-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 300;
}

.close-drawer-btn:hover {
    color: var(--text-dark);
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Empty State Card */
.cart-empty-state {
    text-align: center;
    margin: auto 0;
    padding: 30px 20px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.cart-empty-state h4 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.35rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.cart-empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Cart Items Cart row */
.cart-item {
    background-color: var(--text-light);
    border: var(--border-thin);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    gap: 14px;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.06);
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.cart-item-price {
    font-weight: 700;
    color: var(--color-red);
    font-size: 0.95rem;
}

.cart-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cart-item-qty-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.qty-btn {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-round);
    border: var(--border-thin);
    background: var(--bg-cream-dark);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background-color: var(--bg-sand);
}

.qty-val {
    font-weight: 600;
    font-size: 0.9rem;
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.remove-item-btn:hover {
    color: var(--color-red);
}

.drawer-footer {
    padding: 24px;
    border-top: var(--border-thin);
    background-color: var(--bg-cream-dark);
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.price-val {
    color: var(--color-red);
    font-weight: 700;
}

.shipping-msg {
    font-size: 0.8rem;
    color: var(--color-green);
    font-weight: 600;
    margin-bottom: 18px;
}

.drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    background-color: var(--text-dark);
    color: var(--text-light);
    box-shadow: none;
}

/* ==========================================================================
   HERO BANNER SHOWCASE SECTION
   ========================================================================== */
.toy-hero {
    position: relative;
    padding: 100px 0 120px 0;
    background-color: #F8F5EE;   /* Flat crisp modern cream */
    border-bottom: var(--border-thin);
}

.toy-hero-bg-wood {
    display: none; /* Removed heavy light wash */
}

.toy-hero-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 50px;
    align-items: center;
}

.hero-text-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge-tag {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-green);
    background-color: #EBF2EE;
    border: 1px solid rgba(83, 131, 115, 0.2);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    margin-bottom: 20px;
}

.hero-headline {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 4.2rem;
    line-height: 1.1;
    color: var(--text-dark);
    margin-bottom: 18px;
}

.hero-headline .highlight-text {
    color: var(--color-red);
    font-style: italic;
}

.hero-paragraph {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 580px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-btn-animate {
    background-color: var(--text-dark);
    color: var(--text-light);
}

.hero-btn-animate:hover {
    background-color: #4A4946;
}

/* Image Circular display frame with retro details */
.hero-visual-area {
    display: flex;
    justify-content: center;
}

.hero-image-container {
    position: relative;
    width: 380px;
    height: 380px;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-round);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    background-color: var(--bg-cream-dark);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.hero-image-circle {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: var(--radius-round);
    border: 1px dashed rgba(47, 46, 44, 0.15);
    pointer-events: none;
    z-index: 2;
}

.hero-toy-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 5s ease;
}

.hero-image-wrapper:hover .hero-toy-img {
    transform: scale(1.04);
}

.hero-wood-stamp {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-round);
    background-color: var(--bg-cream);
    border: 1px solid var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1.2;
    z-index: 10;
    transform: rotate(10deg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* ==========================================================================
   BENTO FEATURE GRID LAYOUT
   ========================================================================== */
.bento-features {
    padding: 100px 0;
    background-color: var(--bg-cream);
}

.bento-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: 24px;
}

.bento-card {
    border: var(--border-thin);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background-color: var(--text-light);
}

.bento-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.04);
}

.bento-card.card-large {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-card.card-medium {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-card.card-small {
    grid-column: span 1;
    grid-row: span 1;
}

.bento-icon {
    font-size: 2.8rem;
    position: absolute;
    top: 25px;
    right: 25px;
    line-height: 1;
}

.bento-info h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.35rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.bento-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Elegant soft brand bg tints */
.bg-primary-soft { background-color: #FAF4F4; }
.bg-yellow-soft { background-color: #FAF8EE; }
.bg-green-soft { background-color: #F1F6F4; }
.bg-blue-soft { background-color: #F3F6F9; }

/* ==========================================================================
   INTERACTIVE TOY BUILDER WORKSHOP SECTION
   ========================================================================== */
.toy-workshop {
    position: relative;
    padding: 100px 0;
    background-color: #1E2022;   /* Sophisticated charcoal slate */
    border-top: var(--border-thin);
    border-bottom: var(--border-thin);
}

.workshop-wooden-grain {
    display: none; /* Clean flat layout */
}

.workshop-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

.toy-workshop .section-title {
    color: var(--text-light);
}

.workshop-layout {
    display: grid;
    grid-template-columns: 1fr 1.35fr 1fr;
    gap: 30px;
    margin-top: 50px;
    align-items: stretch;
}

/* Common styling for workbench panels */
.workshop-panel {
    background-color: var(--bg-cream);
    border: var(--border-thin);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.panel-heading {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 16px;
    border-bottom: 1px dashed rgba(47, 46, 44, 0.15);
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 1. Left panel - shapes & paint selections */
.shape-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.selector-btn {
    border: var(--border-thin);
    border-radius: var(--radius-md);
    background-color: var(--text-light);
    padding: 10px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.selector-btn:hover {
    background-color: var(--bg-cream-dark);
    border-color: var(--text-dark);
}

.selector-btn.active {
    background-color: var(--text-dark);
    border-color: var(--text-dark);
    color: var(--text-light);
}

.selector-btn.active .selector-label {
    color: var(--text-light);
}

.selector-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-dark);
}

/* Shape previews in Toolbox menu */
.shape-preview {
    display: block;
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--text-dark);
    background-color: var(--bg-sand);
}

.selector-btn.active .shape-preview {
    border-color: var(--text-light);
}

.shape-cube {
    border-radius: 4px;
}

.shape-triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border: none;
    background-color: var(--bg-sand);
}

.shape-cylinder {
    border-radius: 12px;
}

.shape-arch {
    border-radius: 12px 12px 0 0;
    position: relative;
}

.shape-arch::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    width: 60%;
    height: 50%;
    background-color: var(--text-light);
    border: 1.5px solid var(--text-dark);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.selector-btn.active .shape-arch::after {
    background-color: var(--text-dark);
    border-color: var(--text-light);
}

.shape-star {
    border: none;
    background: none;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
}

.selector-btn.active .shape-star {
    color: var(--text-light);
}

/* Stain Color dots */
.stain-color-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.color-dot-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-round);
    border: 1px solid rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed);
    position: relative;
}

.color-dot-btn:hover {
    transform: scale(1.08);
}

.color-dot-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--bg-cream), 0 0 0 4px var(--text-dark);
}

.red-stain { background-color: var(--color-red); }
.blue-stain { background-color: var(--color-blue); }
.yellow-stain { background-color: var(--color-yellow); }
.green-stain { background-color: var(--color-green); }
.natural-stain { background-color: #D6C2A9; }

/* Personalized Engraving Inputs */
.engrave-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.engrave-input-wrapper label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-wood);
}

.engrave-input-wrapper input {
    border: var(--border-thin);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    background-color: var(--text-light);
    color: var(--text-dark);
    text-transform: uppercase;
}

.engrave-input-wrapper input:focus {
    outline: none;
    border-color: var(--text-dark);
}

.engrave-help {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* 2. Center panel - Canvas Workspace Grid */
.canvas-panel {
    display: flex;
    flex-direction: column;
}

.canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px dashed rgba(47, 46, 44, 0.15);
    padding-bottom: 12px;
}

.workbench-tag {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.canvas-controls {
    display: flex;
    gap: 8px;
}

.canvas-control-btn {
    border: var(--border-thin);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    background-color: var(--text-light);
    transition: all var(--transition-speed) ease;
}

.canvas-control-btn:hover:not(:disabled) {
    background-color: var(--bg-cream-dark);
    border-color: var(--text-dark);
}

.canvas-control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pegboard-workspace-outer {
    position: relative;
    margin: auto 0;
}

.pegboard-workspace {
    width: 100%;
    aspect-ratio: 1;
    max-width: 440px;
    margin: 0 auto;
    background-color: #EAE6DF;    /* Matte light linen pegboard */
    border: 2px solid var(--text-wood); /* Slim wooden outline frame */
    border-radius: var(--radius-lg);
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.06), 0 4px 15px rgba(0,0,0,0.05);
    /* Circular clean hollow peg board holes */
    background-image: radial-gradient(rgba(92, 75, 62, 0.15) 3px, transparent 4px);
    background-size: 16.66% 16.66%;
    background-position: 8.33% 8.33%;
    cursor: crosshair;
}

.pegboard-baseplate-shadow {
    display: none; /* Removed heavy offset shadows */
}

.pegboard-cells-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 1fr);
}

.grid-cell-snap {
    width: 100%;
    height: 100%;
    position: relative;
    transition: background-color var(--transition-speed) ease;
}

.grid-cell-snap:hover {
    background-color: rgba(92, 75, 62, 0.06);
    border-radius: 4px;
}

/* Placed blocks on canvas */
.placed-block {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid var(--text-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-dark);
    text-transform: uppercase;
    animation: block-bounce-entry 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    user-select: none;
}

/* Placed Shape Styles */
.block-shape-cube {
    border-radius: 4px;
}

.block-shape-triangle {
    border: none;
    background-color: transparent !important;
    box-shadow: none;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    overflow: visible;
}

.block-shape-triangle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: inherit;
    clip-path: polygon(50% 1.5px, 1.5px calc(100% - 1px), calc(100% - 1.5px) calc(100% - 1px));
    z-index: 1;
}

.block-shape-triangle::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    background-color: var(--text-dark);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    z-index: 0;
}

.block-shape-triangle .engrave-label {
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 2;
    font-size: 0.6rem;
}

.block-shape-cylinder {
    border-radius: 12px;
}

.block-shape-arch {
    border-radius: 8px 8px 0 0;
}

.block-shape-arch::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    width: 60%;
    height: 50%;
    background-color: #EAE6DF; /* Match light linen pegboard */
    border: 1px solid var(--text-dark);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.block-shape-star {
    border: none;
    box-shadow: none;
    background: none !important;
    font-size: 2.2rem;
    color: var(--color-yellow);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.block-shape-star .engrave-label {
    position: absolute;
    font-size: 0.5rem;
    color: var(--text-dark);
    top: 50%;
}

.block-wood-grain {
    display: none; /* Removed cartoonish wood grains */
}

.engrave-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.7rem;
    pointer-events: none;
    z-index: 2;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.canvas-footer-tip {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 14px;
}

/* 3. Right panel - Custom Block Invoice Summary */
.bill-panel {
    display: flex;
    flex-direction: column;
}

.bill-list-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 250px;
    margin-bottom: 20px;
    border-bottom: 1px dashed rgba(47, 46, 44, 0.15);
}

.bill-items-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
}

.bill-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 4px 0;
}

.bill-item-row.base-kit {
    color: var(--text-wood);
    font-size: 0.95rem;
    border-bottom: 1px dashed rgba(0,0,0,0.06);
    padding-bottom: 6px;
    margin-bottom: 6px;
}

.bill-item-row.block-added {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.bill-item-row.block-added .remove-bill-block {
    color: var(--color-red);
    cursor: pointer;
    margin-left: 6px;
    font-size: 1rem;
}

.bill-total-area {
    margin-top: auto;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-wood);
    margin-bottom: 14px;
}

.total-price {
    color: var(--color-red);
    font-size: 1.5rem;
    font-weight: 700;
}

.add-custom-kit-btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    background-color: var(--text-dark);
    color: var(--text-light);
}

/* ==========================================================================
   MATTEL/LEGO INSPIRED PRODUCT CATALOG GRID
   ========================================================================== */
.toy-catalog {
    padding: 100px 0;
    background-color: var(--bg-cream-dark);
    border-bottom: var(--border-thin);
}

.catalog-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

.catalog-intro {
    margin-bottom: 40px;
}

.catalog-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-tab-btn {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    background-color: var(--text-light);
    color: var(--text-dark);
    border: var(--border-thin);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.filter-tab-btn:hover {
    background-color: rgba(47, 46, 44, 0.03);
    border-color: var(--text-dark);
}

.filter-tab-btn.active {
    background-color: var(--text-dark);
    color: var(--text-light);
    border-color: var(--text-dark);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Interactive Product Catalog Cards */
.product-card {
    background-color: var(--text-light);
    border: var(--border-thin);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.product-img-wrapper {
    height: 240px;
    overflow: hidden;
    position: relative;
    border-bottom: var(--border-thin);
    background-color: var(--bg-cream-dark);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.03);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    background-color: var(--color-red);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    z-index: 2;
    text-transform: uppercase;
}

.product-hover-overlay {
    display: none; /* Removed cartoonish details */
}

.product-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-label-tag {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-blue);
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.product-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.35rem;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 2px;
}

.product-tagline {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
}

.product-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--color-red);
    font-weight: 700;
}

.btn-add-cart {
    padding: 8px 16px;
    font-size: 0.85rem;
    background-color: var(--text-dark);
    color: var(--text-light);
    border: none;
    box-shadow: none;
}

.btn-add-cart:hover {
    background-color: #4A4946;
    transform: none;
}

/* ==========================================================================
   NOSTALGIC RETRO STORY SECTION
   ========================================================================== */
.toy-story {
    padding: 100px 0;
    background-color: var(--bg-cream);
    display: flex;
    justify-content: center;
}

.story-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.story-paper-card {
    background-color: #F8F5EE;
    border: var(--border-thin);
    border-radius: var(--radius-lg);
    padding: 50px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.story-stamp {
    position: absolute;
    top: -14px;
    right: 40px;
    background-color: var(--bg-cream-dark);
    border: 1px dashed var(--text-wood);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--text-wood);
    font-weight: 600;
    transform: rotate(3deg);
}

.story-tagline {
    font-family: var(--font-heading);
    color: var(--color-red);
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 8px;
}

.story-content h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.story-content p {
    font-size: 1.05rem;
    color: #4A4844;
    line-height: 1.6;
    margin-bottom: 16px;
}

.story-content p:last-of-type {
    margin-bottom: 24px;
}

.story-signature {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    border-top: 1px dashed rgba(47, 46, 44, 0.12);
    padding-top: 14px;
}

.sig-name {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.30rem;
    color: var(--text-wood);
    line-height: 1.1;
}

.sig-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

/* ==========================================================================
   TOYMAKER WEBSITE FOOTER
   ========================================================================== */
.toy-footer {
    background-color: var(--bg-slate);  /* Deep charcoal clean flat background */
    color: #DDD8CE;
    position: relative;
    padding: 80px 0 50px 0;
    border-top: var(--border-thin);
}

.scallop-top-border {
    display: none; /* Removed cartoon scallop */
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 20px;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.col-identity .toy-logo {
    font-size: 1.6rem;
    margin-bottom: 16px;
    color: var(--text-light);
}

.footer-bio {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #BAB4A7;
}

.footer-badges {
    display: flex;
    gap: 12px;
}

.footer-badges .badge {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    background-color: rgba(255,255,255,0.04);
    color: #DDD8CE;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.1);
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-list a {
    font-weight: 500;
    color: #BAB4A7;
    font-size: 0.9rem;
}

.footer-links-list a:hover {
    color: var(--text-light);
}

.col-newsletter p {
    font-size: 0.9rem;
    color: #BAB4A7;
    margin-bottom: 16px;
}

.newsletter-form .input-btn-group {
    display: flex;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-pill);
    overflow: hidden;
    background-color: rgba(255,255,255,0.03);
}

.newsletter-form input {
    flex-grow: 1;
    border: none;
    background: none;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-light);
}

.newsletter-form input:focus {
    outline: none;
}

.newsletter-form input::placeholder {
    color: #8E8A84;
}

.newsletter-form .toy-btn {
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 16px;
    background-color: var(--text-light);
    color: var(--bg-slate);
}

.newsletter-form .toy-btn:hover {
    background-color: #E2DBD6;
    transform: none;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 30px;
    font-size: 0.8rem;
    color: #8E8A84;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.parent-portal-link a {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    color: #DDD8CE;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
}

.parent-portal-link a:hover {
    background-color: var(--text-light);
    color: var(--bg-slate);
    border-color: var(--text-light);
}

/* ==========================================================================
   ANIMATIONS & FLOATING MICRO-EFFECTS
   ========================================================================== */
@keyframes floating-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes block-bounce-entry {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Flying item helper elements in shopping cart addition */
.flying-toy-particle {
    position: fixed;
    z-index: 9999;
    font-size: 1.8rem;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATIONS
   ========================================================================== */
@media (max-width: 1024px) {
    .toy-hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .hero-text-area {
        align-items: center;
    }
    
    .hero-paragraph {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-headline {
        font-size: 3.4rem;
    }
    
    .workshop-layout {
        grid-template-columns: 1fr;
    }
    
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    
    .bento-card.card-large, .bento-card.card-medium {
        grid-column: span 2;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }
    
    .toy-header-container {
        flex-direction: column;
        gap: 16px;
    }
    
    .toy-nav {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-headline {
        font-size: 2.5rem;
    }
    
    .hero-paragraph {
        font-size: 1rem;
    }
    
    .hero-image-container,
    .hero-image-wrapper {
        width: 280px;
        height: 280px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    
    .bento-card.card-large, .bento-card.card-medium, .bento-card.card-small {
        grid-column: span 1;
        height: 200px;
    }
    
    .drawer-content {
        width: 100%;
        right: -100%;
    }
}
