/*
Theme Name: Minimal Bookshop (B&N Inspired)
Theme URI: https://github.com/twoj-profil/minimal-bookshop
Author: Senior Full-Stack Developer
Description: Ultralekki, stworzony od zera motyw WooCommerce. Skupiony na typografii, konwersji i Web Vitals (Zero jQuery, wsparcie HPOS).
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 8.2
WooCommerce requires at least: 8.2
Text Domain: minimal-bookshop
*/

:root {
    --font-heading: 'Merriweather', 'Georgia', serif;
    --font-body: 'Inter', '-apple-system', 'BlinkMacSystemFont', sans-serif;
    --color-bg-main: #FFFFFF;
    --color-bg-secondary: #F7F7F7;
    --color-text-primary: #111827;
    --color-text-muted: #6B7280;
    --color-accent: #14532d;
    --color-border: #E5E7EB;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text-primary);
    background-color: var(--color-bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
}

/* ==========================================================================
   MINI CART (B&N Inspired)
   ========================================================================== */
.mb-cart-overlay {
    position: fixed; inset: 0; background-color: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(2px); opacity: 0; visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
    z-index: 9998;
}
.mb-cart-overlay.is-active { opacity: 1; visibility: visible; }
.mb-mini-cart {
    position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 420px;
    background-color: var(--color-bg-main); box-shadow: -4px 0 24px rgba(0,0,0,0.1);
    z-index: 9999; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 300ms cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}
.mb-mini-cart.is-open { transform: translateX(0); }
.mb-mini-cart__header { display: flex; justify-content: space-between; align-items: center; padding: var(--spacing-md); border-bottom: 1px solid var(--color-border); }
.mb-mini-cart__title { font-size: 1.25rem; margin: 0; font-family: var(--font-heading); }
.mb-btn-close { background: none; border: none; padding: 0; cursor: pointer; color: var(--color-text-muted); transition: color var(--transition-fast); }
.mb-btn-close:hover { color: var(--color-text-primary); }
.mb-mini-cart__content { flex-grow: 1; overflow-y: auto; padding: var(--spacing-md); -webkit-overflow-scrolling: touch; }
.mb-cart-items { list-style: none; padding: 0; margin: 0; }
.mb-cart-item { display: flex; gap: var(--spacing-sm); padding-bottom: var(--spacing-sm); margin-bottom: var(--spacing-sm); border-bottom: 1px solid var(--color-border); }
.mb-cart-item__image img { border-radius: 4px; object-fit: cover; background: var(--color-bg-secondary); }
.mb-cart-item__name { font-size: 0.9rem; font-family: var(--font-body); font-weight: 600; margin-bottom: 4px; }
.mb-cart-item__price { font-size: 0.875rem; color: var(--color-text-muted); }
.mb-mini-cart__footer { padding: var(--spacing-md); background-color: var(--color-bg-secondary); border-top: 1px solid var(--color-border); }
.mb-cart-subtotal { display: flex; justify-content: space-between; font-size: 1.1rem; margin-bottom: var(--spacing-md); font-weight: 700; font-family: var(--font-heading); }
.mb-btn { display: inline-flex; justify-content: center; align-items: center; padding: 0.75rem 1.5rem; font-family: var(--font-body); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none; border: none; cursor: pointer; transition: background-color var(--transition-fast); }
.mb-btn--primary { background-color: var(--color-accent); color: #fff; }
.mb-btn--primary:hover { background-color: #0f3c20; }
.mb-btn--full { width: 100%; }

/* ==========================================================================
   SINGLE PRODUCT (B&N Inspired)
   ========================================================================== */
.mb-single-product { max-width: 1200px; margin: 0 auto; padding: var(--spacing-xl) var(--spacing-md); }
.mb-product-layout { display: grid; grid-template-columns: 1fr; gap: var(--spacing-lg); align-items: start; }
@media (min-width: 768px) { .mb-product-layout { grid-template-columns: 4fr 6fr; gap: var(--spacing-xl); } }
.mb-product-gallery { aspect-ratio: 2 / 3; background-color: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: 4px; overflow: hidden; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.mb-img-fluid { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-product-header .product_title { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700; color: var(--color-text-primary); line-height: 1.1; margin-bottom: var(--spacing-xs); }
.mb-product-header .price { font-family: var(--font-body); font-size: 1.5rem; font-weight: 600; color: var(--color-accent); margin-bottom: var(--spacing-md); display: block; }
.mb-product-header .woocommerce-product-details__short-description { font-size: 1.05rem; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); padding-bottom: var(--spacing-md); margin-bottom: var(--spacing-md); line-height: 1.7; }
.mb-buy-box { background: var(--color-bg-secondary); padding: var(--spacing-md); border-radius: 4px; margin-bottom: var(--spacing-lg); }
.mb-product-meta-clean { font-size: 0.85rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.mb-product-meta-clean a { color: var(--color-text-primary); text-decoration: none; font-weight: 600; }
