/* Product, cart and cart drawer views for the Naughty Sprouts storefront. */
.ns-product-page,
.ns-cart-page {
    background: var(--cat-ink);
    color: #fff;
}

.ns-shop-main {
    min-height: 70vh;
    padding: calc(78px + clamp(2.5rem, 5vw, 4.5rem)) 0 clamp(5rem, 8vw, 8rem);
}

.ns-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    color: #b8b5c2;
    font-size: 0.875rem;
}

.ns-breadcrumb a,
.ns-back-to-shop {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 0.3em;
}

.ns-breadcrumb a:hover,
.ns-back-to-shop:hover {
    color: var(--cat-lime);
}

.ns-product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: start;
    gap: clamp(2rem, 6vw, 6rem);
}

.ns-product-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    aspect-ratio: 0.94;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: radial-gradient(circle at 50% 45%, #24272a, #111118 72%);
}

.ns-product-image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 800px;
    object-fit: contain;
}

.ns-product-detail {
    position: sticky;
    top: 7rem;
    min-width: 0;
    padding-top: 0.5rem;
}

.ns-shop-eyebrow {
    margin: 0 0 0.9rem;
    color: var(--cat-lime);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    line-height: 1.5;
    text-transform: uppercase;
}

.ns-shop-eyebrow > span[aria-hidden] { margin: 0 0.25rem; color: #777480; }

.ns-product-detail h1 {
    font-size: clamp(2.5rem, 4.2vw, 4.5rem);
    line-height: 1.02;
    margin-bottom: 1.4rem;
    overflow-wrap: break-word;
}

.ns-product-price {
    margin: 0 0 0.3rem;
    color: #fff;
    font-size: 1.875rem;
    line-height: 1.3;
}

.ns-product-shipping,
.ns-quantity-help,
.ns-checkout-note,
.ns-cart-shipping-note {
    color: #b8b5c2;
    font-size: 0.875rem;
    line-height: 1.6;
}

.ns-product-shipping { margin-bottom: 1.8rem; }

.ns-product-description {
    color: #dedbe4;
    font-size: 1.125rem;
    line-height: 1.65;
    margin-bottom: 1.8rem;
}

.ns-quantity-label {
    display: block;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ns-quantity {
    display: inline-flex;
    align-items: stretch;
    max-width: 100%;
    min-height: 2.875rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.025);
}

.ns-quantity button,
.ns-quantity input {
    min-height: 2.875rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
}

.ns-quantity button {
    width: 2.75rem;
    cursor: pointer;
}

.ns-quantity button:hover { background: rgba(255, 255, 255, 0.1); }
.ns-quantity input { width: 3.5rem; padding: 0.4rem; }
.ns-shopping-ready .ns-quantity input { -moz-appearance: textfield; appearance: textfield; }
.ns-shopping-ready .ns-quantity input::-webkit-outer-spin-button,
.ns-shopping-ready .ns-quantity input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ns-quantity-help { margin: 0.4rem 0 1.5rem; }

.ns-product-actions { display: grid; gap: 0.75rem; }

.ns-shop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    padding: 0.875rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 2px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.ns-shop-button-primary { background: var(--cat-lime); color: #111118; }
.ns-shop-button-primary:hover { background: #e0ff73; color: #111118; text-decoration: none; }
.ns-shop-button-outline { border-color: rgba(255, 255, 255, 0.7); background: transparent; color: #fff; }
.ns-shop-button-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.ns-shop-button:disabled { opacity: 0.5; cursor: not-allowed; }
.ns-shop-button:focus-visible,
.ns-quantity button:focus-visible,
.ns-quantity input:focus-visible,
.ns-cart-close:focus-visible { outline: 2px solid var(--cat-cyan); outline-offset: 3px; }
.ns-checkout-note { margin: 1rem 0 1.5rem; }

.ns-form-status,
.ns-shop-notice {
    padding: 0.875rem 1rem;
    border: 1px solid rgba(200, 255, 0, 0.35);
    background: rgba(200, 255, 0, 0.06);
    color: #e2f2b5;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.ns-form-status { margin: 1rem 0 0; }
.ns-shop-notice { margin: 0 0 1.5rem; }
.ns-shop-notice-error,
.ns-form-status.is-error { border-color: rgba(255, 112, 148, 0.6); color: #ffb7ce; background: rgba(255, 112, 148, 0.07); }

.ns-product-unavailable { padding: 1.25rem 0; }
.ns-product-unavailable p { color: #ffb7ce; }
.ns-product-accordion { border-top: 1px solid rgba(255, 255, 255, 0.18); }
.ns-product-accordion:last-of-type { border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.ns-product-accordion summary { padding: 1.1rem 0; color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer; }
.ns-product-accordion p,
.ns-product-features { padding-bottom: 1.25rem; margin-bottom: 0; color: #c9c5d2; font-size: 1rem; line-height: 1.7; }
.ns-product-features { padding-left: 1.25rem; }
.ns-product-features li { margin-bottom: 0.5rem; }
.ns-product-detail > .ns-back-to-shop { display: inline-block; margin-top: 1.5rem; }

.prebuilt-preview .product-media-link { display: block; width: 100%; height: 100%; color: inherit; }
.prebuilt-copy .product-title-link { color: inherit; text-decoration: none; }
.prebuilt-copy .product-title-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.catalog-shopping-actions { margin-top: 1rem; }
.catalog-add-form { min-width: 0; margin: 0; }
.catalog-quantity-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 0.875rem; }
.catalog-quantity-row .ns-quantity-label { margin: 0; color: var(--slot-fg, currentColor); }
.catalog-quantity-row .ns-quantity { flex-shrink: 0; border-color: var(--slot-muted, #9d9aa7); }
.catalog-quantity-row .ns-quantity button,
.catalog-quantity-row .ns-quantity input { color: var(--slot-fg, currentColor); }
.catalog-quantity-row .ns-quantity button:hover { background: var(--slot-line); }
.catalog-purchase-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0.75rem; }
.catalog-shopping-actions .product-detail-link,
.catalog-shopping-actions .slot-buy { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 3rem; margin: 0; padding: 0.7rem 0.6rem; border-radius: 2px; font-family: inherit; font-size: 0.875rem; font-weight: 700; letter-spacing: 0; line-height: 1.35; text-align: center; text-transform: none; }
.catalog-shopping-actions .product-detail-link { border: 1px solid var(--slot-line); color: inherit; text-decoration: none; }
.catalog-shopping-actions .product-detail-link:hover { border-color: var(--slot-fg); background: var(--slot-line); }
.shopping-form-status { display: block; margin-top: 0.65rem; font-size: 0.875rem; line-height: 1.5; color: var(--slot-fg); }
.shopping-form-status:empty { display: none; }
.shopping-form-status.is-error { color: #ffb7ce; }
.product-feature-light .shopping-form-status.is-error { color: #a51b43; }

.ns-cart-page-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2.75rem; }
.ns-cart-page-heading h1 { font-size: clamp(2.75rem, 5vw, 5rem); line-height: 1; margin-bottom: 0; }
.ns-cart-page-heading .ns-back-to-shop { padding-bottom: 0.25rem; font-size: 1rem; }
.ns-empty-cart { padding: 4rem 1.5rem; text-align: center; border: 1px solid rgba(255, 255, 255, 0.15); background: #111118; }
.ns-empty-cart-mark { display: block; color: var(--cat-lime); font-size: 3.5rem; line-height: 1; margin-bottom: 1.5rem; }
.ns-empty-cart h2 { font-size: clamp(1.75rem, 3vw, 2.75rem); }
.ns-empty-cart p { color: #b8b5c2; font-size: 1.125rem; margin-bottom: 2rem; }
.ns-cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 23rem; align-items: start; gap: clamp(2rem, 5vw, 5rem); }
.ns-cart-items { min-width: 0; }
.ns-cart-column-labels { display: flex; justify-content: space-between; color: #b8b5c2; padding: 0 0 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.2); font-size: 0.875rem; }
.ns-cart-item { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; align-items: start; gap: 1.5rem; padding: 1.75rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.ns-cart-item-image { display: block; overflow: hidden; aspect-ratio: 5 / 6; background: #1b1b24; border: 1px solid rgba(255, 255, 255, 0.12); }
.ns-cart-item-image img { width: 100%; height: 100%; object-fit: contain; }
.ns-cart-item-name { display: block; color: #fff; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.ns-cart-item-name:hover { color: var(--cat-lime); }
.ns-cart-unit-price { margin: 0.35rem 0 1rem; color: #b8b5c2; font-size: 1rem; }
.ns-cart-line-total { color: #fff; font-size: 1.125rem; line-height: 1.5; white-space: nowrap; }
.ns-cart-update-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 0.875rem; }
.ns-cart-text-button,
.ns-cart-remove-button { padding: 0.3rem 0; border: 0; background: transparent; color: #d8d4e0; font-family: inherit; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 0.25em; cursor: pointer; }
.ns-cart-text-button:hover { color: var(--cat-lime); }
.ns-cart-remove-form { margin-top: 0.7rem; }
.ns-cart-remove-button { color: #aaa5b5; }
.ns-cart-remove-button:hover { color: #ffb7ce; }
.ns-cart-item-warning,
.ns-cart-checkout-warning { color: #ffb7ce; font-size: 0.9375rem; line-height: 1.6; }
.ns-cart-summary { position: sticky; top: 7rem; padding: 1.75rem; border: 1px solid rgba(255, 255, 255, 0.2); background: #111118; }
.ns-cart-summary h2 { color: #fff; font-size: 1.5rem; line-height: 1.2; margin-bottom: 1.75rem; }
.ns-cart-totals { margin: 0; }
.ns-cart-totals > div { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; color: #c6c2ce; font-size: 1rem; }
.ns-cart-totals dt { font-weight: 400; }
.ns-cart-totals dd { margin: 0; color: #fff; text-align: right; }
.ns-cart-totals > .ns-cart-total { border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 1rem; margin-top: 1rem; font-size: 1.25rem; }
.ns-cart-total dt,
.ns-cart-total dd { color: #fff; font-weight: 700; }
.ns-cart-summary .ns-shop-button { width: 100%; }
.ns-cart-shipping-note { margin: 0 0 1.5rem; }
.ns-cart-summary .ns-checkout-note { margin-bottom: 0; text-align: center; }

.site-nav-links .ns-header-cart { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.875rem; padding: 0.6rem 0.8rem; }
.ns-header-cart-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; padding: 0 0.25rem; border-radius: 50%; background: #111118; color: var(--cat-lime); font-size: 0.875rem; }
.ns-cart-is-open { overflow: hidden; }
.ns-cart-drawer[hidden],
.ns-cart-drawer [hidden],
.ns-form-status[hidden],
.ns-quantity [hidden] { display: none !important; }
.ns-cart-drawer { position: fixed; inset: 0; z-index: 1200; color: #fff; }
.ns-cart-overlay { position: absolute; inset: 0; background: rgba(3, 3, 6, 0.72); backdrop-filter: blur(4px); }
.ns-cart-panel { display: flex; flex-direction: column; position: absolute; top: 0; right: 0; width: min(100%, 31.25rem); height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; overflow: hidden; border-left: 1px solid rgba(200, 255, 0, 0.4); background: #111118; box-shadow: -1.5rem 0 4rem rgba(0, 0, 0, 0.4); animation: ns-cart-enter 180ms ease-out; }
.ns-cart-panel-heading { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 1.25rem; padding: 1.6rem 1.5rem 1.4rem; border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.ns-cart-panel-heading .ns-shop-eyebrow { margin-bottom: 0.45rem; font-size: 0.75rem; }
.ns-cart-panel-heading h2 { margin: 0; color: #fff; font-size: 1.875rem; line-height: 1.15; letter-spacing: -0.03em; }
.ns-cart-drawer-count { color: #aaa5b5; font-family: "Circular Std Book", sans-serif; font-size: 1rem; margin-left: 0.3rem; }
.ns-cart-close { display: flex; align-items: center; justify-content: center; flex: 0 0 2.75rem; height: 2.75rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; background: transparent; color: #fff; font-size: 1.75rem; line-height: 1; cursor: pointer; }
.ns-cart-close:hover { border-color: var(--cat-lime); color: var(--cat-lime); }
.ns-cart-drawer-message { flex-shrink: 0; margin: 0; padding: 0.8rem 1.5rem; border-bottom: 1px solid rgba(200, 255, 0, 0.16); background: rgba(200, 255, 0, 0.07); color: #e1efbc; font-size: 0.9375rem; line-height: 1.5; }
.ns-cart-drawer-message.is-error { color: #ffb7ce; background: rgba(255, 112, 148, 0.07); }
.ns-cart-panel-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 1.5rem; overscroll-behavior: contain; }
.ns-drawer-empty { padding: 3rem 0; text-align: center; }
.ns-drawer-empty h3 { color: #fff; font-size: 1.5rem; margin-bottom: 0.75rem; }
.ns-drawer-empty p { color: #b8b5c2; font-size: 1rem; }
.ns-drawer-empty .ns-shop-button { margin-top: 1rem; }
.ns-drawer-items { display: grid; }
.ns-drawer-item { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; align-items: start; gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.ns-drawer-item > a { display: block; aspect-ratio: 5 / 6; background: #20202a; }
.ns-drawer-item img { width: 100%; height: 100%; object-fit: contain; }
.ns-drawer-item-name { color: #fff; font-size: 1rem; font-weight: 700; line-height: 1.4; text-decoration: none; }
.ns-drawer-item-name:hover { color: var(--cat-lime); }
.ns-drawer-item-detail p { color: #b8b5c2; font-size: 0.875rem; line-height: 1.6; margin: 0.5rem 0 0; }
.ns-drawer-item-price { color: #fff; font-size: 1rem; white-space: nowrap; }
.ns-drawer-item-detail .ns-cart-item-warning { color: #ffb7ce; }
.ns-cart-panel-footer { flex-shrink: 0; padding: 1.4rem 1.5rem 1.6rem; border-top: 1px solid rgba(255, 255, 255, 0.16); background: #15151d; }
.ns-cart-panel-footer .ns-cart-totals { margin-bottom: 1.2rem; }
.ns-cart-panel-footer .ns-cart-totals > div { font-size: 0.9375rem; }
.ns-cart-panel-footer .ns-cart-totals > .ns-cart-total { font-size: 1.125rem; margin-bottom: 0; }
.ns-cart-drawer-review { display: block; margin-bottom: 0.8rem; color: #e6e2eb; font-size: 0.9375rem; text-align: center; text-decoration: underline; text-underline-offset: 0.25em; }
.ns-cart-drawer-review:hover { color: var(--cat-lime); }
.ns-cart-panel-footer .ns-shop-button { width: 100%; }
.ns-cart-panel-footer .ns-checkout-note { margin: 0.75rem 0 0; text-align: center; }
.ns-cart-drawer-fallback { flex-shrink: 0; padding: 1rem 1.5rem; color: #ddd8e7; text-align: center; font-size: 0.9375rem; text-decoration: underline; }
.ns-cart-drawer-fallback:hover { color: var(--cat-lime); }

@keyframes ns-cart-enter {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@media (max-width: 991px) {
    .ns-product-layout { gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
    .ns-product-image-wrap { max-width: 46rem; width: 100%; aspect-ratio: 1.05; }
    .ns-product-detail { position: static; max-width: 46rem; width: 100%; padding-top: 0; }
    .ns-product-detail h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); }
    .ns-cart-layout { grid-template-columns: minmax(0, 1fr); }
    .ns-cart-summary { position: static; max-width: 36rem; width: 100%; margin-left: auto; }
    .site-nav-links .ns-header-cart { width: 100%; justify-content: center; margin-top: 0.8rem; }
}

@media (max-width: 575px) {
    .ns-shop-main { padding-top: 7.5rem; padding-bottom: 4rem; }
    .ns-breadcrumb { margin-bottom: 1.5rem; }
    .ns-product-layout { gap: 2rem; }
    .ns-product-image-wrap { aspect-ratio: 0.95; }
    .ns-product-detail h1 { font-size: clamp(2.25rem, 9vw, 3.5rem); }
    .ns-product-price { font-size: 1.625rem; }
    .ns-product-description { font-size: 1rem; }
    .ns-cart-page-heading { margin-bottom: 2rem; }
    .ns-cart-page-heading h1 { font-size: 3rem; }
    .ns-cart-column-labels { display: none; }
    .ns-cart-items { border-top: 1px solid rgba(255, 255, 255, 0.18); }
    .ns-cart-item { grid-template-columns: 5rem minmax(0, 1fr); column-gap: 1rem; row-gap: 0.6rem; padding: 1.5rem 0; }
    .ns-cart-item-image { grid-row: 1 / 3; }
    .ns-cart-item-name { font-size: 1.0625rem; }
    .ns-cart-item-detail { min-width: 0; }
    .ns-cart-line-total { grid-column: 2; justify-self: start; margin-top: 0.4rem; }
    .ns-cart-update-controls { gap: 0.6rem; }
    .ns-quantity-compact button { width: 2.5rem; }
    .ns-quantity-compact input { width: 2.6rem; }
    .ns-cart-summary { padding: 1.5rem; }
    .ns-cart-panel-heading { padding: 1.25rem; }
    .ns-cart-panel-heading h2 { font-size: 1.65rem; }
    .ns-cart-panel-body { padding: 0 1.25rem; }
    .ns-cart-panel-footer { padding: 1.2rem 1.25rem; }
    .ns-cart-drawer-message { padding: 0.8rem 1.25rem; }
    .ns-drawer-item { grid-template-columns: 4rem minmax(0, 1fr) auto; gap: 0.75rem; padding: 1.25rem 0; }
    .ns-drawer-item-name { font-size: 0.9375rem; }
    .ns-drawer-item-price { font-size: 0.9375rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ns-cart-panel { animation: none; }
    .ns-shop-button { transition: none; }
}
