/* CSS Variables */
:root {
    --color-primary: #8B4513;
    --color-primary-dark: #5D2E0C;
    --color-secondary: #D2691E;
    --color-accent: #F5DEB3;
    --color-background: #FDF5E6;
    --color-surface: #FFFFFF;
    --color-text: #2C1810;
    --color-text-light: #5C4033;
    --color-border: #D4C4B0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --max-width: 1100px;
}

/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Trebuchet MS', 'Lucida Sans', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-primary-dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.9rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--color-secondary);
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

h4 {
    font-size: 1.15rem;
    margin: 1.25rem 0 0.75rem;
    color: var(--color-text);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

strong {
    color: var(--color-primary-dark);
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

header h1 {
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tagline {
    font-size: 1.25rem;
    opacity: 0.95;
    font-style: italic;
}

/* Navigation */
nav {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 1rem 1.25rem;
    color: var(--color-text);
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

nav a:hover {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
    text-decoration: none;
}

/* Main Content */
main {
    padding: 2.5rem 0 4rem;
}

section {
    margin-bottom: 3.5rem;
}

.intro-section {
    background-color: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--color-secondary);
}

.intro-section p:last-child {
    margin-bottom: 0;
}

/* Cards */
.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.card h3 {
    margin-top: 0;
}

.card ul:last-child,
.card ol:last-child,
.card p:last-child {
    margin-bottom: 0;
}

/* Pattern Grid */
.pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pattern-card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    text-align: center;
}

.pattern-card h3 {
    margin-bottom: 1rem;
}

.pattern-card p {
    text-align: left;
    font-size: 0.95rem;
}

.pattern-card p:last-child {
    margin-bottom: 0;
}

.pattern-visual {
    background-color: var(--color-accent);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.pattern-svg {
    width: 100%;
    max-width: 120px;
    height: auto;
    color: var(--color-primary);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.product-card h3 {
    color: var(--color-secondary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
}

.product-card p {
    flex-grow: 1;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.product-link {
    display: inline-block;
    background-color: var(--color-secondary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.product-link:hover {
    background-color: var(--color-primary-dark);
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    background-color: var(--color-primary-dark);
    color: var(--color-accent);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.affiliate-disclosure {
    font-size: 0.8rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0.5rem auto 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    header {
        padding: 2rem 0;
    }

    nav ul {
        flex-direction: column;
        align-items: stretch;
    }

    nav a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--color-border);
    }

    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1.25rem;
    }

    .pattern-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .intro-section {
        padding: 1.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-2 {
    margin-top: 2rem;
}

/* Print Styles */
@media print {
    nav, footer {
        display: none;
    }

    body {
        font-size: 12pt;
        background: white;
    }

    .card, .product-card, .pattern-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

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

    .product-link {
        background: none;
        color: inherit;
        border: 1px solid currentColor;
    }
}
