/* Kingdom Coops - Main Stylesheet
   Typography: Bitter (slab-serif headlines), DM Sans (body)
   Palette: Barn red, gold, white, warm neutrals */

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

:root {
    --color-red: #8B2318;
    --color-red-dark: #6E1C12;
    --color-red-light: #A83A2E;
    --color-gold: #B8891A;
    --color-gold-light: #D4A833;
    --color-bg: #FFFFFF;
    --color-bg-alt: #F4F2ED;
    --color-text: #2D2A26;
    --color-text-light: #6B6560;
    --color-border: #DDD9D3;
    --color-border-light: #EBE8E3;

    --font-heading: 'Bitter', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --container: 1140px;
    --gutter: 16px;
    --radius: 4px;
    --radius-lg: 6px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,.1);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.65;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-red);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--color-red-dark);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: .75rem; }
h3 { font-size: 1.25rem; margin-bottom: .5rem; }
h4 { font-size: 1rem; margin-bottom: .5rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

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

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

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-body);
    font-size: .9375rem;
    font-weight: 600;
    padding: .7rem 1.5rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    text-decoration: none;
    line-height: 1.3;
}

.btn-primary {
    background: var(--color-red);
    color: #fff;
    border-color: var(--color-red);
}

.btn-primary:hover {
    background: var(--color-red-dark);
    border-color: var(--color-red-dark);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--color-red);
    border-color: var(--color-red);
}

.btn-secondary:hover {
    background: var(--color-red);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}

.btn-lg {
    padding: .9rem 2rem;
    font-size: 1.0625rem;
}

.btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border-light);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    height: 72px;
    gap: 2rem;
}

.header-logo img {
    height: 52px;
    width: auto;
}

.header-nav {
    flex: 1;
}

.header-nav ul {
    list-style: none;
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
}

.header-nav a {
    display: block;
    padding: .5rem 1rem;
    font-size: .9375rem;
    font-weight: 500;
    color: var(--color-text);
    transition: color .2s;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--color-red);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 220px;
    padding: .5rem 0;
    list-style: none;
    z-index: 110;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    padding: .5rem 1.25rem;
    font-size: .875rem;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .9375rem;
    font-weight: 500;
    color: var(--color-text);
}

.header-phone:hover {
    color: var(--color-red);
}

.icon-phone {
    flex-shrink: 0;
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 24px;
    position: relative;
    z-index: 120;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    position: absolute;
    left: 0;
    transition: transform .3s, opacity .3s;
}

.hamburger span:nth-child(1) { top: 2px; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { top: 20px; }

.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    z-index: 90;
    padding: 1.5rem var(--gutter);
    overflow-y: auto;
}

.mobile-nav.open {
    display: block;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.mobile-nav li {
    border-bottom: 1px solid var(--color-border-light);
}

.mobile-nav li strong {
    display: block;
    padding: .75rem 0;
    font-size: .8125rem;
    color: var(--color-text-light);
    letter-spacing: .03em;
    text-transform: uppercase;
    border-bottom: none;
}

.mobile-nav a {
    display: block;
    padding: .75rem 0;
    font-size: 1.0625rem;
    color: var(--color-text);
}

.mobile-nav-divider {
    border-bottom: none;
    height: .5rem;
}

.mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--color-text);
}

.hero-image {
    width: 100%;
    height: 480px;
    object-fit: cover;
    opacity: .6;
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem var(--gutter);
    max-width: var(--container);
    margin: 0 auto;
}

.hero h1 {
    color: #fff;
    font-size: 2.75rem;
    max-width: 600px;
}

.hero .hero-sub {
    color: rgba(255,255,255,.85);
    font-size: 1.125rem;
    max-width: 520px;
    margin-bottom: 1.5rem;
}

/* ============================================
   Model Cards (Homepage)
   ============================================ */
.models-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.model-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg);
    transition: box-shadow .2s;
}

.model-card:hover {
    box-shadow: var(--shadow-md);
}

.model-card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.model-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.model-card-body {
    padding: 1.25rem;
}

.model-card-body h3 {
    margin-bottom: .25rem;
}

.model-card-price {
    font-weight: 600;
    color: var(--color-red);
    margin-bottom: .5rem;
}

.model-card-body p {
    color: var(--color-text-light);
    font-size: .9375rem;
    margin-bottom: 1rem;
}

/* ============================================
   Trust Block
   ============================================ */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.trust-item svg {
    margin: 0 auto .75rem;
    color: var(--color-gold);
}

.trust-item h3 {
    font-size: 1rem;
    margin-bottom: .25rem;
}

.trust-item p {
    font-size: .875rem;
    color: var(--color-text-light);
}

/* ============================================
   Reviews
   ============================================ */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.review-card {
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.review-stars {
    color: var(--color-gold);
    margin-bottom: .5rem;
    font-size: 1.125rem;
}

.review-text {
    font-size: .9375rem;
    color: var(--color-text);
    margin-bottom: .75rem;
    font-style: italic;
}

.review-author {
    font-size: .8125rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.reviews-link {
    text-align: center;
    margin-top: 1.5rem;
}

/* ============================================
   CTA Block
   ============================================ */
.cta-block {
    padding: 3.5rem 0;
    text-align: center;
    background: var(--color-bg-alt);
}

.cta-block h2 {
    margin-bottom: 1.5rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Product Page
   ============================================ */
.product-hero {
    padding: 2.5rem 0 1rem;
}

.product-hero h1 {
    margin-bottom: .25rem;
}

.product-tagline {
    font-size: 1.0625rem;
    color: var(--color-text-light);
}

.product-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: .75rem;
    margin-bottom: 2.5rem;
}

.product-gallery-main {
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-bg-alt);
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.product-gallery-thumbs {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: .75rem;
}

.product-gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s;
}

.product-gallery-thumbs img:hover,
.product-gallery-thumbs img.active {
    border-color: var(--color-red);
}

/* Description & Features */
.product-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-description h2 {
    margin-bottom: 1rem;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: .5rem 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: .9375rem;
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

.features-list li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--color-gold);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: .4rem;
}

/* Pricing Grid */
.pricing-section {
    margin-bottom: 3rem;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9375rem;
}

.pricing-table thead {
    background: var(--color-text);
    color: #fff;
}

.pricing-table th {
    font-family: var(--font-heading);
    font-weight: 700;
    padding: .75rem 1rem;
    text-align: left;
}

.pricing-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.pricing-table tbody tr:hover {
    background: var(--color-bg-alt);
}

.pricing-table .price-cell {
    font-weight: 600;
    color: var(--color-red);
}

/* Upgrades */
.upgrades-list {
    display: grid;
    gap: 1rem;
}

.upgrade-item {
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.upgrade-item h3 {
    margin-bottom: .25rem;
}

.upgrade-price {
    font-weight: 600;
    color: var(--color-red);
    font-size: .875rem;
}

/* Delivery / Zip Checker */
.delivery-section {
    padding: 2rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
}

.zip-form {
    display: flex;
    gap: .75rem;
    margin-top: 1rem;
    max-width: 400px;
}

.zip-form input {
    flex: 1;
    padding: .7rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
}

.zip-form input:focus {
    outline: none;
    border-color: var(--color-red);
}

.zip-result {
    margin-top: 1rem;
    padding: .75rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    display: none;
}

.zip-result.yes {
    background: #E8F5E9;
    color: #2E7D32;
    display: block;
}

.zip-result.no {
    background: #FFF3E0;
    color: #E65100;
    display: block;
}

.zip-result.maybe {
    background: #FFF8E1;
    color: #F57F17;
    display: block;
}

/* Custom callout */
.custom-callout {
    padding: 2rem;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 3rem;
}

.custom-callout p {
    font-size: 1.0625rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

/* Cross-linking */
.other-models {
    padding: 3rem 0;
    border-top: 1px solid var(--color-border-light);
}

.other-models h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.other-models-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

/* ============================================
   About Page
   ============================================ */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.about-photo {
    border-radius: var(--radius-lg);
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.about-section {
    margin-bottom: 2.5rem;
}

/* ============================================
   Gallery
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}

.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--color-bg-alt);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    opacity: .7;
    transition: opacity .2s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ============================================
   Contact Page
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h2 {
    margin-bottom: 1.5rem;
}

.contact-detail {
    display: flex;
    align-items: start;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.contact-detail svg {
    flex-shrink: 0;
    color: var(--color-red);
    margin-top: .15rem;
}

.contact-detail a {
    font-size: 1.125rem;
    font-weight: 500;
}

.contact-detail p {
    font-size: .9375rem;
    color: var(--color-text-light);
}

/* Form */
.inquiry-form h2 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: .35rem;
    color: var(--color-text);
}

.form-group label .required {
    color: var(--color-red);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .7rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-red);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-success {
    display: none;
    padding: 1.5rem;
    background: #E8F5E9;
    border-radius: var(--radius-lg);
    text-align: center;
}

.form-success h3 {
    color: #2E7D32;
    margin-bottom: .5rem;
}

/* Honeypot */
.ohnohoney {
    position: absolute;
    left: -9999px;
}

/* ============================================
   Warranty Badge (inline)
   ============================================ */
.warranty-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-gold);
}

.warranty-badge strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1rem;
}

.warranty-badge span {
    display: block;
    font-size: .875rem;
    color: var(--color-text-light);
}

.warranty-icon {
    color: var(--color-gold);
    flex-shrink: 0;
}

/* ============================================
   404
   ============================================ */
.page-404 {
    text-align: center;
    padding: 6rem var(--gutter);
}

.page-404 h1 {
    font-size: 4rem;
    color: var(--color-border);
}

.page-404 p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--color-text);
    color: rgba(255,255,255,.75);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-logo {
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-nav h4,
.footer-contact h4 {
    color: #fff;
    font-family: var(--font-heading);
    margin-bottom: .75rem;
}

.footer-nav ul,
.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li,
.footer-contact li {
    margin-bottom: .4rem;
}

.footer-nav a,
.footer-contact a {
    color: rgba(255,255,255,.7);
    font-size: .875rem;
    transition: color .2s;
}

.footer-nav a:hover,
.footer-contact a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.15);
    padding-top: 1.5rem;
    font-size: .8125rem;
    text-align: center;
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
