:root {
    --bg: #ffffff;
    --surface: #f6f7f9;
    --ink: #16181d;
    --ink-soft: #6b7280;
    --accent: #e2542c;
    --accent-dark: #c73f1a;
    --line: #e5e7eb;
    --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Manrope', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 66px;
}
.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}
.logo span { color: var(--accent); }
.nav-search { flex: 1; max-width: 420px; }
.nav-search input {
    width: 100%;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.nav-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(226, 84, 44, 0.12); }
.cart-btn {
    margin-left: auto;
    position: relative;
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s;
}
.cart-btn:hover { transform: scale(1.04); }
.cart-count {
    position: absolute;
    top: -6px; right: -6px;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}
.cart-count.bump { animation: bump 0.3s; }
@keyframes bump { 40% { transform: scale(1.4); } }

/* Hero */
.shop-hero {
    padding: 56px 0 36px;
}
.badge {
    display: inline-block;
    background: rgba(226, 84, 44, 0.1);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.shop-hero h1 {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.hero-sub { color: var(--ink-soft); max-width: 520px; }

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 18px 0 26px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 32px;
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all 0.2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
#sort {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
}

/* Produkte */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    padding-bottom: 80px;
}
.product {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    transition: transform 0.22s, box-shadow 0.22s;
    display: flex;
    flex-direction: column;
}
.product:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(22, 24, 29, 0.1); }
.product-img {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.4rem;
    position: relative;
}
.product-tag {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--ink);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.product-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.product-cat { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.product-name { font-weight: 700; font-size: 1.02rem; }
.product-rating { font-size: 0.82rem; color: var(--ink-soft); }
.product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
}
.product-price { font-weight: 800; font-size: 1.15rem; }
.product-price small { color: var(--ink-soft); text-decoration: line-through; font-weight: 500; margin-right: 6px; font-size: 0.82rem; }
.add-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 16px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.add-btn:hover { background: var(--accent-dark); transform: scale(1.05); }
.empty-msg { text-align: center; color: var(--ink-soft); padding: 60px 0; }

/* Warenkorb-Drawer */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(22, 24, 29, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 90;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(420px, 100vw);
    background: #fff;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 60px rgba(22, 24, 29, 0.15);
}
.drawer.open { transform: none; }
.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 1.2rem; }
.drawer-close {
    background: var(--surface);
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
}
.drawer-items { flex: 1; overflow-y: auto; padding: 18px 24px; }
.drawer-empty { color: var(--ink-soft); text-align: center; padding: 48px 0; }
.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
}
.cart-item-img {
    width: 58px; height: 58px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-info b { font-size: 0.94rem; display: block; }
.cart-item-info span { color: var(--ink-soft); font-size: 0.85rem; }
.qty {
    display: flex;
    align-items: center;
    gap: 10px;
}
.qty button {
    width: 26px; height: 26px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
}
.qty button:hover { border-color: var(--accent); color: var(--accent); }
.drawer-foot { padding: 20px 24px; border-top: 1px solid var(--line); }
.drawer-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 1.05rem;
}
.btn-checkout {
    width: 100%;
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-checkout:hover { background: #000; }
.drawer-note { text-align: center; color: var(--ink-soft); font-size: 0.78rem; margin-top: 10px; }

/* Checkout-Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(22, 24, 29, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 110;
    padding: 24px;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
    background: #fff;
    border-radius: 20px;
    padding: 44px 36px;
    max-width: 420px;
    text-align: center;
    transform: translateY(16px);
    transition: transform 0.3s;
}
.modal-backdrop.open .modal { transform: none; }
.modal-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.modal h2 { margin-bottom: 10px; }
.modal p { color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 24px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 24px 0; }
.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--ink-soft);
    font-size: 0.86rem;
}
.footer-inner a { color: var(--ink-soft); text-decoration: none; margin-left: 18px; }
.footer-inner a:hover { color: var(--accent); }

@media (max-width: 640px) {
    .nav-search { display: none; }
    .toolbar { flex-direction: column; align-items: stretch; }
    #sort { width: 100%; }
}
