/* Kunsthaus — base styles */

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

html {
    scroll-behavior: smooth;
}

:lang(zh) body,
body:lang(zh) {
    font-size: 16px;
}

:lang(zh) .nav-menu > li > a {
    font-size: 14px;
}

:lang(zh) .dropdown-menu li a {
    font-size: 15px;
}


body {
    font-family: "Comfortaa", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 24px;
    color: #666;
    background: #fafafa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
    color: #292929;
}

h1 { font-size: 56px; line-height: 64px; }
h2 { font-size: 40px; line-height: 48px; }
h3 { font-size: 32px; line-height: 40px; }
h4 { font-size: 24px; line-height: 32px; }
h5 { font-size: 16px; line-height: 24px; font-weight: 400; }
h6 { font-size: 12px; line-height: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }

main {
    flex: 1;
}

p, span {
    font-weight: 400;
}

a {
    color: #303030;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

a:hover {
    color: #000;
    text-decoration: none;
}

@media all and (max-width: 767px) {
    h1 { font-size: 32px; line-height: 40px; }
    h2 { font-size: 32px; line-height: 40px; }
    h3 { font-size: 24px; line-height: 32px; }
    h4 { font-size: 18px; line-height: 26px; }
    p { font-size: 12px; }
}

/* --- Header --- */
header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 55px;
    padding: 0 8px;
    flex-wrap: nowrap;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo {
    height: 28px;
    width: auto;
}

.logo-dark   { display: none; }
.logo-light  { display: block; }
.logo-square { display: none; }

.nav-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Cart icon in header --- */
.nav-cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #292929;
    font-size: 18px;
}

.has-hero .nav-cart-icon {
    color: #fff;
}

.cart-icon {
    font-size: 20px;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: 2px;
    background: #c00;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    pointer-events: none;
}

.cart-badge:empty {
    display: none;
}


/* --- Cart page --- */
.cart-table {
    width: 100%;
    margin-bottom: 24px;
}

.cart-row {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
    font-size: 13px;
}

.cart-thumb {
    flex-shrink: 0;
}

.cart-thumb img {
    width: 70px;
    height: auto;
}

.cart-info {
    flex: 1;
    min-width: 0;
}

.cart-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.cart-title a {
    font-weight: 600;
}

.cart-artist {
    font-size: 12px;
    color: #888;
    display: block;
    margin-bottom: 6px;
}

.cart-params {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.cart-price-line {
    font-size: 14px;
    color: #333;
}

.cart-price-line strong {
    font-weight: 700;
}

.cart-remove-btn {
    color: #bbb;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
}

.cart-remove-btn:hover {
    color: #c00;
}

.cart-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 0;
    font-size: 18px;
}

.cart-total-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-total-price {
    font-family: "Raleway", sans-serif;
    font-weight: 300;
    font-size: 28px;
}

.cart-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

.cart-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* --- Add to cart button --- */
.btn-add-cart {
    padding: 14px 32px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #292929;
    background: transparent;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-cart:hover {
    border-color: #292929;
    background: #f5f5f5;
}

/* --- Checkout --- */
.checkout-summary {
    margin-bottom: 24px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.checkout-total {
    display: flex;
    justify-content: flex-end;
    padding: 16px 0;
    font-size: 20px;
    font-family: "Raleway", sans-serif;
}

@media (max-width: 768px) {
    .cart-thumb img {
        width: 50px;
    }
}

/* --- Search --- */
.nav-search form {
    display: flex;
}

.nav-search input {
    background: transparent;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 12px;
    color: #292929;
    width: 120px;
    outline: none;
    transition: width 0.3s, border-color 0.3s;
}

.nav-search input:focus {
    width: 200px;
    border-color: #292929;
}

.nav-search input::placeholder {
    color: #999;
}

.has-hero .nav-search input {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.has-hero .nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.has-hero .nav-search input:focus {
    border-color: rgba(255, 255, 255, 0.8);
}

.search-artists {
    margin-bottom: 24px;
}

.search-artist-list {
    list-style: none;
}

.search-artist-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.search-artist-list a {
    font-weight: 600;
}

.search-epithet {
    color: #999;
    font-size: 12px;
    font-weight: 400;
}

.lang-switcher {
    list-style: none;
    display: flex;
    gap: 4px;
}

.lang-switcher a {
    display: block;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #666;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    background: #1a1a1a;
    color: #fff;
}

.footer-lang-switcher a {
    color: #8b8b8b;
}

.footer-lang-switcher a:hover,
.footer-lang-switcher a.active {
    background: #555;
    color: #fff;
}

/* Transparent header over hero */
.has-hero header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 100;
}

.has-hero .logo-dark  { display: block; }
.has-hero .logo-light { display: none; }

.has-hero .logo {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.has-hero .lang-switcher a {
    color: rgba(255, 255, 255, 0.7);
}

.has-hero .lang-switcher a:hover,
.has-hero .lang-switcher a.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* --- Page content (mission, gallery list) --- */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.page-content-wide {
    max-width: 1400px;
}

.page-content h6 {
    text-transform: uppercase;
}

.page-content hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 16px 0 32px;
}

.category-description {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 24px;
    color: #555;
}

.category-description p {
    margin-bottom: 12px;
}

.mission-section {
    margin-bottom: 40px;
}

.mission-section h3 {
    margin-bottom: 12px;
}

.mission-section p {
    line-height: 1.8;
    margin-bottom: 12px;
}

/* --- Footer --- */
footer {
    background: #222;
    color: #8b8b8b;
    padding: 72px 32px 0;
    position: relative;
}

footer a {
    color: #8b8b8b;
    font-weight: 400;
}

footer a:hover {
    color: #fff;
}

footer h6 {
    color: #fff;
    margin-bottom: 0;
}

.footer-columns {
    display: grid;
    grid-template-columns: 0.5fr 2fr 0.8fr;
    gap: 32px;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.footer-col {
    min-width: 0;
}

.footer-logo {
    height: 24px;
    line-height: 24px;
}

.footer-logo img {
    height: 24px;
    width: auto;
    opacity: 0.8;
}

.footer-hr {
    border: none;
    border-top: 1px solid #555;
    margin: 16px 0;
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 6px;
}

.footer-search {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
}

.footer-search form {
    flex: 1;
    min-width: 0;
}

.footer-search .footer-lang-switcher {
    flex-shrink: 0;
}

.footer-search input {
    background: transparent;
    border: none;
    border-bottom: 1px solid #555;
    padding: 6px 0;
    color: #ccc;
    font-family: inherit;
    font-size: 13px;
    width: 100%;
    min-width: 0;
    outline: none;
}

.footer-search input::placeholder {
    color: #666;
}

.footer-search input:focus {
    border-color: #fff;
    color: #fff;
}

.footer-cart-link {
    display: block;
    font-size: 13px;
    margin-bottom: 12px;
    color: #aaa;
}

.footer-cart-link:hover {
    color: #fff;
}

.footer-cart-badge:empty {
    display: none;
}

.footer-cart-badge {
    display: inline-block;
    background: #c00;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
}

.footer-menu a {
    font-size: 13px;
}

.footer-updates {
    list-style: none;
}

.footer-updates li {
    margin-bottom: 12px;
}

.footer-updates a {
    font-size: 13px;
    display: block;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-date {
    font-size: 11px;
    color: #666;
}

@media (max-width: 768px) {
    .footer-updates a {
        white-space: normal;
    }

    .footer-update-title {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .footer-date {
        display: block;
    }

    .footer-date-label,
    .footer-date-paren {
        display: none;
    }
}

.footer-qr {
    margin-top: 12px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.footer-qr img {
    max-width: 150px;
}

.footer-share-btn {
    -webkit-appearance: none;
    appearance: none;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    color: #aaa;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
}

.footer-share-btn:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding: 8px 5px;
    margin: 0 -32px;
}

.footer-copy {
    font-size: 12px;
}

.footer-motto {
    font-size: 12px;
    text-align: right;
}

.back-to-top {
    display: block;
    text-align: center;
    padding: 12px 48px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: #888;
    background: transparent;
    border: 1px solid #555;
    border-radius: 6px;
    max-width: 200px;
    margin: 0 auto;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.back-to-top:hover {
    background: #fff;
    border-color: #fff;
    color: #1a1a1a;
}

@media (max-width: 768px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* --- Hero slider (Foundry-style kenburns fullscreen) --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 560px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* Background image — NO blur, full painting visible */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero.kenburns .hero-slide:nth-of-type(odd) .hero-bg img {
    animation: kenBurnsEast 25s linear infinite alternate;
}

.hero.kenburns .hero-slide:nth-of-type(even) .hero-bg img {
    animation: kenBurnsWest 25s linear infinite alternate;
}

@keyframes kenBurnsEast {
    from { transform: scale(1) translateX(0); }
    to   { transform: scale(1.2) translateX(100px); }
}

@keyframes kenBurnsWest {
    from { transform: scale(1) translateX(0); }
    to   { transform: scale(1.2) translateX(-100px); }
}

@media all and (max-width: 767px) {
    .hero.kenburns .hero-slide .hero-bg img {
        animation: none !important;
    }
}

/* Light overlay — just enough for white text readability */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.10) 0%,
        rgba(0, 0, 0, 0.15) 60%,
        rgba(0, 0, 0, 0.50) 100%
    );
    z-index: 1;
}

/* Center title block */
.hero-center {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-brand {
    font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 56px;
    font-weight: 100;
    letter-spacing: 6px;
    margin-bottom: 4px;
    color: #fff;
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    opacity: 0.8;
}

/* Bottom metadata bar — 3 columns like Foundry original */
.hero-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 0 32px 28px;
    color: #fff;
}

.hero-hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 0 0 24px;
}

.hero-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.hero-col-artist {
    /* Left column — artist name bold uppercase */
}

.hero-artist-name {
    font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.hero-artist-name a {
    color: #fff;
}

.hero-artist-name a:hover {
    color: #fff;
    opacity: 0.85;
}

.hero-artist-epithet {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.7;
    margin-top: 2px;
}

.hero-col-info p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
}

.hero-col-info a {
    color: #fff;
    font-weight: 600;
}

.hero-col-info a:hover {
    color: #fff;
    opacity: 0.85;
}

.hero-col-info span {
    opacity: 0.85;
}

.hero-col-action {
    text-align: right;
}

.btn-hero {
    display: inline-block;
    padding: 12px 32px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-hero:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
}

/* Arrow controls */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 16px;
    transition: color 0.2s;
    line-height: 1;
}

.hero-arrow:hover {
    color: #fff;
}

.hero-arrow-prev { left: 8px; }
.hero-arrow-next { right: 8px; }

/* --- Artist detail page --- */
.hero-artist-page {
    height: auto;
    min-height: 0;
    overflow: hidden;
}

.hero-artist-page .hero-bg {
    position: absolute;
    inset: -20px;
}

.hero-artist-page .hero-bg img {
    filter: blur(10px);
    opacity: 0.5;
    animation: none;
}

.hero-artist-page .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-artist-info {
    position: relative;
    z-index: 2;
    padding: 120px 24px 48px;
    color: #fff;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-artist-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

.hero-artist-col-portrait img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
}

.hero-artist-col-text h2 {
    font-size: 40px;
    font-weight: 300;
    margin-bottom: 4px;
    color: #fff;
}

.hero-artist-sub {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 16px;
}

.hero-artist-bio {
    font-size: 0.85rem;
    line-height: 1.7;
    opacity: 0.85;
}

.hero-artist-bio p {
    margin-bottom: 8px;
}

.artist-works {
    position: relative;
    background: #fafafa;
    z-index: 1;
}

.artist-works-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 24px 0;
}

.artist-works-header h6 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
}

.artist-works-header hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 16px 0 0;
}

/* --- Masonry grid (CSS Grid, grid-auto-rows: 10px) --- */
.masonry-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 10px;
    gap: 2px;
    padding: 8px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .masonry-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1100px) {
    .masonry-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.masonry-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.masonry-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 1s ease;
}

.masonry-item:hover img {
    transform: scale(1.08);
}

.masonry-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.masonry-item:hover::after {
    opacity: 1;
}

.masonry-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 300;
    opacity: 0;
    transform: scale(0.92);
    transform-origin: center bottom;
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

.masonry-item:hover .masonry-caption {
    opacity: 1;
    transform: scale(1);
}

/* --- Lightgallery caption overrides (match old version) --- */
.lg-outer .lg-sub-html,
.lg-sub-html {
    color: #eee !important;
    font-size: 16px !important;
    padding: 10px 40px !important;
}

.lg-outer .lg-sub-html h4,
.lg-sub-html h4 {
    color: #fff !important;
    font-size: 18px !important;
    font-weight: bold !important;
    margin: 0 !important;
    font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

.lg-outer .lg-sub-html p,
.lg-sub-html p {
    color: #ddd !important;
    font-size: 14px !important;
    margin: 5px 0 0 !important;
}

.lg-outer .lg-sub-html a,
.lg-sub-html a {
    color: inherit !important;
    text-decoration: none !important;
}

.lg-outer .lg-sub-html > a,
.lg-sub-html > a {
    display: inline-block;
    transition: transform 0.25s ease;
    transform-origin: center bottom;
}

.lg-outer .lg-sub-html > a:hover,
.lg-sub-html > a:hover {
    transform: scale(1.08);
}

.lg-outer .lg-item .lg-img-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lg-outer .lg-item .lg-img-wrap img,
.lg-outer .lg-item .lg-image {
    max-width: 100vw !important;
    max-height: 100vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.lg-order-btn {
    display: none;
}

.lg-want-copy {
    position: fixed;
    bottom: 16px;
    right: 24px;
    z-index: 1090;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: color 0.2s;
    text-decoration: none;
}

.lg-want-copy:hover {
    color: #fff;
}

/* --- Show More button --- */
.show-more-wrap {
    text-align: center;
    padding: 16px 24px 48px;
}

.show-more-hint {
    color: #999;
    font-size: 0.8em;
}

.btn-show-more {
    display: inline-block;
    padding: 12px 48px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn-show-more:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.htmx-request .btn-show-more {
    opacity: 0.5;
    pointer-events: none;
}

/* --- Artwork detail page (Foundry-style fullscreen hero) --- */
.artwork-hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.artwork-hero-bg {
    position: absolute;
    inset: -10px;
    z-index: 0;
}

.artwork-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px);
    opacity: 0.5;
}

.artwork-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.35);
}

.artwork-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 24px 48px;
    min-height: 100vh;
    width: 100%;
    color: #fff;
}

.artwork-hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.artwork-hero-image img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    cursor: pointer;
}

.artwork-hero-info h3 {
    margin-bottom: 0;
    color: #fff;
}

.artwork-hero-info h5 {
    margin-bottom: 16px;
    color: #fff;
}

.artwork-hero-info h5 a {
    color: #fff;
}

.artwork-hero-info h5 a:hover {
    opacity: 0.85;
    color: #fff;
}

.artwork-hero-info span {
    font-size: 14px;
    line-height: 1.8;
}

.artwork-description {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.7;
}

.artwork-source-line {
    margin-top: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.artwork-source {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
}

.artwork-source:hover {
    color: #fff;
}

.artwork-categories {
    margin-top: 12px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.artwork-tags {
    margin-top: 8px;
}

.hashtag {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-right: 8px;
    text-decoration: none;
    transition: color 0.2s;
}

.hashtag:hover {
    color: #fff;
}

.artwork-want-copy {
    position: absolute;
    bottom: 16px;
    right: 24px;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.2s;
    text-decoration: none;
    z-index: 10;
}

.artwork-want-copy:hover {
    color: #fff;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .artwork-hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .hero-bottom-row {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }

    .hero-col-action {
        text-align: center;
    }

    .hero-artist-name {
        font-size: 0.95rem;
    }

    .hero-artist-row {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-artist-col-portrait img {
        max-width: 200px;
        margin: 0 auto;
    }

    .hero-artist-info {
        padding: 72px 24px 32px;
    }
}

@media (max-width: 600px) {
    .hero {
        height: 70vh;
        min-height: 400px;
    }

    .hero-brand {
        font-size: 2.2rem;
    }

    .hero-bottom {
        padding: 0 16px 16px;
    }

    .hero-arrow {
        font-size: 1.5rem;
        padding: 8px;
    }

    header {
        padding: 0 8px;
    }

    .logo-full   { display: none !important; }
    .logo-square { display: block; height: 32px; }
    .has-hero .logo-square { filter: invert(1) drop-shadow(0 1px 3px rgba(0,0,0,0.4)); }

    .detail-page {
        padding: 16px 8px;
    }
}

/* --- Order page --- */
.order-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.order-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: start;
}

.frame-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.frame-wrap img {
    display: block;
    width: 100%;
    height: auto;
}

.frame-wrap.has-frame {
    box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.3);
}

.frame-top, .frame-bottom, .frame-left, .frame-right {
    position: absolute;
    background-size: cover;
    display: none;
}

.frame-top    { top: 0; left: 0; right: 0; }
.frame-bottom { bottom: 0; left: 0; right: 0; }
.frame-left   { top: 0; bottom: 0; left: 0; }
.frame-right  { top: 0; bottom: 0; right: 0; }

.frame-bottom { transform: rotate(180deg); }
.frame-right  { transform: rotate(180deg); }

.frame-corner {
    position: absolute;
    background-size: cover;
    display: none;
}

.frame-tl { top: 0; left: 0; }
.frame-tr { top: 0; right: 0; transform: scaleX(-1); }
.frame-bl { bottom: 0; left: 0; transform: scaleY(-1); }
.frame-br { bottom: 0; right: 0; transform: scale(-1, -1); }

.order-artwork h3 {
    margin-bottom: 4px;
}

.order-artist {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.order-meta {
    font-size: 13px;
    color: #888;
}

.config-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.config-section {
    margin-bottom: 24px;
}

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

.config-section h5 {
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.config-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.config-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.config-radio input[type="radio"] {
    accent-color: #292929;
}

.config-radio small {
    color: #999;
}

.custom-size-inputs {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    margin-left: 24px;
}

.custom-size-inputs.visible {
    display: flex;
}

.custom-size-inputs input {
    width: 100px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
}

.order-price {
    margin: 24px 0;
    padding: 16px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price-amount {
    font-size: 28px;
    font-weight: 300;
    font-family: "Raleway", sans-serif;
}

.order-hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 24px 0;
}

.form-field {
    margin-bottom: 12px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: #292929;
    outline: none;
}

.field-error {
    color: #c00;
    font-size: 12px;
}

.order-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-submit-order {
    padding: 14px 40px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: #292929;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit-order:hover {
    background: #000;
}

.messenger-links {
    display: flex;
    gap: 8px;
}

.btn-messenger {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #555;
    transition: all 0.2s;
}

.btn-messenger:hover {
    border-color: #292929;
    color: #292929;
}

.order-success-price {
    font-size: 32px;
    font-weight: 300;
    font-family: "Raleway", sans-serif;
    margin: 16px 0;
}

@media (max-width: 768px) {
    .order-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ============================================================
   MOBILE — Foundry-style collapsing nav + layout fixes
   ============================================================ */

@media all and (max-width: 990px) {

    /* --- Nav: stronger gradient on mobile hero --- */
    .has-hero header {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1));
    }

    header nav {
        padding: 0 8px;
    }

    /* --- Nav: smaller search on mobile --- */
    .nav-search input {
        width: 80px;
    }

    .nav-search input:focus {
        width: 140px;
    }

    .lang-switcher {
        gap: 2px;
    }

    .lang-switcher a {
        padding: 4px 6px;
        font-size: 10px;
    }

    /* --- Hero --- */
    .hero {
        height: 80vh;
        min-height: 400px;
    }

    .hero-bottom-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }

    .hero-col-action {
        display: none;
    }

    .hero-artist-name {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .hero-artist-epithet {
        display: none;
    }

    .hero-brand {
        font-size: 32px;
        line-height: 40px;
        letter-spacing: 8px;
        margin-right: -8px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-bottom {
        padding: 0 12px 12px;
    }

    /* --- Artist page --- */
    .hero-artist-row {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-artist-col-portrait img {
        max-width: 180px;
        margin: 0 auto;
    }

    .hero-artist-info {
        padding: 72px 16px 24px;
    }

    /* --- Artwork detail --- */
    .artwork-hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 72px 16px 80px;
    }

    .artwork-hero {
        overflow: visible;
    }


    /* --- Order page --- */
    .order-layout {
        grid-template-columns: 1fr;
    }

    .config-columns {
        grid-template-columns: 1fr;
    }

    .order-page {
        padding: 24px 12px 40px;
    }

    /* --- Cart --- */
    .cart-actions {
        flex-direction: column;
    }

    /* --- Footer --- */
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    footer {
        padding: 40px 16px 0;
    }

    .footer-bottom {
        margin: 0 -16px;
        padding: 8px 16px;
    }

    /* --- Pages --- */
    .page-content {
        padding: 24px 16px 40px;
    }

    .checkout-item {
        flex-direction: column;
        gap: 4px;
    }
}

/* --- Admin edit link (staff only) --- */
.admin-edit {
    float: right;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: color 0.2s;
}

.admin-edit:hover {
    color: #fff;
}
