/* ==========================================================
   Store features: filters, gallery, reviews, coupons, account,
   live search. Uses the same palette as style.css.
   ========================================================== */

:root {
    --sv-green: #429511;
    --sv-green-dark: #357a0d;
    --sv-soft: #f2f8ef;
    --sv-border: #e7eee3;
    --sv-text: #222222;
    --sv-muted: #777777;
}

.sv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1px solid var(--sv-green);
    border-radius: 50px;
    background: var(--sv-green);
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s ease;
}

.sv-btn:hover {
    border-color: var(--sv-text);
    background: var(--sv-text);
    color: #ffffff;
}

.sv-btn-outline {
    background: #ffffff;
    color: var(--sv-green);
}

.sv-btn-outline:hover {
    background: var(--sv-green);
    border-color: var(--sv-green);
    color: #ffffff;
}

.sv-btn-sm {
    padding: 7px 15px;
    font-size: 12px;
}

.sv-btn-danger {
    border-color: #f1d4d4;
    background: #ffffff;
    color: #c0392b;
}

.sv-btn-danger:hover {
    border-color: #c0392b;
    background: #c0392b;
}

.sv-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--sv-green);
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    cursor: pointer;
}

.sv-card {
    padding: 26px;
    border: 1px solid var(--sv-border);
    border-radius: 15px;
    background: #ffffff;
    font-family: "Poppins", sans-serif;
}

.sv-card + .sv-card {
    margin-top: 20px;
}

.sv-card h2,
.sv-card h3 {
    margin: 0 0 18px;
    color: var(--sv-text);
    font-size: 18px;
    font-weight: 500;
}

.sv-badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 50px;
    background: var(--sv-soft);
    color: var(--sv-green);
    font-family: "Poppins", sans-serif;
    font-size: 11px;
    font-weight: 500;
}

.sv-badge-warning { background: #fff5dc; color: #9a6b00; }
.sv-badge-info { background: #e5f3fb; color: #1b6f9c; }
.sv-badge-primary { background: #e8ecfd; color: #3446b3; }
.sv-badge-success { background: #e5f4ea; color: #1f6f43; }
.sv-badge-danger { background: #fdeaea; color: #b03232; }

.sv-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 13px 16px;
    border-radius: 12px;
    background: #fff5dc;
    color: #7a5600;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
}

.sv-muted {
    color: var(--sv-muted);
    font-size: 13px;
}

/* ---------- Product listing filters ---------- */

.sv-shop-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.sv-shop-layout > *,
.sv-account-shell > * {
    min-width: 0;
}

.sv-filters {
    position: sticky;
    top: 100px;
    padding: 22px;
    border: 1px solid var(--sv-border);
    border-radius: 15px;
    background: #ffffff;
    font-family: "Poppins", sans-serif;
}

.sv-filters h4 {
    margin: 0 0 12px;
    color: var(--sv-text);
    font-size: 14px;
    font-weight: 600;
}

.sv-filter-group + .sv-filter-group {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--sv-border);
}

.sv-filter-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sv-filter-list a {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: #555555;
    font-size: 13px;
}

.sv-filter-list a.active,
.sv-filter-list a:hover {
    color: var(--sv-green);
    font-weight: 500;
}

.sv-filter-list small {
    color: #aaaaaa;
}

.sv-price-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sv-price-inputs input {
    width: 100%;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--sv-border);
    border-radius: 50px;
    font-size: 13px;
}

.sv-check {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 8px 0 0;
    color: #555555;
    font-size: 13px;
    cursor: pointer;
}

.sv-check input {
    accent-color: var(--sv-green);
}

.sv-shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-family: "Poppins", sans-serif;
}

.sv-shop-toolbar p {
    margin: 0;
    color: var(--sv-muted);
    font-size: 13px;
}

.sv-shop-toolbar select {
    padding: 8px 34px 8px 16px;
    border: 1px solid var(--sv-border);
    border-radius: 50px;
    background-color: #ffffff;
    font-size: 13px;
}

.sv-filter-toggle {
    display: none;
}

.sv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.sv-chips a {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 5px 12px;
    border-radius: 50px;
    background: var(--sv-soft);
    color: var(--sv-green);
    font-family: "Poppins", sans-serif;
    font-size: 12px;
}

@media (max-width: 991px) {
    .sv-shop-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sv-filters {
        position: static;
        display: none;
    }

    .sv-filters.open {
        display: block;
    }

    .sv-filter-toggle {
        display: inline-flex;
    }
}

/* ---------- Product card extras ---------- */

.book-product-card .sv-discount {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    padding: 5px 9px;
    border-radius: 50px;
    background: #222222;
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 10px;
}

.book-product-card .sv-oos {
    color: #b03232;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.book-product-price del {
    margin-left: 6px;
    color: #aaaaaa;
    font-size: 0.8em;
    font-weight: 400;
}

/* ---------- Product gallery ---------- */

.sv-gallery-main img {
    transition: opacity 0.2s ease;
}

.sv-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.sv-gallery-thumbs button {
    width: 64px;
    height: 80px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--sv-soft);
    cursor: pointer;
}

.sv-gallery-thumbs button.active {
    border-color: var(--sv-green);
}

.sv-gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sv-detail-note {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    color: var(--sv-muted);
    font-family: "Poppins", sans-serif;
    font-size: 13px;
}

/* ---------- Reviews ---------- */

.sv-reviews {
    padding: 10px 0 60px;
    font-family: "Poppins", sans-serif;
}

.sv-reviews-head {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
}

.sv-reviews-head h2 {
    margin: 0;
    color: var(--sv-text);
    font-size: 26px;
    font-weight: 600;
}

.sv-rating-big {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sv-rating-big strong {
    color: var(--sv-text);
    font-size: 34px;
    font-weight: 600;
}

.sv-stars {
    color: #f5a623;
    font-size: 13px;
    letter-spacing: 1px;
}

.sv-review {
    padding: 20px 0;
    border-bottom: 1px solid var(--sv-border);
}

.sv-review-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sv-review h5 {
    margin: 4px 0;
    color: var(--sv-text);
    font-size: 15px;
    font-weight: 500;
}

.sv-review p {
    margin: 0;
    color: #555555;
    font-size: 14px;
    line-height: 1.7;
}

.sv-star-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}

.sv-star-input input {
    display: none;
}

.sv-star-input label {
    color: #dddddd;
    font-size: 24px;
    cursor: pointer;
}

.sv-star-input input:checked ~ label,
.sv-star-input label:hover,
.sv-star-input label:hover ~ label {
    color: #f5a623;
}

/* ---------- Cart extras ---------- */

.sv-coupon-form {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.sv-coupon-form input {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    border: 1px solid #e1e9dc;
    border-radius: 50px;
    background: #ffffff;
    font-size: 13px;
    text-transform: uppercase;
}

.sv-coupon-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border: 1px dashed var(--sv-green);
    border-radius: 12px;
    background: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
}

.sv-savings {
    margin-top: 14px;
    padding: 9px 14px;
    border-radius: 12px;
    background: #ffffff;
    color: var(--sv-green);
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    text-align: center;
}

.book-cart-quantity button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ---------- Checkout extras ---------- */

.sv-address-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.sv-address-option {
    position: relative;
    padding: 14px 16px;
    border: 1px solid var(--sv-border);
    border-radius: 12px;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    line-height: 1.6;
    cursor: pointer;
}

.sv-address-option.active {
    border-color: var(--sv-green);
    background: var(--sv-soft);
}

.sv-address-option strong {
    display: block;
    color: var(--sv-text);
    font-size: 13px;
}

/* ---------- Account area ---------- */

.sv-account {
    padding: 50px 0 70px;
    font-family: "Poppins", sans-serif;
}

.sv-account-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.sv-account-side {
    position: sticky;
    top: 100px;
    padding: 22px;
    border: 1px solid var(--sv-border);
    border-radius: 15px;
    background: var(--sv-soft);
}

.sv-account-user {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.sv-avatar {
    display: grid;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: var(--sv-green);
    color: #ffffff;
    font-weight: 600;
}

.sv-account-user strong {
    display: block;
    color: var(--sv-text);
    font-size: 15px;
}

.sv-account-user span {
    display: block;
    color: var(--sv-muted);
    font-size: 12px;
    word-break: break-all;
}

.sv-account-nav a,
.sv-account-nav button {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: #444444;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.sv-account-nav a i,
.sv-account-nav button i {
    width: 18px;
    color: var(--sv-green);
}

.sv-account-nav a.active,
.sv-account-nav a:hover,
.sv-account-nav button:hover {
    background: #ffffff;
    color: var(--sv-text);
}

.sv-account-nav em {
    margin-left: auto;
    padding: 1px 8px;
    border-radius: 50px;
    background: var(--sv-green);
    color: #ffffff;
    font-size: 11px;
    font-style: normal;
}

.sv-account-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 26px;
}

.sv-account-head span {
    color: var(--sv-green);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
}

.sv-account-head h1 {
    margin: 4px 0 0;
    color: var(--sv-text);
    font-size: 28px;
    font-weight: 600;
}

.sv-account-head p {
    margin: 4px 0 0;
    color: var(--sv-muted);
    font-size: 14px;
}

.sv-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.sv-stat {
    padding: 18px;
    border: 1px solid var(--sv-border);
    border-radius: 15px;
    background: #ffffff;
}

.sv-stat i {
    color: var(--sv-green);
}

.sv-stat strong {
    display: block;
    margin-top: 8px;
    color: var(--sv-text);
    font-size: 22px;
    font-weight: 600;
}

.sv-stat span {
    color: var(--sv-muted);
    font-size: 12px;
}

.sv-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.sv-tabs a {
    padding: 7px 16px;
    border: 1px solid var(--sv-border);
    border-radius: 50px;
    color: #555555;
    font-size: 13px;
}

.sv-tabs a.active {
    border-color: var(--sv-green);
    background: var(--sv-green);
    color: #ffffff;
}

.sv-order-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--sv-border);
}

.sv-order-row:last-child {
    border-bottom: 0;
}

.sv-order-row h4 {
    margin: 0 0 4px;
    color: var(--sv-text);
    font-size: 15px;
    font-weight: 500;
}

.sv-order-thumbs {
    display: flex;
    gap: 6px;
}

.sv-order-thumbs img {
    width: 38px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.sv-order-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--sv-border);
}

.sv-order-item img {
    width: 60px;
    height: 78px;
    object-fit: cover;
    border-radius: 8px;
}

.sv-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: #555555;
    font-size: 14px;
}

.sv-summary-row.total {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--sv-border);
    color: var(--sv-text);
    font-size: 16px;
    font-weight: 600;
}

.sv-progress {
    display: flex;
    justify-content: space-between;
    margin: 6px 0 4px;
    position: relative;
}

.sv-progress::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--sv-border);
}

.sv-progress div {
    position: relative;
    flex: 1;
    color: #aaaaaa;
    font-size: 11px;
    text-align: center;
}

.sv-progress div i {
    display: grid;
    width: 30px;
    height: 30px;
    margin: 0 auto 6px;
    place-items: center;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--sv-border);
    font-size: 11px;
}

.sv-progress div.done {
    color: var(--sv-green);
}

.sv-progress div.done i {
    border-color: var(--sv-green);
    background: var(--sv-green);
    color: #ffffff;
}

.sv-address-card {
    position: relative;
    height: 100%;
    padding: 20px;
    border: 1px solid var(--sv-border);
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.7;
}

.sv-address-card.default {
    border-color: var(--sv-green);
    background: var(--sv-soft);
}

.sv-address-card .sv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

@media (max-width: 991px) {
    .sv-account-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .sv-account-side {
        position: static;
    }

    .sv-account-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .sv-account-nav a,
    .sv-account-nav form,
    .sv-account-nav button {
        width: auto;
    }
}

/* ---------- Live search ---------- */

.sv-search-wrap {
    position: relative;
}

.sv-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1060;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid var(--sv-border);
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    font-family: "Poppins", sans-serif;
    text-align: left;
}

.sv-suggest[hidden] {
    display: none;
}

.sv-suggest a {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    color: var(--sv-text);
    font-size: 13px;
}

.sv-suggest a:hover,
.sv-suggest a.active {
    background: var(--sv-soft);
}

.sv-suggest img {
    width: 36px;
    height: 48px;
    object-fit: cover;
    border-radius: 5px;
}

.sv-suggest small {
    display: block;
    color: var(--sv-muted);
    font-size: 11px;
}

.sv-suggest .sv-suggest-price {
    margin-left: auto;
    color: var(--sv-green);
    font-weight: 500;
    white-space: nowrap;
}

.sv-suggest .sv-suggest-all {
    justify-content: center;
    border-top: 1px solid var(--sv-border);
    color: var(--sv-green);
}

.sv-suggest .sv-suggest-empty {
    padding: 16px;
    color: var(--sv-muted);
    font-size: 13px;
    text-align: center;
}

/* ---------- Footer newsletter ---------- */

.sv-footer-newsletter {
    margin: 18px 0 22px;
    font-family: "Poppins", sans-serif;
}

.sv-footer-newsletter strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.sv-footer-newsletter small {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
}

.sv-newsletter {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.sv-newsletter input {
    flex: 1;
    min-width: 0;
    max-width: 260px;
    padding: 10px 16px;
    border: 1px solid var(--sv-border);
    border-radius: 50px;
    font-size: 13px;
}

.sv-newsletter button {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--sv-green);
    color: #ffffff;
}

.sv-newsletter-msg {
    display: block;
    margin-top: 6px;
    font-size: 12px;
}

/* ---------- Toast notifications ---------- */

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

.cart-count.bump {
    animation: sv-bump 0.45s ease;
}

@keyframes sv-bump {
    0% { transform: scale(1); }
    40% { transform: scale(1.45); }
    100% { transform: scale(1); }
}

.sv-toasts {
    position: fixed;
    top: 96px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

.sv-toast {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 340px;
    padding: 10px 12px 11px;
    overflow: hidden;
    border-radius: 12px;
    background: #222222;
    color: #ffffff;
    box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.45);
    font-family: "Poppins", sans-serif;
    pointer-events: auto;
    animation: sv-toast-in 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) both;
}

.sv-toast.leaving {
    animation: sv-toast-out 0.25s ease forwards;
}

@keyframes sv-toast-in {
    from { opacity: 0; transform: translateY(-10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sv-toast-out {
    to { opacity: 0; transform: translateY(-10px) scale(0.97); }
}

.sv-toast-icon {
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
}

.sv-toast-success .sv-toast-icon { color: #7dd34a; }
.sv-toast-error .sv-toast-icon { color: #ff7a7a; }
.sv-toast-info .sv-toast-icon { color: #7cc0ff; }

.sv-toast-text {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: #f2f2f2;
    font-size: 13px;
    line-height: 1.45;
}

.sv-toast-text strong {
    color: #ffffff;
    font-weight: 600;
}

.sv-toast-text a {
    margin-left: 4px;
    color: #7dd34a;
    font-weight: 500;
    white-space: nowrap;
}

.sv-toast-text a:hover {
    color: #a6e57f;
    text-decoration: underline !important;
}

.sv-toast-close {
    flex-shrink: 0;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #9a9a9a;
    font-size: 12px;
    cursor: pointer;
}

.sv-toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.sv-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    transform-origin: left;
    background: #7dd34a;
}

.sv-toast-error .sv-toast-progress { background: #ff7a7a; }
.sv-toast-info .sv-toast-progress { background: #7cc0ff; }

.sv-toast.running .sv-toast-progress {
    animation: sv-toast-timer var(--sv-toast-time, 3500ms) linear forwards;
}

.sv-toast:hover .sv-toast-progress {
    animation-play-state: paused;
}

@keyframes sv-toast-timer {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Add-to-cart button states */
.book-product-cart.is-loading,
.book-detail-cart-btn.is-loading {
    pointer-events: none;
    opacity: 0.75;
}

.book-product-cart.is-added {
    background: var(--sv-text);
}

@media (max-width: 575px) {
    .sv-toasts {
        top: 12px;
        right: 16px;
        left: 16px;
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sv-toast,
    .sv-toast.leaving,
    .cart-count.bump {
        animation: none;
    }
}

/* ---------- Form validation ---------- */

input.sv-invalid,
select.sv-invalid,
textarea.sv-invalid,
.sv-invalid-wrap input.sv-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

input[type="checkbox"].sv-invalid,
input[type="radio"].sv-invalid {
    outline: 2px solid rgba(220, 53, 69, 0.55);
    outline-offset: 2px;
    box-shadow: none !important;
}

.sv-star-input.sv-invalid-wrap label {
    color: #f4c7cc;
}

.book-field-error {
    display: flex;
    gap: 5px;
    align-items: flex-start;
    margin-top: 6px;
    padding-left: 14px;
    animation: sv-error-in 0.2s ease;
}

.book-field-error::before {
    content: "\f06a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
    line-height: 1.6;
}

.book-checkout-payment .book-field-error,
.book-register-terms + .book-field-error,
.sv-check + .book-field-error,
.sv-star-input + .book-field-error {
    padding-left: 0;
}

@keyframes sv-error-in {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Header menu ---------- */

.navbar-nav a {
    white-space: nowrap;
}

/* Laptop widths: tighter spacing so the five menu items stay on one line. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-nav a {
        margin-left: 9px !important;
        margin-right: 9px !important;
        font-size: 13.5px !important;
        letter-spacing: 1px !important;
    }
}

/* Desktop: give the menu the free space between logo and icons, centred, so it never runs under the logo. */
@media (min-width: 992px) {
    #offcanvasNavbar > .row {
        flex-wrap: nowrap;
        align-items: center;
        width: 100%;
        margin: 0;
    }

    #offcanvasNavbar > .row > .col-lg-8 {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    #offcanvasNavbar > .row > .col-lg-4 {
        flex: 0 0 auto;
        width: auto;
    }

    #offcanvasNavbar .navbar-nav {
        justify-content: center;
    }
}

/* ---------- Mobile bottom navigation ---------- */

@media (max-width: 768px) {
    :root {
        /* bar (66px) + gap below it (12px) + room for the raised cart button */
        --bottom-nav-height: calc(96px + env(safe-area-inset-bottom));
    }

    .bottom-nav.sv-bottom-nav {
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: auto;
        height: 66px;
        padding: 0 6px;
        gap: 0;
        align-items: stretch;
        border: 1px solid rgba(66, 149, 17, 0.12);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.97);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
        backdrop-filter: saturate(180%) blur(14px);
        box-shadow: 0 14px 34px -10px rgba(25, 50, 12, 0.28), 0 2px 8px rgba(0, 0, 0, 0.05);
    }
}

.sv-bottom-nav .sv-bn-item {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    color: #8b9387;
    font-family: "Poppins", sans-serif;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease;
}

.sv-bottom-nav .sv-bn-icon {
    display: grid;
    width: 46px;
    height: 30px;
    place-items: center;
    border-radius: 50px;
    transition: background 0.25s ease, transform 0.2s ease;
}

.sv-bottom-nav .sv-bn-icon i,
.sv-bottom-nav .sv-bn-fab i {
    display: block;
    margin: 0;
    font-size: 18px;
    line-height: 1;
}

.sv-bottom-nav .sv-bn-label {
    display: block;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
}

.sv-bottom-nav .sv-bn-item:active .sv-bn-icon {
    transform: scale(0.9);
}

/* Active item: green icon on a soft chip with a dot under the label */
.sv-bottom-nav .sv-bn-item.active {
    color: var(--sv-green);
}

.sv-bottom-nav .sv-bn-item.active .sv-bn-icon {
    background: #eaf5e2;
}

.sv-bottom-nav .sv-bn-item.active:not(.sv-bn-cart)::after {
    content: "";
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--sv-green);
}

/* Raised cart button in the middle */
.sv-bottom-nav .sv-bn-cart {
    justify-content: flex-end;
    padding-bottom: 9px;
}

.sv-bottom-nav .sv-bn-fab {
    position: absolute;
    top: -22px;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border: 4px solid #ffffff;
    border-radius: 50%;
    background: linear-gradient(145deg, #5cb32a 0%, #429511 55%, #357a0d 100%);
    color: #ffffff;
    box-shadow: 0 10px 20px -6px rgba(66, 149, 17, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sv-bottom-nav .sv-bn-fab i {
    font-size: 19px;
}

.sv-bottom-nav .sv-bn-cart:active .sv-bn-fab {
    transform: scale(0.93);
}

.sv-bottom-nav .sv-bn-cart.active .sv-bn-fab {
    box-shadow: 0 0 0 4px rgba(66, 149, 17, 0.18), 0 10px 20px -6px rgba(66, 149, 17, 0.6);
}

.sv-bottom-nav .sv-bn-cart .sv-bn-label {
    color: var(--sv-green);
    font-weight: 600;
}

.sv-bottom-nav .sv-bn-fab .cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    place-items: center;
    border: 2px solid #ffffff;
    border-radius: 50px;
    background: #222222;
    color: #ffffff;
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
}

/* The space kept free for the bottom bar belongs to the dark footer, not a white strip. */
@media (max-width: 768px) {
    body {
        padding-bottom: 0 !important;
    }

    .book-footer-section {
        padding-bottom: var(--bottom-nav-height) !important;
    }
}

/* ---------- Checkout: "use a different address" option ---------- */

.sv-address-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    color: var(--sv-muted);
    text-align: center;
}

.sv-address-new i {
    display: grid;
    width: 30px;
    height: 30px;
    margin-bottom: 6px;
    place-items: center;
    border-radius: 50%;
    background: var(--sv-soft);
    color: var(--sv-green);
    font-size: 12px;
}

.sv-address-new.active {
    border-style: solid;
}

[data-address-fields][hidden] {
    display: none !important;
}
