:root {
    --bg: #f3efe6;
    --bg-deep: #e7e0d2;
    --ink: #1c1a16;
    --muted: #5f584c;
    --line: rgba(28, 26, 22, 0.12);
    --accent: #3f5d4a;
    --accent-ink: #f7f3ea;
    --surface: rgba(255, 252, 246, 0.82);
    --shadow: 0 24px 60px rgba(28, 26, 22, 0.08);
    --radius: 18px;
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "DM Sans", system-ui, sans-serif;
    --container: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(63, 93, 74, 0.12), transparent 34%),
        radial-gradient(circle at 88% 0%, rgba(28, 26, 22, 0.06), transparent 28%),
        linear-gradient(180deg, #f7f3ea 0%, var(--bg) 42%, #efe8da 100%);
    min-height: 100vh;
    line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
code {
    font-size: 0.92em;
    background: rgba(28, 26, 22, 0.06);
    padding: 0.12em 0.4em;
    border-radius: 6px;
}

.container {
    width: min(var(--container), calc(100% - 2.5rem));
    margin-inline: auto;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(14px);
    background: rgba(247, 243, 234, 0.78);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
    border-color: var(--line);
    background: rgba(247, 243, 234, 0.92);
}

.header-bar {
    display: grid;
    grid-template-columns: auto minmax(12rem, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    min-height: 4.75rem;
    padding-block: 0.7rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.brand img {
    height: 2.6rem;
    width: auto;
    max-width: 9.5rem;
    object-fit: contain;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.28rem 0.28rem 0.28rem 1rem;
    box-shadow: 0 10px 28px rgba(28, 26, 22, 0.05);
}

.header-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.95rem;
    outline: none;
}

.header-search input::placeholder { color: var(--muted); }

.header-search button {
    display: grid;
    place-items: center;
    width: 2.45rem;
    height: 2.45rem;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    cursor: pointer;
}

.header-search button:hover { filter: brightness(1.08); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.header-action {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 3.4rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.header-action:hover { color: var(--ink); }

.header-action__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
}

.header-badge {
    position: absolute;
    top: -0.15rem;
    right: -0.35rem;
    display: inline-grid;
    place-items: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 0.68rem;
    line-height: 1;
}

.nav {
    border-top: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 2.6rem;
}

.nav a {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav a:hover { color: var(--ink); }

.nav-toggle {
    display: none;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 1rem;
    height: 2px;
    margin: 0.22rem auto;
    background: var(--ink);
}

.hero {
    position: relative;
    min-height: min(88vh, 760px);
    display: grid;
    align-items: end;
    overflow: hidden;
}

.hero__media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(28, 26, 22, 0.08) 0%, rgba(28, 26, 22, 0.55) 100%),
        url("../images/hero.svg") center/cover no-repeat;
    transform: scale(1.04);
    animation: heroDrift 14s ease-in-out infinite alternate;
}

.hero__content {
    position: relative;
    z-index: 1;
    color: #f8f4eb;
    padding: 5rem 0 4rem;
    max-width: 40rem;
    margin-left: max(calc((100% - var(--container)) / 2), 1.25rem);
    animation: riseIn 0.9s ease both;
}

.brand-mark {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 0.75rem;
    letter-spacing: -0.03em;
}

.hero h1,
.page-hero h1,
.section-head h2,
.story h2,
.product-detail h1 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin: 0 0 1rem;
}

.hero h1 {
    font-size: clamp(2.6rem, 7vw, 4.8rem);
    max-width: 11ch;
}

.lede {
    font-size: 1.08rem;
    color: rgba(248, 244, 235, 0.86);
    max-width: 34ch;
    margin: 0 0 1.75rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary,
.btn--ink {
    background: var(--ink);
    color: #fff;
}

.btn--primary:hover,
.btn--ink:hover {
    background: #000;
    color: #fff;
}

.hero .btn--primary {
    background: var(--accent-ink);
    color: var(--ink);
}

.hero .btn--primary:hover {
    background: #fff;
}

.btn--secondary {
    background: #fffdf8;
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn--secondary:hover {
    background: var(--bg-deep);
}

.btn--outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn--outline:hover {
    background: rgba(28, 26, 22, 0.05);
}

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

.btn--lg {
    min-height: 3.2rem;
    padding: 0.85rem 1.6rem;
    font-size: 1.05rem;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

.btn--ghost {
    border-color: rgba(248, 244, 235, 0.35);
    color: #f8f4eb;
}

.section {
    padding: 5rem 0;
}

.section-head {
    margin-bottom: 2rem;
    max-width: 34rem;
}

.section-head h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-head p,
.page-hero p,
.story p {
    color: var(--muted);
    margin: 0;
}

.category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-weight: 600;
}

.offer-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 1rem;
}

.offer-card {
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.offer-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.offer-card p {
    margin: 0;
    color: var(--muted);
}

.offer-code {
    margin-top: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.featured-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 1.25rem 0;
    color: var(--muted);
}

.sale-countdown {
    display: flex;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.sale-countdown span {
    min-width: 4.1rem;
    padding: 0.45rem 0.5rem 0.35rem;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sale-countdown b {
    font-size: 1.15rem;
    line-height: 1;
}

.sale-countdown small {
    margin-top: 0.2rem;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.campaign-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
}

.campaign-card {
    display: grid;
    gap: 0.75rem;
    padding: 0.8rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.campaign-card img {
    width: 100%;
    height: 9rem;
    object-fit: cover;
    border-radius: 12px;
}

.campaign-card span {
    display: grid;
    gap: 0.2rem;
}

.campaign-card small {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.campaign-card strong {
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.campaign-card em {
    color: var(--muted);
    font-style: normal;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease;
}

.product-card:hover { transform: translateY(-4px); }

.product-card__media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-deep);
    flex: 0 0 auto;
}

.product-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card__media img {
    transform: scale(1.04);
}

.product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1rem 1.1rem 1.2rem;
}

.product-card__body h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    min-height: 2.6em;
}

.product-card__body h3 a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.price {
    margin: auto 0 0;
    color: var(--muted);
    font-weight: 600;
}

.price--lg {
    font-size: 1.35rem;
    color: var(--ink);
    margin-bottom: 1rem;
}

.section--story {
    padding-top: 0;
}

.story {
    padding: 2.5rem;
    border-radius: calc(var(--radius) + 6px);
    background: linear-gradient(135deg, rgba(63, 93, 74, 0.1), rgba(28, 26, 22, 0.04));
    border: 1px solid var(--line);
}

.story--with-image {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1.5rem;
    align-items: center;
}

.story__media img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}

.story h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.page-hero {
    padding: 4.5rem 0 1rem;
}

.page-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
}

.product-detail__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: center;
}

.product-detail__media {
    border-radius: calc(var(--radius) + 8px);
    overflow: hidden;
    background: var(--bg-deep);
    border: 1px solid var(--line);
}

.product-detail__info .lede {
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 3.5rem 0 2.5rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
}

.brand--footer { display: inline-block; margin-bottom: 0.6rem; }

.footer-copy,
.footer-meta {
    color: var(--muted);
    margin: 0.35rem 0;
}

.site-footer h3 {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.site-footer a {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--ink);
}

@keyframes heroDrift {
    from { transform: scale(1.04) translateY(0); }
    to { transform: scale(1.08) translateY(-1.5%); }
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Alerts */
.theme-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 1.5rem;
}

.theme-alert--success {
    background: #edf7ed;
    color: #1e4620;
    border: 1px solid #b7dfb9;
}

.theme-alert--error {
    background: #fdf2f2;
    color: #9b1c1c;
    border: 1px solid #f8b4b4;
}

.theme-alert svg {
    flex-shrink: 0;
    margin-top: 0.15rem;
}

/* Cart Table & Grid */
.cart-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 2.5rem;
    align-items: start;
}

.cart-items-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.cart-table th {
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    background: rgba(28, 26, 22, 0.02);
}

.cart-table td {
    padding: 1.25rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.cart-row:last-child td {
    border-bottom: 0;
}

.cart-product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-product-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    flex-shrink: 0;
}

.cart-product-title {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    line-height: 1.3;
}

.cart-product-title:hover {
    color: var(--accent);
}

.cart-product-variant {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fffdf8;
    overflow: hidden;
}

.qty-control--sm {
    padding: 0.15rem;
}

.qty-btn {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 500;
}

.qty-btn:hover {
    background: var(--bg-deep);
}

.qty-display {
    min-width: 2rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.qty-input {
    width: 3rem;
    text-align: center;
    border: 0;
    background: transparent;
    font-weight: 600;
    font-size: 1rem;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-remove {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.btn-remove:hover {
    color: #c53030;
    background: rgba(197, 48, 48, 0.08);
}

.cart-summary-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
}

.cart-summary-card h2 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.summary-note {
    font-size: 0.85rem;
    margin: 0 0 1.25rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.summary-total-amt {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

.cart-continue-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.cart-continue-link:hover {
    color: var(--ink);
    text-decoration: underline;
}

/* Product Page Additions */
.product-qty-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.product-qty-row label {
    font-weight: 500;
    font-size: 0.95rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Shop Toolbar & Catalog */
.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.shop-toolbar__count {
    color: var(--muted);
    font-size: 0.95rem;
}

.shop-toolbar__filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.55rem 2rem 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fffdf8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f584c' 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") no-repeat right 0.75rem center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font: inherit;
    font-size: 0.9rem;
    color: var(--ink);
    cursor: pointer;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 3.5rem;
    list-style: none;
    padding: 0;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    height: 2.4rem;
    padding: 0 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fffdf8;
    color: var(--ink);
    font-weight: 500;
    font-size: 0.92rem;
}

.pagination li.active span {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

@media (max-width: 900px) {
    .cart-grid,
    .checkout-grid,
    .contact-grid--two-col {
        grid-template-columns: 1fr;
    }
    .checkout-summary-wrap {
        position: static !important;
    }
    .cart-table th:nth-child(2),
    .cart-table td:nth-child(2) {
        display: none;
    }
    .header-bar {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.75rem 1rem;
    }

    .header-search { grid-column: 1 / -1; }

    .nav { display: none; }

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

    .nav-toggle { display: inline-block; }
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .product-card__body {
        padding: 0.75rem 0.8rem 0.9rem;
    }
    .product-card__body h3 {
        font-size: 0.95rem;
    }
    .product-detail__grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero__content {
        margin-left: 1.25rem;
        padding-bottom: 3rem;
    }
}

