/* RESET & VARIABLES */
:root {
  --paper: #f5f2e9;
  --ink: #24221f;
  --accent: #a65e3e;
  --panel: #ebe7dc;
  --line: #ccc6b9;
  --radius: 0px;
  --hero-bg: #242623;
  --hero-text: #f5f2e9;
  --hero-btn: #d5a27a;
  
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: Arial, Helvetica, "Trebuchet MS", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body.onyx { font-family: var(--font-sans); background: var(--paper); color: var(--ink); line-height: 1.6; }
h1, h2, h3, h4, h5, h6, .wordmark, .serif { font-family: var(--font-serif); font-weight: normal; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }

/* LAYOUT & NAV */
.skip-link { position: absolute; top: -100px; left: 0; background: var(--ink); color: var(--paper); padding: 8px 16px; z-index: 100; }
.skip-link:focus { top: 0; }
.header { position: sticky; top: 0; background: var(--paper); border-bottom: 1px solid var(--line); z-index: 50; display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; }
.wordmark { font-size: 1.5rem; font-weight: bold; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a:hover { color: var(--accent); }
.cart-badge { background: var(--accent); color: var(--paper); padding: 2px 8px; font-size: 0.8rem; border-radius: 12px; }

/* HERO - ONYX THEME */
.hero-onyx { background: var(--hero-bg); color: var(--hero-text); display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 70vh; }
.hero-content { padding: 40px; }
.hero-content h1 { font-size: 2.5rem; margin-bottom: 20px; line-height: 1.2; }
.hero-btn { display: inline-block; background: var(--hero-btn); color: var(--ink); padding: 12px 24px; font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 1px; font-weight: bold; margin-top: 20px; transition: opacity 0.3s; }
.hero-btn:hover { opacity: 0.8; }
.hero-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* SECTIONS & COMPONENTS */
.section { padding: 60px 20px; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 2rem; margin-bottom: 30px; text-align: center; }
.notice { background: var(--panel); padding: 15px; border-left: 4px solid var(--accent); font-size: 0.9rem; margin-bottom: 30px; }

/* PRODUCT CARDS (BORDERLESS EDITORIAL) */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin-top: 30px; }
.product-card { background: transparent; border: none; text-align: center; transition: transform 0.3s; }
.product-card:hover { transform: translateY(-5px); }
.product-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; margin-bottom: 15px; background: var(--panel); }
.product-title { font-size: 1.2rem; margin-bottom: 10px; }
.product-price { font-weight: bold; margin-bottom: 15px; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); padding: 10px 20px; border: none; cursor: pointer; text-transform: uppercase; font-size: 0.9rem; width: 100%; }
.btn:hover { background: var(--accent); }
.btn:disabled { background: var(--line); cursor: not-allowed; }

/* CATALOG CONTROLS */
.controls { display: flex; flex-wrap: wrap; gap: 15px; background: var(--panel); padding: 20px; margin-bottom: 30px; }
.controls input, .controls select { padding: 8px; border: 1px solid var(--line); background: var(--paper); font-family: inherit; }

/* PRODUCT DETAIL */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 20px; }
.gallery img { margin-bottom: 10px; background: var(--panel); }
.breadcrumb { font-size: 0.9rem; margin-bottom: 20px; color: var(--ink); opacity: 0.7; }
.facts { display: flex; gap: 15px; margin: 20px 0; font-size: 0.9rem; background: var(--panel); padding: 15px; }
.omnibus { font-size: 0.85rem; color: #555; display: block; margin-top: 5px; }
.qty-wrap { display: flex; align-items: center; gap: 10px; margin: 20px 0; }
.qty-wrap input { width: 60px; padding: 10px; text-align: center; border: 1px solid var(--line); background: var(--paper); }

/* CART & CHECKOUT */
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.cart-item-title { font-weight: bold; }
.cart-summary { background: var(--panel); padding: 20px; align-self: start; }
.summary-line { display: flex; justify-content: space-between; margin-bottom: 10px; }
.summary-total { font-weight: bold; font-size: 1.2rem; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.checkout-form { display: flex; flex-direction: column; gap: 15px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { margin-bottom: 5px; font-weight: bold; font-size: 0.9rem; }
.form-group input, .form-group select { padding: 10px; border: 1px solid var(--line); background: var(--paper); }
.error-msg { color: #d00; font-size: 0.8rem; display: none; }
.invalid .error-msg { display: block; }
.invalid input { border-color: #d00; }

/* MISC */
.block-split { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; margin-bottom: 50px; }
details { border-bottom: 1px solid var(--line); }
summary { padding: 15px 0; font-weight: bold; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; float: right; }
details[open] summary::after { content: '-'; }
details p { padding-bottom: 15px; }

/* FOOTER */
.footer { background: var(--ink); color: var(--paper); padding: 60px 20px 20px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.footer-col h4 { font-size: 1.2rem; margin-bottom: 15px; }
.footer-col ul li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #333; font-size: 0.8rem; }

/* TOAST */
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--ink); color: var(--paper); padding: 12px 24px; transition: transform 0.3s; z-index: 1000; font-size: 0.9rem; }
#toast.show { transform: translateX(-50%) translateY(0); }

/* PRINT */
@media print {
  .header, .footer, .skip-link, .hero-onyx, .product-grid, button[data-print] { display: none !important; }
  body.onyx { background: #fff; color: #000; }
  .section { padding: 0; }
}
@media (max-width: 768px) {
  .hero-onyx, .product-detail, .cart-layout, .block-split { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .header::after { content: '☰ (Menu v patičce)'; font-size: 0.9rem; }
}