/* Shared visual foundation adapted from KI_Platform's purchase.css. */
:root {
    --ink: #263746;
    --muted: #6f7f8c;
    --line: rgba(38, 55, 70, 0.12);
    --panel: #ffffff;
    --panel-strong: #ffffff;
    --accent: #f5a623;
    --accent-deep: #dd7f12;
    --accent-soft: #fbf1df;
    --km-purple: #7d3f98;
    --km-purple-deep: #60317b;
    --shadow-md: 0 18px 48px rgba(38, 55, 70, 0.1);
    --store-font: "Muli", "Mulish", Arial, sans-serif;
    --bs-primary: #7d3f98;
    --bs-primary-rgb: 125, 63, 152;
}

body.store-body {
    font-family: var(--store-font);
    line-height: 1.6;
    background: linear-gradient(180deg, #fffdf7 0%, #f7f5ef 52%, #edf5f2 100%);
}

.store-body :is(h1, h2, h3, h4, h5, h6, legend, .brand-name,
    .store-summary-value, .store-price, .store-detail-price, .hero-slide-title,
    .store-section-title, .store-category-feature-title, .store-footer-brand, .hero-slide-card-title) {
    font-family: var(--store-font);
    font-weight: 800;
    letter-spacing: 0;
}

.store-body :is(h1, .hero-slide-title) {
    font-weight: 900;
}

.store-body :is(input, select, textarea, button, .btn) {
    font-family: var(--store-font);
}

.store-body .btn {
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.3;
    padding: 0.8rem 1.2rem;
    min-height: 3rem;
    text-decoration: none;
}

.store-body .btn-sm {
    min-height: 2.4rem;
    padding: 0.5rem 0.9rem;
}

.store-body .btn-primary {
    --bs-btn-bg: var(--km-purple);
    --bs-btn-border-color: var(--km-purple);
    --bs-btn-hover-bg: var(--km-purple-deep);
    --bs-btn-hover-border-color: var(--km-purple-deep);
    --bs-btn-active-bg: var(--km-purple-deep);
    --bs-btn-active-border-color: var(--km-purple-deep);
    --bs-btn-disabled-bg: var(--km-purple);
    --bs-btn-disabled-border-color: var(--km-purple);
    background: var(--km-purple);
    border: 1px solid var(--km-purple);
    color: #fff;
    box-shadow: 0 8px 20px rgba(125, 63, 152, 0.16);
}

.store-body .btn-primary:is(:hover, :focus-visible, :active) {
    background: var(--km-purple-deep);
    border-color: var(--km-purple-deep);
    color: #fff;
    transform: none;
}

.store-body :is(.btn-outline-secondary, .btn-outline-dark, .btn-default) {
    color: var(--ink);
    background: #fff;
    border: 1px solid rgba(38, 55, 70, 0.2);
    box-shadow: none;
}

.store-body :is(.btn-outline-secondary, .btn-outline-dark, .btn-default):is(:hover, :focus-visible) {
    color: var(--km-purple);
    border-color: var(--km-purple);
    background: #f6edf9;
}

.store-body :is(.form-control, .form-select) {
    min-height: 3rem;
    border: 1px solid rgba(38, 55, 70, 0.18);
    border-radius: 0.7rem;
    padding: 0.7rem 0.9rem;
    color: var(--ink);
    background-color: #fff;
}

/* Use background-image separately: the old background shorthand removed the select arrow. */
.store-body .form-select {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23263746' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 16px 16px;
}

.store-body :is(.form-control, .form-select):focus {
    border-color: var(--km-purple);
    box-shadow: 0 0 0 0.2rem rgba(125, 63, 152, 0.14);
}

.store-body :is(.form-control, .form-select):disabled {
    background-color: #f4f5f6;
    color: var(--muted);
}

.store-body .main-container .page-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.store-body .main-container fieldset {
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: 0 10px 30px rgba(38, 55, 70, 0.04);
}

.store-body .main-container legend {
    float: none;
    width: auto;
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
}

.store-body .main-container h3.title {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--muted);
    margin-bottom: 1rem;
}

.store-body .main-container .col-form-label {
    font-size: 0.9rem;
    font-weight: 700;
}

.store-body .main-container #divItems {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
    margin-bottom: 1.5rem;
}

.store-body .main-container .table {
    margin-bottom: 0;
    vertical-align: middle;
    font-size: 0.95rem;
}

.store-body .main-container .table > :not(caption) > * > * {
    padding: 1rem;
    border-color: var(--line);
}

.store-body .main-container .table thead th {
    background: #f7f5ef;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--muted);
}

.store-body .main-container .table :is(.price, .amount, .total-amount) {
    white-space: nowrap;
    text-align: right;
}

.store-body .main-container .table .quantity {
    width: 6rem;
    text-align: center;
}

.store-body .main-container .table .quantity .form-control {
    width: 4rem;
    min-height: 2.4rem;
    padding: 0.4rem;
    text-align: center;
}

.store-body .main-container .table .form-group {
    margin-bottom: 0;
}

.store-body .main-container .product small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.store-body .main-container .product a {
    color: var(--km-purple);
    font-weight: 700;
    text-decoration: none;
}

.checkout-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.checkout-actions .submit-button {
    display: inline-flex;
    gap: 0.75rem;
}

.checkout-actions .btn i,
.checkout-switch i {
    margin-right: 0.4rem;
}

.store-body .checkout-switch {
    min-height: 2.4rem;
    margin-top: 0.6rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
}

@media (max-width: 575.98px) {
    .checkout-actions > *, .checkout-actions .btn {
        width: 100%;
    }

    .store-body .main-container .table > :not(caption) > * > * {
        padding: 0.75rem;
    }
}


/* Logo/home, centered search, and account controls share one responsive header. */
.store-header-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 400px) minmax(0, 1fr);
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
}

.store-header-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
}

.store-header-brand .store-logo-image {
    width: 185px;
    max-width: none;
}

.store-category-toggle {
    border: 0;
    padding: 0.65rem 0;
    background: transparent;
    color: var(--ink);
    font-weight: 800;
    white-space: nowrap;
}

.store-category-toggle:is(:hover, :focus-visible) {
    color: var(--km-purple);
}

.store-header-search {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 3rem;
    border: 1px solid rgba(38, 55, 70, 0.18);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.store-header-search:focus-within {
    border-color: var(--km-purple);
    box-shadow: 0 0 0 0.2rem rgba(125, 63, 152, 0.12);
}

.store-header-search input {
    flex: 1;
    width: 0;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0.7rem 0.3rem 0.7rem 1.1rem;
    background: transparent;
    color: var(--ink);
    font-size: 0.9rem;
}

.store-header-search button {
    flex: 0 0 2.6rem;
    width: 2.6rem;
    height: 2.6rem;
    margin: 0.15rem;
    border: 0;
    border-radius: 50%;
    background: var(--km-purple);
    color: #fff;
}

.store-header-search button:hover {
    background: var(--km-purple-deep);
}

.store-account-actions {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 0.65rem;
}

.store-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-size: 1.35rem;
    text-decoration: none;
}

.store-header-icon:is(:hover, :focus-visible, .show) {
    color: var(--km-purple);
    border-color: var(--km-purple);
    background: #f6edf9;
}

.store-header-cart .store-cart-badge {
    position: absolute;
    top: -0.3rem;
    right: -0.35rem;
    min-width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    padding: 0 0.25rem;
    font-size: 0.65rem;
}

.store-profile-menu {
    min-width: 12rem;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.store-profile-menu .dropdown-item {
    border-radius: 0.6rem;
    padding: 0.7rem 0.85rem;
    font-weight: 700;
}

.store-profile-menu .dropdown-item:is(:hover, :focus) {
    color: var(--km-purple);
    background: #f6edf9;
}

@media (max-width: 1199.98px) {
    .store-header-nav {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 1rem;
    }

    .store-header-search {
        grid-row: 2;
        grid-column: 1 / -1;
        max-width: 640px;
        justify-self: center;
    }

    .store-account-actions {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 575.98px) {
    .store-header-nav {
        padding: 0.85rem;
        gap: 0.75rem;
    }

    .store-header-brand {
        flex-wrap: wrap;
        gap: 0.15rem 0.65rem;
    }

    .store-header-brand .store-logo-image {
        width: 150px;
        max-width: 100%;
    }

    .store-category-toggle {
        font-size: 0.8rem;
        padding: 0.25rem 0;
    }

    .store-account-actions {
        gap: 0.4rem;
    }
}

.store-header-nav .store-mega-menu {
    position: absolute;
    inset: calc(100% + 0.5rem) 0 auto;
    width: 100%;
    max-height: min(70vh, 36rem);
    overflow-y: auto;
}

.store-card-pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem;
}

.store-card-price-original {
    color: #687680;
    font-size: .875rem;
    font-weight: 400;
}

.store-card-pricing .store-price {
    color: #803e98;
    font-size: 1.125rem;
    font-weight: 800;
}

/* Full-bleed decorations must not create a viewport-wide scrollbar. */
body.store-body {
    overflow-x: clip;
}

.store-body .store-footer {
    width: 100%;
    margin-inline: 0;
}

.store-body .store-checkout {
    padding-top: 1.5rem;
}

.store-body .store-checkout .page-title {
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    margin-bottom: 1.5rem;
}

.store-body .store-checkout fieldset {
    min-width: 0;
    padding: 1.5rem;
    border-radius: 1rem;
}

.store-body .store-checkout legend {
    float: left;
    width: 100%;
    padding-bottom: .75rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.15rem;
    color: var(--ink);
}

.store-body .store-checkout legend + * {
    clear: both;
}

.store-body .store-checkout h3.title {
    color: var(--ink);
    font-size: .95rem;
}

.store-body .store-checkout .checkout-section-table {
    margin-bottom: 1.5rem;
    border: 1px solid var(--line);
    table-layout: fixed;
}

.store-body .store-checkout .checkout-section-heading {
    caption-side: top;
    padding: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 1rem 1rem 0 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.store-body .store-checkout .checkout-section-table td {
    overflow-wrap: anywhere;
}

.store-body .store-checkout .checkout-section-table td:first-child:not(:only-child) {
    width: 30%;
    color: var(--muted);
    font-weight: 700;
}

.store-body .store-checkout .alert {
    border-radius: .75rem;
    margin-bottom: 0;
}

.store-body .store-checkout input[type="radio"] {
    accent-color: var(--km-purple);
}

.store-body .store-checkout .table.cart th:nth-child(2) {
    text-align: right;
}

.store-body .store-checkout .table.cart th:nth-child(3) {
    text-align: center;
}

.store-body .store-checkout .table.cart tr:has(.total-amount) {
    font-weight: 800;
    background: #f7f5fa;
}

@media (max-width: 575.98px) {
    .store-body .store-checkout fieldset {
        padding: 1rem;
    }

    .store-body .store-checkout .table > :not(caption) > * > * {
        padding: .75rem;
    }

    .store-body .store-checkout .checkout-section-table td:first-child:not(:only-child) {
        width: 35%;
    }
}

/* Checkout shares the header's store-shell width, without a second container cap. */
.store-body .store-checkout > .container {
    width: 100%;
    max-width: none;
    padding-inline: 0;
}

.store-body .store-checkout > .container > .row {
    margin-inline: 0;
}

.store-body .store-checkout > .container > .row > .main {
    padding-inline: 0;
}

.store-category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .25rem 1.5rem;
    padding: .6rem 1rem 0;
    margin-top: .75rem;
}

.store-category-nav .store-category-toggle {
    padding: .6rem .25rem;
    font-size: .9rem;
}

.store-category-nav .store-category-toggle.show {
    color: var(--km-purple);
}

.store-category-menu {
    width: 18rem;
    max-width: calc(100vw - 2rem);
    max-height: min(60vh, 30rem);
    overflow-y: auto;
    padding: .5rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.store-category-menu .dropdown-item {
    padding: .6rem .8rem;
    border-radius: .5rem;
    white-space: normal;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: .9rem;
}

.store-category-menu .dropdown-item:is(:hover, :focus) {
    background: #f6edf9;
    color: var(--km-purple);
}

@media (max-width: 575.98px) {
    .store-category-nav {
        justify-content: flex-start;
        gap: .1rem 1rem;
        padding-inline: .5rem;
    }

    .store-category-nav .store-category-toggle {
        font-size: .8rem;
    }
}

.store-footer-links {
    align-items: center;
    gap: .25rem .5rem;
    font-size: .8rem;
    color: var(--muted);
}

.store-footer-links a {
    font-weight: 400;
}

.store-footer-links a:is(:hover, :focus-visible) {
    color: var(--km-purple);
    text-decoration: underline;
}

/* Keep every slide in the same grid cell so the tallest copy sets a stable height. */
.store-home-carousel .carousel-inner {
    display: grid;
}

.store-home-carousel .carousel-inner::after {
    display: none;
}

.store-home-carousel .carousel-item {
    display: block;
    grid-area: 1 / 1;
    float: none;
    margin-right: 0;
    visibility: hidden;
    pointer-events: none;
}

.store-home-carousel .carousel-item:is(.active, .carousel-item-next, .carousel-item-prev) {
    visibility: visible;
}

.store-home-carousel .carousel-item.active {
    pointer-events: auto;
}

.store-home-carousel .hero-slide {
    height: 100%;
}

.store-faq {
    padding-block: 1rem 2rem;
}

.store-faq-questions {
    display: grid;
    gap: .75rem;
}

.store-faq-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1rem;
}

.store-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.store-faq-item summary::-webkit-details-marker {
    display: none;
}

.store-faq-item summary::after {
    content: '+';
    color: var(--km-purple);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.store-faq-item[open] summary::after {
    content: '\2212';
}

.store-faq-item[open] summary {
    color: var(--km-purple);
}

.store-faq-item summary:focus-visible {
    outline: 2px solid var(--km-purple);
    outline-offset: 3px;
    border-radius: 1rem;
}

.store-faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--ink);
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.store-faq-answer > :last-child {
    margin-bottom: 0;
}

.store-faq-answer li + li {
    margin-top: .5rem;
}

.store-faq-help {
    padding: 1.5rem;
    border: 1px solid rgba(125, 63, 152, .15);
    border-radius: 1rem;
    background: #f6edf9;
}

.store-faq-help > i {
    color: var(--km-purple);
}

.store-faq-help a {
    display: block;
    margin-top: .75rem;
    color: var(--km-purple-deep);
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .store-faq-item summary {
        padding: 1rem;
    }

    .store-faq-answer {
        padding: 0 1rem 1rem;
    }
}
