/* ── RESET ───────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --cream: #faf7f2;
    --parchment: #f0e8d8;
    --warm-mid: #dfd0b8;
    --terra: #c4613a;
    --terra-lt: #e8a87c;
    --terra-dk: #9b3d1f;
    --brown: #2d2118;
    --muted: #9b8b7a;
    --border: #ddd0bc;
    --surface: #f5ece0;

    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: "Jost", sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --r: 2px;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--cream);
    color: var(--brown);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    background: none;
}
img {
    display: block;
    max-width: 100%;
}
a {
    color: inherit;
    text-decoration: none;
}

::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: var(--parchment);
}
::-webkit-scrollbar-thumb {
    background: var(--warm-mid);
    border-radius: 99px;
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(14px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
@keyframes slideInR {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}
@keyframes slideOutR {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}
@keyframes toastUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
@keyframes ticker {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}
@keyframes pulseDot {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

/* ── HEADER ──────────────────────────────────────────────── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 0 2rem;
    height: 150px;
    background: rgba(250, 247, 242, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.logo-image {
    width: clamp(50px, 15vw, 150px);
}

.logo {
    display: flex;
    align-items: center; /* vertically centers them */
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.03em;
}
.logo em {
    font-style: italic;
    color: var(--terra);
}

nav {
    display: flex;
    gap: 2.2rem;
}
nav a {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.2s;
}
nav a:hover {
    color: var(--terra);
}

.bag-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brown);
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: var(--r);
    transition:
        border-color 0.2s,
        color 0.2s;
}
.bag-btn:hover {
    border-color: var(--terra);
    color: var(--terra);
}

.bag-count {
    background: var(--terra);
    color: #fff;
    font-size: 10px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
}
.bag-count.visible {
    display: flex;
}

/* ── TICKER ──────────────────────────────────────────────── */
.ticker-wrap {
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: var(--parchment);
    height: 32px;
    display: flex;
    align-items: center;
}
.ticker-track {
    display: flex;
    white-space: nowrap;
    animation: ticker 32s linear infinite;
}
.ticker-track span {
    font-size: 11px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 2rem;
}
.ticker-track span.dot {
    color: var(--terra);
    padding: 0;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: end;
    padding: 6rem 2rem 5rem;
    border-bottom: 1px solid var(--border);
    max-width: 1200px;
    margin: 0 auto;
}

.hero-left {
    animation: fadeUp 0.9s var(--ease) both;
}
.hero-eyebrow {
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--terra);
    margin-bottom: 1.2rem;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 300;
    line-height: 0.94;
    letter-spacing: -0.01em;
}
.hero-title em {
    font-style: italic;
    color: var(--terra);
}

.hero-right {
    animation: fadeUp 0.9s 0.12s var(--ease) both;
}
.hero-desc {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.8;
    max-width: 360px;
}
.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2.4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.stat-val {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 400;
    color: var(--terra);
    line-height: 1;
}
.stat-lbl {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 4px;
}

/* ── FILTER BAR ──────────────────────────────────────────── */
.filter-bar {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--border);
}
.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    flex-shrink: 0;
    padding: 14px 26px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    border-right: 1px solid var(--border);
    border-bottom: 2px solid transparent;
    transition:
        color 0.2s,
        background 0.2s,
        border-color 0.2s;
}
.filter-btn:hover {
    color: var(--brown);
}
.filter-btn.active {
    color: var(--terra);
    background: var(--parchment);
    border-bottom-color: var(--terra);
}

/* ── CATALOG BAR ─────────────────────────────────────────── */
.catalog-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.6rem;
    border-bottom: 1px solid var(--border);
    background: var(--parchment);
}
.catalog-bar-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    color: var(--muted);
}
.catalog-bar-count {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── GRID ────────────────────────────────────────────────── */
.catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    border-left: 1px solid var(--border);
}

/* ── PRODUCT CARD ────────────────────────────────────────── */
.card {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}
.card:hover {
    background: var(--parchment);
}
.card.sold-out {
    opacity: 0.52;
    pointer-events: none;
}

.card-img {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.card:hover .card-img img {
    transform: scale(1.05);
}

.card-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
}
.card-placeholder .paw {
    font-size: 28px;
    opacity: 0.4;
}
.card-placeholder span {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--warm-mid);
}

.card-badge {
    position: absolute;
    top: 11px;
    left: 11px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid;
    background: rgba(250, 247, 242, 0.88);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 5px;
}
.badge-live {
    border-color: var(--terra);
    color: var(--terra);
}
.badge-new {
    border-color: #7a9e7e;
    color: #7a9e7e;
}
.badge-closed {
    border-color: var(--muted);
    color: var(--muted);
}

.badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    animation: pulseDot 1.8s infinite;
}

.card-swatches {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}
.card-swatch {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.card-info {
    padding: 1.1rem 1.3rem;
    border-top: 1px solid var(--border);
}
.card-collection {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--terra);
    margin-bottom: 4px;
}
.card-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.1;
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}
.card-price {
    font-family: var(--font-display);
    font-size: 1.15rem;
}
.card-edition {
    font-size: 11px;
    color: var(--muted);
}
.card-edition strong {
    color: var(--brown);
}

/* ── MODAL OVERLAY ───────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(45, 33, 24, 0.52);
    backdrop-filter: blur(7px);
    display: none;
    place-items: center;
    padding: 1.5rem;
}
.modal-overlay.open {
    display: grid;
    animation: fadeIn 0.25s ease both;
}

.modal {
    background: var(--cream);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    animation: scaleIn 0.32s var(--ease) both;
}

.modal-img-panel {
    position: relative;
    aspect-ratio: 1;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-img-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: 300px;
}
.modal-placeholder .paw {
    font-size: 52px;
    opacity: 0.35;
}
.modal-placeholder span {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--warm-mid);
}

.modal-close {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
    z-index: 2;
    transition:
        border-color 0.2s,
        color 0.2s;
}
.modal-close:hover {
    border-color: var(--terra);
    color: var(--terra);
}

.modal-info {
    padding: 2rem;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.modal-collection {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terra);
    margin-bottom: 5px;
}
.modal-name {
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 400;
    line-height: 1;
}
.modal-desc {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.8;
}

/* Colorway picker */
.picker-label {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}
.picker-label strong {
    color: var(--brown);
    font-weight: 400;
}

.colorway-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cw-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--brown);
    transition:
        border-color 0.2s,
        color 0.2s,
        background 0.2s;
}
.cw-btn:hover:not(.cw-soldout) {
    border-color: var(--terra-lt);
}
.cw-btn.cw-selected {
    border-color: var(--terra);
    color: var(--terra);
    background: rgba(196, 97, 58, 0.05);
}
.cw-btn.cw-soldout {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.cw-swatch {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Edition tracker */
.edition-tracker {
    background: var(--parchment);
    border: 1px solid var(--border);
    padding: 12px 16px;
}
.edition-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 8px;
}
.edition-row strong {
    color: var(--brown);
    font-size: 13px;
    font-weight: 400;
}
.edition-row .low {
    color: var(--terra);
}

.edition-bar {
    height: 3px;
    background: var(--warm-mid);
    border-radius: 99px;
    overflow: hidden;
}
.edition-fill {
    height: 100%;
    background: var(--terra);
    border-radius: 99px;
    transition: width 0.4s var(--ease);
}

/* Price & CTA */
.modal-price {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 400;
}

.add-btn {
    width: 100%;
    padding: 15px;
    background: var(--terra);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition:
        background 0.2s,
        transform 0.1s;
    border: none;
}
.add-btn:hover:not(:disabled) {
    background: var(--terra-dk);
}
.add-btn:active:not(:disabled) {
    transform: scale(0.99);
}
.add-btn:disabled {
    background: var(--warm-mid);
    color: var(--muted);
    cursor: not-allowed;
}

.secure-note {
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    letter-spacing: 0.07em;
    margin-top: 10px;
}

/* ── CART DRAWER ─────────────────────────────────────────── */
.cart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 299;
    background: rgba(45, 33, 24, 0.32);
    display: none;
}
.cart-backdrop.open {
    display: block;
    animation: fadeIn 0.2s ease;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 100vw);
    z-index: 300;
    background: var(--cream);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.38s var(--ease);
}
.cart-drawer.open {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem 1.6rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--cream);
    z-index: 1;
}
.cart-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
}
.cart-close-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
    transition: border-color 0.2s;
}
.cart-close-btn:hover {
    border-color: var(--terra);
    color: var(--terra);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 12px;
    text-align: center;
}
.cart-empty .paw {
    font-size: 42px;
}
.cart-empty p {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--muted);
}
.cart-empty button {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--terra);
    border-bottom: 1px solid var(--terra);
    padding-bottom: 2px;
    margin-top: 4px;
}

.cart-item {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 1rem;
    padding: 1.2rem 1.6rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.cart-thumb {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-thumb-inner {
    text-align: center;
}
.cart-thumb-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin: 0 auto 3px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.cart-item-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
}
.cart-item-cw {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    font-size: 11px;
    color: var(--muted);
}
.cart-item-cw-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--muted);
    transition: border-color 0.2s;
}
.qty-btn:hover {
    border-color: var(--terra);
    color: var(--terra);
}
.qty-val {
    font-size: 13px;
    min-width: 16px;
    text-align: center;
}

.cart-item-right {
    text-align: right;
}
.cart-item-price {
    font-family: var(--font-display);
    font-size: 1.1rem;
}
.cart-remove {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 6px;
    border-bottom: 1px solid transparent;
    transition:
        color 0.2s,
        border-color 0.2s;
}
.cart-remove:hover {
    color: var(--terra);
    border-color: var(--terra);
}

/* Summary */
.cart-summary {
    border-top: 1px solid var(--border);
    padding: 1.4rem 1.6rem;
    background: var(--parchment);
    position: sticky;
    bottom: 0;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}
.summary-row.total {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 4px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--brown);
    margin-bottom: 1.1rem;
}
.summary-free {
    color: var(--terra);
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: var(--terra);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: none;
    transition: background 0.2s;
}
.checkout-btn:hover {
    background: var(--terra-dk);
}

.checkout-note {
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    margin-top: 10px;
    letter-spacing: 0.07em;
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    background: var(--parchment);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}
.footer-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 8px;
}
.footer-logo em {
    font-style: italic;
    color: var(--terra);
}
.footer-desc {
    font-size: 12px;
    color: var(--muted);
    max-width: 300px;
    line-height: 1.75;
}
.footer-copy {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.07em;
}

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    z-index: 400;
    opacity: 0;
    pointer-events: none;
    background: var(--brown);
    color: #fff;
    padding: 12px 24px;
    font-size: 12px;
    letter-spacing: 0.08em;
    white-space: nowrap;
    border-left: 3px solid var(--terra);
    transition:
        opacity 0.3s,
        transform 0.3s;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 700px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 3.5rem 1.2rem 3rem;
    }
    .modal {
        grid-template-columns: 1fr;
    }
    .modal-img-panel {
        aspect-ratio: auto;
        min-height: 240px;
    }
    nav {
        display: none;
    }
    header {
        padding: 0 1.2rem;
    }
    .catalog {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}
