@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Jost:wght@400;500;600&display=swap');

:root {
    --ink: #1d1a19;
    --muted: #6f6662;
    --brand: #a8475f;
    --brand-dark: #87364b;
    --on-brand: #fff;
    --gold: #b38a52;
    --cream: #faf6f3;
    --line: #ebe2dc;
    --surface: #fffdfb;
    --surface-raised: #fff;
    --surface-muted: #f3ebe6;
    --blush: #f4e3e3;
    --sand: #ede3d6;
    --input-border: #e2d7cf;
    --card-shadow: 0 .75rem 2rem rgba(40, 24, 20, .06);
    --display-font: 'Cormorant Garamond', Georgia, serif;
    --body-font: 'Jost', system-ui, sans-serif;
}

[data-bs-theme="dark"] {
    color-scheme: dark;
    --ink: #f3ece8;
    --muted: #b9aca6;
    --brand: #e08aa0;
    --brand-dark: #c96d85;
    --on-brand: #1b1213;
    --gold: #d2ad78;
    --cream: #161213;
    --line: #3a3033;
    --surface: #1d1819;
    --surface-raised: #241e20;
    --surface-muted: #2d2528;
    --blush: #3a2a2f;
    --sand: #352d27;
    --input-border: #4a3e42;
    --card-shadow: 0 .75rem 2rem rgba(0, 0, 0, .3);
}

html {
    min-height: 100%;
    font-size: 16px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: var(--body-font);
    letter-spacing: .01em;
}

main {
    flex: 1;
}

a {
    color: var(--brand);
}

a:hover {
    color: var(--brand-dark);
}

/* ---------- Header ---------- */

.announcement-bar {
    padding: .45rem 0;
    color: var(--cream);
    background: var(--ink);
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: .18em;
    text-align: center;
    text-transform: uppercase;
}

.site-navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: .85rem 0;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.theme-toggle {
    flex: 0 0 auto;
    color: var(--ink);
    border-color: var(--line);
    border-radius: 999px;
}

.theme-toggle:hover {
    color: var(--on-brand);
    background: var(--brand);
    border-color: var(--brand);
}

.theme-toggle i {
    vertical-align: -.05em;
}

.navbar-brand {
    display: inline-flex;
    align-items: baseline;
    gap: .4rem;
    color: var(--ink);
    font-family: var(--display-font);
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: .24em;
    line-height: 1;
}

.navbar-brand:hover {
    color: var(--ink);
}

.site-navbar .nav-link {
    padding: .55rem .85rem;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus-visible {
    color: var(--brand);
}

.site-navbar .dropdown-menu {
    background: var(--surface-raised);
    border-color: var(--line);
    border-radius: .75rem;
    box-shadow: var(--card-shadow);
}

.site-navbar .dropdown-item {
    color: var(--ink);
    font-size: .9rem;
}

.site-navbar .dropdown-item:hover {
    background: var(--surface-muted);
}

.site-navbar .dropdown-item.active,
.site-navbar .dropdown-item:active {
    color: var(--on-brand);
    background: var(--brand);
}

.cart-link,
.currency-toggle {
    display: inline-flex;
    align-items: center;
}

.currency-toggle {
    background: none;
    border: 0;
}

.currency-symbol {
    display: inline-block;
    min-width: 1.4em;
    color: var(--brand);
    font-weight: 600;
    text-align: center;
}

.dropdown-item.active .currency-symbol {
    color: inherit;
}

.cart-count {
    margin-left: .4rem;
    color: var(--on-brand);
    background: var(--brand);
    font-size: .7rem;
}

.user-greeting {
    color: var(--muted) !important;
    text-transform: none !important;
    letter-spacing: .02em !important;
}

/* ---------- Buttons ---------- */

.btn {
    border-radius: 999px;
    font-weight: 500;
    letter-spacing: .06em;
}

.btn-brand {
    color: var(--on-brand);
    background: var(--brand);
    border-color: var(--brand);
}

.btn-brand:hover,
.btn-brand:focus,
.btn-brand:active {
    color: var(--on-brand) !important;
    background: var(--brand-dark) !important;
    border-color: var(--brand-dark) !important;
}

.btn-ink {
    color: var(--cream);
    background: var(--ink);
    border-color: var(--ink);
}

.btn-ink:hover,
.btn-ink:focus {
    color: var(--cream);
    background: var(--brand);
    border-color: var(--brand);
}

.btn-outline-ink {
    color: var(--ink);
    background: transparent;
    border-color: var(--ink);
}

.btn-outline-ink:hover,
.btn-outline-ink:focus {
    color: var(--cream);
    background: var(--ink);
    border-color: var(--ink);
}

.btn-outline-secondary {
    color: var(--ink);
    border-color: var(--line);
}

.btn-outline-secondary:hover {
    color: var(--ink);
    background: var(--surface-muted);
    border-color: var(--line);
}

/* ---------- Type ---------- */

.eyebrow {
    display: inline-block;
    margin-bottom: .9rem;
    color: var(--brand);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.display-heading,
.section-heading,
.page-heading {
    font-family: var(--display-font);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.05;
}

.section-heading,
.page-heading {
    margin-bottom: .6rem;
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
}

.section-intro,
.page-intro {
    max-width: 38rem;
    color: var(--muted);
    line-height: 1.7;
}

.text-brand {
    color: var(--brand);
}

/* ---------- Home ---------- */

.hero {
    padding: clamp(3rem, 7vw, 6rem) 0;
    background:
        radial-gradient(ellipse at 90% 10%, var(--blush), transparent 45%),
        var(--cream);
}

.hero-copy .display-heading {
    margin-bottom: 1.25rem;
    font-size: clamp(3.2rem, 8vw, 6.4rem);
}

.hero-copy .display-heading em {
    color: var(--brand);
    font-style: italic;
}

.hero-copy p {
    max-width: 30rem;
    margin-bottom: 2rem;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.8;
}

.home-highlights {
    padding: 1.6rem 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    color: var(--muted);
    font-size: .92rem;
}

.highlight i {
    color: var(--brand);
    font-size: 1.35rem;
}

.highlight strong {
    display: block;
    color: var(--ink);
    font-weight: 600;
}

.home-section {
    padding: clamp(3.5rem, 7vw, 5.5rem) 0 1rem;
}

.newsletter-band {
    margin-top: clamp(3rem, 6vw, 5rem);
    padding: clamp(2.5rem, 6vw, 4rem) 0;
    color: var(--cream);
    background: var(--ink);
    text-align: center;
}

.newsletter-band .section-heading {
    color: var(--cream);
}

.newsletter-band p {
    color: color-mix(in srgb, var(--cream) 75%, transparent);
}

/* ---------- Shop pages ---------- */

.content-page {
    padding-top: clamp(2rem, 5vw, 3.5rem);
}

.shop-header {
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}

.menu-toolbar {
    max-width: 430px;
}

.menu-search {
    min-height: 3rem;
    padding-left: 2.75rem;
    color: var(--ink);
    background-color: var(--surface-raised);
    border-color: var(--line);
    border-radius: 999px;
}

.search-wrap {
    position: relative;
}

.search-wrap .bi-search {
    position: absolute;
    top: 50%;
    left: 1.1rem;
    color: var(--muted);
    transform: translateY(-50%);
}

.product-card {
    height: 100%;
    overflow: hidden;
    background: transparent;
    border: 0;
}

.product-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--surface-muted);
    border-radius: 1rem;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.product-card:hover .product-media img {
    transform: scale(1.04);
}

.product-media .quick-add {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    left: .75rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
}

.product-card:hover .quick-add,
.product-card:focus-within .quick-add {
    opacity: 1;
    transform: none;
}

@media (hover: none) {
    .product-media .quick-add {
        opacity: 1;
        transform: none;
    }
}

.beauty-art {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--brand);
    background:
        radial-gradient(circle at 30% 25%, var(--surface-raised), transparent 55%),
        linear-gradient(160deg, var(--blush), var(--sand));
    font-size: 4.5rem;
}

.product-info {
    padding: 1rem .25rem 0;
}

.product-info .product-name {
    margin-bottom: .3rem;
    font-family: var(--display-font);
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.15;
}

.product-info .product-description {
    display: -webkit-box;
    margin-bottom: .5rem;
    overflow: hidden;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price-tag {
    color: var(--ink);
    font-weight: 600;
    letter-spacing: .04em;
}

.empty-menu {
    padding: 3.5rem 1rem;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: 1.25rem;
    text-align: center;
}

.empty-menu h1,
.empty-menu h2 {
    color: var(--ink);
    font-family: var(--display-font);
    font-weight: 600;
}

.empty-menu > i {
    color: var(--brand);
}

/* ---------- Forms, tables, cart ---------- */

.form-card {
    padding: clamp(1.5rem, 4vw, 2.75rem);
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    box-shadow: var(--card-shadow);
}

.form-card .form-control,
.form-card .form-select {
    min-height: 2.9rem;
    color: var(--ink);
    background-color: var(--surface-raised);
    border-color: var(--input-border);
    border-radius: .7rem;
}

.form-card textarea.form-control {
    min-height: 6rem;
}

.form-card .form-control::placeholder,
.menu-search::placeholder {
    color: var(--muted);
}

.form-card .form-control:focus,
.form-card .form-select:focus,
.menu-search:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 18%, transparent);
}

.form-card .form-label,
.form-card .control-label {
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: .06em;
}

.auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100%;
    padding: 2.5rem;
    color: var(--cream);
    background:
        radial-gradient(circle at 80% 15%, color-mix(in srgb, var(--brand) 55%, transparent), transparent 50%),
        var(--ink);
    border-radius: 1.25rem;
}

.auth-aside .display-heading {
    font-size: clamp(2.2rem, 4vw, 3rem);
}

.auth-aside p {
    color: color-mix(in srgb, var(--cream) 75%, transparent);
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 1rem;
}

.table-wrap .table {
    margin-bottom: 0;
    vertical-align: middle;
    --bs-table-bg: transparent;
}

.table-wrap .table thead {
    color: var(--ink);
    background: var(--surface-muted);
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.table-wrap .table thead th {
    font-weight: 600;
}

.cart-thumb {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: .6rem;
}

.admin-thumb {
    width: 56px;
    height: 72px;
    object-fit: cover;
    border-radius: .5rem;
}

.product-type-icon {
    display: inline-grid;
    width: 56px;
    height: 72px;
    place-items: center;
    color: var(--brand);
    background: var(--blush);
    border-radius: .5rem;
    font-size: 1.4rem;
}

.badge-clothing {
    color: var(--ink);
    background: var(--sand);
}

.badge-beauty {
    color: var(--ink);
    background: var(--blush);
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .15rem;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.qty-control a {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    color: var(--ink);
    border-radius: 50%;
    text-decoration: none;
}

.qty-control a:hover {
    color: var(--on-brand);
    background: var(--brand);
}

.qty-control span {
    min-width: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.cart-summary {
    position: sticky;
    top: 6rem;
    padding: 1.75rem;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
}

.cart-summary h2 {
    font-family: var(--display-font);
    font-weight: 600;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 0;
    color: var(--muted);
    font-size: .92rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    margin: .5rem 0 1.25rem;
    border-top: 1px solid var(--line);
    font-size: 1.1rem;
    font-weight: 600;
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 5rem;
    padding: 3rem 0 1.5rem;
    color: var(--muted);
    background: var(--surface);
    border-top: 1px solid var(--line);
    font-size: .9rem;
}

.footer-brand {
    color: var(--ink);
    font-family: var(--display-font);
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: .24em;
}

.footer-heading {
    margin-bottom: .9rem;
    color: var(--ink);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.footer-links {
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-links li + li {
    margin-top: .45rem;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--brand);
}

.accepted-payment-methods {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.accepted-payment-methods img {
    width: 3.5rem;
    height: 2.25rem;
    padding: .3rem;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: .35rem;
}

.footer-bottom {
    padding-top: 1.25rem;
    margin-top: 2.5rem;
    border-top: 1px solid var(--line);
    font-size: .82rem;
}

@media (max-width: 1199.98px) {
    .site-navbar .navbar-collapse {
        padding-top: .75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

body:has(.newsletter-band) .site-footer {
    margin-top: 0;
}

.site-navbar .navbar-toggler {
    padding: .2rem .55rem;
    color: var(--ink);
    border-color: var(--line);
    border-radius: 999px;
    font-size: 1.5rem;
}

.site-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 25%, transparent);
}

.image-picker {
    min-width: 0;
}

.image-preview {
    display: block;
    width: 180px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: .75rem;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.filter-count {
    margin-left: .3rem;
    opacity: .65;
    font-size: .8em;
}

/* ---------- Wishlist ---------- */

.wishlist-form {
    position: absolute;
    top: .65rem;
    right: .65rem;
    z-index: 2;
    margin: 0;
}

.wishlist-toggle {
    display: grid;
    width: 2.4rem;
    height: 2.4rem;
    place-items: center;
    padding: 0;
    color: var(--ink);
    background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .12);
    font-size: 1.1rem;
    transition: transform .15s ease, color .15s ease;
}

.wishlist-toggle:hover {
    color: var(--brand);
    transform: scale(1.08);
}

.wishlist-toggle:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.wishlist-toggle.is-saved {
    color: var(--brand);
}

.wishlist-toggle.is-saved i {
    animation: heart-pop .3s ease;
}

@keyframes heart-pop {
    50% { transform: scale(1.3); }
}

/* ---------- Sizes ---------- */

.add-to-bag {
    margin-top: .75rem;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .6rem;
}

.size-chip {
    min-width: 2.4rem;
    padding: .3rem .5rem;
    color: var(--ink);
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: .5rem;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 500;
    text-align: center;
    transition: border-color .15s ease, background .15s ease;
}

.size-chip:hover {
    border-color: var(--ink);
}

.btn-check:checked + .size-chip {
    color: var(--cream);
    background: var(--ink);
    border-color: var(--ink);
}

.btn-check:focus-visible + .size-chip {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.btn-check:disabled + .size-chip {
    color: var(--muted);
    background: var(--surface-muted);
    cursor: not-allowed;
    opacity: .6;
    text-decoration: line-through;
}

.size-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
    gap: .5rem;
}

.size-stock-cell {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: .8rem;
    font-weight: 600;
    text-align: center;
}

.size-stock-cell .form-control {
    min-height: 2.3rem !important;
    text-align: center;
}

/* ---------- Orders ---------- */

.order-card {
    padding: 1.5rem;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
}

.order-card address {
    line-height: 1.7;
}

.orders-table tbody tr {
    position: relative;
}

.orders-table .stretched-link-row::after {
    position: absolute;
    inset: 0;
    content: "";
}

.orders-table .btn {
    position: relative;
    z-index: 1;
}

.order-facts {
    display: grid;
    grid-template-columns: minmax(8rem, auto) 1fr;
    gap: .45rem 1rem;
    font-size: .92rem;
}

.order-facts dt {
    color: var(--muted);
    font-weight: 500;
}

.order-facts dd {
    margin: 0;
}

@media print {
    .site-navbar,
    .announcement-bar,
    .site-footer,
    .btn,
    form {
        display: none !important;
    }
}

/* Delivery logos carry their own card frame. */
.delivery-methods img {
    width: 4.2rem;
    height: 2.8rem;
    padding: 0;
    background: transparent;
    border: 0;
}

/* ---------- Low stock ---------- */

.stock-note {
    margin: 0 0 .5rem;
    color: #c0392b;
    font-size: .82rem;
    font-weight: 600;
}

[data-bs-theme="dark"] .stock-note {
    color: #ff8a7a;
}

.size-chip.is-low {
    position: relative;
}

.size-chip.is-low::after {
    position: absolute;
    top: -.2rem;
    right: -.2rem;
    width: .5rem;
    height: .5rem;
    background: #c0392b;
    border: 2px solid var(--surface-raised);
    border-radius: 50%;
    content: "";
}

/* ---------- Back-in-stock alerts ---------- */

.stock-alert {
    margin-top: .6rem;
    font-size: .82rem;
}

.stock-alert summary {
    display: inline;
    color: var(--brand);
    cursor: pointer;
    font-weight: 500;
    list-style: none;
}

.stock-alert summary::-webkit-details-marker {
    display: none;
}

.stock-alert summary:hover {
    text-decoration: underline;
}

.stock-alert-form {
    display: flex;
    gap: .4rem;
    margin-top: .5rem;
}

.stock-alert-form .form-select {
    min-width: 0;
    color: var(--ink);
    background-color: var(--surface-raised);
    border-color: var(--line);
    border-radius: 999px;
}

/* ---------- Contact ---------- */

.contact-tips li + li {
    margin-top: .6rem;
}

.contact-tips {
    color: color-mix(in srgb, var(--cream) 80%, transparent);
}

/* Keep menu labels and header buttons on one line; tighten spacing on mid-size screens. */
.site-navbar .nav-link,
.site-navbar .btn {
    white-space: nowrap;
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .site-navbar .nav-link {
        padding: .55rem .5rem;
        letter-spacing: .08em;
    }

    .navbar-brand {
        font-size: 1.6rem;
    }
}

/* ---------- Home: hero gallery ---------- */

.hero-link {
    color: var(--ink);
    font-weight: 500;
    letter-spacing: .06em;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.hero-link:hover {
    color: var(--brand);
}


/* ---------- Home: product rows ---------- */

.rail-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rail-controls {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.rail-view-all {
    margin-right: .5rem;
    color: var(--ink);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-decoration: none;
    text-transform: uppercase;
    border-bottom: 1px solid currentColor;
}

.rail-view-all:hover {
    color: var(--brand);
}

.rail-button {
    display: grid;
    width: 2.6rem;
    height: 2.6rem;
    place-items: center;
    padding: 0;
    color: var(--ink);
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 50%;
    transition: background .2s ease, color .2s ease, opacity .2s ease;
}

.rail-button:hover:not(:disabled) {
    color: var(--cream);
    background: var(--ink);
}

.rail-button:disabled {
    cursor: default;
    opacity: .35;
}

.product-rail {
    display: flex;
    gap: 1.25rem;
    padding: .25rem .25rem 1rem;
    margin: 0 -.25rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.product-rail:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 4px;
    border-radius: 1rem;
}

.product-rail > .col {
    flex: 0 0 auto;
    width: clamp(220px, 23%, 290px);
    scroll-snap-align: start;
}

@media (max-width: 575.98px) {
    .product-rail > .col {
        width: 72%;
    }
}

.selling-fast .eyebrow {
    color: #c0392b;
}

[data-bs-theme="dark"] .selling-fast .eyebrow {
    color: #ff8a7a;
}

/* ---------- Scrolling touches ---------- */

.site-navbar {
    transition: box-shadow .25s ease, padding .25s ease;
}

.site-navbar.is-scrolled {
    padding: .55rem 0;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .06);
}

/* Sections fade in once as they scroll into view (only when JavaScript runs). */
.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}

.js-reveal [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1030;
    display: grid;
    width: 2.9rem;
    height: 2.9rem;
    place-items: center;
    padding: 0;
    color: var(--cream);
    background: var(--ink);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, background .2s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.back-to-top:hover {
    background: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
    .js-reveal [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .product-rail {
        scroll-behavior: auto;
    }
}

/* Placeholder for a product photo that couldn't load. */
.photo-failed {
    background:
        radial-gradient(circle at 30% 25%, var(--surface-raised), transparent 55%),
        linear-gradient(160deg, var(--blush), var(--sand));
}

.photo-failed > img {
    visibility: hidden;
}

.photo-failed::before {
    position: absolute;
    top: 50%;
    left: 50%;
    color: var(--brand);
    font-family: "bootstrap-icons";
    font-size: 3.5rem;
    content: "\f1d8"; /* bi-brush */
    opacity: .7;
    transform: translate(-50%, -50%);
}

/* ---------- RD monogram logo ---------- */

.navbar-brand {
    align-items: center;
    gap: .65rem;
}

.brand-mark {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    color: var(--ink);
    transition: color .2s ease, transform .4s cubic-bezier(.2, .7, .2, 1);
}

.navbar-brand:hover .brand-mark {
    color: var(--brand);
    transform: rotate(-8deg);
}

.brand-word {
    line-height: 1;
}

@media (max-width: 575.98px) {
    .brand-mark {
        width: 2.2rem;
        height: 2.2rem;
    }
}

/* ---------- Home: wallpaper hero ---------- */

.hero-wallpaper {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(520px, 78vh, 760px);
    overflow: hidden;
    padding: clamp(3rem, 7vw, 6rem) 0;
    background: var(--cream);
    isolation: isolate;
}

.hero-wallpaper-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Keep the family (centre-right of the photo) in view on wide screens. */
    object-position: 70% 40%;
    animation: hero-zoom 18s ease-out both;
}

/* Cream fade on the left so the headline stays readable over the photo. */
.hero-wallpaper::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--cream) 96%, transparent) 0%,
        color-mix(in srgb, var(--cream) 88%, transparent) 32%,
        color-mix(in srgb, var(--cream) 35%, transparent) 55%,
        transparent 72%);
    content: "";
}

.hero-wallpaper .hero-copy {
    max-width: 36rem;
}

.hero-wallpaper .hero-copy p {
    color: var(--ink);
    opacity: .82;
}

@keyframes hero-zoom {
    from { transform: scale(1.06); }
    to { transform: scale(1); }
}

/* On narrow screens the photo sits behind the text with a stronger, even fade. */
@media (max-width: 991.98px) {
    .hero-wallpaper {
        min-height: 560px;
        align-items: flex-end;
    }

    .hero-wallpaper-image {
        object-position: 62% 30%;
    }

    .hero-wallpaper::before {
        background: linear-gradient(180deg,
            transparent 0%,
            color-mix(in srgb, var(--cream) 45%, transparent) 40%,
            color-mix(in srgb, var(--cream) 92%, transparent) 70%,
            var(--cream) 100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-wallpaper-image {
        animation: none;
    }
}

/* Wide screens: photo fills the right side and fades into the cream, so the whole family stays visible. */
@media (min-width: 992px) {
    .hero-wallpaper-image {
        left: auto;
        width: 62%;
        object-position: 50% 45%;
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
        mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
    }

    .hero-wallpaper::before {
        display: none;
    }
}

/* Phones and tablets: photo on top, text underneath, so faces and headline never overlap. */
@media (max-width: 991.98px) {
    .hero-wallpaper {
        display: block;
        min-height: 0;
        padding-top: 0;
    }

    .hero-wallpaper::before {
        display: none;
    }

    .hero-wallpaper-image {
        position: relative;
        display: block;
        height: clamp(260px, 72vw, 460px);
        margin-bottom: 1.75rem;
        object-position: 50% 40%;
    }
}

/* ---------- Product page and photo gallery ---------- */

.product-photo-link {
    display: block;
    width: 100%;
    height: 100%;
}

.photo-count-badge {
    position: absolute;
    bottom: .65rem;
    left: .65rem;
    padding: .2rem .55rem;
    color: var(--ink);
    background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 500;
}

.product-name-link {
    color: inherit;
    text-decoration: none;
}

.product-name-link:hover,
.product-name-link:focus-visible {
    color: var(--brand);
}

.product-breadcrumb {
    margin-bottom: 1.5rem;
    font-size: .88rem;
}

.product-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.product-breadcrumb a:hover {
    color: var(--brand);
}

.gallery-stage {
    position: relative;
    overflow: hidden;
    background: var(--surface-muted);
    border-radius: 1rem;
}

.gallery-track {
    display: flex;
    overflow-x: auto;
    aspect-ratio: 4 / 5;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-track:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}

.gallery-slide {
    position: relative;
    flex: 0 0 100%;
    margin: 0;
    scroll-snap-align: start;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    padding: 0;
    color: var(--ink);
    background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .12);
    font-size: 1.2rem;
    transform: translateY(-50%);
    transition: opacity .2s ease, color .15s ease;
}

.gallery-arrow:hover {
    color: var(--brand);
}

.gallery-arrow:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.gallery-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

.gallery-arrow.is-prev {
    left: .85rem;
}

.gallery-arrow.is-next {
    right: .85rem;
}

.gallery-counter {
    position: absolute;
    bottom: .85rem;
    left: 50%;
    padding: .2rem .7rem;
    color: var(--ink);
    background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 500;
    transform: translateX(-50%);
}

.gallery-thumbs {
    display: flex;
    gap: .6rem;
    margin-top: .85rem;
    padding: .15rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.gallery-thumb {
    position: relative;
    flex: 0 0 4.75rem;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    padding: 0;
    background: var(--surface-muted);
    border: 2px solid transparent;
    border-radius: .6rem;
    opacity: .6;
    transition: opacity .15s ease, border-color .15s ease;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb:hover,
.gallery-thumb.is-active {
    opacity: 1;
}

.gallery-thumb.is-active {
    border-color: var(--ink);
}

.gallery-thumb:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.gallery-thumb.photo-failed::before {
    font-size: 1.4rem;
}

.gallery-hint {
    margin: .75rem 0 0;
    color: var(--muted);
    font-size: .82rem;
}

.product-details {
    position: sticky;
    top: 6.5rem;
}

.product-details .product-name {
    margin-bottom: .5rem;
}

.product-page-price {
    display: block;
    margin-bottom: 1.25rem;
    font-size: 1.3rem;
}

.product-page-description {
    margin-bottom: 1.5rem;
    color: var(--muted);
    line-height: 1.7;
}

.product-details .add-to-bag .btn {
    padding-block: .7rem;
    font-size: 1rem;
}

.product-back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: .9rem;
    text-decoration: none;
}

.product-back-link:hover {
    color: var(--brand);
}

@media (max-width: 991.98px) {
    .product-details {
        position: static;
    }
}

@media (hover: none) {
    .gallery-arrow {
        width: 2.4rem;
        height: 2.4rem;
    }
}

/* ---------- "More photos" field on the admin product forms ---------- */

.more-images-current {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1rem;
}

.more-images-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .35rem .4rem;
    align-items: center;
    width: 5.5rem;
    font-size: .8rem;
}

.more-images-item img {
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: var(--surface-muted);
    border-radius: .5rem;
}

.more-images-item .form-check-input {
    margin: 0;
}

.more-images-item:has(.form-check-input:checked) img {
    opacity: .35;
    outline: 2px solid #dc3545;
}

.more-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.more-images-preview:not(:empty) {
    margin-top: .5rem;
}

.more-images-preview img {
    width: 4rem;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: .4rem;
}
