/* Client-side shopping basket for the LESEM static catalogue.
   No backend: the basket lives in localStorage and the order is sent
   through the visitor's own mail client. */

.lesem-cart-open {
    overflow: hidden;
}

.lesem-cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(24, 24, 24, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.lesem-cart-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.lesem-cart {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    width: min(430px, 100%);
    height: 100%;
    background: #fff;
    color: #3c4858;
    font-family: Raleway, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: -8px 0 30px rgba(0, 0, 0, .18);
    transform: translateX(102%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    visibility: hidden;
}

.lesem-cart.is-open {
    transform: translateX(0);
    visibility: visible;
}

.lesem-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
}

.lesem-cart-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #3c4858;
}

.lesem-cart-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #3c4858;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.lesem-cart-close:hover {
    background: #f4f4f4;
}

.lesem-cart-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

.lesem-cart-body {
    padding: 10px 20px;
}

.lesem-cart-empty {
    padding: 40px 0;
    text-align: center;
    color: #888;
}

.lesem-cart-items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lesem-cart-item {
    display: grid;
    grid-template-columns: 68px 1fr auto;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.lesem-cart-thumb {
    width: 68px;
    height: 86px;
    object-fit: cover;
    border-radius: 3px;
    background: #f6f6f6;
}

.lesem-cart-name {
    display: block;
    color: #3c4858;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.35;
}

.lesem-cart-name:hover {
    color: #b8860b;
}

.lesem-cart-unit {
    margin-top: 2px;
    color: #888;
    font-size: 13px;
}

.lesem-cart-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.lesem-cart-qty button {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #3c4858;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.lesem-cart-qty button:hover {
    border-color: #daa520;
    color: #b8860b;
}

.lesem-cart-qty span {
    min-width: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.lesem-cart-remove {
    border: 0 !important;
    padding: 0 4px !important;
    color: #999 !important;
    font-size: 12px !important;
    text-decoration: underline;
    background: transparent !important;
}

.lesem-cart-remove:hover {
    color: #c0392b !important;
}

.lesem-cart-line {
    white-space: nowrap;
    font-weight: 500;
    text-align: right;
    padding-top: 2px;
}

.lesem-cart-footer {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 16px 20px 20px;
    border-top: 1px solid #eee;
    background: #fcfcfc;
}

.lesem-cart-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.lesem-cart-total strong {
    font-size: 20px;
    font-weight: 600;
}

.lesem-cart-primary,
.lesem-cart-submit {
    display: block;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-radius: 3px;
    background: #daa520;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease;
}

.lesem-cart-primary:hover,
.lesem-cart-submit:hover {
    background: #c2921c;
}

.lesem-cart-primary:disabled,
.lesem-cart-submit:disabled {
    background: #ddd;
    cursor: default;
}

.lesem-cart-secondary {
    display: block;
    width: 100%;
    margin-top: 10px;
    border: 0;
    background: transparent;
    color: #888;
    font-family: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.lesem-cart-secondary:hover {
    color: #3c4858;
}

.lesem-cart-summary {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 3px;
    background: #f7f2e4;
    color: #6b5a20;
    font-size: 13px;
    text-align: center;
}

.lesem-cart-form label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.lesem-cart-form input,
.lesem-cart-form textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #3c4858;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.lesem-cart-form input:focus,
.lesem-cart-form textarea:focus {
    border-color: #daa520;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(218, 165, 32, .18);
}

.lesem-cart-form textarea {
    resize: vertical;
}

.lesem-cart-hint {
    margin: 10px 0 0;
    color: #999;
    font-size: 12px;
    line-height: 1.45;
}

.lesem-cart-step {
    display: none;
}

.lesem-cart-step.is-active {
    display: block;
}

.lesem-cart-sent {
    padding: 24px 0 8px;
    text-align: center;
}

.lesem-cart-sent p {
    margin: 0 0 12px;
}

/* Nav entry */
.lesem-cart-nav a {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

.lesem-cart-nav svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.lesem-cart-count {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #daa520;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    vertical-align: middle;
}

.lesem-cart-count[hidden] {
    display: none;
}

/* Add-to-cart buttons */
.lesem-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #e3e3e3;
    border-radius: 50%;
    background: #fff;
    color: #b8860b;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.lesem-add:hover,
.lesem-add.is-added {
    border-color: #daa520;
    background: #daa520;
    color: #fff;
}

.lesem-add svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.lesem-add-single {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 18px;
    padding: 13px 24px;
    border: 0;
    border-radius: 3px;
    background: #daa520;
    color: #fff;
    font-family: Raleway, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .18s ease;
}

.lesem-add-single:hover {
    background: #c2921c;
}

.lesem-add-single svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Floating cart button: the theme hides the navbar menu behind a
   hamburger below 992px, so the basket needs its own entry point there.
   Bottom-left keeps it clear of the theme's scroll-to-top button. */
.lesem-cart-fab {
    position: fixed;
    left: 16px;
    bottom: 18px;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #daa520;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    cursor: pointer;
}

.lesem-cart-fab svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.lesem-cart-fab .lesem-cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #3c4858;
}

@media (max-width: 991px) {
    .lesem-cart-fab {
        display: inline-flex;
    }
}

/* Feedback toast */
.lesem-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 100002;
    transform: translate(-50%, 12px);
    padding: 11px 18px;
    border-radius: 3px;
    background: rgba(40, 40, 40, .94);
    color: #fff;
    font-family: Raleway, sans-serif;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.lesem-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.lesem-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 480px) {
    .lesem-cart {
        width: 100%;
    }

    .lesem-cart-item {
        grid-template-columns: 56px 1fr auto;
    }

    .lesem-cart-thumb {
        width: 56px;
        height: 72px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lesem-cart,
    .lesem-cart-overlay,
    .lesem-toast {
        transition: none;
    }
}
