@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;600;700&family=Playfair+Display:wght@500;700&display=swap');

:root {
    --bg: #f4f2ee;
    --ink: #161616;
    --muted: #6b6862;
    --accent: #0f6c5d;
    --accent-strong: #0b4d43;
    --accent-soft: rgba(15, 108, 93, 0.12);
    --card: #ffffff;
    --border: #e6e2da;
    --shadow-soft: 0 18px 40px rgba(20, 24, 22, 0.08);
    --shadow-card: 0 12px 30px rgba(22, 28, 26, 0.08);
    --radius-lg: 16px;
    --radius-xl: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 12% -10%, #ffffff 0%, #f8f6f2 50%, #f4f2ee 70%),
        radial-gradient(900px 400px at 90% 10%, #eef7f4 0%, rgba(238, 247, 244, 0) 60%),
        var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--accent-strong);
}

.container {
    width: min(1240px, 92vw);
    margin: 0 auto;
}

.site-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    backdrop-filter: blur(10px);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    font-family: "Playfair Display", serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.nav-links a,
.nav-links .link-button {
    padding: 6px 12px;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links .link-button:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.link-button {
    background: none;
    border: none;
    color: var(--ink);
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.site-main {
    padding: 36px 0 80px;
}

.hero {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 36px;
    box-shadow: var(--shadow-soft);
}

.hero h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(30px, 4vw, 40px);
    margin: 0 0 12px;
}

.hero p {
    margin: 0 0 20px;
    color: var(--muted);
}

.btn {
    background: linear-gradient(135deg, var(--accent), #15957f);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 12px 20px rgba(15, 108, 93, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(15, 108, 93, 0.28);
}

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

.section {
    margin-bottom: 36px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2,
.page-header h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(22px, 3vw, 30px);
    margin: 0;
}

.category-grid,
.product-grid {
    display: grid;
    gap: 16px;
}

.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.category-card,
.product-card,
.order-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.product-card:hover,
.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(22, 28, 26, 0.12);
}

.product-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 14px;
}

.product-info {
    margin-top: 10px;
}

.product-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.product-price {
    color: var(--accent);
    font-weight: 600;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr auto;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}

.filter-bar input,
.filter-bar select,
.auth-card input,
.auth-card textarea,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font: inherit;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 108, 93, 0.15);
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 32px;
    align-items: start;
}

.product-gallery img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 12px;
    object-fit: cover;
}

.main-image-frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f7f4ee;
    height: min(60vh, 520px);
    box-shadow: var(--shadow-soft);
}

.main-image-frame::before {
    content: "";
    position: absolute;
    inset: -10%;
    background-image: var(--frame-image);
    background-size: cover;
    background-position: center;
    filter: blur(26px);
    opacity: 0.35;
    transform: scale(1.05);
}

.product-gallery .main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
    border-radius: 16px;
    position: relative;
    z-index: 1;
}

.product-gallery .thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.product-gallery .thumb-image {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-gallery .thumb-image:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.product-gallery .thumb-image.is-active {
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(15, 108, 93, 0.25);
}

.main-image-placeholder {
    height: min(70vh, 640px);
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: 16px;
    color: var(--muted);
}

.price-tier table,
.variant-table,
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.page-header {
    margin-bottom: 20px;
}

.product-meta {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.product-meta h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(26px, 3vw, 34px);
    margin: 0 0 12px;
}

.product-meta .sku {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.price-tier h3,
.description h3 {
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.price-tier table {
    background: #fbfaf7;
    border-radius: 14px;
    overflow: hidden;
}

.price-tier thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.description p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.auth-card {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.auth-card label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.order-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 22px;
    display: grid;
    gap: 18px;
    box-shadow: var(--shadow-soft);
}

.option-stack {
    display: grid;
    gap: 16px;
}

.option-group {
    display: grid;
    gap: 10px;
}

.option-label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-hint {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.option-values {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-chip {
    border: 1px solid #ddd8cf;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    padding: 8px 12px;
    transition: all 0.15s ease;
}

.option-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.option-chip.is-selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.option-chip.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.option-chip.is-hidden {
    display: none;
}

.option-group.is-locked .option-label {
    color: var(--muted);
}

.color-swatch {
    position: relative;
    width: 62px;
    height: 62px;
    padding: 8px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    display: grid;
    align-items: end;
    overflow: hidden;
}

.color-swatch .swatch-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.color-swatch .chip-label {
    font-size: 11px;
    text-align: center;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    padding: 2px 6px;
    z-index: 1;
}

.size-chip {
    min-width: 56px;
    height: 40px;
}

.order-row {
    display: grid;
    grid-template-columns: auto 140px 1fr;
    align-items: center;
    gap: 12px;
}

.field-label {
    font-size: 13px;
    color: var(--muted);
}

.price-pill {
    justify-self: end;
    background: #f6f4f0;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.stock-pill {
    justify-self: end;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.stock-pill.is-in {
    background: #e7f4ef;
    color: #1b5e4b;
}

.stock-pill.is-low {
    background: #fff4e5;
    color: #9a5b00;
}

.stock-pill.is-out {
    background: #fdecea;
    color: #8a1f11;
}

.order-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.variant-status {
    font-size: 12px;
    color: var(--muted);
}

.order-submit {
    margin-top: 20px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 12px;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.alert.success {
    background: #e7f4ef;
    color: #1b5e4b;
}

.alert.error {
    background: #fdecea;
    color: #8a1f11;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    background: #fff;
    color: var(--muted);
    font-size: 13px;
}

.honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

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

.hero,
.product-detail,
.order-panel,
.product-card,
.category-card,
.order-card {
    animation: rise 0.6s ease both;
}

.pagination {
    margin-top: 24px;
}

.pagination nav {
    display: flex;
    justify-content: center;
}

.pagination .sm\\:hidden {
    display: none;
}

.pagination .sm\\:flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination .sm\\:flex > div {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.pagination a,
.pagination span[aria-current] > span,
.pagination span[aria-disabled] > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1;
    background: #fff;
    color: var(--ink);
}

.pagination .relative.inline-flex {
    min-width: 32px !important;
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    line-height: 1 !important;
}

.pagination .sm\\:hidden .relative.inline-flex {
    padding: 0 12px !important;
}

.pagination a {
    transition: all 0.15s ease;
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination span[aria-current] > span {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pagination span[aria-disabled] > span {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination svg {
    width: 16px;
    height: 16px;
}

@media (min-width: 1024px) {
    .product-meta {
        position: sticky;
        top: 24px;
    }
}

@media (max-width: 640px) {
    .pagination nav {
        justify-content: space-between;
    }
    .pagination .sm\\:hidden {
        display: flex;
    }
    .pagination .sm\\:flex {
        display: none;
    }
}

@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        grid-template-columns: 1fr;
    }
    .order-row {
        grid-template-columns: 1fr;
        justify-items: start;
    }
    .price-pill {
        justify-self: start;
    }
    .stock-pill {
        justify-self: start;
    }
    .main-image-frame,
    .product-gallery .main-image,
    .main-image-placeholder {
        height: min(50vh, 360px);
    }
    .color-swatch {
        width: 56px;
        height: 56px;
    }
}
