/* ============================================================
   cart.css — Liberty's own cart: button, drawer, toast,
              and the order page (objednavka.html)

   Palette follows the rest of the site:
     ink #172124 · mint #dbfaf2 · gold #bd8c00
   ============================================================ */

.liberty-cart {
    --lc-ink:    #172124;
    --lc-mint:   #dbfaf2;
    --lc-gold:   #bd8c00;
    --lc-line:   #e6e6e0;
    --lc-muted:  #6b7679;
    --lc-bg:     #ffffff;
}

:root {
    --lc-ink:    #172124;
    --lc-mint:   #dbfaf2;
    --lc-gold:   #bd8c00;
    --lc-line:   #e6e6e0;
    --lc-muted:  #6b7679;
    --lc-bg:     #ffffff;
    --lc-font:   'Barlow Condensed', sans-serif;
}

/* ============================================================
   1. CART BUTTON
   ============================================================ */

.liberty-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    background: transparent;
    color: #ffffff;
    font-family: var(--lc-font);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

.liberty-cart-btn__icon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.liberty-cart-btn:hover { transform: scale(1.06); }

.liberty-cart-btn.is-bumped { animation: lc-bump 0.42s ease; }

@keyframes lc-bump {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.22); }
    100% { transform: scale(1); }
}

/* the little number */
.liberty-cart-btn__count {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--lc-mint);
    color: var(--lc-ink);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
    box-sizing: border-box;
}

[data-liberty-cart-count].is-empty { display: none; }

/* In the black header bar, push it to the right edge. */
.site-header .liberty-cart-btn {
    margin-left: 20px;
    margin-right: 20px;
    flex: none;
}

/* Floating variant — used on pages with no header of their own.
   Sits under the dealer button, which is fixed at right:0 / top:270px. */
.liberty-cart-fab {
    position: fixed;
    right: 0;
    top: 330px;
    z-index: 900;
    width: 48px;
    height: 48px;
    background: var(--lc-ink);
    border-radius: 4px 0 0 4px;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.18);
}

.liberty-cart-fab:hover { background: #2a3f44; transform: none; }

@media screen and (max-width: 768px) {
    .liberty-cart-fab {
        top: auto;
        bottom: 18px;
        right: 18px;
        border-radius: 50%;
    }
}

/* ============================================================
   2. DRAWER
   ============================================================ */

.liberty-cart-locked { overflow: hidden; }

.liberty-cart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(23, 33, 36, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.liberty-cart-backdrop.is-open { opacity: 1; }
.liberty-cart-backdrop[hidden] { display: none; }

.liberty-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1401;
    width: min(420px, 100vw);
    display: flex;
    flex-direction: column;
    background: var(--lc-bg);
    color: var(--lc-ink);
    font-family: var(--lc-font);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.liberty-cart-drawer.is-open { transform: none; }
.liberty-cart-drawer[hidden] { display: none; }

.liberty-cart-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: var(--lc-ink);
    color: #fff;
    flex: none;
}

.liberty-cart-drawer__head h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.liberty-cart-drawer__x {
    border: none;
    background: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 1;
}

.liberty-cart-drawer__x:hover { opacity: 1; }

/* --- lines --- */
.liberty-cart-lines {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}

.liberty-cart-line {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 16px 42px 16px 16px;
    border-bottom: 1px solid var(--lc-line);
}

.liberty-cart-line__img {
    width: 78px;
    height: 78px;
    flex: none;
    object-fit: contain;
    background: #f5f5f0;
}

.liberty-cart-line__img--empty { display: block; }

.liberty-cart-line__body { flex: 1; min-width: 0; }

.liberty-cart-line__name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.liberty-cart-line__variant {
    margin: 3px 0 0;
    font-size: 1rem;
    color: var(--lc-muted);
}

.liberty-cart-line__unit {
    margin: 3px 0 0;
    font-size: 0.95rem;
    color: var(--lc-muted);
}

.liberty-cart-line__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 9px;
}

.liberty-cart-line__sum {
    font-size: 1.15rem;
    font-weight: 700;
}

.liberty-cart-line__x {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border: none;
    background: none;
    color: var(--lc-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.liberty-cart-line__x:hover { color: #a3271f; }

.liberty-cart-qty {
    display: inline-flex;
    align-items: stretch;
    background: var(--lc-mint);
}

.liberty-cart-qty button {
    width: 30px;
    border: none;
    background: var(--lc-ink);
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}

.liberty-cart-qty button:hover { background: var(--lc-gold); }

.liberty-cart-qty__val {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* --- footer --- */
.liberty-cart-drawer__foot {
    flex: none;
    padding: 16px;
    border-top: 2px solid var(--lc-ink);
    background: #fff;
}

.liberty-cart-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.liberty-cart-total strong { font-size: 1.7rem; }

.liberty-cart-note {
    margin: 6px 0 14px;
    font-size: 0.95rem;
    color: var(--lc-muted);
    line-height: 1.35;
}

.liberty-cart-order {
    display: block;
    padding: 14px;
    background: var(--lc-mint);
    color: var(--lc-ink);
    text-align: center;
    text-decoration: none;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.15s;
}

.liberty-cart-order:hover { background: #c4f0e4; }

.liberty-cart-clear {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    border: none;
    background: none;
    color: var(--lc-muted);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: underline;
}

.liberty-cart-clear:hover { color: #a3271f; }

.liberty-cart-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lc-muted);
    font-size: 1.2rem;
}

/* ============================================================
   3. TOAST
   ============================================================ */

.liberty-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    background: var(--lc-ink);
    color: #fff;
    font-family: var(--lc-font);
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24);
    transform: translate(-50%, 14px);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.liberty-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.liberty-toast--err { background: #a3271f; }
.liberty-toast svg { width: 20px; height: 20px; flex: none; }

/* ============================================================
   4. "DO KOŠÍKA" BUTTON on the výpredaj carousel
   ============================================================ */

.vy-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border: none;
    background: var(--lc-mint);
    color: var(--lc-ink);
    font-family: var(--lc-font);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s;
}

.vy-cart-btn:hover { background: #c4f0e4; }
.vy-cart-btn svg { width: 20px; height: 20px; flex: none; }
.vy-cart-btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* "Pridať do košíka" on a category page is a <button> now, not a link —
   category-page.css styles .cat-p-cart for an <a>, so give the button back
   the bits a button doesn't inherit. */
button.cat-p-cart {
    font-family: inherit;
    border: none;
    text-align: left;
    cursor: pointer;
}

/* ============================================================
   5. ORDER PAGE — objednavka.html
   ============================================================ */

.ob-page {
    font-family: var(--lc-font);
    color: var(--lc-ink);
    background: #fff;
    min-height: 100vh;
}

.ob-head {
    background: var(--lc-ink);
    color: #fff;
    padding: 26px 24px;
}

.ob-head__inner {
    max-width: 1040px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.ob-head h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ob-back {
    color: var(--lc-mint);
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
}

.ob-back:hover { text-decoration: underline; }

.ob-body {
    max-width: 1040px;
    margin: 0 auto;
    padding: 30px 24px 70px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

@media screen and (max-width: 860px) {
    .ob-body { grid-template-columns: 1fr; gap: 28px; }
    .ob-summary { order: -1; }
}

/* --- form --- */
.ob-section + .ob-section { margin-top: 30px; }

.ob-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--lc-ink);
}

.ob-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media screen and (max-width: 560px) {
    .ob-grid { grid-template-columns: 1fr; }
}

.ob-field { display: flex; flex-direction: column; gap: 5px; }
.ob-field--wide { grid-column: 1 / -1; }

.ob-field label {
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ob-field .ob-req { color: #a3271f; }

.ob-field input,
.ob-field textarea,
.ob-field select {
    font-family: inherit;
    font-size: 1.05rem;
    color: var(--lc-ink);
    background: #fff;
    border: 1px solid var(--lc-line);
    padding: 10px 12px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.ob-field input:focus,
.ob-field textarea:focus,
.ob-field select:focus {
    outline: none;
    border-color: var(--lc-ink);
}

.ob-field textarea { min-height: 92px; resize: vertical; }

.ob-field.is-bad input,
.ob-field.is-bad textarea,
.ob-field.is-bad select { border-color: #a3271f; background: #fdf6f5; }

.ob-err {
    font-size: 0.95rem;
    color: #a3271f;
    min-height: 1.1em;
}

/* --- radio blocks (doprava / platba) --- */
.ob-choices { display: flex; flex-direction: column; gap: 8px; }

.ob-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #f6f6f2;
    cursor: pointer;
    transition: background 0.15s;
}

.ob-choice:hover { background: #eeeee8; }
.ob-choice input { margin-top: 3px; flex: none; }
.ob-choice.is-picked { background: var(--lc-mint); }

.ob-choice__label { font-size: 1.08rem; font-weight: 600; }
.ob-choice__note { display: block; font-size: 0.98rem; font-weight: 400; color: var(--lc-muted); }
.ob-choice__price { margin-left: auto; font-weight: 700; white-space: nowrap; }

/* --- consent --- */
.ob-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    font-size: 1.02rem;
    line-height: 1.45;
}

.ob-consent input { margin-top: 4px; flex: none; }
.ob-consent a { color: var(--lc-ink); }

/* honeypot — never visible to a human */
.ob-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* --- summary --- */
.ob-summary {
    background: #f6f6f2;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.ob-summary h2 {
    margin: 0 0 14px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ob-lines { list-style: none; margin: 0; padding: 0; }

.ob-line {
    display: flex;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--lc-line);
}

.ob-line__img {
    width: 56px; height: 56px; flex: none;
    object-fit: contain; background: #fff;
}

.ob-line__body { flex: 1; min-width: 0; }
.ob-line__name { margin: 0; font-size: 1.02rem; font-weight: 700; line-height: 1.15; }
.ob-line__variant { margin: 2px 0 0; font-size: 0.95rem; color: var(--lc-muted); }
.ob-line__qty { margin: 2px 0 0; font-size: 0.95rem; color: var(--lc-muted); }
.ob-line__sum { font-weight: 700; white-space: nowrap; }

.ob-sums { margin-top: 14px; font-size: 1.05rem; }
.ob-sums div { display: flex; justify-content: space-between; padding: 3px 0; }
.ob-sums .ob-sums__total {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 2px solid var(--lc-ink);
    font-size: 1.45rem;
    font-weight: 700;
    text-transform: uppercase;
}

.ob-vat { margin-top: 6px; font-size: 0.95rem; color: var(--lc-muted); }

.ob-submit {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 15px;
    border: none;
    background: var(--lc-ink);
    color: #fff;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s;
}

.ob-submit:hover { background: #2a3f44; }
.ob-submit[disabled] { opacity: 0.55; cursor: wait; }

.ob-formerr {
    margin-top: 12px;
    padding: 11px 14px;
    background: #fdf1ef;
    border-left: 4px solid #a3271f;
    color: #7d1d17;
    font-size: 1.02rem;
    line-height: 1.4;
}

.ob-formerr[hidden] { display: none; }

/* --- empty + done states --- */
.ob-empty, .ob-done {
    max-width: 640px;
    margin: 0 auto;
    padding: 70px 24px;
    text-align: center;
}

.ob-done__tick {
    width: 68px; height: 68px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--lc-mint);
    display: flex; align-items: center; justify-content: center;
}

.ob-done__tick svg { width: 34px; height: 34px; color: var(--lc-ink); }

.ob-done h1, .ob-empty h1 {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.ob-done p, .ob-empty p {
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--lc-muted);
    margin: 0 0 8px;
}

.ob-done__num {
    display: inline-block;
    margin: 14px 0 22px;
    padding: 10px 22px;
    background: #f6f6f2;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.ob-cta {
    display: inline-block;
    margin-top: 10px;
    padding: 13px 30px;
    background: var(--lc-ink);
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ob-cta:hover { background: #2a3f44; }
