@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600&display=swap');

:root {
    --ink: #2C2420;
    --ink-soft: #5C5049;
    --linen: #FAF7F0;
    --linen-deep: #F0E9DB;
    --panel: #F5EFE3;
    --rust: #B8763E;
    --rust-dark: #9B5F2E;
    --sage: #5C7A6B;
    --border: #DDD0B8;
    --stitch: #C9A85C;
}

* { box-sizing: border-box; }

html {
    background: var(--linen);
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--linen);
    color: var(--ink);
    line-height: 1.55;
}

h1, h2, h3, .logo-text {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--ink);
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* --- Top identifier strip --- */
.top-banner {
    background: var(--ink);
    text-align: center;
    padding: 10px 20px;
}
.top-banner h1 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--linen);
    font-family: 'Inter', sans-serif;
}

/* --- Header --- */
.site-header {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--linen);
    border-bottom: 1px solid var(--border);
    padding: 16px 44px;
    position: relative;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}
.brand-mark { width: 38px; height: 38px; }
.brand-name {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: center;
}
.main-nav a {
    position: relative;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 0;
    white-space: nowrap;
}
.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.5px;
    background: var(--rust-dark);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.18s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a.active { color: var(--rust-dark); }
.main-nav a.active::after { transform: scaleX(1); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}
.icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
}
.icon-link:hover { color: var(--rust-dark); }

.admin-link {
    color: var(--ink-soft);
    opacity: 0.55;
    padding-left: 14px;
    border-left: 1px solid var(--border);
}
.admin-link:hover { color: var(--rust-dark); opacity: 1; }

.cart-badge {
    position: absolute;
    top: -7px;
    right: -9px;
    background: var(--rust-dark);
    color: white;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 999px;
    min-width: 15px;
    text-align: center;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ink);
    cursor: pointer;
    padding: 4px;
}

.site-main {
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px 90px;
    flex: 1 0 auto;
}

.site-footer {
    text-align: center;
    padding: 28px;
    color: var(--ink-soft);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    background: var(--linen-deep);
}
.site-footer p { margin: 0 0 6px; }
.site-footer-credit {
    font-size: 0.78rem;
    color: var(--ink-soft);
    opacity: 0.85;
    margin-bottom: 0 !important;
}
.site-footer-credit a {
    color: var(--rust-dark);
    text-decoration: none;
    font-weight: 600;
}
.site-footer-credit a:hover { text-decoration: underline; }

/* --- Stitch-line divider, used as a real design device --- */
.stitch-divider {
    border: none;
    border-top: 2px dashed var(--stitch);
    opacity: 0.55;
    margin: 56px 0;
}

/* --- Full-bleed hero --- */
.hero-full {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 480px;
    margin: 0 calc(-50vw + 50%);
    padding: 80px 24px;
    background:
        repeating-linear-gradient(135deg, transparent 0 38px, rgba(184,118,62,0.05) 38px 40px),
        linear-gradient(180deg, var(--linen-deep) 0%, var(--linen) 100%);
    overflow: hidden;
    text-align: center;
}
.hero-full-inner { position: relative; z-index: 2; max-width: 640px; }
.hero-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--rust-dark);
    margin: 0 0 16px;
}
.hero-full .hero-eyebrow { color: #E8C79A; }
.hero-full-title {
    font-family: 'Fraunces', serif;
    font-size: 3.2rem;
    line-height: 1.08;
    margin: 0 0 20px;
    color: #fff;
    letter-spacing: -0.01em;
}
.hero-full-copy {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    max-width: 46ch;
    margin: 0 auto 32px;
}
.hero-full-actions {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-cta-secondary {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 13px 6px;
    border-bottom: 1px solid #fff;
}
.hero-cta-secondary:hover { color: #E8C79A; border-color: #E8C79A; }

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: hero-ken-burns 16s ease-in-out infinite;
    transition: opacity 1.5s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: -4s; }
.hero-slide:nth-child(3) { animation-delay: -8s; }
.hero-slide:nth-child(4) { animation-delay: -12s; }
.hero-slide:nth-child(5) { animation-delay: -2s; }
.hero-slide:nth-child(6) { animation-delay: -6s; }
@keyframes hero-ken-burns {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}
.hero-carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(44,36,32,0.68) 0%, rgba(44,36,32,0.55) 55%, rgba(44,36,32,0.7) 100%);
}

.hero-cta {
    display: inline-block;
    padding: 13px 30px;
    background: var(--rust);
    color: white;
    text-decoration: none;
    border-radius: 2px;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.hero-cta:hover { background: var(--rust-dark); }

/* --- Home sections --- */
.home-section { padding: 72px 0; border-bottom: 1px solid var(--border); }
.home-section:last-of-type { border-bottom: none; }
.home-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}
.home-section-head h2 { font-size: 1.7rem; margin: 0; }
.home-section-link {
    color: var(--rust-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}
.home-section-link:hover { text-decoration: underline; }

.collection-grid-home .collection-card { aspect-ratio: 4/3.6; }

/* --- Story section --- */
.home-story {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 56px;
    align-items: center;
}
.home-story-visual {
    aspect-ratio: 4/4.6;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.home-story-swatch {
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(45deg, var(--panel) 0 30px, var(--linen-deep) 30px 60px),
        repeating-linear-gradient(-45deg, transparent 0 58px, var(--border) 58px 60px);
    border: 2px dashed var(--stitch);
    border-radius: 4px;
    overflow: hidden;
}
.home-story-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
}
.home-story-copy h2 { font-size: 2rem; margin: 0 0 18px; line-height: 1.15; }
.home-story-copy > p { color: var(--ink-soft); font-size: 1.02rem; max-width: 52ch; margin: 0 0 36px; }

.home-feature-list { display: flex; flex-direction: column; gap: 22px; }
.home-feature-item { display: flex; gap: 16px; align-items: flex-start; }
.home-feature-icon {
    flex-shrink: 0;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 1.15rem;
    color: var(--rust-dark);
}
.home-feature-item h4 { margin: 0 0 4px; font-size: 1rem; font-family: 'Fraunces', serif; font-weight: 500; }
.home-feature-item p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

/* --- Quote band --- */
.home-quote-band {
    text-align: center;
    padding: 64px 24px;
    background: var(--linen-deep);
    margin: 0 calc(-50vw + 50%);
}
.home-quote-band blockquote {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--ink);
    max-width: 680px;
    margin: 0 auto 18px;
}
.home-quote-attribution { color: var(--ink-soft); font-size: 0.88rem; margin: 0; }

/* --- CTA band --- */
.home-cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 56px 0 0;
}
.home-cta-band h2 { font-size: 1.5rem; margin: 0 0 8px; }
.home-cta-band p { color: var(--ink-soft); margin: 0; max-width: 46ch; }

/* --- Shop --- */
.page-heading {
    font-size: 2rem;
    margin: 44px 0 8px;
}
.page-intro {
    color: var(--ink-soft);
    max-width: 62ch;
    margin: 0 0 28px;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 28px;
}
.collection-card {
    position: relative;
    display: block;
    aspect-ratio: 4/3.4;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--panel);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.collection-card:hover {
    box-shadow: 0 10px 28px rgba(44, 36, 32, 0.12);
    transform: translateY(-2px);
}
.collection-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.collection-card-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 18px;
    background: linear-gradient(to top, rgba(44,36,32,0.78), rgba(44,36,32,0));
    color: #fff;
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    font-weight: 500;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 40px 0 0;
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--rust-dark); }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 28px;
}
.product-card {
    background: var(--linen);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card:hover {
    box-shadow: 0 6px 20px rgba(44, 36, 32, 0.08);
    transform: translateY(-2px);
}
.product-card img { width: 100%; height: 210px; object-fit: cover; background: var(--panel); }
.product-info { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.product-info h3 { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.3; }
.product-info p.desc { color: var(--ink-soft); font-size: 0.9rem; flex: 1; margin: 0 0 16px; }
.product-price { font-weight: 600; color: var(--rust-dark); font-size: 1.2rem; margin: 0 0 4px; font-family: 'Fraunces', serif; }
.price-unit { font-size: 0.75rem; font-weight: 500; color: var(--ink-soft); font-family: 'Inter', sans-serif; }
.qty-label { display: block; font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 4px; }
.stock-note { font-size: 0.8rem; color: var(--ink-soft); margin: 0 0 14px; }

form.inline-form { margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.btn {
    display: inline-block;
    padding: 11px 20px;
    background: var(--rust);
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
}
.btn:hover { background: var(--rust-dark); }
.btn:disabled { background: #C9C0B2; cursor: not-allowed; }
.btn-secondary { background: transparent; border: 1px solid var(--rust); color: var(--rust-dark); }
.btn-secondary:hover { background: var(--panel); }

input[type=number] {
    width: 58px;
    padding: 9px 6px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: inherit;
    background: var(--linen);
}

/* --- Cart / Checkout --- */
table.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
table.cart-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    border-bottom: 2px solid var(--stitch);
    font-weight: 500;
}
table.cart-table td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
}
.cart-total { text-align: right; font-size: 1.35rem; margin-top: 18px; font-family: 'Fraunces', serif; }

form.checkout-form { max-width: 520px; }
form.checkout-form label { display: block; margin-top: 16px; font-weight: 500; font-size: 0.9rem; }
form.checkout-form input, form.checkout-form textarea {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: inherit;
    background: var(--linen);
}

/* --- Long arm services --- */
.longarm-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 48px 0 8px;
}
.longarm-hero-image {
    aspect-ratio: 4/3;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.longarm-hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.longarm-hero-copy h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin: 0 0 18px;
}
.longarm-hero-copy p {
    color: var(--ink-soft);
    font-size: 1.02rem;
    margin: 0 0 28px;
}
.longarm-hero-copy strong { color: var(--ink); }

.longarm-service-section { padding: 8px 0 40px; text-align: center; }
.longarm-service-title { font-size: 1.9rem; margin: 0 0 20px; }
.longarm-service-intro {
    color: var(--ink-soft);
    max-width: 68ch;
    margin: 0 auto 16px;
    font-size: 1rem;
}
.longarm-service-intro strong { color: var(--ink); }
.longarm-request-form { margin: 32px auto 0; text-align: left; }

/* --- Contact --- */
form.contact-form { max-width: 520px; }
form.contact-form label { display: block; margin-top: 16px; font-weight: 500; font-size: 0.9rem; }
form.contact-form input, form.contact-form textarea {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: inherit;
    background: var(--linen);
}
.contact-info { margin-top: 44px; padding-top: 28px; border-top: 1px dashed var(--stitch); color: var(--ink-soft); }
.contact-info p { margin: 4px 0; }

.alert { padding: 14px 18px; border-radius: 2px; margin-bottom: 22px; font-size: 0.92rem; }
.alert-success { background: #EAF1EB; color: #34513F; border: 1px solid #C3D8C6; }
.alert-error { background: #F7E9E4; color: #7A3B26; border: 1px solid #E4BFA9; }

@media (max-width: 760px) {
    .hero-full { min-height: 380px; padding: 56px 20px; }
    .hero-full-title { font-size: 2.1rem; }
    .hero-full-copy { font-size: 1rem; }
    .hero-full-motif { width: 340px; height: 340px; }

    .home-story { grid-template-columns: 1fr; gap: 32px; }
    .home-story-visual { aspect-ratio: 16/9; }
    .home-section { padding: 48px 0; }

    .home-cta-band { flex-direction: column; align-items: flex-start; text-align: left; }
    .longarm-hero { grid-template-columns: 1fr; gap: 28px; }
    .longarm-hero-copy h1 { font-size: 1.6rem; }

    .site-header {
        padding: 14px 20px;
        flex-wrap: wrap;
    }
    .brand { order: 1; }
    .header-actions { order: 2; margin-left: auto; }
    .mobile-toggle { display: inline-flex; order: 3; }

    .main-nav {
        order: 4;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid var(--border);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 8px 0; width: 100%; }
    .main-nav a::after { display: none; }
    .main-nav a.active { color: var(--rust-dark); }
}
/* --- Product pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 40px 0 8px;
    flex-wrap: wrap;
}
.pagination-link {
    padding: 8px 16px;
    border: 1px solid #D8CFC0;
    border-radius: 6px;
    text-decoration: none;
    color: #2C2420;
    font-size: 0.9rem;
    font-weight: 600;
    background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.pagination-link:hover {
    border-color: #B8763E;
    background: #FBF1E7;
}
.pagination-disabled {
    padding: 8px 16px;
    border: 1px solid #E8E1D6;
    border-radius: 6px;
    color: #B8AFA2;
    font-size: 0.9rem;
    font-weight: 600;
    background: #F5F1E9;
    cursor: not-allowed;
}
.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}
.pagination-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    border-radius: 6px;
    text-decoration: none;
    color: #2C2420;
    font-size: 0.88rem;
    font-weight: 600;
}
a.pagination-num:hover {
    background: #FBF1E7;
}
.pagination-current {
    background: #B8763E;
    color: #fff;
}
.pagination-ellipsis {
    padding: 0 4px;
    color: #9C9184;
}
.pagination-summary {
    text-align: center;
    color: #7A6F65;
    font-size: 0.85rem;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .pagination { gap: 8px; }
    .pagination-link { padding: 8px 12px; font-size: 0.85rem; }
}
/* --- Search page --- */
.search-form {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin: 0 0 24px;
}
.search-form input[type=text] {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid #D8CFC0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
}
.search-form input[type=text]:focus {
    outline: none;
    border-color: #B8763E;
    box-shadow: 0 0 0 3px rgba(184,118,62,0.14);
}

@media (max-width: 500px) {
    .search-form { flex-direction: column; }
}
/* --- AJAX add-to-cart feedback --- */
.add-to-cart-feedback {
    min-height: 1.2em;
    margin: 8px 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.2s ease;
}
.add-to-cart-feedback.success {
    color: #2E5C34;
}
.add-to-cart-feedback.error {
    color: #A64B3A;
}
/* --- Checkout: address section --- */
.checkout-section-heading {
    margin: 28px 0 4px;
    font-size: 1rem;
    color: #2C2420;
}
.checkout-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.checkout-form-row > div {
    display: flex;
    flex-direction: column;
}

@media (max-width: 500px) {
    .checkout-form-row { grid-template-columns: 1fr; }
}
/* --- Cart & checkout thumbnails --- */
.cart-thumb-cell {
    width: 56px;
}
.cart-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #E3DACB;
    display: block;
}
/* --- Styled select dropdowns (checkout province, etc.) --- */
form.checkout-form select,
form.contact-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 11px 40px 11px 11px;
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    background-color: var(--linen);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235C5049' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}
form.checkout-form select:hover,
form.contact-form select:hover {
    border-color: var(--rust);
}
form.checkout-form select:focus,
form.contact-form select:focus {
    outline: none;
    border-color: var(--rust);
    box-shadow: 0 0 0 3px rgba(184,118,62,0.14);
}