/* Color Variables */
:root {
    --white: #FFFFFF;
    --cream: #F5F1E8;
    --tan: #e4d3bb;
    --warm-brown: #8B7355;
    --warm-green: #738B55;
    --text-dark: #38442a;
    --gingham-red: rgba(180, 80, 70, 0.15);
    --gingham-thickness: 20px;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --card-bg: #FFFEF9;
    --body-font: Georgia, 'Times New Roman', serif;
}

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

/* Accessibility - Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Body with Gingham Background */
body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent var(--gingham-thickness),
            var(--gingham-red) var(--gingham-thickness),
            var(--gingham-red) calc(var(--gingham-thickness) * 2)
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent var(--gingham-thickness),
            var(--gingham-red) var(--gingham-thickness),
            var(--gingham-red) calc(var(--gingham-thickness) * 2)
        );
        background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Font Loading */
@font-face {
    font-family: 'CustomHandwritten';
    src: url('../fonts/Leilali-Regular.ttf') format('truetype'),
         url('../fonts/Leila-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Apply custom font to headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'CustomHandwritten', cursive, sans-serif;
}

/* Main Container */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

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

/* Site Title in Header */
.site-title-link {
    text-decoration: none;
    display: block;
}

.site-title-link:hover {
    text-decoration: none;
}

.site-title {
    font-size: 2.5em;
    margin: 0;
    color: var(--warm-green);
    font-weight: normal;
    line-height: 1.2;
}

.site-title-link:hover .site-title {
    opacity: 0.8;
}

/* Typography */
h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--warm-brown);
}

h2 {
    font-size: 2em;
    margin-top: 30px;
    margin-bottom: 20px;
    color: var(--warm-brown);
}

h3 {
    font-size: 1.5em;
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

a {
    color: var(--warm-brown);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Filter and Search Bar Container */
.filter-search-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

/* Filter Toggle Button */
.filter-toggle {
    position: relative;
    background: var(--text-dark);
    color: var(--card-bg);
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: var(--body-font);
    font-size: 0.95em;
    transition: all 0.2s ease;
}

.filter-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.filter-toggle:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

.filter-toggle-icon {
    font-size: 1.2em;
    line-height: 1;
}

.filter-toggle-text {
    font-weight: 500;
}

/* Recipe Search Input */
.recipe-search {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--tan);
    border-radius: 50px;
    background: var(--card-bg);
    color: var(--text-dark);
    font-family: var(--body-font);
    font-size: 0.95em;
    transition: all 0.2s ease;
}

.recipe-search:focus {
    outline: none;
    border-color: var(--warm-brown);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recipe-search::placeholder {
    color: var(--text-dark);
    opacity: 0.5;
}

/* Filter Tray */
.filter-tray {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.filter-tray.open {
    pointer-events: auto;
}

/* Filter Tray Overlay */
.filter-tray-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.filter-tray.open .filter-tray-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Filter Tray Panel */
.filter-tray-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: var(--card-bg);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.filter-tray.open .filter-tray-panel {
    transform: translateX(0);
}

/* Filter Tray Header */
.filter-tray-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--tan);
    background: var(--cream);
}

.filter-tray-title {
    font-family: 'CustomHandwritten', cursive, sans-serif;
    font-size: 1.8em;
    color: var(--warm-brown);
    margin: 0;
    font-weight: normal;
}

.filter-tray-close {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--warm-brown);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.filter-tray-close:hover {
    background: var(--tan);
}

.filter-tray-close:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

/* Filter Container (inside tray) */
.filter-container {
    padding: 25px;
    flex: 1;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-family: 'CustomHandwritten', cursive, sans-serif;
    font-size: 1.3em;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: normal;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    font-family: var(--body-font);
    background: var(--cream);
    border: 2px solid var(--tan);
    color: var(--text-dark);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--tan);
    border-color: var(--warm-brown);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--text-dark);
    color: var(--card-bg);
    border-color: var(--warm-brown);
}

.filter-btn:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

/* Filter Clear Button */
.filter-clear-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--tan);
}

.filter-clear-btn {
    font-family: var(--body-font);
    background: var(--cream);
    border: 2px solid var(--tan);
    color: var(--text-dark);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s ease;
}

.filter-clear-btn:not(:disabled):hover {
    background: var(--tan);
    border-color: var(--warm-brown);
    transform: translateY(-1px);
}

.filter-clear-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.filter-clear-btn:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

/* Recipe Grid (Homepage) */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.recipe-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--card-shadow);
    text-decoration: none;
}

.recipe-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--tan);
}

.recipe-card-content {
    padding: 20px;
}

.recipe-card-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--warm-brown);
}

.recipe-card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    color: var(--text-dark);
    opacity: 0.8;
}

.recipe-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Recipe Card Container */
.recipe-container {
    max-width: 900px;
    margin: 0 auto;
    perspective: 1000px;
}

/* Recipe Header with Back Link */
.recipe-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin-bottom: 20px;
}

.recipe-header .back-link {
    grid-column: 1;
}

.recipe-header h1 {
    grid-column: 2;
    text-align: center;
    margin-bottom: 0;
}

/* Back Link */
.back-link {
    display: inline-block;
    color: var(--warm-brown);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.back-link .arrow-left {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-left: 6px solid currentColor;
    border-bottom: 6px solid currentColor;
    transform: rotate(45deg);
    border-radius: 20%;
    padding: 5px;
}

.back-link:hover {
    opacity: 1;
    text-decoration: none;
}

.recipe-card-single {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--card-shadow);
    padding: 40px;
    position: relative;
}

/* Recipe Content Layout */
.recipe-content {
    margin-top: 30px;
}

.recipe-content h2 {
    color: var(--warm-brown);
    border-bottom: 2px solid var(--tan);
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Recipe Description */
.recipe-description {
    text-align: center;
    font-style: italic; 
    margin-bottom: 20px;
}

/* Recipe Metadata */
.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(212, 197, 176, 0.2);
    border-radius: 6px;
}

.recipe-meta span {
    font-size: 1em;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Recipe Content Styling */
.recipe-content ul ol {
    margin: 15px 0 15px 30px;
}

.recipe-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.recipe-content ol li {
    position: relative;
}

.recipe-content h2 {
    color: var(--text-dark);
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 15px;
}

/* Tips Section */
.tips-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(245, 241, 232, 0.5);
    border-left: 4px solid var(--warm-brown);
    border-radius: 4px;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 30px 0;
    background-color: var(--card-bg);
    border-top: 2px solid var(--warm-brown);
    text-align: center;
}

footer p {
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .recipe-grid {
        grid-template-columns: 1fr;
    }
    
    .recipe-card-single {
        padding: 25px;
    }
    
    .site-title {
        font-size: 2.5em;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.6em;
    }
    
    .filter-tray-panel {
        width: 85%;
    }
    
    .filter-container {
        padding: 20px;
    }
    
    .filter-label {
        font-size: 1.2em;
    }
    
    .filter-search-bar {
        gap: 10px;
        margin: 15px 0;
    }
    
    .filter-toggle {
        margin: 0;
        padding: 8px 12px;
        border-radius: 8px;
    }
    
    .filter-toggle-text {
        display: none;
    }
    
    .filter-toggle-icon {
        font-size: 1.2em;
    }
    
}

@media (max-width: 480px) {
    
    .recipe-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .site-title {
        font-size: 2.5em;
    }
    
    .filter-tray-panel {
        width: 90%;
    }
    
    .filter-container {
        padding: 15px;
    }
    
    .filter-btn {
        font-size: 0.9em;
        padding: 6px 12px;
    }
    
    .filter-search-bar {
        gap: 8px;
        margin: 12px 0;
    }
    
    .filter-toggle {
        margin: 0;
        padding: 6px 10px;
        border-radius: 6px;
    }
    
    .recipe-search {
        font-size: 0.9em;
        padding: 10px 16px;
    }
}

/* Cursor Selector Toggle Button */
.cursor-selector-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--text-dark);
    color: var(--card-bg);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    transition: all 0.3s ease;
    z-index: 999;
}

.cursor-selector-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.cursor-selector-toggle:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

/* Cursor Selector Tray */
.cursor-selector-tray {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.cursor-selector-tray.open {
    pointer-events: auto;
}

/* Cursor Selector Overlay */
.cursor-selector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cursor-selector-tray.open .cursor-selector-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Cursor Selector Panel */
.cursor-selector-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background: var(--card-bg);
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cursor-selector-tray.open .cursor-selector-panel {
    transform: translateX(0);
}

/* Cursor Selector Header */
.cursor-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--tan);
    background: var(--cream);
}

.cursor-selector-title {
    font-family: 'CustomHandwritten', cursive, sans-serif;
    font-size: 1.8em;
    color: var(--warm-brown);
    margin: 0;
    font-weight: normal;
}

.cursor-selector-close {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--warm-brown);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.cursor-selector-close:hover {
    background: var(--tan);
}

.cursor-selector-close:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

/* Cursor Options Container */
.cursor-selector-container {
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Individual Cursor Option */
.cursor-option {
    background: var(--cream);
    border: 2px solid var(--tan);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.cursor-option:hover {
    background: var(--tan);
    border-color: var(--warm-brown);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cursor-option.active {
    background: var(--text-dark);
    border-color: var(--warm-brown);
    color: var(--card-bg);
}

.cursor-option:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

.cursor-preview {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.cursor-name {
    font-family: var(--body-font);
    font-size: 0.9em;
    text-align: center;
    font-weight: 500;
}

/* Icon-based cursor preview (for default option) */
.cursor-preview-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: var(--text-dark);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Special styling for default cursor option when active */
.cursor-option-default.active .cursor-preview-icon {
    color: var(--card-bg);
}

/* Hide on mobile/tablet */
@media (max-width: 1024px) {
    .cursor-selector-toggle {
        display: none;
    }
}

/* Language Switcher */
.site-header {
    background-color: var(--card-bg);
    border-bottom: 2px solid var(--tan);
    padding: 15px 0;
}

.header-container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

.language-switcher {
    display: flex;
    gap: 15px;
}

.language-switcher a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95em;
    padding: 5px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.language-switcher a:hover {
    background-color: var(--tan);
    color: var(--text-dark);
}

/* Dancing Mascots */
.mascot-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    overflow: hidden;
    justify-content: center;
    min-width: 0;
}

.mascot {
    height: 45px;
    width: auto;
    animation: wiggle 1.8s ease-in-out infinite;
    transform-origin: center bottom;
    flex-shrink: 0;
}

.mascot-1 {
    animation-delay: 0s;
}

.mascot-2 {
    animation-delay: -0.2s;
}

.mascot-3 {
    animation-delay: -0.4s;
}

.mascot-4 {
    animation-delay: -0.6s;
}

.mascot-5 {
    animation-delay: -0.8s;
}

.mascot-6 {
    animation-delay: -1.0s;
}

.mascot-7 {
    animation-delay: -1.2s;
}

.mascot-8 {
    animation-delay: -1.4s;
}

.mascot-9 {
    animation-delay: -1.6s;
}

.mascot-10 {
    animation-delay: -0.1s;
}

.mascot-11 {
    animation-delay: -0.3s;
}

.mascot-12 {
    animation-delay: -0.5s;
}

.mascot-13 {
    animation-delay: -0.7s;
}

.mascot-14 {
    animation-delay: -0.9s;
}

.mascot-15 {
    animation-delay: -1.1s;
}

.mascot-16 {
    animation-delay: -1.3s;
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(-8deg);
    }
    50% {
        transform: rotate(8deg);
    }
}

/* Responsive: Progressive mascot hiding based on available space */

/* Hide last 2 mascots on large screens */
@media (max-width: 1400px) {
    .mascot-15,
    .mascot-16 {
        display: none;
    }
}

/* Hide 2 more mascots */
@media (max-width: 1250px) {
    .mascot-13,
    .mascot-14 {
        display: none;
    }
}

/* Hide 2 more mascots */
@media (max-width: 1130px) {
    .mascot-11,
    .mascot-12 {
        display: none;
    }
}

/* Hide 2 more mascots */
@media (max-width: 1005px) {
    .mascot-9,
    .mascot-10 {
        display: none;
    }
}

/* Hide 2 more mascots */
@media (max-width: 885px) {
    .mascot-7,
    .mascot-8 {
        display: none;
    }
}

/* Hide 2 more mascots */
@media (max-width: 690px) {
    .mascot-5,
    .mascot-6 {
        display: none;
    }
}

/* Hide 2 more mascots */
@media (max-width: 565px) {
    .mascot-3,
    .mascot-4 {
        display: none;
    }
}

/* Keep only 1 mascot on very small screens */
@media (max-width: 445px) {
    .mascot-2 {
        display: none;
    }
}

/* Hide all mascots on tiny screens */
@media (max-width: 380px) {
    .mascot-1 {
        display: none;
    }
}

/* Gingham Customizer Toggle Button */
.gingham-customizer-toggle {
    position: fixed;
    bottom: 105px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--text-dark);
    color: var(--card-bg);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    transition: all 0.3s ease;
    z-index: 999;
}

.gingham-customizer-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.gingham-customizer-toggle:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

/* Gingham Customizer Tray */
.gingham-customizer-tray {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.gingham-customizer-tray.open {
    pointer-events: auto;
}

/* Gingham Customizer Overlay */
.gingham-customizer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gingham-customizer-tray.open .gingham-customizer-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Gingham Customizer Panel */
.gingham-customizer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background: var(--card-bg);
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.gingham-customizer-tray.open .gingham-customizer-panel {
    transform: translateX(0);
}

/* Gingham Customizer Header */
.gingham-customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--tan);
    background: var(--cream);
}

.gingham-customizer-title {
    font-family: 'CustomHandwritten', cursive, sans-serif;
    font-size: 1.8em;
    color: var(--warm-brown);
    margin: 0;
    font-weight: normal;
}

.gingham-customizer-close {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--warm-brown);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.gingham-customizer-close:hover {
    background: var(--tan);
}

.gingham-customizer-close:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

/* Gingham Customizer Container */
.gingham-customizer-container {
    padding: 25px;
    flex: 1;
}

.gingham-control-group {
    margin-bottom: 25px;
}

.gingham-control-label {
    font-family: 'CustomHandwritten', cursive, sans-serif;
    font-size: 1.3em;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: block;
    font-weight: normal;
}

.gingham-control-value {
    font-family: var(--body-font);
    font-size: 0.9em;
    color: var(--text-dark);
    margin-left: 8px;
}

/* Color Picker Control */
.gingham-color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gingham-color-input {
    width: 80px;
    height: 50px;
    border: 2px solid var(--tan);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gingham-color-input:hover {
    border-color: var(--warm-brown);
}

.gingham-color-input:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

/* Range Slider Control */
.gingham-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gingham-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--tan);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.gingham-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gingham-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--warm-brown);
}

.gingham-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-dark);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.gingham-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: var(--warm-brown);
}

.gingham-slider:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

/* Preview Area */
.gingham-preview {
    margin-top: 20px;
    padding: 20px;
    background: var(--cream);
    border: 2px solid var(--tan);
    border-radius: 8px;
}

.gingham-preview-label {
    font-family: 'CustomHandwritten', cursive, sans-serif;
    font-size: 1.2em;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: block;
}

.gingham-preview-swatch {
    width: 100%;
    height: 100px;
    border-radius: 6px;
    background-color: var(--white);
    background-attachment: local;
    border: 1px solid var(--tan);
}

/* Reset Button */
.gingham-reset-btn {
    width: 100%;
    font-family: var(--body-font);
    background: var(--cream);
    border: 2px solid var(--tan);
    color: var(--text-dark);
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s ease;
    margin-top: 25px;
}

.gingham-reset-btn:hover {
    background: var(--tan);
    border-color: var(--warm-brown);
    transform: translateY(-1px);
}

.gingham-reset-btn:focus {
    outline: 2px solid var(--warm-brown);
    outline-offset: 2px;
}

/* Hide on mobile/tablet */
@media (max-width: 1024px) {
    .gingham-customizer-toggle {
        display: none;
    }
}

