/* ============================================================
   DESIGN TOKENS — "Hearth & Field" home-goods aesthetic
   Palette: warm linen bg, warm charcoal ink, muted clay + deep sage accents
   Type: Fraunces (display, editorial serif) + Work Sans (body/utility)
   Signature: "material swatch" strip on product cards — a thin
   gradient bar sampling the product's own material tone, standing
   in for the fabric/wood/stone swatches a real showroom would offer.
   ============================================================ */

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

:root {
    --linen: #f6f1e9;
    --plaster: #ece4d6;
    --ink: #2a241d;
    --ink-soft: #5b5346;
    --clay: #ad5f3c;
    --clay-dark: #8c4a2e;
    --sage: #616b54;
    --sage-dark: #4a5240;
    --brass: #a6873f;
    --line: #dcd1be;
    --white: #fffdf9;
    --error: #a3382e;

    --radius-sm: 2px;
    --radius-md: 3px;
    --shadow-card:
        0 1px 2px rgba(42, 36, 29, 0.05),
        0 8px 24px -12px rgba(42, 36, 29, 0.18);
    --shadow-lift: 0 14px 34px -14px rgba(42, 36, 29, 0.32);

    --container: 1320px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: var(--linen);
    color: var(--ink);
    font-family: "Work Sans", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img {
    max-width: 100%;
    display: block;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font-family: inherit;
    cursor: pointer;
}
input,
select,
textarea {
    font-family: inherit;
    font-size: 1rem;
}

.wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
}

h1,
h2,
h3,
h4 {
    font-family: "Fraunces", serif;
    font-weight: 500;
    line-height: 1.12;
    margin: 0 0 0.4em;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.eyebrow {
    font-family: "Work Sans", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clay-dark);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--clay-dark);
    display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--white);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}
.btn:hover {
    background: var(--clay-dark);
    border-color: var(--clay-dark);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    color: var(--ink);
}
.btn-outline:hover {
    background: var(--ink);
    color: var(--white);
}
.btn-block {
    width: 100%;
}
.btn-sage {
    background: var(--sage);
    border-color: var(--sage);
}
.btn-sage:hover {
    background: var(--sage-dark);
    border-color: var(--sage-dark);
}
.btn-ghost {
    background: transparent;
    border: none;
    color: var(--ink-soft);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    padding: 8px 4px;
    border-bottom: 1px solid var(--ink-soft);
}
.btn-ghost:hover {
    color: var(--clay-dark);
    border-color: var(--clay-dark);
}
.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Header ---------- */
.announce {
    background: var(--ink);
    color: var(--linen);
    text-align: center;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    padding: 9px 12px;
    text-transform: uppercase;
    font-weight: 500;
    position: relative;
    z-index: 41;
}

header.site {
    background: var(--linen);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
}

/* Overlay for mobile menu */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 39;
}
.nav-overlay.active {
    display: block;
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
    min-height: 70px;
}

.logo {
    font-family: "Fraunces", serif;
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    flex-shrink: 0;
}
.logo em {
    font-style: italic;
    color: var(--clay-dark);
}
.logo img {
    max-height: 50px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}
.main-nav a {
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--ink-soft);
    position: relative;
    padding: 6px 0;
    white-space: nowrap;
}
.main-nav a:hover {
    color: var(--ink);
}
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--clay-dark);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}
.main-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
.main-nav a.active {
    color: var(--ink);
}
.main-nav a.active::after {
    transform: scaleX(1);
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.nav-icons button,
.nav-icons a {
    background: none;
    border: none;
    color: var(--ink);
    position: relative;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}
.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--clay-dark);
    color: var(--white);
    font-size: 0.58rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Mobile Burger */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 6px;
    z-index: 60;
    flex-shrink: 0;
}
.burger span {
    width: 24px;
    height: 2.5px;
    background: var(--ink);
    display: block;
    transition: all 0.3s ease;
    transform-origin: center;
}
.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.burger.active span:nth-child(2) {
    opacity: 0;
}
.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation Styles */
@media (max-width: 1024px) {
    .main-nav a {
        font-size: 0.78rem;
    }
}

@media (max-width: 900px) {
    .burger {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        background: var(--linen);
        flex-direction: column;
        align-items: flex-start;
        padding: 90px 32px 32px;
        gap: 18px;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-lift);
        overflow-y: auto;
        z-index: 50;
    }
    .main-nav.open {
        right: 0;
    }
    .main-nav a {
        font-size: 1rem;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
    }
    .main-nav a::after {
        display: none;
    }
    .main-nav a:hover {
        color: var(--clay-dark);
    }

    /* Dropdown in mobile */
    .nav-dropdown {
        width: 100%;
    }
    .dropdown-btn {
        font-size: 1rem;
        padding: 10px 0;
        width: 100%;
        justify-content: space-between;
        border-bottom: 1px solid var(--line);
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        max-height: none;
        background: transparent;
    }
    .dropdown-menu a {
        border-bottom: none;
        padding: 8px 0;
        font-size: 0.92rem;
    }
    .nav-dropdown:hover .dropdown-menu {
        display: none;
    }
    .nav-dropdown.open .dropdown-menu {
        display: block;
    }
}

@media (max-width: 600px) {
    .nav-row {
        padding: 12px 8px;
        min-height: 60px;
        gap: 10px;
    }
    .logo img {
        max-height: 40px;
    }
    .nav-icons {
        gap: 10px;
    }
    .icon-btn svg {
        width: 18px;
        height: 18px;
    }
    .cart-count {
        min-width: 15px;
        height: 15px;
        font-size: 0.52rem;
        top: -5px;
        right: -5px;
    }
    .burger span {
        width: 20px;
        height: 2px;
        gap: 4px;
    }
    .announce {
        font-size: 0.68rem;
        padding: 7px 10px;
    }
    .main-nav {
        padding: 80px 24px 24px;
    }
    .main-nav a {
        font-size: 0.92rem;
    }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: flex-end;
    background: var(--plaster);
    overflow: hidden;
}
.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(42, 36, 29, 0.62) 0%,
        rgba(42, 36, 29, 0.05) 55%
    );
}
.hero-inner {
    position: relative;
    z-index: 2;
    color: var(--white);
    padding: 40px 0 56px;
    width: 100%;
}
.hero-inner .eyebrow {
    color: #e8d9c4;
}
.hero-inner .eyebrow::before {
    background: #e8d9c4;
}
.hero-inner h1 {
    color: var(--white);
    font-size: clamp(2rem, 5vw, 4.2rem);
    max-width: 14ch;
    margin-top: 0.3em;
}
.hero-inner p {
    max-width: 44ch;
    color: #ede6d9;
    font-size: 1.05rem;
    margin-bottom: 1.6em;
}

@media (max-width: 600px) {
    .hero {
        min-height: 50vh;
    }
    .hero-inner {
        padding: 30px 0 40px;
    }
    .hero-inner h1 {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
    }
    .hero-inner p {
        font-size: 0.92rem;
    }
}

/* ---------- Section headers ---------- */
.section {
    padding: 60px 0;
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    gap: 20px;
    flex-wrap: wrap;
}
.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.6rem);
}
.section-head p {
    color: var(--ink-soft);
    max-width: 52ch;
}

@media (max-width: 600px) {
    .section {
        padding: 40px 0;
    }
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------- Category strip / Swiper ---------- */
.cat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.cat-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 3/4;
}
.cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.cat-card:hover img {
    transform: scale(1.06);
}
.cat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(42, 36, 29, 0.55),
        rgba(42, 36, 29, 0) 60%
    );
}
.cat-card span {
    position: absolute;
    left: 18px;
    bottom: 16px;
    z-index: 2;
    color: var(--white);
    font-family: "Fraunces", serif;
    font-size: 1.15rem;
}

/* Swiper custom styles */
.swiper {
    width: 100%;
    padding-bottom: 40px;
}
.swiper-slide {
    height: auto;
}
.swiper-pagination-bullet {
    background: var(--ink-soft);
    opacity: 0.4;
}
.swiper-pagination-bullet-active {
    background: var(--clay-dark);
    opacity: 1;
}

@media (max-width: 900px) {
    .cat-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   ADVANCED PRODUCT CARD SYSTEM
   ============================================================ */
.grid-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 24px;
}

@media (max-width: 1100px) {
    .grid-products {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .grid-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 16px;
    }
}
@media (max-width: 460px) {
    .grid-products {
        grid-template-columns: 1fr 1fr;
        gap: 20px 12px;
    }
}

.p-card {
    position: relative;
    display: flex;
    flex-direction: column;
}
.p-card-media {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--plaster);
    box-shadow: var(--shadow-card);
}
.p-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        opacity 0.45s ease,
        transform 0.6s ease;
}
.p-card-media img.img-b {
    position: absolute;
    inset: 0;
    opacity: 0;
}
.p-card:hover .p-card-media img.img-a {
    opacity: 0;
}
.p-card:hover .p-card-media img.img-b {
    opacity: 1;
    transform: scale(1.04);
}

.p-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    background: var(--white);
    color: var(--clay-dark);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 20px;
}
.p-badge.sage {
    color: var(--sage-dark);
}

.p-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 253, 249, 0.92);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-6px);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        background 0.2s ease;
}
.p-card:hover .p-wishlist {
    opacity: 1;
    transform: translateY(0);
}
.p-wishlist svg {
    width: 16px;
    height: 16px;
    stroke: var(--ink);
    fill: none;
}
.p-wishlist.active svg {
    fill: var(--clay-dark);
    stroke: var(--clay-dark);
}

.p-quickadd {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    opacity: 0;
    transform: translateY(8px);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}
.p-card:hover .p-quickadd {
    opacity: 1;
    transform: translateY(0);
}
.p-quickadd button {
    width: 100%;
    background: var(--ink);
    color: var(--white);
    border: none;
    padding: 11px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: var(--radius-sm);
}
.p-quickadd button:hover {
    background: var(--clay-dark);
}

/* the signature material-swatch strip */
.p-swatch {
    height: 5px;
    width: 100%;
    border-radius: 3px;
    margin: 12px 0 10px;
    background: var(--swatch, linear-gradient(90deg, #c7b299, #8c6e54));
}

.p-info .p-cat {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 600;
    margin-bottom: 4px;
}
.p-info h3 {
    font-size: 1.02rem;
    font-weight: 500;
    margin: 0 0 6px;
    line-height: 1.3;
}
.p-info h3 a:hover {
    color: var(--clay-dark);
}
.p-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    flex-wrap: wrap;
}
.p-price .was {
    color: var(--ink-soft);
    text-decoration: line-through;
    font-size: 0.85rem;
}
.p-price .now.sale {
    color: var(--clay-dark);
    font-weight: 600;
}
.p-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: var(--brass);
    font-size: 0.78rem;
    flex-wrap: wrap;
}
.p-rating .count {
    color: var(--ink-soft);
}
.p-swatches-mini {
    display: flex;
    gap: 6px;
    margin-top: 9px;
    flex-wrap: wrap;
}
.p-swatches-mini span {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(42, 36, 29, 0.15);
    display: inline-block;
    cursor: pointer;
}
.p-swatches-mini span.active {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* ---------- Filters bar (catalog) ---------- */
.catalog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 34px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.chip {
    border: 1px solid var(--line);
    background: var(--white);
    padding: 9px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--ink-soft);
    transition: all 0.2s ease;
}
.chip.active,
.chip:hover {
    border-color: var(--ink);
    color: var(--ink);
    background: var(--plaster);
}
.sort select {
    border: 1px solid var(--line);
    background: var(--white);
    padding: 9px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--ink);
}

@media (max-width: 600px) {
    .catalog-head {
        flex-direction: column;
        align-items: stretch;
    }
    .filters {
        justify-content: center;
    }
    .sort select {
        width: 100%;
    }
}

/* ---------- Product detail ---------- */
.pd-wrap {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    padding: 48px 0;
}
@media (max-width: 900px) {
    .pd-wrap {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 28px 0;
    }
}
.pd-gallery-main {
    aspect-ratio: 4/5;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--plaster);
    margin-bottom: 14px;
}
.pd-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pd-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.pd-thumbs img {
    width: 74px;
    height: 88px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    opacity: 0.65;
}
.pd-thumbs img.active {
    opacity: 1;
    border-color: var(--ink);
}
.pd-info .eyebrow {
    margin-bottom: 14px;
}
.pd-info h1 {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
}
.pd-price {
    font-size: 1.3rem;
    margin: 14px 0 22px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.pd-price .was {
    text-decoration: line-through;
    color: var(--ink-soft);
    font-size: 1rem;
}
.pd-desc {
    color: var(--ink-soft);
    margin-bottom: 26px;
    line-height: 1.7;
}

.pd-option-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}
.pd-swatch-row {
    display: flex;
    gap: 10px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}
.pd-swatch-row button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
}
.pd-swatch-row button.active {
    border-color: var(--ink);
}

.pd-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    width: fit-content;
    margin-bottom: 18px;
}
.pd-qty button {
    background: none;
    border: none;
    width: 40px;
    height: 44px;
    font-size: 1.1rem;
    color: var(--ink);
}
.pd-qty input {
    width: 44px;
    text-align: center;
    border: none;
    background: none;
    font-size: 1rem;
}

.pd-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.pd-actions .btn {
    flex: 1;
    min-width: 140px;
}
.pd-meta {
    border-top: 1px solid var(--line);
    padding-top: 22px;
    font-size: 0.86rem;
    color: var(--ink-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accordion {
    border-top: 1px solid var(--line);
    margin-top: 20px;
}
.accordion-item {
    border-bottom: 1px solid var(--line);
}
.accordion-item summary {
    padding: 16px 2px;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.accordion-item summary::-webkit-details-marker {
    display: none;
}
.accordion-item summary::after {
    content: "+";
    font-size: 1.2rem;
    color: var(--ink-soft);
}
.accordion-item[open] summary::after {
    content: "–";
}
.accordion-item p {
    padding: 0 2px 16px;
    color: var(--ink-soft);
}

/* ---------- Cart ---------- */
.cart-wrap {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 40px;
    padding: 48px 0;
    align-items: start;
}
@media (max-width: 900px) {
    .cart-wrap {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 28px 0;
    }
}
.cart-line {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
}
.cart-line img {
    width: 80px;
    height: 92px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}
.cart-line h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 500;
}
.cart-line .meta {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-bottom: 8px;
}
.cart-line .row-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.qty-mini {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.qty-mini button {
    background: none;
    border: none;
    width: 30px;
    height: 32px;
    font-size: 1rem;
}
.qty-mini input {
    width: 32px;
    border: none;
    text-align: center;
    background: none;
    font-size: 0.9rem;
}
.remove-link {
    font-size: 0.78rem;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--ink-soft);
}
.remove-link:hover {
    color: var(--error);
    border-color: var(--error);
}
.cart-line-price {
    text-align: right;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cart-line {
        grid-template-columns: 60px 1fr;
        gap: 12px;
    }
    .cart-line img {
        width: 60px;
        height: 70px;
    }
    .cart-line-price {
        grid-column: 2;
        text-align: left;
        padding-top: 4px;
    }
    .cart-line .row-actions {
        grid-column: 2;
    }
}

.summary-card {
    background: var(--plaster);
    border-radius: var(--radius-md);
    padding: 24px;
    position: sticky;
    top: 100px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
}
.summary-row.total {
    border-top: 1px solid var(--line);
    margin-top: 10px;
    padding-top: 16px;
    font-size: 1.1rem;
    color: var(--ink);
    font-weight: 600;
}
.promo {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;
}
.promo input {
    flex: 1;
    border: 1px solid var(--line);
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    background: var(--white);
    min-width: 120px;
}
.promo button {
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}
.empty-state svg {
    width: 64px;
    height: 64px;
    stroke: var(--ink-soft);
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .summary-card {
        padding: 20px;
    }
}

/* ---------- Checkout ---------- */
.checkout-wrap {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    padding: 40px 0 70px;
}
@media (max-width: 900px) {
    .checkout-wrap {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 28px 0 60px;
    }
}
.steps {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
    font-size: 0.82rem;
    color: var(--ink-soft);
    flex-wrap: wrap;
}
.steps .step.active {
    color: var(--ink);
    font-weight: 600;
}
fieldset {
    border: none;
    padding: 0;
    margin: 0 0 28px;
}
legend {
    font-family: "Fraunces", serif;
    font-size: 1.2rem;
    margin-bottom: 14px;
    padding: 0;
}
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field.full {
    grid-column: 1/-1;
}
.field label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    font-weight: 600;
}
.field input,
.field select {
    border: 1px solid var(--line);
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    background: var(--white);
    width: 100%;
}
.field input:focus,
.field select:focus,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}
.pay-methods {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.pay-methods label {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    min-width: 120px;
}
.pay-methods input {
    accent-color: var(--ink);
}
.pay-methods label.checked {
    border-color: var(--ink);
    background: var(--plaster);
}
.mini-line {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
}
.mini-line img {
    width: 52px;
    height: 62px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}
.field-error {
    color: var(--error);
    font-size: 0.78rem;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .field-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .pay-methods label {
        min-width: 100%;
    }
    .steps {
        gap: 12px;
        font-size: 0.75rem;
    }
}

/* ---------- Order success ---------- */
.success-wrap {
    text-align: center;
    padding: 90px 20px;
    max-width: 640px;
    margin: 0 auto;
}
.success-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: var(--sage);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 26px;
}
.success-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--white);
    fill: none;
}
.order-num {
    display: inline-block;
    background: var(--plaster);
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 14px 0 30px;
}

/* ---------- Footer ---------- */
footer.site {
    background: var(--ink);
    color: #dcd3c4;
    padding: 60px 0 24px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 40px;
}
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}
@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}
footer.site h4 {
    color: var(--white);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: "Work Sans", sans-serif;
    font-weight: 600;
    margin-bottom: 14px;
}
footer.site ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
footer.site a {
    color: #bdb2a0;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}
footer.site a:hover {
    color: var(--white);
}
footer.site .logo {
    color: var(--white);
}
footer.site .logo img {
    max-height: 50px;
    width: auto;
}
footer.site p {
    margin-top: 14px;
    max-width: 32ch;
    color: #bdb2a0;
    font-size: 0.92rem;
    line-height: 1.6;
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #9c927f;
    flex-wrap: wrap;
    gap: 10px;
}
.newsletter-form {
    display: flex;
    gap: 0;
    margin-top: 6px;
    max-width: 400px;
}
.newsletter-form input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: var(--white);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    min-width: 0;
}
.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.newsletter-form button {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 12px 20px;
    background: var(--clay-dark);
    border: 1px solid var(--clay-dark);
    color: var(--white);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    transition: background 0.2s ease;
}
.newsletter-form button:hover {
    background: var(--clay);
}

@media (max-width: 600px) {
    footer.site {
        padding: 40px 0 20px;
        margin-top: 40px;
    }
    .newsletter-form {
        max-width: 100%;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .newsletter-form button {
        padding: 10px 14px;
    }
}

/* ---------- Generic content card (contact, track order, wishlist, etc.) ---------- */
.card-panel {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 20px;
}
.card-panel h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.two-col-page {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
}
@media (max-width: 800px) {
    .two-col-page {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
@media (max-width: 600px) {
    .card-panel {
        padding: 18px;
    }
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background: var(--ink);
    color: var(--white);
    padding: 16px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    box-shadow: var(--shadow-lift);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(20px);
    opacity: 0;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
    max-width: 90%;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.alert-success {
    background: #e4e9dd;
    color: var(--sage-dark);
}
.alert-error {
    background: #f3deda;
    color: var(--error);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
