@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Instrument+Serif&display=swap");

:root {
    color-scheme: light;
    --paper: #fdfbf8;
    --ink: #332922;
    --muted: #685b52;
    --line: #e7ddd4;
    --accent: #693e48;
    --cream: #f1e7db;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 "DM Sans", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
img { display: block; width: 100%; height: auto; }
:is(a, button, input, textarea, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, p { margin: 0; }
h1 { font: 400 clamp(44px, 6.1vw, 83px)/.98 "Instrument Serif", Georgia, serif; letter-spacing: -.025em; }
h2 { font-size: clamp(24px, 3.1vw, 35px); line-height: 1.15; letter-spacing: -.04em; font-weight: 500; }
.shell { width: min(92%, 1240px); margin-inline: auto; }
.skip { position: absolute; top: -100px; left: 12px; z-index: 2; background: var(--paper); padding: 12px; }
.skip:focus { top: 12px; }
.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.site-header nav { display: flex; gap: clamp(14px, 4vw, 38px); }
.site-header nav a, .link-button { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--muted); }
.site-header nav a:hover, .back:hover, .about a:hover, .panel a:hover { text-decoration: underline; text-underline-offset: 4px; }
.wordmark { display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; font: 400 clamp(33px, 4vw, 43px)/1 "Instrument Serif", Georgia, serif; }
.wordmark span { font: 400 12px/1 "DM Sans", sans-serif; color: var(--muted); }

.hero { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1fr); overflow: hidden; border-radius: 22px; background: var(--cream); }
.hero-copy { display: grid; justify-items: start; align-content: center; gap: 18px; padding: clamp(24px, 6vw, 84px); }
.hero-copy p { color: var(--muted); max-width: 31ch; }
.hero-photo { width: 100%; height: 100%; min-height: 380px; max-height: 530px; object-fit: cover; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; width: fit-content; min-height: 45px; padding: 8px 17px; border: 1px solid transparent; border-radius: 99px; background: var(--paper); color: var(--accent); font-size: 14px; font-weight: 500; }
.button:hover { border-color: #d9c7c5; }
.primary { background: var(--accent); color: white; }
.section { margin-block: clamp(35px, 5vw, 68px); scroll-margin-top: 15px; }
.section h2 { margin-bottom: 17px; }
.collections { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 2vw, 24px); }
.collection { display: grid; gap: 10px; }
.collection img { height: clamp(125px, 27vw, 315px); object-fit: cover; border-radius: 16px; background: var(--cream); }
.collection > span { display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-size: clamp(16px, 2vw, 21px); font-weight: 500; }
.collection span span { color: var(--accent); }
.collection:hover > span, .product-card:hover > span { text-decoration: underline; text-underline-offset: 4px; }
.about { border-radius: 18px; padding: clamp(22px, 4vw, 48px); background: #f5eee9; scroll-margin-top: 15px; }
.about h2 { font-size: clamp(23px, 3vw, 31px); }
.about p { max-width: 60ch; margin-top: 9px; color: var(--muted); }
.about a { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; margin-right: 13px; color: var(--accent); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-block: 22px; border-top: 1px solid var(--line); color: var(--muted); }
.site-footer .wordmark { font-size: 29px; }
.site-footer small { font-size: 12px; }
.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); margin-bottom: 14px; }
.collection-page h1 { margin-bottom: 24px; }
.empty { padding: clamp(22px, 6vw, 64px); background: var(--cream); border-radius: 18px; }
.empty h1, .empty p { margin-bottom: 16px; }
.empty a { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; color: var(--accent); }
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { display: grid; gap: 5px; align-content: start; min-width: 0; overflow-wrap: anywhere; }
.product-card img, .placeholder { aspect-ratio: 4/5; object-fit: cover; border-radius: 12px; background: var(--cream); margin-bottom: 4px; }
.placeholder { display: grid; place-items: center; color: var(--accent); font: 65px "Instrument Serif", Georgia, serif; }
.product-card small { font-size: 13px; color: var(--muted); }
.product-page { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.9fr); gap: clamp(18px, 5vw, 58px); }
.main-photo { max-height: 580px; aspect-ratio: 4/5; object-fit: contain; background: #f5eee9; border-radius: 16px; }
.product-copy { display: grid; align-content: start; gap: 16px; overflow-wrap: anywhere; padding-top: clamp(0px, 3%, 35px); }
.product-copy h1 { font-size: clamp(36px, 5vw, 64px); }
.price { font-size: 22px; font-weight: 500; }
.description { color: var(--muted); }
.shop-banner { padding: 10px 4%; text-align: center; background: var(--cream); color: var(--ink); }
.shop-banner a, .footer-nav a { text-decoration: underline; text-underline-offset: 3px; }
.shop-logo { width: auto; max-width: min(145px, 36vw); max-height: 50px; object-fit: contain; }
.collection-placeholder { display: grid; place-items: center; height: clamp(125px, 27vw, 315px); border-radius: 16px; background: var(--cream); color: var(--accent); font: 60px "Instrument Serif", Georgia, serif; }
.collection-page .collections { margin-bottom: 24px; }
.product-facts { display: grid; gap: 7px; margin: 0; }
.product-facts div { display: grid; grid-template-columns: minmax(95px, .5fr) minmax(0,1fr); padding-block: 6px; border-bottom: 1px solid var(--line); }
.product-facts dd { margin: 0; color: var(--muted); }
.price del, .product-card del { margin-right: 5px; color: var(--muted); }
.text-page { max-width: 760px; min-height: 45vh; overflow-wrap: anywhere; margin-block: 25px 55px; }
.text-page h1 { margin-bottom: 20px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 15px; }
.thumbs { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.thumbs img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; }
.thumbs button { padding: 2px; background: none; border: 1px solid transparent; border-radius: 7px; }
.thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.order { display: grid; gap: 8px; justify-items: start; }
.order select { min-width: 165px; }

.admin { padding-block: 22px 50px; }
.admin h1 { font-size: clamp(40px, 5vw, 58px); margin-bottom: 23px; }
.admin h2 { font-size: 24px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { background: #fffdfa; border: 1px solid var(--line); border-radius: 15px; padding: clamp(15px, 3vw, 27px); display: grid; gap: 13px; min-width: 0; }
.panel.login { max-width: 445px; }
.panel.contacts { margin-top: 18px; }
.panel-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.panel a, .link-button { color: var(--accent); }
.link-button { border: 0; background: none; padding: 0; }
.panel label { display: grid; gap: 5px; min-width: 0; }
.panel small { color: var(--muted); }
.panel label.check { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.panel label.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
input:not([type="checkbox"]), select, textarea { max-width: 100%; min-width: 0; border: 1px solid #d9cec5; border-radius: 8px; background: var(--paper); padding: 10px; min-height: 44px; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product-list { list-style: none; padding: 0; margin: 0; }
.product-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.notice { margin-bottom: 14px; padding: 11px 14px; background: #e9f0e1; border-radius: 8px; }
.notice.error { background: #f7e4e2; color: #7b2425; }

@media (max-width: 670px) {
    .site-footer { flex-wrap: wrap; }
    .site-header { min-height: 64px; }
    .site-header nav a { font-size: 13px; }
    .hero { grid-template-columns: 1fr; border-radius: 17px; }
    .hero-copy { gap: 11px; padding: 22px; }
    .hero-photo { min-height: 0; height: auto; aspect-ratio: 1.62; }
    .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 10px; }
    .product-page, .admin-grid { grid-template-columns: 1fr; }
    .main-photo { max-height: 480px; }
}
@media (max-width: 380px) {
    .site-header nav { gap: 9px; }
    .site-header nav a { font-size: 12px; }
    .site-header .wordmark { font-size: 29px; gap: 4px; }
    .site-header .wordmark span { font-size: 10px; }
    .form-pair { grid-template-columns: 1fr; }
}
