@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&family=Fraunces:opsz,wght@9..144,600&display=swap');

:root {
    --bg: #fdf9f6;
    --surface: #fffdfb;
    --surface-soft: #f7f1eb;
    --text: #2d2430;
    --muted: #6f6072;
    --primary: #8a5c6b;
    --primary-strong: #6e4250;
    --accent: #c69a6b;
    --border: #eadfd6;
    --ok: #4f7a62;
    --danger: #b14963;
    --radius: 14px;
    --shadow: 0 16px 38px rgba(77, 52, 61, 0.14);
}

/* :root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: #eef2f8;
    --text: #14213d;
    --muted: #5c667d;
    --primary: #0b6e99;
    --primary-strong: #0a5575;
    --accent: #ff6b4a;
    --border: #dde3ee;
    --ok: #0d8a4f;
    --danger: #ca2f47;
    --radius: 14px;
    --shadow: 0 16px 38px rgba(22, 40, 70, 0.12);
} */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(138, 92, 107, 0.16), transparent 44%),
        radial-gradient(circle at top left, rgba(198, 154, 107, 0.14), transparent 34%),
        var(--bg);
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

h1 {
    margin-bottom: 1rem;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h2 {
    margin-bottom: 0.6rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

p {
    margin-top: 0;
    color: var(--muted);
}

.container {
    width: min(1140px, calc(100% - 2rem));
    margin: 0 auto;
}

#header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(6px);
    background: rgba(246, 247, 251, 0.9);
    border-bottom: 1px solid rgba(20, 33, 61, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.logo {
    font-family: 'Fraunces', serif;
    color: var(--text);
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    letter-spacing: 0.02em;
}

.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.8rem;
}

.cart-status {
    padding: 0.65rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.92rem;
}

.cart-status a {
    margin-left: 0.45rem;
    font-weight: 700;
}

.language-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.language-form label {
    margin: 0;
    font-size: 0.86rem;
    color: var(--muted);
}

.language-form select {
    border: 0;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 700;
    padding-right: 0.25rem;
}

#content {
    padding: 1.8rem 0 3rem;
}

.shop-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

#sidebar,
#main,
.product-detail,
.order-info,
.order-form,
table.cart,
.recommendations,
.coupon-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

#sidebar {
    padding: 1.1rem;
}

#sidebar h3 {
    margin-bottom: 0.8rem;
}

#sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

#sidebar ul li a {
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    color: var(--text);
    background: var(--surface-soft);
}

#sidebar ul li.selected a {
    background: linear-gradient(130deg, var(--primary), var(--primary-strong));
    color: #fff;
}

#main {
    padding: 1.2rem;
}

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

.product-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 25px rgba(15, 44, 82, 0.16);
}

.product-image-link {
    display: block;
}

.product-card-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
    display: block;
    background: var(--surface-soft);
}

.product-card-body {
    padding: 0.9rem;
}

.product-name {
    color: var(--text);
    font-weight: 700;
    display: block;
    margin-bottom: 0.35rem;
}

.product-price {
    margin: 0;
    color: var(--primary-strong);
    font-weight: 800;
}

.product-detail {
    padding: 1.2rem;
}

.product-detail > img {
    width: 100%;
    max-width: 450px;
    display: block;
    margin: 0 auto 1.2rem;
    border-radius: 12px;
    object-fit: cover;
    object-position: center;
}

.product-detail-content {
    max-width: 70ch;
}

.product-detail h2 a {
    color: var(--muted);
    font-family: 'Manrope', sans-serif;
    font-size: 1.05rem;
}

.product-detail .price {
    font-size: 1.7rem;
    color: var(--primary-strong);
    font-weight: 800;
    margin-bottom: 0.85rem;
}

.recommendations {
    margin-top: 1.2rem;
    padding: 1rem;
    overflow: auto;
}

.recommendations h3 {
    margin-bottom: 0.9rem;
}

.recommendations .item {
    width: 170px;
    margin-right: 0.8rem;
    float: left;
}

.recommendations img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.recommendations p {
    margin-top: 0.35rem;
}

.recommendations.cart {
    margin-top: 1rem;
}

table {
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
}

table.cart {
    margin-bottom: 1rem;
    overflow: hidden;
}

table th,
table td {
    text-align: left;
    padding: 0.8rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 0.95rem;
}

table th {
    background: var(--surface-soft);
    color: var(--text);
}

table.cart img {
    width: 84px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

tbody tr.subtotal {
    background: #f7efe8;
}

tbody tr.total {
    background: linear-gradient(130deg, var(--primary), var(--primary-strong));
    color: #fff;
    font-weight: 800;
}

tbody tr.total td,
tbody tr.total .num {
    color: #fff;
}

tbody td.num {
    text-align: right;
    color: var(--text);
    font-weight: 700;
}

form {
    margin: 0;
}

form p {
    margin: 0 0 0.8rem;
}

form p label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
    color: var(--text);
}

form p input,
form p select,
form p textarea,
form div.field {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    font: inherit;
    background: #fff;
    color: var(--text);
}

.coupon-form {
    padding: 0.95rem;
    display: grid;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.order-form {
    padding: 1rem;
    margin-top: 1rem;
}

.order-info {
    padding: 1rem;
    margin-bottom: 1rem;
}

.order-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.order-info li {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--border);
}

.order-info li:last-child {
    border-bottom: 0;
}

.order-info p {
    margin-top: 0.7rem;
    margin-bottom: 0;
    font-weight: 800;
    color: var(--text);
}

a.button,
input[type='submit'] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    font-size: 0.93rem;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(130deg, var(--primary), var(--primary-strong));
    transition: transform 0.2s ease, filter 0.2s ease;
}

a.button:hover,
input[type='submit']:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    color: #fff;
}

a.button.light {
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.text-right {
    text-align: right;
}

.neg {
    color: var(--danger);
    font-weight: 700;
}

ul.errorlist {
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
    color: var(--danger);
    font-size: 0.9rem;
}

/* braintree hosted fields */
form div.field {
    height: auto;
    margin-bottom: 0.7rem;
}

@media (min-width: 920px) {
    .shop-layout {
        grid-template-columns: 250px 1fr;
        align-items: start;
    }

    .product-detail {
        display: grid;
        grid-template-columns: minmax(280px, 40%) 1fr;
        gap: 1.2rem;
        align-items: start;
    }

    .order-form,
    .order-info {
        margin-bottom: 0;
    }

    .order-form {
        width: 62%;
        float: left;
    }

    .order-info {
        width: 34%;
        float: right;
    }
}

@media (max-width: 919px) {
    table.cart {
        display: block;
        overflow-x: auto;
    }

    .text-right {
        display: flex;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(1140px, calc(100% - 1.2rem));
    }

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .cart-status,
    .language-form {
        width: 100%;
        border-radius: 12px;
    }

    .language-form {
        justify-content: space-between;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-detail {
        padding: 0.95rem;
    }

    .recommendations .item {
        width: 140px;
    }
}

@media (max-width: 420px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}
