/* ==========================================================================
   InoBags Noir — „Бордо нощ“, по-тъмен вариант (прототип v2, 13.11.2026)
   1. Fonts  2. Tokens  3. Blocksy palette bridge  4. Base  5. Components
   6. Header  7. Drawer + search  8. Footer
   ========================================================================== */

/* 1. Fonts ---------------------------------------------------------------- */
@font-face { font-family: 'Prata'; font-style: normal; font-weight: 400; font-display: swap;
	src: url(../fonts/prata-cyrillic.woff2) format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Prata'; font-style: normal; font-weight: 400; font-display: swap;
	src: url(../fonts/prata-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap;
	src: url(../fonts/manrope-cyrillic.woff2) format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap;
	src: url(../fonts/manrope-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* 2. Tokens --------------------------------------------------------------- */
html:root {
	--ibn-bg: #120B0D;
	--ibn-surface: #1D1316;
	--ibn-surface-2: #26191D;
	--ibn-surface-3: #160E10;
	--ibn-wine: #561521;          /* бордо ленти, отстъпки */
	--ibn-wine-deep: #3A0E18;     /* горна лента, футър */
	--ibn-wine-hero: #2E0B12;     /* текстовата половина на hero */
	--ibn-gold: #D4B07A;
	--ibn-gold-hover: #E2C391;
	--ibn-gold-soft: #E9CFA3;
	--ibn-ink: #F3EAE2;
	--ibn-ink-2: #E4D6CB;
	--ibn-muted: #A8968E;
	--ibn-line: rgba(212, 176, 122, .2);
	--ibn-line-soft: rgba(243, 234, 226, .08);
	--ibn-on-gold: #1A0F11;
	--ibn-cover: #89614B;         /* фон на AI кориците */
	--ibn-ok: #9CC59A;

	--ibn-serif: 'Prata', Georgia, 'Times New Roman', serif;
	--ibn-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--ibn-gutter: 16px;
	--ibn-max: 1280px;
	--ibn-radius: 2px;

/* 3. Blocksy palette bridge — Blocksy's own markup (shop, cart, account) picks these up */
	--theme-palette-color-1: var(--ibn-gold);
	--theme-palette-color-2: var(--ibn-gold-hover);
	--theme-palette-color-3: var(--ibn-ink-2);
	--theme-palette-color-4: var(--ibn-ink);
	--theme-palette-color-5: #3A2A28;
	--theme-palette-color-6: var(--ibn-surface);
	--theme-palette-color-7: var(--ibn-surface-3);
	--theme-palette-color-8: var(--ibn-bg);
	--theme-text-color: var(--ibn-ink-2);
	--theme-headings-color: var(--ibn-ink);
	--theme-link-initial-color: var(--ibn-ink);
	--theme-link-hover-color: var(--ibn-gold);
	--theme-border-color: var(--ibn-line);
	--theme-font-family: var(--ibn-sans);
	--theme-button-background-initial-color: var(--ibn-gold);
	--theme-button-background-hover-color: var(--ibn-gold-hover);
	--theme-button-text-initial-color: var(--ibn-on-gold);
	--theme-button-text-hover-color: var(--ibn-on-gold);
	--theme-button-border-radius: var(--ibn-radius);
	--theme-form-field-background-initial-color: var(--ibn-surface);
	--theme-form-field-background-focus-color: var(--ibn-surface);
	--theme-form-field-border-initial-color: rgba(243, 234, 226, .22);
	--theme-form-field-border-focus-color: var(--ibn-gold);
	--theme-form-text-initial-color: var(--ibn-ink);
	--theme-form-text-focus-color: var(--ibn-ink);
	--theme-selection-background-color: var(--ibn-gold);
	--theme-selection-text-color: var(--ibn-on-gold);
}
@media (min-width: 1000px) { html:root { --ibn-gutter: 80px; } }

/* 4. Base ----------------------------------------------------------------- */
html body { background: var(--ibn-bg); color: var(--ibn-ink-2); font-family: var(--ibn-sans); -webkit-font-smoothing: antialiased; }
body h1, body h2, body h3, body .ibn-serif {
	--theme-font-family: var(--ibn-serif);
	--theme-font-weight: 400;
	--theme-text-transform: none;
	font-family: var(--ibn-serif); font-weight: 400; letter-spacing: -.01em; line-height: 1.12; color: var(--ibn-ink);
}
body h4, body h5, body h6 { --theme-font-family: var(--ibn-sans); font-family: var(--ibn-sans); color: var(--ibn-ink); }
:focus-visible { outline: 2px solid var(--ibn-gold); outline-offset: 2px; }
.ibn-wrap { width: 100%; max-width: calc(var(--ibn-max) + 2 * var(--ibn-gutter)); margin-inline: auto; padding-inline: var(--ibn-gutter); box-sizing: border-box; }
.ibn-skip { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--ibn-gold); color: var(--ibn-on-gold); padding: 10px 16px; font-weight: 700; }
.ibn-skip:focus { top: 12px; }
[hidden] { display: none !important; }
body.ibn-locked { overflow: hidden; }

/* 5. Components ----------------------------------------------------------- */
.ibn-eyebrow { margin: 0; font: 600 11px/1.4 var(--ibn-sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ibn-gold); }
.ibn-eyebrow--light { color: var(--ibn-gold-soft); }
.ibn-muted { color: var(--ibn-muted); }
.ibn-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; padding: 0 26px; border-radius: var(--ibn-radius); border: 1px solid transparent;
	font: 600 15px/1 var(--ibn-sans); letter-spacing: .02em; text-decoration: none; cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s, transform .12s;
}
.ibn-btn:hover { transform: translateY(-1px); }
.ibn-btn:active { transform: translateY(1px); }
.ibn-btn--gold { background: var(--ibn-gold); color: var(--ibn-on-gold); }
.ibn-btn--gold:hover, .ibn-btn--gold:focus-visible { background: var(--ibn-gold-hover); color: var(--ibn-on-gold); }
.ibn-btn--ghost { background: transparent; color: var(--ibn-ink); border-color: rgba(243, 234, 226, .4); }
.ibn-btn--ghost:hover { border-color: var(--ibn-gold); color: var(--ibn-gold); }
.ibn-btn--block { display: flex; width: 100%; }
.ibn-icon-btn {
	display: inline-flex; align-items: center; justify-content: center; position: relative;
	width: 44px; height: 44px; padding: 0; background: none; border: 0; color: var(--ibn-ink); cursor: pointer;
	transition: color .2s;
}
.ibn-icon-btn:hover { color: var(--ibn-gold); }
.ibn-logo { font: 400 26px/1 var(--ibn-serif); letter-spacing: .01em; color: var(--ibn-ink); text-decoration: none; white-space: nowrap; }
.ibn-logo:hover { color: var(--ibn-ink); }
.ibn-logo--lg { font-size: 34px; }

@media (max-width: 999.98px) { .ibn-only-desktop { display: none !important; } }
@media (min-width: 1000px) { .ibn-only-mobile { display: none !important; } }

/* 6. Header --------------------------------------------------------------- */
.ibn-announce { background: var(--ibn-wine-deep); color: var(--ibn-ink); font: 500 12px/1.4 var(--ibn-sans); text-align: center; padding: 9px 16px; letter-spacing: .02em; }
.ibn-announce__long { display: none; }
@media (min-width: 1000px) {
	.ibn-announce { font-size: 13px; padding: 10px; }
	.ibn-announce__short { display: none; }
	.ibn-announce__long { display: inline; }
}
.ibn-header { position: sticky; top: 0; z-index: 50; background: var(--ibn-bg); border-bottom: 1px solid var(--ibn-line); }
.admin-bar .ibn-header { top: var(--admin-bar, 0px); }
.ibn-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 56px; padding-inline: 6px; }
.ibn-header__start { display: flex; align-items: center; }
.ibn-header__end { display: flex; align-items: center; justify-content: flex-end; }
@media (min-width: 1000px) {
	.ibn-header__inner { grid-template-columns: 220px 1fr 220px; min-height: 84px; padding-inline: var(--ibn-gutter); }
	.ibn-header .ibn-logo { font-size: 32px; }
	.ibn-header__end { gap: 4px; }
}
.ibn-nav { display: flex; justify-content: center; gap: clamp(18px, 2.4vw, 34px); }
.ibn-nav__link { position: relative; padding: 12px 0; font: 500 14px/1.2 var(--ibn-sans); color: var(--ibn-ink); text-decoration: none; white-space: nowrap; }
.ibn-nav__link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--ibn-gold); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.ibn-nav__link:hover::after, .ibn-nav__link.is-current::after { transform: scaleX(1); }
.ibn-nav__link:hover, .ibn-nav__link.is-accent, .ibn-nav__link.is-current { color: var(--ibn-gold); }
.ibn-cart-count {
	position: absolute; top: 5px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
	background: var(--ibn-gold); color: var(--ibn-on-gold); font: 700 10px/17px var(--ibn-sans); text-align: center;
}

/* 7. Drawer + search ------------------------------------------------------ */
.ibn-search { border-top: 1px solid var(--ibn-line); background: var(--ibn-surface); }
.ibn-search__inner { display: flex; align-items: center; gap: 8px; padding-block: 12px; }
.ibn-search__form { flex: 1; display: flex; gap: 8px; }
.ibn-search__form input[type="search"] {
	flex: 1; min-width: 0; height: 52px; padding: 0 14px; border-radius: var(--ibn-radius);
	background: var(--ibn-bg); border: 1px solid rgba(243, 234, 226, .22); color: var(--ibn-ink); font: 500 16px var(--ibn-sans);
}
.ibn-search__form input[type="search"]::placeholder { color: #8A7A73; }
@media (max-width: 599.98px) { .ibn-search__form .ibn-btn { padding: 0 16px; } }

.ibn-drawer { position: fixed; inset: 0; z-index: 200; }
.ibn-drawer__scrim { position: absolute; inset: 0; background: rgba(10, 6, 7, .65); }
.ibn-drawer__panel {
	position: absolute; inset: 0 auto 0 0; width: min(88vw, 360px); display: flex; flex-direction: column;
	background: var(--ibn-bg); border-right: 1px solid var(--ibn-line); overflow-y: auto;
	transform: translateX(-100%); transition: transform .28s ease;
}
.ibn-drawer.is-open .ibn-drawer__panel { transform: none; }
.ibn-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 6px 8px 16px; border-bottom: 1px solid var(--ibn-line); }
.ibn-drawer__nav { display: flex; flex-direction: column; padding: 8px 16px; }
.ibn-drawer__nav a { padding: 15px 0; border-bottom: 1px solid var(--ibn-line-soft); font: 400 22px/1.2 var(--ibn-serif); color: var(--ibn-ink); text-decoration: none; }
.ibn-drawer__nav a.is-accent { color: var(--ibn-gold); }
.ibn-drawer__foot { margin-top: auto; display: flex; flex-direction: column; padding: 16px; background: var(--ibn-wine-deep); }
.ibn-drawer__foot a { padding: 11px 0; color: var(--ibn-ink-2); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .ibn-drawer__panel { transition: none; } }

/* 8. Footer --------------------------------------------------------------- */
.ibn-footer { background: var(--ibn-wine-deep); color: var(--ibn-ink-2); margin-top: 48px; padding: 36px 0 28px; }
.ibn-footer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
.ibn-footer__brand { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.ibn-footer__brand p { margin: 0; max-width: 320px; color: var(--ibn-ink-2); }
.ibn-footer__col { display: flex; flex-direction: column; }
.ibn-footer__col .ibn-eyebrow { margin-bottom: 6px; }
.ibn-footer__col a { padding: 10px 0; color: var(--ibn-ink); text-decoration: none; }
.ibn-footer__col a:hover { color: var(--ibn-gold); }
.ibn-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(212, 176, 122, .25); font-size: 13px; color: #C9B3A8; }
@media (min-width: 1000px) {
	.ibn-footer { margin-top: 120px; padding: 72px 0 36px; }
	.ibn-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
	.ibn-footer__brand { grid-column: auto; }
	.ibn-footer__bottom { margin-top: 48px; }
}

/* 9. Product cards (shared by home, archive, related) --------------------- */
.ibn-card { display: flex; flex-direction: column; gap: 9px; color: var(--ibn-ink); text-decoration: none; transition: transform .25s; }
.ibn-card:hover { transform: translateY(-2px); color: var(--ibn-ink); }
.ibn-tile { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 4; background: var(--ibn-cover); }
.ibn-tile--square { aspect-ratio: 1 / 1; }
.ibn-tile__img, .ibn-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ibn-card:hover .ibn-tile__img { transform: scale(1.03); }
.ibn-badge { position: absolute; top: 10px; left: 10px; background: var(--ibn-wine); color: var(--ibn-ink); font: 700 12px/1 var(--ibn-sans); letter-spacing: .03em; padding: 5px 8px; }
.ibn-stars { color: var(--ibn-gold); letter-spacing: 1px; font-size: 12px; }
.ibn-stars .ibn-muted { letter-spacing: 0; }
.ibn-card__name { font-size: 14px; line-height: 1.35; }
.ibn-card__price { font-size: 16px; }
.ibn-price { font-weight: 700; color: var(--ibn-ink); }
.ibn-price .woocommerce-Price-amount { color: inherit; }
.ibn-old { margin-left: 6px; color: var(--ibn-muted); font-size: 13px; font-weight: 400; text-decoration: line-through; }
@media (min-width: 1000px) { .ibn-card__name { font-size: 15px; } .ibn-badge { top: 14px; left: 14px; } }
@media (prefers-reduced-motion: reduce) { .ibn-card, .ibn-tile__img { transition: none; } }

/* 10. Section scaffolding ------------------------------------------------- */
.ibn-section { padding-top: 44px; }
.ibn-section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.ibn-section__head--stack { flex-direction: column; align-items: flex-start; gap: 6px; }
.ibn-section__head p { margin: 0; font-size: 14px; }
.ibn-h2 { margin: 0; font-size: 28px; }
.ibn-more { padding: 12px 0; color: var(--ibn-gold); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.ibn-more:hover { color: var(--ibn-gold-hover); }
.ibn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
.ibn-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--ibn-gutter)); padding-inline: var(--ibn-gutter); scroll-padding-inline: var(--ibn-gutter); }
.ibn-rail::-webkit-scrollbar { display: none; }
.ibn-rail > * { flex: 0 0 224px; scroll-snap-align: start; }
.ibn-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-top: 18px; }
.ibn-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid rgba(243, 234, 226, .3); color: var(--ibn-ink); font-size: 14px; white-space: nowrap; text-decoration: none; }
.ibn-chip:hover { border-color: var(--ibn-gold); color: var(--ibn-gold); }
@media (min-width: 1000px) {
	.ibn-section { padding-top: 110px; }
	.ibn-section__head { margin-bottom: 32px; }
	.ibn-h2 { font-size: 44px; }
	.ibn-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 20px; }
	.ibn-rail { margin-inline: 0; padding-inline: 0; overflow: visible; }
}

/* 11. "Added to cart" panel (markup from inc/shop-tweaks.php) ------------- */
html body .inobags-added { background: var(--ibn-surface); border-top: 1px solid rgba(212, 176, 122, .3); box-shadow: 0 -8px 28px rgba(0, 0, 0, .5); }
html body .inobags-added__title { color: var(--ibn-ink); }
html body .inobags-added__title svg { color: var(--ibn-ok); }
html body .inobags-added__name { color: var(--ibn-muted); }
html body .inobags-added__continue { background: transparent; border: 1px solid rgba(243, 234, 226, .4); color: var(--ibn-ink); }
html body .inobags-added__cart { background: var(--ibn-gold); color: var(--ibn-on-gold); border-radius: var(--ibn-radius); }
@media (min-width: 690px) { html body .inobags-added { border: 1px solid rgba(212, 176, 122, .3); } }

/* 12. Touch targets (≥ 44px) for small text links ----------------------- */
.ibn-header .ibn-logo { display: inline-flex; align-items: center; min-height: 44px; }

/* Tables inside posts/pages (often pasted with inline light backgrounds); never the cart/checkout/account tables */
body:not(.woocommerce-page) .entry-content table { width: 100%; border-collapse: collapse; border: 1px solid var(--ibn-line); background: var(--ibn-surface); font-size: 15px; }
body:not(.woocommerce-page) .entry-content table tr { background: transparent !important; }
body:not(.woocommerce-page) .entry-content table th, body:not(.woocommerce-page) .entry-content table td { padding: 12px 16px; border: 1px solid var(--ibn-line) !important; color: var(--ibn-ink); text-align: left; }
body:not(.woocommerce-page) .entry-content table thead th, body:not(.woocommerce-page) .entry-content table thead td, body:not(.woocommerce-page) .entry-content table tr:first-child th {
	background: var(--ibn-wine-deep) !important; color: var(--ibn-gold) !important; font-weight: 600; letter-spacing: .02em;
}
body:not(.woocommerce-page) .entry-content table tbody tr:nth-child(even) td { background: rgba(243, 234, 226, .03); }
@media (max-width: 689.98px) {
	body:not(.woocommerce-page) .entry-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 14px; }
	body:not(.woocommerce-page) .entry-content table th, body:not(.woocommerce-page) .entry-content table td { padding: 10px 12px; }
}

/* Product grids from shortcodes inside pages/posts (woocommerce/content-product.php) */
.entry-content .woocommerce ul.products { list-style: none; margin: 0 0 32px; padding: 0; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
.entry-content .woocommerce ul.products::before, .entry-content .woocommerce ul.products::after { display: none; }
.entry-content .woocommerce ul.products li.ibn-loop__item { width: auto !important; margin: 0 !important; padding: 0; float: none; }
@media (min-width: 1000px) { .entry-content .woocommerce ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; } }

/* Pages whose content starts with its own H1: hide the theme's duplicate page title */
body.page:has(.entry-content > h1:first-child) .hero-section { display: none; }

/* Block buttons in content: the shop's gold button instead of the editor default */
.entry-content .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: var(--ibn-radius) !important; background: var(--ibn-gold) !important; color: var(--ibn-on-gold) !important; font: 700 15px var(--ibn-sans); letter-spacing: .02em; text-decoration: none; }
.entry-content .wp-block-button__link:hover { background: var(--ibn-gold-hover) !important; }
