/* Hand Knits For Little People - public site
   Look carried over from the old Storefront theme: cream background, tan buttons,
   "Love Ya Like A Sister" headings, 3-column product grid. */

@font-face {
    font-family: 'Love Ya Like A Sister';
    src: url('../fonts/love-ya-like-a-sister.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('../fonts/source-sans-3.woff2') format('woff2');
    font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('../fonts/source-sans-3-italic.woff2') format('woff2');
    font-weight: 400; font-style: italic; font-display: swap;
}

:root {
    --bg: #f0efe6;
    --tan: #d9ba7c;
    --tan-dark: #c29e75;
    --tan-hover: #cdaa66;
    --text: #55524c;
    --heading: #7a746a;
    --dark: #333333;
    --line: #dcd9cc;
    --white: #ffffff;
    --error: #b3261e;
    --success-bg: #e4efd9;
    --display: 'Love Ya Like A Sister', 'Comic Sans MS', cursive;
    --body: 'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.65 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: #4a4640; }
a:hover { color: #000; }
:focus-visible { outline: 3px solid #5b8def; outline-offset: 2px; }

h1, h2, h3 { font-family: var(--display); color: var(--heading); font-weight: 400; line-height: 1.25; margin: 1.6em 0 .6em; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.3rem; }

.wrap { width: min(100% - 32px, 1080px); margin-inline: auto; }
.narrow { max-width: 780px; margin-inline: auto; }
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--white); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */
.site-header { background: #f6f5ec center top / cover; border-bottom: 1px solid var(--line); }
.header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-top: 28px; padding-bottom: 18px; }
.brand img { max-height: 150px; width: auto; }
.brand-text { font: 2rem var(--display); color: var(--dark); text-decoration: none; }
.brand { text-decoration: none; }
.search input {
    width: 230px; max-width: 100%; padding: 10px 14px; font: inherit; font-size: .95rem;
    background: rgba(255,255,255,.75); border: 1px dashed var(--tan); border-radius: 2px;
}
.main-nav { display: flex; flex-wrap: wrap; gap: 3px; }
.main-nav a {
    font: 1.15rem var(--display); color: var(--dark); text-decoration: none;
    background: var(--tan); padding: 22px 18px 20px;
}
.main-nav a:hover { background: var(--tan-hover); }
.main-nav a[aria-current] { color: #6d675d; }
.nav-toggle { display: none; }

/* ---------- content ---------- */
.site-main { padding-top: 26px; padding-bottom: 70px; min-height: 50vh; }
.page-title { margin-top: .6em; }
.breadcrumbs { font-size: .9rem; color: #77736b; margin-bottom: 8px; }
.breadcrumbs span { margin: 0 4px; color: #aaa; }
.content > :first-child { margin-top: 0; }
.content p { margin: 0 0 1.1em; }
.content img { margin: 1em auto; }
.content table { border-collapse: collapse; width: 100%; margin: 1.2em 0 2em; background: var(--white); font-size: .95rem; }
.content th, .content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.content th, .content tr:first-child td { background: #f8f6ee; }
.table-scroll { overflow-x: auto; }

.button, button.button {
    display: inline-block; font: 1rem var(--display); color: var(--dark); text-decoration: none; cursor: pointer;
    background: var(--tan); border: 1px solid var(--tan-dark); border-radius: 2px; padding: 12px 22px;
}
.button:hover { background: var(--tan-hover); color: #000; }
.button-small { font-size: .9rem; padding: 7px 16px; }
.button-dark { background: var(--dark); border-color: var(--dark); color: var(--white); }
.button-dark:hover { background: #000; color: var(--white); }

.notice { padding: 14px 18px; margin: 0 0 22px; border-left: 4px solid; background: var(--white); }
.notice-success { border-color: #5a8f3c; background: var(--success-bg); }
.notice-error { border-color: var(--error); }

/* ---------- home ---------- */
.hero { position: relative; margin: 10px 0 40px; }
.hero img { width: 100%; max-height: 590px; object-fit: cover; }
.hero-button { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 25px #888; }
.home-intro { margin-bottom: 26px; }

/* ---------- product grid ---------- */
.product-grid { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 46px 28px; }
.product-card { text-align: center; display: flex; flex-direction: column; align-items: center; }
.product-card > a:first-child { text-decoration: none; display: block; width: 100%; }
.product-card-image { display: block; aspect-ratio: 1; overflow: hidden; background: #e6e3d6; }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card a:hover .product-card-image img { transform: scale(1.04); }
.product-card-title { display: block; font: 1.1rem var(--display); color: var(--heading); margin-top: 18px; }
.price { display: block; color: var(--dark); font-size: .95rem; margin-top: 2px; }
.product-card .button { margin-top: 12px; }
.no-image { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 200px; color: #999; font-style: italic; }

/* ---------- shop ---------- */
.shop-intro { margin-bottom: 24px; max-width: 780px; }
.filter-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; }
.filter-pills a {
    display: block; padding: 7px 16px; border: 1px solid var(--tan-dark); border-radius: 999px;
    text-decoration: none; font: .98rem var(--display); color: var(--dark); background: transparent;
}
.filter-pills a:hover, .filter-pills a[aria-current] { background: var(--tan); }
.filter-pills .count { font: .8rem var(--body); color: #6b675f; }
.shop-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; font-size: .95rem; }
.result-count { margin: 0; }
.sort-form select { font: inherit; padding: 7px 10px; border: 1px solid var(--line); background: var(--white); border-radius: 2px; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 46px; }
.pagination a, .pagination .current, .pagination .gap { min-width: 40px; padding: 7px 10px; text-align: center; text-decoration: none; border: 1px solid var(--line); background: var(--white); }
.pagination .current { background: var(--tan); border-color: var(--tan-dark); color: var(--dark); }
.pagination .gap { border: 0; background: none; }
.empty { padding: 40px 0; }

/* ---------- product ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 46px; margin-top: 22px; }
.gallery-main { display: block; background: #e6e3d6; cursor: zoom-in; }
.gallery-main img { width: 100%; }
.gallery-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; }
.gallery-thumbs button[aria-current] { border-color: var(--tan-dark); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-title { font-family: var(--body); font-weight: 300; font-size: 2.2rem; margin: 0 0 .3em; color: #5d5952; }
.price-large { font-size: 1.35rem; margin: 0 0 1em; }
.product-options { border-top: 1px solid var(--line); margin-top: 1.2em; padding-top: 1em; }
.product-options h2 { font-size: 1.15rem; margin: 0 0 .4em; }
.product-meta { font-size: .88rem; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 26px; }
.product-description, .product-enquiry, .related { border-top: 1px solid var(--line); margin-top: 50px; }
.product-description, .product-enquiry { max-width: 780px; }

/* ---------- forms ---------- */
.form p { margin: 0 0 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form label { display: block; font-weight: 600; margin-bottom: 5px; color: #3e3b36; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form textarea {
    width: 100%; padding: 11px 12px; font: inherit; color: #333; background: var(--white);
    border: 1px solid rgba(0,0,0,.25); border-radius: 3px;
}
.form [aria-invalid=true] { border-color: var(--error); }
.form .help { display: block; font-size: .9rem; color: #6b675f; margin: -2px 0 6px; }
.field-error { color: var(--error); font-size: .9rem; margin: 4px 0 0 !important; }
.req { color: var(--error); } .optional { font-weight: 400; color: #77736b; }
.hp { position: absolute !important; left: -9999px; height: 0; overflow: hidden; }

/* ---------- footer ---------- */
.site-footer { background: var(--tan); color: #4a4234; padding: 50px 0 40px; }
.site-footer h2 { font: 300 1.35rem var(--body); color: #4a4234; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(0,0,0,.08); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { font-family: var(--display); margin-bottom: 9px; }
.footer-links.plain li { font-family: var(--body); overflow-wrap: anywhere; }
.footer-links a { color: #2f2a20; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(0,0,0,.08); font-size: .92rem; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(20,18,14,.9); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox button { position: absolute; top: 14px; right: 18px; font-size: 2rem; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 18px; }
    .product { grid-template-columns: 1fr; gap: 26px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    h1 { font-size: 1.7rem; }
    .product-title { font-size: 1.8rem; }
}
@media (max-width: 640px) {
    .header-top { flex-direction: column; align-items: center; padding-top: 18px; }
    .brand img { max-height: 105px; }
    .search, .search input { width: 100%; }
    .nav-toggle {
        display: block; width: 100%; font: 1.1rem var(--display); color: var(--dark);
        background: var(--tan); border: 0; padding: 14px; cursor: pointer;
    }
    .main-nav { display: none; flex-direction: column; gap: 1px; }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 14px 18px; border-top: 1px solid rgba(0,0,0,.08); }
    .form-row { grid-template-columns: 1fr; }
    .hero-button { font-size: .9rem; padding: 9px 14px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .product-card-image img { transition: none; }
}
