@import url('https://googleapis.com');

:root {
    --bg-paper: #fbf6ef;  --wood-dark: #3e2723; --wood-mid: #5d4037;
    --leather-brown: #8d6e63; --ink-black: #263238; --gold-leaf: #d4af37;
    --font-vintage: 'EB Garamond', Georgia, serif;
}
body {
    margin: 0; padding: 0; background-color: var(--bg-paper); color: var(--ink-black); font-family: var(--font-vintage); font-size: 18px;
    background-image: linear-gradient(rgba(93, 64, 55, 0.05) 1px, transparent 1px); background-size: 100% 20px;
}
.stall-header { background: var(--wood-dark); border-bottom: 3px solid var(--gold-leaf); display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; color: var(--bg-paper); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.stall-logo { font-size: 20px; font-weight: bold; }
.wood-text { color: var(--gold-leaf); }
.stall-nav a { text-decoration: none; color: var(--bg-paper); font-size: 16px; }
.stall-hero { text-align: center; padding: 40px 20px; background-color: #f5ebd8; border-bottom: 2px solid var(--wood-dark); }
.vintage-frame { border: 4px double var(--wood-dark); max-width: 850px; margin: 0 auto; padding: 25px 20px; }
.stall-title { font-size: 34px; color: var(--wood-dark); margin: 0 0 10px 0; }
.stall-subtitle { font-style: italic; font-size: 18px; color: #4e342e; margin: 0; }

.stall-schema { padding: 40px 5%; }
.stall-section-title { text-align: center; font-size: 26px; margin-bottom: 40px; color: var(--wood-dark); }
.stall-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }

/* Программные полки и книги */
.book-shelf { background: #fffdf9; border: 1px solid #d7ccc8; padding: 20px 15px 12px 15px; position: relative; box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.shelf-wood { position: absolute; bottom: 0; left: 0; width: 100%; height: 12px; background: linear-gradient(90deg, var(--wood-dark), var(--wood-mid), var(--wood-dark)); border-top: 2px solid var(--gold-leaf); }
.shelf-title { font-size: 15px; font-weight: bold; color: var(--leather-brown); margin-bottom: 15px; text-transform: uppercase; }
.book-list { list-style: none; padding: 0; margin: 0 0 12px 0; }
.book-spine { background: var(--bg-paper); border: 1px solid #bcaaa4; padding: 12px; margin-bottom: 10px; cursor: pointer; display: flex; flex-direction: column; transition: all 0.2s; }
.book-spine:hover { background: #fff; transform: scale(1.02); box-shadow: 0 5px 15px rgba(93, 64, 55, 0.2); }

/* Имитация цветных переплетов */
.shelf-0 .book-spine { border-left: 8px solid #2b1c11; }
.shelf-1 .book-spine { border-left: 8px solid #4e342e; }
.shelf-2 .book-spine { border-left: 8px solid #5d4037; }
.shelf-3 .book-spine { border-left: 8px solid #795548; }
.shelf-4 .book-spine { border-left: 8px solid #8d6e63; }
.shelf-5 .book-spine { border-left: 8px solid #a1887f; }
.shelf-6 .book-spine { border-left: 8px solid #3e2723; }

.dept-num { font-size: 13px; text-transform: uppercase; color: #a1887f; font-weight: bold; }
.book-name { font-size: 17px; font-weight: bold; margin: 2px 0; color: var(--wood-dark); }
.book-author { font-size: 14px; font-style: italic; color: #795548; }

/* Формуляр */
.stall-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(38, 50, 56, 0.6); backdrop-filter: blur(2px); align-items: center; justify-content: center; }
.stall-modal-box { background: #fdfbf7; border: 2px solid var(--wood-dark); box-shadow: 0 15px 40px rgba(0,0,0,0.4); padding: 35px; width: 85%; max-width: 480px; position: relative; }
.modal-card-label { color: var(--leather-brown); font-size: 12px; font-weight: bold; margin-bottom: 10px; }
.author-style { font-style: italic; color: var(--wood-mid); margin: 2px 0 0 0; font-size: 18px; }
.modal-ink-divider { height: 2px; background: linear-gradient(90deg, var(--wood-dark), transparent); margin: 15px 0; }
.isbn-badge { background: #efebe9; padding: 6px 12px; display: inline-block; font-size: 14px; border: 1px dashed var(--wood-mid); }
.stall-close { position: absolute; right: 20px; top: 15px; font-size: 30px; cursor: pointer; color: var(--wood-dark); }
.stall-footer { text-align: center; background: var(--wood-dark); color: #8d6e63; padding: 20px; font-size: 14px; margin-top: 40px; }
