/* OHYA navigation and homepage card refinements. Loaded after the base theme. */
.nav-all-categories,
.nav-category-group {
    position: relative;
}

.site-nav .nav-inner {
    position: relative;
}

.nav-all-categories {
    align-items: stretch;
    display: flex;
    flex: 0 0 auto;
    position: static;
}

.nav-all-categories > summary,
.nav-category-group > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: .35rem;
    list-style: none;
    white-space: nowrap;
}

.nav-all-categories > summary {
    font-size: 13px;
    font-weight: 800;
    min-height: 47px;
    padding: 0 clamp(13px, 1.6vw, 23px);
}

.nav-all-categories > summary:hover,
.nav-all-categories > summary:focus-visible,
.nav-all-categories[open] > summary {
    background: color-mix(in srgb, var(--brand-secondary, #f2e9e6) 60%, transparent);
    color: var(--brand-accent, #b84b65);
}

.nav-all-categories > summary span {
    color: var(--brand-accent, #b84b65);
    transition: transform .2s ease;
}

.nav-all-categories[open] > summary span {
    transform: rotate(180deg);
}

.nav-all-categories > summary::-webkit-details-marker,
.nav-category-group > summary::-webkit-details-marker {
    display: none;
}

.nav-all-panel {
    background: var(--brand-card, #fff);
    border: 1px solid rgba(37, 24, 32, .1);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 18px 45px rgba(37, 24, 32, .15);
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    left: 0;
    max-height: min(70vh, 680px);
    overflow: auto;
    padding: 1.25rem;
    position: absolute;
    top: calc(100% + 1px);
    width: min(1100px, calc(100vw - 2rem));
    z-index: 80;
}

details.nav-all-categories:not([open]) > .nav-all-panel {
    display: none;
}

.nav-all-panel section {
    background: color-mix(in srgb, var(--brand-secondary, #f2e9e6) 38%, #fff);
    border: 1px solid color-mix(in srgb, var(--brand-accent, #b84b65) 18%, transparent);
    border-radius: 12px;
    border-top: 3px solid var(--brand-accent, #b84b65);
    min-width: 0;
    padding: .8rem;
}

.nav-all-panel > .nav-all-products {
    align-items: center;
    background: var(--brand-primary, #251820);
    border-radius: 9px;
    color: var(--brand-button-text, #fff);
    display: flex;
    font-weight: 700;
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 42px;
}

.nav-all-panel > .nav-all-products .icon {
    height: 1rem;
    margin-left: .35rem;
    width: 1rem;
}

.nav-all-panel strong {
    color: var(--brand-primary, #251820);
    display: block;
    font-size: 14px;
    font-weight: 850;
    margin-bottom: .45rem;
    padding: 0 .35rem .5rem;
    text-align: left;
}

.nav-all-panel section div {
    display: grid;
    gap: .12rem;
}

.nav-all-panel section a {
    background: rgba(255, 255, 255, .64);
    border-radius: 8px;
    display: block;
    line-height: 1.35;
    padding: .42rem .5rem;
    text-align: left;
    white-space: normal;
}

.nav-all-panel section a:hover,
.nav-all-panel section a:focus-visible {
    background: var(--brand-secondary, #f2e9e6);
}

.nav-featured-groups {
    min-width: 0;
}

.nav-mobile-groups {
    display: none;
}

.nav-mobile-toolbar {
    display: none;
}

@media (min-width: 801px) {
    .site-nav,
    .site-nav .nav-inner {
        overflow: visible;
    }
}

.header-actions .icon-message {
    stroke-width: 1.9;
}

.product-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.product-image-shell {
    position: relative;
}

.product-card-quick-add {
    bottom: 9px;
    display: none;
    left: 9px;
    margin: 0;
    position: absolute;
    right: 9px;
    z-index: 3;
}

/* The form is positioned over the image; the button itself must stay in flow. */
.product-card-quick-add .product-card-add-button {
    position: static;
}

.product-card-add-button,
.product-card-options-link {
    align-items: center;
    background: var(--brand-primary, #251820);
    border: 0;
    border-radius: 999px;
    color: var(--brand-button-text, #fff);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 800;
    inset: auto;
    justify-content: center;
    min-height: 42px;
    opacity: 1;
    padding: .65rem 1rem;
    transform: none;
    width: 100%;
}

.product-card-options-link {
    bottom: 9px;
    display: none;
    left: 9px;
    position: absolute;
    right: 9px;
    width: auto;
    z-index: 3;
}

/*
 * Product-card actions are a desktop hover enhancement. On touch/mobile the
 * entire image stays a plain detail-page link and no cart control is layered
 * over it.
 */
@media (min-width: 801px) and (hover: hover) and (pointer: fine) {
    .product-image-shell::after {
        background: rgba(24, 25, 25, .42);
        border-radius: inherit;
        content: "";
        inset: 0;
        opacity: 0;
        pointer-events: none;
        position: absolute;
        transition: opacity .2s ease;
        z-index: 2;
    }

    .product-card-quick-add {
        display: block;
        opacity: 0;
        pointer-events: none;
        transform: translateY(8px);
        transition: opacity .2s ease, transform .2s ease;
    }

    .product-card-options-link {
        background: #239d58;
        border-radius: 10px;
        display: flex;
        opacity: 0;
        pointer-events: none;
        transform: translateY(8px);
        transition: background-color .18s ease, opacity .2s ease, transform .2s ease;
    }

    .product-card-add-button {
        background: #239d58;
        border-radius: 10px;
        transition: background-color .18s ease, box-shadow .18s ease;
    }

    .product-image-shell:hover::after,
    .product-image-shell:focus-within::after {
        opacity: 1;
    }

    .product-image-shell:hover .product-card-quick-add,
    .product-image-shell:focus-within .product-card-quick-add,
    .product-image-shell:hover .product-card-options-link,
    .product-image-shell:focus-within .product-card-options-link {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .product-card-add-button:hover,
    .product-card-add-button:focus-visible,
    .product-card-options-link:hover,
    .product-card-options-link:focus-visible {
        background: #168647;
        box-shadow: 0 8px 18px rgba(22, 134, 71, .28);
    }

    .product-badges {
        z-index: 3;
    }
}

.reference-price {
    color: var(--brand-muted, #766d73);
    display: block;
    font-size: .75rem;
    margin-top: .15rem;
}

.reference-price[hidden] {
    display: none;
}

.header-preference {
    align-items: center;
    background: color-mix(in srgb, var(--brand-card, #fff) 88%, var(--brand-secondary, #f2e9e6));
    border: 1px solid rgba(37, 24, 32, .12);
    border-radius: 999px;
    color: var(--brand-primary, #251820);
    display: inline-flex;
    gap: .38rem;
    min-height: 38px;
    padding: 3px 8px 3px 5px;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.header-preference:hover,
.header-preference:focus-within,
.header-preference:focus-visible {
    border-color: color-mix(in srgb, var(--brand-accent, #b84b65) 55%, transparent);
    box-shadow: 0 5px 14px rgba(37, 24, 32, .09);
}

.header-preference > span:not(.preference-icon) {
    font-size: .7rem;
    font-weight: 800;
    white-space: nowrap;
}

.header-preference .preference-icon {
    align-items: center;
    background: var(--brand-primary, #251820);
    border-radius: 50%;
    color: var(--brand-button-text, #fff);
    display: inline-flex;
    flex: 0 0 28px;
    font-size: .72rem;
    font-weight: 900;
    height: 28px;
    justify-content: center;
}

.header-preference select {
    appearance: auto;
    background: transparent;
    border: 0;
    color: var(--brand-text, #272125);
    font: inherit;
    font-size: .75rem;
    font-weight: 850;
    min-height: 30px;
    outline: 0;
}

.product-tab-list {
    border-bottom: 1px solid rgba(37, 24, 32, .12);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1.5rem;
}

.product-tab-list button {
    background: color-mix(in srgb, var(--brand-secondary, #f2e9e6) 45%, #fff);
    border: 0;
    border-bottom: 3px solid transparent;
    color: var(--brand-muted, #766d73);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    min-height: 54px;
    padding: .8rem 1rem;
}

.product-tab-list button[aria-selected="true"] {
    background: var(--brand-card, #fff);
    border-bottom-color: var(--brand-accent, #b84b65);
    color: var(--brand-accent, #b84b65);
}

.product-content-layout {
    display: block;
    position: relative;
}

.product-tab-panel[hidden] {
    display: none;
}

.product-tab-panels {
    min-width: 0;
    width: 100%;
}

.product-tab-panel > h2 {
    margin-top: 0;
    text-align: center;
}

.legacy-richtext {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.legacy-richtext img {
    display: block;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

.legacy-richtext table {
    border-collapse: collapse;
    display: table;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    width: auto;
}

.legacy-richtext td,
.legacy-richtext th {
    border: 1px solid rgba(37, 24, 32, .14);
    padding: .55rem;
}

.legacy-shared-content + .legacy-shared-content {
    border-top: 1px solid rgba(37, 24, 32, .12);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.product-sticky-cart {
    height: 0;
    margin: 0 0 0 auto;
    opacity: 0;
    pointer-events: none;
    position: sticky;
    top: calc(var(--site-header-height, 210px) + 14px);
    transform: translateY(-10px);
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
    visibility: hidden;
    width: 190px;
    z-index: 12;
}

.product-sticky-cart.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
    visibility: visible;
}

.product-sticky-cart-button {
    background: #55b95e;
    border-color: #55b95e;
    box-shadow: 0 10px 24px rgba(42, 132, 53, .24);
    width: 100%;
}

.product-sticky-cart-button .icon {
    height: 1rem;
    margin-right: .35rem;
    width: 1rem;
}

.product-sticky-cart small {
    display: none;
}

.floating-line {
    background: #fff;
    overflow: hidden;
}

.floating-line img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.header-preference select {
    max-width: 76px;
    padding: 0 .15rem;
}

.main-image-frame {
    align-items: center;
    display: flex;
    justify-content: center;
}

.main-product-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-position: center;
}

.thumbnail-row {
    justify-content: center;
}

.quantity-field {
    align-items: center;
    display: flex;
    gap: .7rem;
    grid-column: 1 / -1;
}

.quantity-field > label {
    font-weight: 800;
}

.quantity-stepper {
    align-items: stretch;
    display: grid;
    grid-template-columns: 38px 48px 38px;
}

.add-cart-form .quantity-stepper input {
    -moz-appearance: textfield;
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    min-height: 40px;
    padding: 0 .2rem;
    width: 48px;
}

.add-cart-form .quantity-stepper input::-webkit-inner-spin-button,
.add-cart-form .quantity-stepper input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-stepper button {
    background: var(--brand-card, #fff);
    border: 1px solid var(--line, #ded7da);
    color: var(--brand-primary, #251820);
    cursor: pointer;
    font: inherit;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    min-height: 40px;
    padding: 0;
}

.quantity-stepper button:first-child {
    border-radius: 999px 0 0 999px;
}

.quantity-stepper button:last-child {
    border-radius: 0 999px 999px 0;
}

.quantity-stepper button:not(:disabled):hover,
.quantity-stepper button:not(:disabled):focus-visible {
    background: var(--brand-secondary, #f2e9e6);
    color: var(--brand-accent, #b84b65);
}

.quantity-stepper button:disabled {
    cursor: default;
    opacity: .38;
}

@media (min-width: 801px) and (max-width: 1180px) {
    .currency-preference .preference-label,
    .locale-preference > span:not(.preference-icon) {
        display: none;
    }
}

@media (max-width: 800px) {
    body.nav-open #site-nav.site-nav {
        border-radius: 0;
        box-sizing: border-box;
        height: calc(100dvh - var(--mobile-bottom-nav-height, 64px));
        left: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        overflow-x: hidden;
        overflow-y: auto;
        padding-left: 0;
        padding-right: 0;
        right: 0 !important;
        width: 100vw !important;
    }

    .site-nav::before {
        display: none;
    }

    .nav-mobile-toolbar {
        align-items: center;
        background: var(--brand-card, #fff);
        border-bottom: 1px solid rgba(37, 24, 32, .1);
        display: flex;
        justify-content: space-between;
        min-height: 60px;
        padding: 8px 16px;
        position: sticky;
        top: 0;
        width: 100%;
        z-index: 20;
    }

    .nav-mobile-toolbar strong {
        color: var(--brand-accent, #b84b65);
        font-size: .9rem;
        letter-spacing: .04em;
    }

    .nav-mobile-toolbar button {
        align-items: center;
        background: var(--brand-primary, #251820);
        border: 0;
        border-radius: 999px;
        color: var(--brand-button-text, #fff);
        cursor: pointer;
        display: inline-flex;
        font: inherit;
        font-size: .78rem;
        font-weight: 850;
        gap: .4rem;
        min-height: 40px;
        padding: 0 14px;
    }

    .nav-mobile-toolbar button .icon {
        height: 1.1rem;
        width: 1.1rem;
    }

    #site-nav.site-nav .nav-inner {
        align-items: stretch;
        display: grid;
        gap: 0;
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
        justify-items: stretch;
        margin-left: 0;
        margin-right: 0;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }

    .site-nav .nav-home {
        box-sizing: border-box;
        padding-left: 18px;
        padding-right: 18px;
        width: 100%;
    }

    .nav-all-categories,
    .nav-featured-groups {
        display: none !important;
    }

    .nav-mobile-groups {
        display: block;
        width: 100%;
    }

    .nav-mobile-all-products,
    .nav-mobile-group > summary,
    .nav-mobile-children a {
        box-sizing: border-box;
        text-align: left;
        width: 100%;
    }

    .nav-mobile-all-products {
        align-items: center;
        background: var(--brand-primary, #251820);
        color: var(--brand-button-text, #fff);
        display: flex;
        font-weight: 800;
        justify-content: space-between;
        min-height: 48px;
        padding: .8rem 18px;
    }

    .nav-mobile-preferences {
        align-items: stretch;
        background: color-mix(in srgb, var(--brand-secondary, #f2e9e6) 56%, #fff);
        display: grid;
        gap: .7rem;
        grid-template-columns: 1fr 1fr;
        padding: .75rem 18px;
        width: 100%;
    }

    .mobile-preference-card {
        align-items: center;
        background: #fff;
        border: 1px solid rgba(37, 24, 32, .11);
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(37, 24, 32, .05);
        color: var(--brand-primary, #251820);
        display: flex;
        gap: .45rem;
        min-height: 48px;
        padding: 5px 9px;
        text-decoration: none;
    }

    .mobile-preference-card .preference-icon {
        align-items: center;
        background: var(--brand-primary, #251820);
        border-radius: 50%;
        color: #fff;
        display: inline-flex;
        flex: 0 0 30px;
        font-size: .76rem;
        font-weight: 900;
        height: 30px;
        justify-content: center;
    }

    .mobile-preference-card select {
        appearance: auto;
        background: transparent;
        border: 0;
        color: inherit;
        font: inherit;
        font-size: .82rem;
        font-weight: 850;
        min-height: 36px;
        min-width: 0;
        outline: 0;
    }

    .mobile-preference-card > span:not(.preference-icon) {
        font-size: .8rem;
        font-weight: 850;
        white-space: nowrap;
    }

    .mobile-preference-card .preference-copy {
        display: flex;
        flex: 1;
        flex-direction: column;
        line-height: 1.18;
        min-width: 0;
    }

    .mobile-preference-card .preference-copy small {
        color: var(--brand-muted, #766d73);
        font-size: .66rem;
        font-weight: 700;
    }

    .mobile-preference-card .preference-copy strong {
        font-size: .8rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-mobile-all-products .icon {
        height: 1rem;
        width: 1rem;
    }

    .nav-mobile-group {
        border-bottom: 1px solid rgba(37, 24, 32, .09);
    }

    .nav-mobile-group > summary {
        align-items: center;
        background: #fff;
        cursor: pointer;
        display: flex;
        font-size: .95rem;
        font-weight: 850;
        justify-content: space-between;
        list-style: none;
        min-height: 54px;
        padding: .85rem 18px;
    }

    .nav-mobile-group > summary::-webkit-details-marker {
        display: none;
    }

    .nav-mobile-group > summary::before {
        color: var(--brand-accent, #b84b65);
        content: "◆";
        font-size: .72rem;
        margin-right: .55rem;
    }

    .nav-mobile-group > summary > span {
        flex: 1;
    }

    .nav-mobile-group > summary > b {
        color: var(--brand-accent, #b84b65);
        transition: transform .2s ease;
    }

    .nav-mobile-group[open] > summary > b {
        transform: rotate(180deg);
    }

    .nav-mobile-children {
        background: #f1f1f1;
        padding: .35rem 0;
    }

    .nav-mobile-children a {
        display: block;
        min-height: 48px;
        padding: .78rem 42px;
    }

    .nav-mobile-children a:hover,
    .nav-mobile-children a:focus-visible {
        background: #fff;
        color: var(--brand-accent, #b84b65);
    }

    .header-preference {
        display: none;
    }

    .product-card-quick-add,
    .product-card-options-link,
    .home-custom-section .product-card-add-button,
    .home-custom-section .product-card-options-link {
        display: none !important;
    }

    .product-content-layout {
        display: block;
    }

    .product-sticky-cart {
        margin: 0 0 0 auto;
        max-width: 170px;
        position: sticky;
        top: calc(var(--site-header-height, 126px) + 8px);
        width: 46vw;
        z-index: 12;
    }

    .product-sticky-cart small {
        display: none;
    }

    .product-tab-list {
        margin-bottom: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-image-shell::after,
    .product-card-quick-add,
    .product-card-options-link,
    .product-sticky-cart {
        transition: none;
    }
}

@media (max-width: 520px) {
    .header-actions .icon-action > span {
        font-size: .68rem;
    }

    .nav-mobile-preferences {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* v1.27a final overrides: rich product imagery and fixed circular home categories. */
.product-detail, .product-gallery, .product-summary, .product-content-layout, .product-tab-panels, .product-tab-panel { min-width:0; max-width:100%; }
.product-tab-panel .legacy-richtext { width:100%; max-width:100%; overflow-x:auto; }
.product-tab-panel .legacy-richtext :is(div,p,figure,picture) { max-width:100%!important; box-sizing:border-box; }
.product-tab-panel .legacy-richtext img { width:auto!important; max-width:100%!important; height:auto!important; }
.product-tab-panel .legacy-richtext table { display:block; max-width:100%; overflow-x:auto; }
.category-grid .category-icon.has-image { border-radius:50%; }
@media(max-width:800px) { .category-sidebar { display:none!important; } }
@media(max-width:540px) { .category-grid .category-icon.has-image { width:min(18vw,86px); height:min(18vw,86px); border-radius:50%; } }
