:root {
    --paper: #f6eee5;
    --ink: #351025;
    --wine: #521331;
    --serif: Georgia, "Times New Roman", serif;
    --sans: system-ui, sans-serif;
    --gutter: clamp(1.25rem, 4.25vw, 4.5rem);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .16em; }
a:hover { color: #8b2357; }
:focus-visible { outline: 3px solid #ae6644; outline-offset: 4px; }
h1, h2, h3, p { margin-block: 0 1rem; }
h1, h2, h3 { line-height: 1.04; }
h1 { font-size: clamp(2.5rem, 5.4vw, 5rem); letter-spacing: -.04em; }
h2 { font-size: clamp(2rem, 4vw, 3.9rem); letter-spacing: -.035em; }
h3 { font-size: clamp(1.45rem, 2.55vw, 2.7rem); letter-spacing: -.025em; }
button, input, select, textarea { font: inherit; }
button, .button {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: .65rem;
    background: var(--wine);
    color: #fff7ed;
    padding: .7em 1.2em;
    text-decoration: none;
    cursor: pointer;
}
button:hover, .button:hover { background: #6d1c46; color: white; }
button.secondary { background: transparent; color: var(--wine); border-color: #b29ba6; }
button.secondary:hover { background: #efe0e5; }
.wrap { padding: clamp(1.8rem, 3vw, 3rem) var(--gutter); max-width: 108rem; margin-inline: auto; }
.narrow { max-width: 48rem; }
.site-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.4rem;
    padding: .65rem var(--gutter);
    border-bottom: 1px solid #35102527;
    position: relative;
    z-index: 1;
}
.wordmark { font-weight: bold; font-size: clamp(1.85rem, 3.2vw, 3.15rem); letter-spacing: -.055em; text-decoration: none; }
.site-head nav { display: flex; gap: clamp(1rem, 5.5vw, 6rem); font-size: clamp(1.1rem, 1.8vw, 1.7rem); }
.site-head nav a, .basket { text-decoration: none; }
.basket { display: flex; align-items: center; gap: .35rem; }
.hero {
    position: relative;
    display: flex;
    align-items: center;
    isolation: isolate;
    min-height: clamp(25rem, 30.6vw, 35rem);
    padding: 2rem var(--gutter);
}
.hero-photo {
    position: absolute;
    right: 0;
    top: 0;
    width: 72%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    z-index: -2;
}
.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 0 28%;
    background: linear-gradient(90deg, var(--paper), transparent 23%);
}
.hero-copy { max-width: 50%; }
.hero h1 { font-size: clamp(3.35rem, 6.55vw, 7rem); margin-bottom: .65rem; }
.hero p { font-size: clamp(1.25rem, 2.15vw, 2.3rem); line-height: 1.3; }
.hero .button { font-size: clamp(1.15rem, 2vw, 1.95rem); margin-top: .75rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 1.7vw, 2rem); }
.category, .card { display: block; text-decoration: none; }
.category img, .card img { width: 100%; aspect-ratio: 1.58; object-fit: cover; background: #e6d8ca; }
.category h3, .card h3 { margin-top: .5rem; margin-bottom: .4rem; }
.card img { aspect-ratio: 1.33; }
.price { font-weight: bold; font-size: 1.6rem; color: var(--wine); }
.detail, .story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }
.story { align-items: center; }
.story img, .detail-photo { width: 100%; }
.detail h1 { margin-top: .65rem; }
.description { white-space: pre-line; line-height: 1.6; font-size: 1.15rem; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin-top: .75rem; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.footer { border-top: 1px solid #35102527; display: flex; justify-content: space-between; gap: 1.5rem; background: #ffffff32; }
.footer h2 { font-size: 1.4rem; }
.cart-row { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; padding-block: 1rem; border-bottom: 1px solid #35102527; }
.cart-row div { flex: 1 0 11rem; }
.cart-row input { width: 4rem; padding: .6rem; }
.admin { font-family: var(--sans); }
.admin h1, .admin h2, .admin .wordmark { font-family: var(--serif); }
.admin h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); }
.admin h2 { font-size: 1.85rem; margin-bottom: 0; }
.admin-layout { display: grid; grid-template-columns: minmax(13rem, .85fr) minmax(0, 2fr); align-items: start; gap: 1.25rem; max-width: 75rem; }
.panel { display: grid; gap: 1rem; padding: clamp(1rem, 2vw, 1.6rem); background: #fffaf4; border: 1px solid #decfcb; border-radius: .8rem; }
.panel label { display: grid; gap: .35rem; }
.panel :is(input:not([type=checkbox]), textarea, select) { min-width: 0; max-width: 100%; width: 100%; padding: .65rem; border: 1px solid #baa8ad; border-radius: .35rem; color: #351025; background: white; }
.panel input[type=color] { height: 3rem; width: 7rem; padding: .25rem; }
.panel button, .panel .button { justify-self: start; }
.panel .check { display: flex; align-items: center; }
.panel textarea { resize: vertical; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tabs a { display: block; border-radius: .4rem; padding: .65rem 1rem; text-decoration: none; }
.tabs [aria-current] { color: white; background: var(--wine); }
.notice { padding: .85rem 1rem; background: #fff5df; border: 1px solid #e3c39b; border-radius: .4rem; }
.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list li { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: space-between; padding: .65rem 0; border-top: 1px solid #decfcb; }
.thumb { width: min(100%, 17rem); max-height: 12rem; object-fit: contain; object-position: left; }
.upload-preview { display: flex; gap: .5rem; flex-wrap: wrap; }
.upload-preview img { width: 6rem; aspect-ratio: 1; object-fit: cover; }
.delete { margin-top: 1rem; }
@media (max-width: 780px) {
    .hero { min-height: 0; flex-direction: column; align-items: stretch; padding: 0; }
    .hero::before { display: none; }
    .hero-photo { position: static; order: 1; width: 100%; height: auto; aspect-ratio: 1.7; }
    .hero-copy { max-width: none; padding: 2rem var(--gutter); }
    .hero h1 { font-size: clamp(3.1rem, 9vw, 4.35rem); }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-head:not(.admin .site-head) { flex-wrap: wrap; }
    .site-head nav { order: 2; width: 100%; gap: 1.2rem; }
}
@media (max-width: 560px) {
    .grid, .detail, .story, .admin-layout { grid-template-columns: 1fr; }
    .category img { aspect-ratio: 1.7; }
    .footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Katalog, patička a administrace */
.shop-logo { width: auto; max-width: min(15rem, 56vw); max-height: 3.5rem; object-fit: contain; }
.catalog { background: #ffffff45; border-top: 1px solid #35102520; }
.catalog-empty { padding: 1.5rem; border: 1px dashed #bba2af; border-radius: .65rem; }
.catalog-card { border: 1px solid #e0cfd4; border-radius: .8rem; background: #fffaf5; overflow: hidden; }
.catalog-placeholder { display: grid; place-items: center; aspect-ratio: 1.33; background: #f0e3df; }
.card-copy { padding: .85rem 1rem 0; }
.card-copy small { font-family: var(--sans); }
.shop-footer { background: #48102a; color: #fff4eb; }
.shop-footer a:hover { color: #ffd7b9; }
.shop-footer p { line-height: 1.55; }
.shop-footer .wordmark { display: inline-block; margin-bottom: .75rem; }
.shop-footer .shop-logo { background: #fff4eb; border-radius: .45rem; padding: .3rem .65rem; max-height: 4rem; }
.footer-columns { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-columns h2 { font-size: 1.55rem; }
.footer-columns nav a, .footer-columns > div:last-child a { display: block; width: fit-content; max-width: 100%; overflow-wrap: anywhere; margin-bottom: .65rem; }
.footer-info details { border-top: 1px solid #fff4eb40; padding: .65rem 0; }
.footer-info summary { cursor: pointer; }
.footer-info p { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: .6rem 0; }
.footer-bottom { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid #fff4eb50; display: flex; justify-content: space-between; gap: 1rem; font: .85rem var(--sans); }
.dashboard { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); min-height: 100vh; }
.dashboard-guest { display: block; }
.dashboard-guest .dashboard-content { max-width: 42rem; }
.dashboard-guest h1 { margin-top: 1rem; }
.dashboard-sidebar { position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.5rem 1rem; background: #48102a; color: #fff4eb; }
.dashboard-sidebar .wordmark { font-size: 2rem; padding: 0 .6rem; }
.dashboard-sidebar nav, .dashboard-actions { display: grid; gap: .35rem; }
.dashboard-sidebar nav a, .dashboard-actions > a { padding: .7rem .65rem; border-radius: .5rem; text-decoration: none; transition: background-color .18s, color .18s; }
.dashboard-sidebar nav a span { display: inline-block; width: 1.75rem; }
.dashboard-sidebar nav a:hover, .dashboard-sidebar [aria-current="page"], .dashboard-actions > a:hover { background: #ffffff24; color: white; }
.dashboard-actions { margin-top: auto; }
.dashboard-actions .secondary { color: #fff4eb; width: 100%; }
.dashboard-actions .secondary:hover { background: #ffffff24; }
.dashboard-content { width: 100%; min-width: 0; animation: panel-in .22s ease-out; }
.dashboard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.dashboard-stats a { text-decoration: none; }
.dashboard-stats strong { font: bold 2.2rem var(--serif); }
@keyframes panel-in { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1050px) {
    .catalog-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 830px) {
    .dashboard { display: block; }
    .dashboard-sidebar { position: static; height: auto; gap: .65rem; }
    .dashboard-sidebar nav, .dashboard-actions { display: flex; flex-wrap: wrap; align-items: center; }
    .dashboard-sidebar nav a span { width: 1.3rem; }
}
@media (max-width: 560px) {
    .catalog-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-columns, .dashboard-stats { grid-template-columns: 1fr; gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .dashboard-content { animation: none; }
    .dashboard-sidebar a { transition: none; }
}

.product-photo-frame, .catalog-card { position: relative; overflow: hidden; }
.product-photo-frame .detail-photo { aspect-ratio: 4 / 5; object-fit: contain; background: #eaded3; }
.product-ribbon { position: absolute; z-index: 1; inset: 2rem -4rem auto auto; transform: rotate(45deg); width: 14rem; padding: .35rem 0; color: #fff4eb; background: #64153d; text-align: center; box-shadow: 0 2px 5px #24091640; font: bold .76rem var(--sans); }
.gallery-thumb { padding: 0; border: 2px solid transparent; overflow: hidden; background: transparent; }
.gallery-thumb[aria-pressed="true"] { border-color: var(--wine); }
.product-specs { margin: 1.1rem 0; }
.product-specs > div { display: grid; grid-template-columns: minmax(6rem, 25%) 1fr; gap: .5rem; padding: .65rem 0; border-top: 1px solid #35102525; }
.product-specs dt { font-weight: bold; }
.product-specs dd { margin: 0; overflow-wrap: anywhere; }
.inquiry-form, .inquiry-confirmation { margin-block: 1.5rem; }
.inquiry-form { font: 1rem var(--sans); }
.inquiry-form h2 { font: bold clamp(1.75rem, 4vw, 2.4rem) var(--serif); }
.inquiry-form p, .inquiry-confirmation p { line-height: 1.6; }
.inquiry-form small { display: inline; }
.workshop-form { margin-bottom: 1.25rem; max-width: 62rem; display: grid; gap: .9rem; }
.workshop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; align-items: start; }
.workshop-card summary { cursor: pointer; display: grid; gap: .45rem; }
.workshop-card summary img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: .45rem; background: #eaded3; }
.workshop-card summary span { font-size: .9rem; text-decoration: underline; }
.workshop-card > :not(summary) { margin-top: .75rem; }
.workshop-card .description { overflow-wrap: anywhere; }
.download-link { display: block; width: fit-content; max-width: 100%; overflow-wrap: anywhere; margin-block: .35rem; }
.inquiry-status-filter { display: flex; align-items: end; flex-wrap: wrap; gap: .7rem; margin-block: 1rem; }
.inquiry-status-filter label { display: grid; gap: .3rem; }
.inquiry-status-filter select { padding: .65rem; border-radius: .4rem; }
.inquiry-list { display: grid; gap: .65rem; }
.inquiry-list .panel { grid-template-columns: minmax(12rem, 2fr) minmax(9rem, 1fr) minmax(7rem, 1fr) auto; align-items: center; text-decoration: none; }
.status-pill { justify-self: start; background: #eddde5; border-radius: 2rem; padding: .2rem .65rem; }
.inquiry-line { display: grid; grid-template-columns: 1fr minmax(4rem, 6rem) 1fr; gap: .8rem; align-items: center; padding: .75rem 0; border-top: 1px solid #ded0d4; }
@media (max-width: 660px) {
    .inquiry-list .panel, .inquiry-line { grid-template-columns: 1fr 1fr; }
    .inquiry-line > :last-child { grid-column: 1 / -1; }
}
