* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark mode colors */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    --border-color: #30363d;
    --card-bg: #161b22;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 3px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --accent-primary: #58a6ff;
    --accent-secondary: #1f6feb;
    --accent-hover: #388bfd;
    --success: #3fb950;
    --warning: #d29922;
    --danger: #da3633;
}

body.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #eaeef2;
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --text-tertiary: #8c959f;
    --border-color: #d0d7de;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 3px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
}

body {
    font-family: "Atkinson Hyperlegible", sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

nav.navbar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 16px;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo {
    width: 60px;
    height: 60px;
    display: block;
    object-fit: contain;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    background-color: var(--bg-tertiary);
}

.theme-toggle::after {
    content: attr(data-theme) " Mode";
}

header.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 64px 16px;
    text-align: center;
}

.hero-content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.hero-content p {
    font-size: 16px;
    color: var(--text-secondary);
}

main {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 16px;
    flex: 1;
}

.ornamental-notice {
    max-width: 760px;
    margin: 0 auto 28px;
    padding: 12px 18px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.6rem; /* 40% smaller than the 1rem hero subheading */
    line-height: 1.5;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.ornamental-notice p {
    margin: 0;
}

.filters-section {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filters {
    display: flex;
    gap: 12px;
    width: 100%;
}

.filters input {
    flex: 1;
    padding: 8px 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.filters input:focus, .filters select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.filters select {
    padding: 8px 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.results-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.product-image-wrapper {
    position: relative;
    padding-top: 100%; /* 1:1 square product tile */
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--bg-tertiary);
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.product-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex: 1;
    line-height: 1.4;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.add-to-cart-btn {
    background-color: var(--accent-primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-to-cart-btn:hover {
    background-color: var(--accent-hover);
}

footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 32px 16px;
    margin-top: auto;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.footer-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.footer-section p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    font-size: 13px;
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--accent-hover);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* --- Interactive Quantity Changer Styles (Amazon Style) --- */
.quantity-controller {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    height: 34px;
    overflow: hidden;
    width: 100%;
    max-width: 120px;
}

.quantity-controller button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 100%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.2s;
}

.quantity-controller button:hover {
    background: var(--border-color);
}

.qty-count {
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-primary);
}

@media (max-width: 620px) {
    nav.navbar {
        padding: 8px 12px;
    }

    .brand {
        gap: 7px;
    }

    .brand-logo {
        width: 50px;
        height: 50px;
    }

    .brand-name {
        font-size: 16px;
        letter-spacing: 0.5px;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .theme-toggle {
        padding: 4px 7px;
    }
}

@media (max-width: 390px) {
    .brand-name {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .brand-logo {
        width: 46px;
        height: 46px;
    }

    .nav-links {
        gap: 8px;
    }
}

/* Inventory-aware catalog controls and states */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.stock-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.stock-filter input {
    width: auto;
    accent-color: var(--accent-primary);
}

.product-code {
    margin-bottom: 3px;
    color: var(--text-tertiary);
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-size: 11px;
}

.product-stock {
    margin-top: 9px;
    font-size: 13px;
    font-weight: 700;
}

.stock-available { color: var(--success); }
.stock-low { color: var(--warning); }
.stock-out { color: var(--danger); }

.out-of-stock-banner {
    position: absolute;
    top: 22px;
    right: -48px;
    width: 190px;
    padding: 8px 0;
    transform: rotate(35deg);
    background: var(--danger);
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md);
}

.product-card.is-out-of-stock .product-image {
    filter: grayscale(0.75);
    opacity: 0.58;
}

.add-to-cart-btn:disabled,
.qty-plus:disabled,
.quantity-btn:disabled,
.checkout-btn:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.catalog-loading,
.catalog-empty,
.catalog-error {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-secondary);
    text-align: center;
}

.catalog-error { color: var(--danger); }

@media (max-width: 760px) {
    .filters {
        flex-wrap: wrap;
    }
    .filters input[type="text"] {
        flex-basis: 100%;
    }
    .filters select,
    .stock-filter {
        flex: 1 1 180px;
    }
}

/* Build 003: product photo viewer and parent-reference carousel */
.product-image-button {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    overflow: hidden;
}

.product-image-button:focus-visible {
    outline: 3px solid var(--accent-primary);
    outline-offset: -3px;
}

.product-photo-hint {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity 0.18s ease;
    white-space: nowrap;
}

.product-image-button:hover .product-photo-hint,
.product-image-button:focus-visible .product-photo-hint {
    opacity: 1;
}

.out-of-stock-banner {
    z-index: 2;
    pointer-events: none;
}

body.carousel-open {
    overflow: hidden;
}

.product-carousel-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.78);
}

.product-carousel-modal[hidden] {
    display: none;
}

.product-carousel-dialog {
    position: relative;
    width: min(1040px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
}

.product-carousel-dialog h2 {
    max-width: calc(100% - 54px);
    margin: 0 0 14px;
    color: var(--text-primary);
    font-size: clamp(17px, 2.4vw, 24px);
    line-height: 1.25;
}

.product-carousel-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.product-carousel-stage {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    gap: 10px;
}

.product-carousel-figure {
    min-width: 0;
    margin: 0;
    text-align: center;
}

.product-carousel-figure img {
    display: block;
    width: 100%;
    max-height: min(68vh, 760px);
    object-fit: contain;
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.product-carousel-figure figcaption {
    min-height: 1.5em;
    margin-top: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
}

.product-carousel-nav {
    width: 46px;
    height: 58px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 36px;
    cursor: pointer;
}

.product-carousel-nav[hidden] {
    visibility: hidden;
}

.product-carousel-close:hover,
.product-carousel-nav:hover,
.product-carousel-thumbnail:hover {
    border-color: var(--accent-primary);
}

.product-carousel-meta {
    margin-top: 5px;
    color: var(--text-tertiary);
    text-align: center;
    font-size: 12px;
}

.product-carousel-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 9px;
    margin-top: 13px;
}

.product-carousel-thumbnails[hidden] {
    display: none;
}

.product-carousel-thumbnail {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 7px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.product-carousel-thumbnail.is-active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.product-carousel-thumbnail img {
    width: 58px;
    height: 48px;
    object-fit: cover;
    border-radius: 5px;
    background: var(--card-bg);
}

.product-carousel-thumbnail span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 650px) {
    .product-photo-hint { opacity: 0.88; }
    .product-carousel-modal { padding: 0; }
    .product-carousel-dialog {
        width: 100%;
        min-height: 100%;
        max-height: 100vh;
        border: 0;
        border-radius: 0;
        padding: 16px 12px 22px;
    }
    .product-carousel-stage {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 4px;
    }
    .product-carousel-nav {
        width: 38px;
        height: 50px;
        font-size: 30px;
    }
    .product-carousel-figure img {
        max-height: 62vh;
    }
    .product-carousel-thumbnails {
        grid-template-columns: 1fr;
    }
}

/* Build 005: keep the requested shop greeting in the top brand area without crowding navigation. */
.shop-page .brand {
    min-width: 0;
    flex: 1 1 auto;
}

.shop-page .shop-brand-message {
    max-width: 820px;
    white-space: normal;
    font-size: clamp(15px, 1.65vw, 20px);
    line-height: 1.25;
    letter-spacing: 0.25px;
}

.shop-page .nav-links {
    flex: 0 0 auto;
}

@media (max-width: 820px) {
    .shop-page .nav-container {
        flex-wrap: wrap;
        align-items: flex-start;
        column-gap: 14px;
        row-gap: 4px;
    }

    .shop-page .brand {
        flex-basis: 100%;
    }

    .shop-page .shop-brand-message {
        max-width: none;
        font-size: 15px;
    }

    .shop-page .nav-links {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 390px) {
    .shop-page .shop-brand-message {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
        border: 0;
        font-size: 13px;
        line-height: 1.2;
    }
}


/* Build 022 visual refresh: typography, logo, and OLED/light theme overhaul */
:root {
    --accent-primary: #1AFF78;
    --accent-secondary: #1AFFEC;
    --accent-tertiary: #2DFF1A;
    --accent-hover: #2DFF1A;
    --accent-ink: #04160a;
    --focus-ring: rgba(26, 255, 120, 0.34);
    --bg-primary: #000000;
    --bg-secondary: #050505;
    --bg-tertiary: #0d0d0d;
    --card-bg: #080808;
    --text-primary: #ffffff;
    --text-secondary: #efefef;
    --text-tertiary: #a3a3a3;
    --border-color: rgba(255, 255, 255, 0.14);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.68);
    --success: #1AFF78;
    --warning: #ffe56b;
    --danger: #ff5e5e;
}

body.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #eaeef2;
    --card-bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: #151515;
    --text-tertiary: #6b7280;
    --border-color: #d0d7de;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.10);
}

body {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.brand-name,
.hero-content h1,
.product-name,
.footer-section h3,
.cart-header h1,
.cart-summary h2,
.checkout-form h3,
.empty-cart h2,
.admin-panel h1,
.admin-panel h2,
.admin-heading h1,
.section-heading h2,
.hold-order {
    font-family: "Zilla Slab", serif;
    letter-spacing: 0.01em;
}

nav.navbar {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, color-mix(in srgb, var(--bg-secondary) 84%, var(--accent-secondary) 16%) 100%);
    backdrop-filter: saturate(120%) blur(6px);
    padding: 14px 18px;
}

body.light-mode nav.navbar {
    background: #ffffff;
}

.nav-container {
    gap: 18px;
}

.brand {
    gap: 0;
}

.brand-name {
    font-size: clamp(1.1rem, 1rem + 0.65vw, 1.6rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
}

.shop-page .shop-brand-message {
    max-width: 860px;
    font-size: clamp(1rem, 0.82rem + 1vw, 1.55rem);
    font-weight: 700;
    line-height: 1.15;
}

.nav-links a,
.theme-toggle {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 700;
}

.nav-links a {
    color: var(--text-primary);
    opacity: 0.92;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 0.24em;
    text-decoration-thickness: 0.12em;
    text-decoration-color: var(--accent-secondary);
}

.theme-toggle,
.add-to-cart-btn,
.checkout-btn,
.empty-cart-btn,
.admin-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--accent-ink);
    border: 1px solid color-mix(in srgb, var(--accent-primary) 72%, black 28%);
    box-shadow: 0 8px 18px rgba(26, 255, 120, 0.16);
}

.theme-toggle {
    border-radius: 999px;
    padding: 7px 12px;
    background-color: transparent;
}

.add-to-cart-btn:hover,
.checkout-btn:hover,
.empty-cart-btn:hover,
.admin-primary:hover,
.theme-toggle:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.theme-toggle::after {
    font-weight: 800;
}

.admin-secondary,
.continue-shopping,
.footer-section a,
.admin-link-button,
.quantity-controller button:hover,
.quantity-btn:hover,
.product-carousel-thumbnail.is-active,
.pirate-selectable-order.pirate-selected {
    color: var(--text-primary);
}

header.hero {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 52px 16px 48px;
}

body.light-mode header.hero {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-content {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    text-align: left;
}

.hero-logo {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1;
    object-fit: contain;
    display: block;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.hero-copy {
    min-width: 0;
}

.hero-content h1 {
    font-size: clamp(2rem, 1.3rem + 2vw, 3.65rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 12px;
}

.hero-content p {
    font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem);
    color: var(--text-secondary);
    font-weight: 600;
    max-width: 48rem;
}

.ornamental-notice {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--bg-secondary) 82%, var(--accent-secondary) 18%);
    border-radius: 12px;
}

.filters input,
.filters select,
.form-group input,
.form-group select,
.checkout-form textarea,
.admin-panel input,
.admin-panel textarea,
.admin-panel select,
.generated-field,
.image-upload-box,
.product-csv-form,
.pirate-tracking-form,
.shipping-address,
.tracking-summary,
.tracking-editor,
.hold-card,
.stock-filter,
.pdf-download-notice,
.email-status-summary,
.email-status-issues,
.product-carousel-thumbnail,
.product-carousel-dialog {
    border-radius: 12px;
}

.filters input,
.filters select,
.form-group input,
.form-group select,
.checkout-form textarea,
.admin-panel input,
.admin-panel textarea,
.admin-panel select,
.product-csv-form input[type="file"],
.pirate-tracking-form input[type="file"] {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-width: 1px;
}

.filters input::placeholder,
.form-group input::placeholder,
.checkout-form textarea::placeholder,
.admin-panel input::placeholder,
.admin-panel textarea::placeholder {
    color: var(--text-tertiary);
    opacity: 1;
    font-weight: 500;
}

.filters input:focus,
.filters select:focus,
.form-group input:focus,
.form-group select:focus,
.checkout-form textarea:focus,
.admin-panel input:focus,
.admin-panel textarea:focus,
.admin-panel select:focus {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.results-count,
.product-description,
.footer-section p,
.footer-bottom,
.cart-subtitle,
.summary-row,
.shipping-status,
.us-shipping-note,
.hold-details,
.hold-items,
.product-form-help,
.login-panel p,
.admin-heading p,
.section-heading p,
.product-csv-help,
.pirate-ship-help,
.email-workflows,
.shipping-help,
.image-upload-controls small,
.canonical-image-name,
.accounting-export-help {
    color: var(--text-secondary);
    font-weight: 500;
}

.product-card,
.cart-item,
.cart-summary,
.empty-cart,
.admin-panel,
.generated-field,
.hold-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--card-bg) 92%, var(--accent-secondary) 8%) 0%, var(--card-bg) 100%);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

body.light-mode .product-card,
body.light-mode .cart-item,
body.light-mode .cart-summary,
body.light-mode .empty-cart,
body.light-mode .admin-panel,
body.light-mode .generated-field,
body.light-mode .hold-card {
    background: var(--card-bg);
}

.product-card:hover,
.cart-item:hover,
.hold-card:hover {
    border-color: var(--accent-secondary);
    box-shadow: var(--shadow-lg);
}

.product-name,
.item-name,
.product-price,
.item-total,
.total-row,
.generated-field output,
.product-lock-message,
.shipping-address,
.tracking-summary,
.email-status-summary,
.email-status-issues,
.admin-table td,
.admin-table th,
.product-carousel-thumbnail span {
    color: var(--text-primary);
}

.product-name,
.item-name,
.cart-summary h2,
.checkout-form h3,
.cart-header h1,
.footer-section h3,
.admin-panel h1,
.admin-panel h2,
.admin-heading h1,
.section-heading h2 {
    font-weight: 700;
}

.product-price,
.item-total,
.discount-row span:last-child,
.qty-count,
.item-price,
.footer-section a,
.continue-shopping,
.tracking-summary a,
.admin-link-button {
    color: var(--accent-secondary);
    font-weight: 700;
}

.product-code,
.item-code,
.item-stock,
.shipping-help,
.optional-label,
.build-label,
.admin-table th,
.field-label,
.generated-field > span,
.product-carousel-counter,
.product-carousel-caption {
    color: var(--text-tertiary);
}

.out-of-stock-banner {
    background: linear-gradient(135deg, var(--danger), color-mix(in srgb, var(--danger) 72%, #111 28%));
}

.stock-filter input {
    accent-color: var(--accent-primary);
}

.footer-section a:hover,
.continue-shopping:hover,
.tracking-summary a:hover {
    color: var(--accent-primary);
}

.product-image-wrapper,
.product-image,
.image-upload-box img,
.product-carousel-thumbnail img {
    background-color: color-mix(in srgb, var(--bg-tertiary) 86%, var(--accent-secondary) 14%);
}

.quantity-controller,
.quantity-selector {
    background: var(--bg-secondary);
}

.quantity-controller button,
.quantity-btn,
.remove-btn {
    font-weight: 700;
}

.admin-secondary,
.admin-danger {
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
}

.admin-secondary {
    background: color-mix(in srgb, var(--bg-tertiary) 84%, var(--accent-secondary) 16%);
    color: var(--text-primary);
    border: 1px solid color-mix(in srgb, var(--border-color) 72%, var(--accent-secondary) 28%);
}

.admin-danger {
    background: linear-gradient(135deg, #ff6262, #ff8f8f);
    color: #1f0000;
}

.product-csv-errors,
.admin-message,
.email-status-issues {
    font-weight: 600;
}

body.light-mode .theme-toggle,
body.light-mode .add-to-cart-btn,
body.light-mode .checkout-btn,
body.light-mode .empty-cart-btn,
body.light-mode .admin-primary {
    color: #00140a;
}

body.light-mode .nav-links a,
body.light-mode .brand-name,
body.light-mode .hero-content h1,
body.light-mode .product-name,
body.light-mode .cart-header h1,
body.light-mode .cart-summary h2,
body.light-mode .checkout-form h3,
body.light-mode .admin-panel h1,
body.light-mode .admin-panel h2,
body.light-mode .admin-heading h1,
body.light-mode .footer-section h3,
body.light-mode .summary-row.total-row,
body.light-mode .admin-table td,
body.light-mode .admin-table th,
body.light-mode .results-count,
body.light-mode .product-description,
body.light-mode .cart-subtitle,
body.light-mode .footer-section p,
body.light-mode .footer-bottom,
body.light-mode .product-form-help,
body.light-mode .hold-details,
body.light-mode .hold-items,
body.light-mode .email-workflows,
body.light-mode .pdf-download-notice,
body.light-mode .shipping-status,
body.light-mode .us-shipping-note {
    color: var(--text-primary);
}

body.light-mode .product-code,
body.light-mode .item-code,
body.light-mode .item-stock,
body.light-mode .optional-label,
body.light-mode .build-label,
body.light-mode .field-label,
body.light-mode .generated-field > span,
body.light-mode .canonical-image-name,
body.light-mode .shipping-help,
body.light-mode .image-upload-controls small {
    color: var(--text-tertiary);
}

@media (max-width: 820px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .hero-content p {
        margin-inline: auto;
    }
}

@media (max-width: 620px) {
    .shop-page .nav-container {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .shop-page .brand {
        flex: 1 1 100%;
    }

    .shop-page .shop-brand-message {
        max-width: none;
        white-space: normal;
    }

    .shop-page .nav-links {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 520px) {
    .nav-links {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .hero-logo {
        max-width: 220px;
    }
}

/* Build 023 header refinement, font cleanup, and shipping badge */
body {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 400;
}

.brand-name,
.hero-content h1,
.product-name,
.footer-section h3,
.cart-header h1,
.cart-summary h2,
.checkout-form h3,
.empty-cart h2,
.admin-panel h1,
.admin-panel h2,
.admin-heading h1,
.section-heading h2,
.hold-order,
.admin-panel label,
.form-group label,
.field-label,
.generated-field > span,
.stock-filter,
.shipping-badge,
.build-label,
.pirate-selection-count,
.generated-title-field,
.product-form-help code,
.product-carousel-title {
    font-family: "Zilla Slab", serif;
}

.product-description,
.hero-content p,
.ornamental-notice,
.footer-section p,
.footer-bottom,
.results-count,
.item-desc,
.cart-subtitle,
.summary-row,
.shipping-status,
.us-shipping-note,
.hold-details,
.hold-items,
.product-form-help,
.login-panel p,
.admin-heading p,
.section-heading p,
.product-csv-help,
.pirate-ship-help,
.email-workflows,
.shipping-help,
.image-upload-controls small,
.canonical-image-name,
.accounting-export-help,
.admin-table,
.product-code,
.item-code,
.item-stock,
.product-carousel-caption,
.product-carousel-counter,
.filters input,
.filters select,
.form-group input,
.form-group select,
.checkout-form textarea,
.admin-panel input,
.admin-panel textarea,
.admin-panel select,
.theme-toggle,
.nav-links a,
.add-to-cart-btn,
.checkout-btn,
.empty-cart-btn,
.admin-primary,
.admin-secondary,
.admin-danger {
    font-family: "Atkinson Hyperlegible", sans-serif;
}

nav.navbar {
    padding: 8px 16px;
}

.nav-container {
    align-items: center;
    gap: 14px;
}

.brand-name {
    font-size: clamp(1rem, 0.95rem + 0.42vw, 1.35rem);
    line-height: 1.05;
}

.shop-page .shop-brand-message {
    font-size: clamp(0.95rem, 0.85rem + 0.6vw, 1.2rem);
    max-width: 700px;
}

.nav-links {
    gap: 12px;
}

.shipping-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid color-mix(in srgb, var(--border-color) 70%, var(--accent-secondary) 30%);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-secondary) 78%, var(--accent-secondary) 22%);
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.shipping-flag {
    font-size: 0.95rem;
    line-height: 1;
}

.shipping-badge-text {
    display: inline-block;
}

header.hero {
    padding: 16px;
}

.hero-content {
    max-width: 1120px;
    grid-template-columns: minmax(120px, 156px) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.hero-logo {
    max-width: 150px;
    width: 100%;
    border-radius: 14px;
}

.hero-content h1 {
    font-size: clamp(1.65rem, 1.25rem + 1.4vw, 2.45rem);
    line-height: 1.02;
    margin-bottom: 8px;
}

.hero-content p {
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
}

.ornamental-notice {
    font-size: 0.74rem;
    font-weight: 400;
    max-width: 820px;
    margin: 0 auto 24px;
    padding: 10px 16px;
}

.footer-section h3,
.product-name,
.cart-header h1,
.cart-summary h2,
.checkout-form h3,
.admin-panel h1,
.admin-panel h2,
.admin-heading h1,
.section-heading h2,
.hold-order,
.form-group label,
.admin-panel label,
.field-label,
.generated-field > span,
.stock-filter,
.build-label {
    font-weight: 600;
}

body.light-mode .ornamental-notice,
body.light-mode .hero-content p,
body.light-mode .product-description,
body.light-mode .results-count,
body.light-mode .footer-section p,
body.light-mode .footer-bottom,
body.light-mode .cart-subtitle,
body.light-mode .product-form-help,
body.light-mode .hold-details,
body.light-mode .hold-items,
body.light-mode .email-workflows,
body.light-mode .pdf-download-notice,
body.light-mode .shipping-status,
body.light-mode .us-shipping-note,
body.light-mode .shipping-badge,
body.light-mode .shipping-badge-text {
    color: var(--text-primary);
}

@media (max-width: 900px) {
    .shipping-badge-text {
        display: none;
    }

    .shipping-badge {
        padding-inline: 8px;
    }
}

@media (max-width: 820px) {
    header.hero {
        padding: 14px 16px;
    }

    .hero-content {
        grid-template-columns: 120px minmax(0, 1fr);
        justify-items: stretch;
        text-align: left;
    }

    .hero-content p {
        margin-inline: 0;
    }
}

@media (max-width: 620px) {
    nav.navbar {
        padding: 8px 12px;
    }

    .shop-page .nav-container {
        row-gap: 8px;
    }

    .shop-page .nav-links {
        width: 100%;
        justify-content: space-between;
    }

    .shipping-badge-text {
        display: inline-block;
    }

    .hero-content {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
    }

    .hero-logo {
        max-width: 96px;
    }

    .hero-content h1 {
        font-size: 1.35rem;
    }

    .hero-content p {
        font-size: 0.92rem;
    }
}

@media (max-width: 520px) {
    .nav-links {
        gap: 8px;
        align-items: center;
    }

    .shipping-badge {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .theme-toggle {
        padding: 6px 10px;
    }
}

/* Build 024: compact desktop shop header matched to the legacy storefront proportions */
html,
body,
button,
input,
select,
textarea,
option {
    font-family: "Atkinson Hyperlegible", sans-serif;
}

.brand-name,
.hero-content h1,
.product-name,
.footer-section h3,
.cart-header h1,
.cart-summary h2,
.checkout-form h3,
.empty-cart h2,
.admin-panel h1,
.admin-panel h2,
.admin-heading h1,
.section-heading h2,
.hold-order,
.admin-panel label,
.form-group label,
.field-label,
.generated-field > span,
.stock-filter,
.build-label,
.product-carousel-dialog h2 {
    font-family: "Zilla Slab", serif;
}

/* Keep the top navigation as a narrow strip. */
nav.navbar {
    min-height: 46px;
    padding: 7px 16px;
}

.nav-container {
    min-height: 32px;
}

.shop-page .shop-brand-message {
    font-size: clamp(1rem, 0.92rem + 0.35vw, 1.18rem);
    line-height: 1.05;
}

.shipping-badge {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 4px 9px;
}

.shipping-flag {
    width: 22px;
    height: 14px;
    display: block;
    flex: 0 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.24);
}

/* Match the older storefront's desktop hero height (about 208 px),
   while retaining Build 022's high-resolution logo and large heading scale. */
@media (min-width: 821px) {
    header.hero {
        height: 208px;
        min-height: 208px;
        max-height: 208px;
        padding: 14px 16px;
        overflow: hidden;
    }

    .hero-content {
        width: min(1120px, 100%);
        height: 180px;
        min-height: 180px;
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 28px;
        align-items: center;
    }

    .hero-logo {
        width: 180px;
        height: 180px;
        max-width: 180px;
        max-height: 180px;
        object-fit: contain;
        border-radius: 16px;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 1.3rem + 2vw, 3.65rem);
        line-height: 1.02;
        margin: 0 0 8px;
    }

    .hero-content p {
        font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem);
        line-height: 1.3;
    }

    .shop-page main {
        padding-top: 18px;
    }

    .shop-page .ornamental-notice {
        margin-bottom: 16px;
        padding: 8px 14px;
        line-height: 1.35;
    }

    .shop-page .filters-section {
        margin-bottom: 16px;
        gap: 10px;
    }
}

/* Mobile/tablet remains compact but fluid rather than fixed-height. */
@media (max-width: 820px) {
    header.hero {
        height: auto;
        min-height: 0;
        max-height: none;
        padding: 14px 16px;
        overflow: visible;
    }

    .hero-content {
        height: auto;
        min-height: 0;
    }
}

/* Build 025: dragon-palette accents, rainbow navigation, and compact mobile storefront */
:root {
    /* Dark theme: slightly lightened from the uploaded dragon logo for OLED legibility. */
    --accent-primary: #35e8c7;      /* greenish light teal */
    --accent-secondary: #4e8bff;    /* electric blue */
    --accent-tertiary: #ff5adf;     /* hot pink */
    --accent-quaternary: #ff7048;   /* vibrant red-orange */
    --accent-hover: #67f0d8;
    --accent-ink: #001713;
    --focus-ring: rgba(53, 232, 199, 0.34);
    --success: #45efcf;
    --warning: #ff9a68;
    --danger: #ff684e;
}

body.light-mode {
    /* Light theme: darkened versions of the same logo colors for contrast on white. */
    --accent-primary: #087f70;
    --accent-secondary: #174fb5;
    --accent-tertiary: #ad218f;
    --accent-quaternary: #c54124;
    --accent-hover: #075f56;
    --accent-ink: #ffffff;
    --focus-ring: rgba(8, 127, 112, 0.24);
    --success: #087f70;
    --warning: #a64b1f;
    --danger: #b63222;
}

/* The thin top bar remains mostly black, then flows like the dragon scales:
   electric blue → teal → green → yellow → a thinner red line that darkens at the far right. */
nav.navbar,
body.light-mode nav.navbar {
    color: #ffffff;
    background:
        linear-gradient(
            90deg,
            #000000 0%,
            #000000 48%,
            #061325 54%,
            #154dcb 62%,
            #2f7ff1 67%,
            #36cfd8 73%,
            #47e3b0 77%,
            #74eb72 82%,
            #cde654 88%,
            #f1d94c 92%,
            #da5441 94%,
            #4d1210 97%,
            #090404 100%
        );
    border-bottom-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.42);
}

nav.navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 46%,
        rgba(47, 127, 241, 0.92) 61%,
        rgba(54, 207, 216, 0.95) 71%,
        rgba(116, 235, 114, 0.95) 81%,
        rgba(241, 217, 76, 0.95) 90%,
        rgba(218, 84, 65, 0.9) 94%,
        rgba(10, 4, 4, 0.88) 100%
    );
    opacity: 0.92;
}

nav.navbar .brand-name,
nav.navbar .nav-links a,
nav.navbar .shipping-badge,
nav.navbar .theme-toggle,
body.light-mode nav.navbar .brand-name,
body.light-mode nav.navbar .nav-links a,
body.light-mode nav.navbar .shipping-badge,
body.light-mode nav.navbar .theme-toggle {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.92);
}

nav.navbar .nav-links a:hover,
nav.navbar .nav-links a.active {
    color: #ffffff;
    text-decoration-color: #ffffff;
}

.shipping-badge,
body.light-mode .shipping-badge {
    border-color: rgba(255, 255, 255, 0.46);
    background: rgba(0, 0, 0, 0.42);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.shipping-badge-mobile {
    display: none;
}

.theme-toggle,
body.light-mode .theme-toggle {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.50);
    border-color: rgba(255, 255, 255, 0.56);
    box-shadow: none;
}

.theme-toggle:hover,
body.light-mode .theme-toggle:hover {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    border-color: #ffffff;
}

/* Subtle logo-color ambience without sacrificing OLED black. */
header.hero {
    background:
        radial-gradient(circle at 18% 50%, rgba(78, 139, 255, 0.08), transparent 30%),
        radial-gradient(circle at 82% 48%, rgba(53, 232, 199, 0.07), transparent 28%),
        linear-gradient(180deg, #030303 0%, #000000 100%);
}

body.light-mode header.hero {
    background:
        radial-gradient(circle at 16% 46%, rgba(23, 79, 181, 0.08), transparent 31%),
        radial-gradient(circle at 84% 44%, rgba(8, 127, 112, 0.08), transparent 29%),
        linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-logo {
    background: transparent;
    box-shadow: none;
}

/* Main accent hierarchy: teal first, blue second, pink and orange as highlights. */
.add-to-cart-btn,
.checkout-btn,
.empty-cart-btn,
.admin-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: var(--accent-ink);
    border-color: color-mix(in srgb, var(--accent-secondary) 54%, var(--accent-primary) 46%);
    box-shadow: 0 7px 18px color-mix(in srgb, var(--accent-primary) 22%, transparent 78%);
}

.add-to-cart-btn:hover,
.checkout-btn:hover,
.empty-cart-btn:hover,
.admin-primary:hover {
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-tertiary) 58%, var(--accent-quaternary) 100%);
    color: #ffffff;
}

body.light-mode .add-to-cart-btn,
body.light-mode .checkout-btn,
body.light-mode .empty-cart-btn,
body.light-mode .admin-primary {
    color: #ffffff;
}

.product-price,
.qty-count,
.item-price,
.discount-row span:last-child,
.footer-section a,
.continue-shopping,
.tracking-summary a,
.admin-link-button {
    color: var(--accent-primary);
}

.product-card:hover,
.cart-item:hover,
.hold-card:hover {
    border-color: var(--accent-secondary);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--accent-secondary) 72%, transparent 28%),
        var(--shadow-lg);
}

.product-photo-hint {
    background: linear-gradient(135deg, rgba(23, 79, 181, 0.92), rgba(173, 33, 143, 0.92));
}

.stock-filter input {
    accent-color: var(--accent-primary);
}

.stock-low {
    color: var(--accent-quaternary);
}

.out-of-stock-banner {
    background: linear-gradient(135deg, var(--accent-quaternary), var(--accent-tertiary));
}

.admin-secondary {
    border-color: color-mix(in srgb, var(--accent-secondary) 42%, var(--border-color) 58%);
    background: color-mix(in srgb, var(--bg-tertiary) 88%, var(--accent-secondary) 12%);
}

.generated-field,
.email-status-summary,
.pdf-download-notice {
    border-color: color-mix(in srgb, var(--border-color) 72%, var(--accent-primary) 28%);
}

/* Mobile storefront: keep the first complete product card in the initial viewport. */
@media (max-width: 820px) {
    nav.navbar {
        min-height: 0;
        padding: 6px 10px;
    }

    .shop-page .nav-container {
        min-height: 0;
        row-gap: 5px;
    }

    .shop-page .brand {
        flex-basis: 100%;
    }

    .shop-page .shop-brand-message {
        max-width: none;
        font-size: 0.88rem;
        line-height: 1.06;
    }

    .shop-page .nav-links {
        width: 100%;
        gap: 6px;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    .shop-page .nav-links a,
    .shop-page .theme-toggle,
    .shop-page .shipping-badge {
        font-size: 0.76rem;
    }

    .shop-page .theme-toggle {
        padding: 5px 8px;
    }

    .shipping-badge {
        width: auto;
        min-height: 26px;
        padding: 4px 7px;
        order: initial;
    }

    .shipping-badge-desktop {
        display: none;
    }

    .shipping-badge-mobile {
        display: inline;
    }

    .shipping-flag {
        width: 18px;
        height: 12px;
    }

    header.hero {
        height: 132px;
        min-height: 132px;
        max-height: 132px;
        padding: 8px 10px;
        overflow: hidden;
    }

    .hero-content {
        width: 100%;
        height: 116px;
        min-height: 116px;
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        justify-items: stretch;
        text-align: left;
    }

    .hero-logo {
        width: 86px;
        height: 86px;
        max-width: 86px;
        max-height: 86px;
        aspect-ratio: 1;
        object-fit: contain;
    }

    .hero-content h1 {
        margin: 0 0 5px;
        font-size: clamp(1.18rem, 5.3vw, 1.5rem);
        line-height: 0.98;
    }

    .hero-content p {
        margin: 0;
        font-size: 0.78rem;
        line-height: 1.18;
    }

    .shop-page main {
        padding: 8px 9px 24px;
    }

    .shop-page .ornamental-notice {
        max-width: none;
        margin: 0 0 8px;
        padding: 5px 8px;
        border-radius: 8px;
        font-size: 0.64rem;
        line-height: 1.22;
    }

    .shop-page .filters-section {
        margin-bottom: 7px;
        gap: 5px;
    }

    .shop-page .filters {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
        gap: 5px;
        width: 100%;
    }

    .shop-page .filters input[type="text"] {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 34px;
        padding: 6px 9px;
        font-size: 0.8rem;
    }

    .shop-page .filters select {
        min-width: 0;
        min-height: 34px;
        padding: 5px 7px;
        font-size: 0.74rem;
    }

    .shop-page .stock-filter {
        min-width: 0;
        min-height: 34px;
        padding: 5px 7px;
        gap: 4px;
        font-size: 0.69rem;
    }

    .shop-page .results-count {
        font-size: 0.7rem;
        line-height: 1.15;
    }

    .shop-page .products-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .shop-page .product-card {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
        min-height: 146px;
        max-height: 156px;
        border-radius: 10px;
        transform: none;
    }

    .shop-page .product-card:hover {
        transform: none;
    }

    .shop-page .product-image-wrapper {
        width: 118px;
        height: 100%;
        min-height: 146px;
        padding-top: 0;
        border-right: 1px solid var(--border-color);
        border-bottom: 0;
    }

    .shop-page .product-image {
        object-fit: contain;
    }

    .shop-page .product-photo-hint {
        display: none;
    }

    .shop-page .product-info {
        min-width: 0;
        padding: 8px 9px;
    }

    .shop-page .product-code {
        margin-bottom: 1px;
        font-size: 0.62rem;
        line-height: 1.05;
    }

    .shop-page .product-name {
        margin-bottom: 2px;
        font-size: 0.96rem;
        line-height: 1.02;
    }

    .shop-page .product-description {
        display: -webkit-box;
        overflow: hidden;
        margin-bottom: 3px;
        font-size: 0.72rem;
        line-height: 1.15;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .shop-page .product-stock {
        margin-top: 2px;
        font-size: 0.72rem;
        line-height: 1.05;
    }

    .shop-page .product-footer {
        gap: 6px;
        margin-top: 4px;
    }

    .shop-page .product-price {
        font-size: 0.95rem;
    }

    .shop-page .add-to-cart-btn {
        padding: 5px 11px;
        border-radius: 7px;
        font-size: 0.74rem;
    }

    .shop-page .quantity-controller {
        max-width: 104px;
        height: 30px;
    }

    .shop-page .quantity-controller button {
        width: 30px;
        font-size: 0.9rem;
    }

    .shop-page .qty-count {
        font-size: 0.78rem;
    }

    .shop-page .out-of-stock-banner {
        top: 15px;
        right: -54px;
        width: 170px;
        padding: 6px 0;
        font-size: 0.68rem;
    }
}

@media (max-width: 420px) {
    .shop-page .shop-brand-message {
        font-size: 0.82rem;
    }

    .shop-page .nav-links a,
    .shop-page .theme-toggle,
    .shop-page .shipping-badge {
        font-size: 0.7rem;
    }

    .shop-page .shipping-badge {
        padding-inline: 5px;
    }

    header.hero {
        height: 124px;
        min-height: 124px;
        max-height: 124px;
    }

    .hero-content {
        height: 108px;
        min-height: 108px;
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .hero-logo {
        width: 78px;
        height: 78px;
        max-width: 78px;
        max-height: 78px;
    }

    .hero-content h1 {
        font-size: 1.16rem;
    }

    .hero-content p {
        font-size: 0.73rem;
    }

    .shop-page .product-card {
        grid-template-columns: 108px minmax(0, 1fr);
        min-height: 142px;
        max-height: 150px;
    }

    .shop-page .product-image-wrapper {
        width: 108px;
        min-height: 142px;
    }
}

/* Keep shipping text white over the permanent rainbow navigation in both themes. */
nav.navbar .shipping-badge-text,
body.light-mode nav.navbar .shipping-badge-text {
    color: #ffffff;
}


/* Build 028: unified button system.
   Every visible control uses the same light-teal fill and black text in both themes.
   Hover/focus keeps the same fill and adds only a glow. */
:root,
body.light-mode {
    --drgn-button-teal: #14fbc3;
    --drgn-button-teal-border: #14fbc3;
    --drgn-button-ink: #04110f;
    --drgn-button-glow: rgba(20, 251, 195, 0.48);
    --drgn-delete-orange: #e75307;
    --drgn-delete-border: #e75307;
    --drgn-delete-glow: rgba(231, 83, 7, 0.50);
}

/* Ordinary buttons and button-like links. Product-image buttons and image thumbnails
   are intentionally excluded because their image itself is the control surface. */
.theme-toggle,
.nav-links .cart-link,
.add-to-cart-btn,
.checkout-btn,
.empty-cart-btn,
.admin-primary,
.admin-secondary,
.admin-danger,
.admin-link-button,
.quantity-controller button,
.quantity-btn,
.remove-btn,
.product-carousel-close,
.product-carousel-nav {
    background: var(--drgn-button-teal) !important;
    background-image: none !important;
    color: var(--drgn-button-ink) !important;
    border-color: var(--drgn-button-teal-border) !important;
    text-shadow: none !important;
    filter: none !important;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.22) !important;
    transition: box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease !important;
}

/* Native file-picker buttons follow the same dominant button color. */
input[type="file"]::file-selector-button {
    background: var(--drgn-button-teal) !important;
    color: var(--drgn-button-ink) !important;
    border: 1px solid var(--drgn-button-teal-border) !important;
    border-radius: 8px;
    padding: 0.45rem 0.72rem;
    margin-right: 0.55rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.18) !important;
    transition: box-shadow 160ms ease, transform 160ms ease !important;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::file-selector-button:focus-visible {
    background: var(--drgn-button-teal) !important;
    color: var(--drgn-button-ink) !important;
    border-color: var(--drgn-button-teal-border) !important;
    box-shadow:
        0 0 0 2px rgba(20, 251, 195, 0.20),
        0 0 18px var(--drgn-button-glow),
        0 5px 12px rgba(0, 0, 0, 0.24) !important;
}

/* Body color never changes on hover. The glow alone provides feedback. */
.theme-toggle:hover,
.theme-toggle:focus-visible,
.nav-links .cart-link:hover,
.nav-links .cart-link:focus-visible,
.add-to-cart-btn:hover,
.add-to-cart-btn:focus-visible,
.checkout-btn:hover,
.checkout-btn:focus-visible,
.empty-cart-btn:hover,
.empty-cart-btn:focus-visible,
.admin-primary:hover,
.admin-primary:focus-visible,
.admin-secondary:hover,
.admin-secondary:focus-visible,
.admin-danger:hover,
.admin-danger:focus-visible,
.admin-link-button:hover,
.admin-link-button:focus-visible,
.quantity-controller button:hover,
.quantity-controller button:focus-visible,
.quantity-btn:hover,
.quantity-btn:focus-visible,
.remove-btn:hover,
.remove-btn:focus-visible,
.product-carousel-close:hover,
.product-carousel-close:focus-visible,
.product-carousel-nav:hover,
.product-carousel-nav:focus-visible {
    background: var(--drgn-button-teal) !important;
    background-image: none !important;
    color: var(--drgn-button-ink) !important;
    border-color: var(--drgn-button-teal-border) !important;
    filter: none !important;
    box-shadow:
        0 0 0 2px rgba(20, 251, 195, 0.20),
        0 0 18px var(--drgn-button-glow),
        0 5px 12px rgba(0, 0, 0, 0.28) !important;
    transform: translateY(-1px);
}

/* Only controls explicitly identified as Delete use the red-orange exception. */
.delete-button,
.admin-delete,
button[data-action="delete"],
button[aria-label*="delete" i],
button[title*="delete" i] {
    background: var(--drgn-delete-orange) !important;
    background-image: none !important;
    color: #180501 !important;
    border-color: var(--drgn-delete-border) !important;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.22) !important;
}

.delete-button:hover,
.delete-button:focus-visible,
.admin-delete:hover,
.admin-delete:focus-visible,
button[data-action="delete"]:hover,
button[data-action="delete"]:focus-visible,
button[aria-label*="delete" i]:hover,
button[aria-label*="delete" i]:focus-visible,
button[title*="delete" i]:hover,
button[title*="delete" i]:focus-visible {
    background: var(--drgn-delete-orange) !important;
    background-image: none !important;
    color: #180501 !important;
    border-color: var(--drgn-delete-border) !important;
    box-shadow:
        0 0 0 2px rgba(231, 83, 7, 0.20),
        0 0 18px var(--drgn-delete-glow),
        0 5px 12px rgba(0, 0, 0, 0.28) !important;
}

.theme-toggle:disabled,
.add-to-cart-btn:disabled,
.checkout-btn:disabled,
.admin-primary:disabled,
.admin-secondary:disabled,
.admin-danger:disabled,
.quantity-controller button:disabled,
.quantity-btn:disabled,
.product-carousel-nav:disabled {
    background: var(--drgn-button-teal) !important;
    color: var(--drgn-button-ink) !important;
    opacity: 0.5 !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed !important;
}

/* Build 028 specificity bridge for Build 027's inline admin-link styles. */
.admin-link-button.admin-primary,
.admin-link-button.admin-secondary,
body.light-mode .admin-link-button.admin-primary,
body.light-mode .admin-link-button.admin-secondary {
    background: var(--drgn-button-teal) !important;
    background-image: none !important;
    color: var(--drgn-button-ink) !important;
    border-color: var(--drgn-button-teal-border) !important;
}

.admin-link-button.admin-primary:hover,
.admin-link-button.admin-primary:focus-visible,
.admin-link-button.admin-secondary:hover,
.admin-link-button.admin-secondary:focus-visible,
body.light-mode .admin-link-button.admin-primary:hover,
body.light-mode .admin-link-button.admin-primary:focus-visible,
body.light-mode .admin-link-button.admin-secondary:hover,
body.light-mode .admin-link-button.admin-secondary:focus-visible {
    background: var(--drgn-button-teal) !important;
    background-image: none !important;
    color: var(--drgn-button-ink) !important;
    border-color: var(--drgn-button-teal-border) !important;
}

/* Build 031: Archive buttons use the standardized DRGN red-orange #E75307.
   The fill remains unchanged on hover/focus; only the glow strengthens. */
.archive-product {
    background: var(--drgn-delete-orange) !important;
    background-image: none !important;
    color: #180501 !important;
    border-color: var(--drgn-delete-border) !important;
    text-shadow: none !important;
    filter: none !important;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.22) !important;
}

.archive-product:hover,
.archive-product:focus-visible {
    background: var(--drgn-delete-orange) !important;
    background-image: none !important;
    color: #180501 !important;
    border-color: var(--drgn-delete-border) !important;
    filter: none !important;
    box-shadow:
        0 0 0 2px rgba(231, 83, 7, 0.20),
        0 0 18px var(--drgn-delete-glow),
        0 5px 12px rgba(0, 0, 0, 0.28) !important;
    transform: translateY(-1px);
}


/* Build 032: site-wide high-contrast boundary system.
   Dark mode uses pure white lines; light mode uses pure black lines.
   Button borders keep their brand colors and are intentionally handled above. */
:root {
    --drgn-boundary-color: #ffffff;
}

body.light-mode {
    --drgn-boundary-color: #000000;
}

/* Page dividers and passive framed areas. */
nav.navbar,
header.hero,
footer,
.footer-bottom,
.ornamental-notice,
.catalog-loading,
.catalog-empty,
.catalog-error,
.product-card,
.product-carousel-dialog,
.product-carousel-figure img,
.product-carousel-thumbnail,
.product-carousel-thumbnail img,
.cart-item,
.cart-summary,
.empty-cart,
.pdf-download-notice,
.quantity-controller,
.quantity-selector,
.stock-filter {
    border-color: var(--drgn-boundary-color) !important;
}

/* Fields on the shop, cart, and admin pages. */
.filters input,
.filters select,
.form-group input,
.form-group select,
.checkout-form textarea,
.admin-panel input,
.admin-panel textarea,
.admin-panel select,
.product-csv-form input[type="file"],
.pirate-tracking-form input[type="file"] {
    border-color: var(--drgn-boundary-color) !important;
}

/* Internal divider lines retain the same stark contrast. */
.product-image-wrapper,
.total-row,
.checkout-form {
    border-color: var(--drgn-boundary-color) !important;
}

/* Hover never substitutes a softer accent border. */
.product-card:hover,
.cart-item:hover,
.product-carousel-thumbnail:hover,
.product-carousel-thumbnail.is-active {
    border-color: var(--drgn-boundary-color) !important;
}

/* Focus keeps the pure boundary and adds a mint accessibility halo. */
.filters input:focus,
.filters select:focus,
.form-group input:focus,
.form-group select:focus,
.checkout-form textarea:focus,
.admin-panel input:focus,
.admin-panel textarea:focus,
.admin-panel select:focus {
    border-color: var(--drgn-boundary-color) !important;
    box-shadow: 0 0 0 3px rgba(20, 251, 195, 0.38) !important;
    outline: none;
}

/* Make the ornamental statement a complete, clearly bounded panel. */
.ornamental-notice {
    border: 1px solid var(--drgn-boundary-color) !important;
}

/* Give image-viewer images a visible frame rather than relying on background contrast. */
.product-carousel-figure img,
.product-carousel-thumbnail img {
    border: 1px solid var(--drgn-boundary-color) !important;
}

/* Build 032: revised DRGN storefront mint treatment.
   Light mode uses #5DFCD5 for the ornamental notice and product-card shell,
   while keeping the product information panel white for strong readability. */
body.shop-page.light-mode .ornamental-notice {
    background: #5dfcd5 !important;
    color: #04110f !important;
    border-color: #000000 !important;
    box-shadow: 0 3px 10px rgba(20, 251, 195, 0.18);
}

body.shop-page.light-mode .product-card,
body.shop-page.light-mode .product-card:hover {
    background: #5dfcd5 !important;
    border: 2px solid #000000 !important;
    box-shadow: 0 0 0 1px rgba(20, 251, 195, 0.22), var(--shadow-sm) !important;
}

body.shop-page.light-mode .product-card .product-info {
    background: #ffffff;
}

body.shop-page.light-mode .product-card .product-image-wrapper {
    border-bottom-color: #000000 !important;
}

@media (max-width: 720px) {
    body.shop-page.light-mode .product-card .product-image-wrapper {
        border-right-color: #000000 !important;
        border-bottom-color: transparent !important;
    }
}

/* Build 038 growth-variant catalog label */
.product-growth-type {
    display: inline-block;
    width: fit-content;
    margin: 0 0 5px;
    padding: 2px 7px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 780px) {
    .shop-page .product-growth-type {
        margin-bottom: 2px;
        padding: 1px 5px;
        font-size: 0.62rem;
    }
}

/* Numbered R-lot remainder purchase controls (Build 038 Patch 002). */
.remainder-action {
    margin-top: 10px;
}
.buy-remainder-btn {
    width: 100%;
    border: 1px solid currentColor;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.buy-remainder-btn:disabled {
    cursor: default;
    opacity: 0.68;
}
.remainder-in-cart,
.remainder-cart-label {
    font-weight: 700;
}
.cart-item-remainder {
    border-width: 2px;
}
.remainder-cart-label {
    max-width: 24rem;
    line-height: 1.35;
}


/* Patch 038-005: concise Buy All storefront button. */
.buy-remainder-btn .buy-all-title,
.buy-remainder-btn .buy-all-details { display: block; }
.buy-remainder-btn .buy-all-title { font-size: 1.05em; }
.buy-remainder-btn .buy-all-details { margin-top: 3px; font-size: 0.9em; font-weight: 700; }

/* Build 045: full product detail modal opened from the entire shop card. */
.product-card { cursor: pointer; }
.product-card:focus-visible {
    outline: 3px solid var(--accent-primary);
    outline-offset: 3px;
}
.product-detail-dialog {
    width: min(1380px, 96vw);
    height: min(900px, 94vh);
    max-height: 94vh;
    padding: 64px 24px 24px;
    overflow: hidden;
}
.product-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 24px;
    height: 100%;
    min-height: 0;
}
.product-detail-media,
.product-detail-copy {
    min-height: 0;
    overflow: auto;
}
.product-detail-media { padding-right: 4px; }
.product-detail-copy {
    padding: 8px 10px 28px 4px;
}
.product-detail-copy h2 {
    max-width: none;
    margin: .4rem 0 1rem;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
}
.product-detail-description {
    white-space: pre-wrap;
    line-height: 1.62;
    overflow-wrap: anywhere;
}
.product-detail-purchase {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.product-carousel-back {
    position: absolute;
    top: 12px;
    left: 14px;
    z-index: 3;
    min-height: 42px;
    padding: .55rem .9rem;
    border: 2px solid var(--accent-primary);
    border-radius: 999px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
}
.product-carousel-back:hover,
.product-carousel-back:focus-visible {
    outline: none;
    background: var(--accent-primary);
    color: var(--bg-primary);
}
.product-detail-dialog .product-carousel-close {
    top: 12px;
    right: 14px;
}
.product-detail-dialog .product-carousel-figure img {
    max-height: min(63vh, 700px);
}
@media (max-width: 850px) {
    .product-detail-dialog {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border: 0;
        border-radius: 0;
        padding: 64px 12px 24px;
        overflow: auto;
    }
    .product-detail-layout {
        display: block;
        height: auto;
    }
    .product-detail-media,
    .product-detail-copy { overflow: visible; }
    .product-detail-copy { padding: 24px 8px 48px; }
    .product-carousel-back span { display: inline; }
}

/* Build 050: compact listing cards and minimum-order notice */
.minimum-shop-notice{max-width:1180px;margin:0 auto 1rem;padding:.8rem 1rem;text-align:center;border:1px solid rgba(78,230,203,.38);border-radius:12px;background:rgba(78,230,203,.11);font-size:1.08rem}.product-description{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;max-height:4.65em}.product-expand-hint{display:block;margin-top:.35rem;font-size:.86rem;font-weight:700;opacity:.72}.product-card:hover .product-expand-hint,.product-card:focus-visible .product-expand-hint{opacity:1;text-decoration:underline}.product-growth-type[hidden]{display:none!important}body.light-mode .minimum-shop-notice{background:#eaf9f5;border-color:#a6d6ca}

/* Storefront purchase-first layout: prominent pricing and always-visible actions. */
.product-description {
    flex: none;
    margin-bottom: .45rem;
}

.product-purchase-block {
    margin-top: .65rem;
}

.product-price-line {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: .7rem;
}

.product-price {
    color: var(--accent-primary);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.02em;
}

.product-price-line .product-stock {
    margin: 0;
    text-align: right;
}

.product-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: .55rem;
    margin-top: .7rem;
}

.product-action-row.has-buy-all {
    grid-template-columns: minmax(0, 3fr) minmax(0, 5fr);
}

.product-action-row .action-container,
.product-action-row .remainder-action {
    display: flex;
    min-width: 0;
    width: 100%;
    margin: 0;
}

.product-action-row .add-to-cart-btn,
.product-action-row .buy-remainder-btn,
.product-action-row .quantity-controller,
.product-action-row .remainder-in-cart {
    width: 100%;
    max-width: none;
    min-height: 68px;
    margin: 0;
}

.product-action-row .add-to-cart-btn,
.product-action-row .buy-remainder-btn {
    padding: .72rem .6rem;
    font-size: 1.02rem;
    font-weight: 900;
    line-height: 1.14;
}

.product-action-row .buy-remainder-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.product-action-row .buy-remainder-btn .buy-all-title {
    font-size: 1.12em;
}

.product-action-row .buy-remainder-btn .buy-all-details {
    margin-top: .22rem;
    font-size: .78em;
    line-height: 1.18;
}

.product-action-row .quantity-controller {
    height: auto;
    border-radius: 8px;
}

.product-action-row .quantity-controller button {
    width: 38%;
    min-width: 42px;
    font-size: 1.55rem;
}

.product-action-row .qty-count {
    font-size: 1.15rem;
    font-weight: 900;
}

.product-action-row .remainder-in-cart {
    display: grid;
    place-items: center;
    padding: .55rem;
    text-align: center;
}

/* Expanded product: buying controls live with the media, before long descriptions. */
.product-detail-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
        "media heading"
        "media copy";
}

.product-detail-heading {
    grid-area: heading;
    min-width: 0;
    padding: 8px 10px 0 4px;
}

.product-detail-heading h2 {
    max-width: none;
    margin: .4rem 0 1rem;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    overflow-wrap: anywhere;
}

.product-detail-media {
    grid-area: media;
}

.product-detail-copy {
    grid-area: copy;
    padding-top: 0;
}

.product-detail-purchase-shell {
    display: grid;
    grid-template-columns: minmax(138px, .36fr) minmax(390px, 1fr);
    align-items: stretch;
    gap: 1rem;
    margin: .8rem 0 1rem;
    padding: .9rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
}

.product-detail-price-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.product-detail-price-group .product-price {
    font-size: clamp(2rem, 3vw, 2.45rem);
}

.product-detail-price-group .product-stock {
    margin: .45rem 0 0;
}

.product-detail-purchase-shell .product-action-row {
    margin-top: 0;
}

.product-detail-purchase-shell .product-action-row:not(.has-buy-all) {
    grid-template-columns: minmax(0, 1fr);
}

.product-detail-purchase-shell .add-to-cart-btn,
.product-detail-purchase-shell .buy-remainder-btn,
.product-detail-purchase-shell .quantity-controller,
.product-detail-purchase-shell .remainder-in-cart {
    min-height: 76px;
}

body.light-mode .product-detail-purchase-shell {
    background: var(--bg-tertiary);
}

@media (max-width: 1120px) {
    .product-detail-purchase-shell {
        grid-template-columns: 1fr;
        gap: .65rem;
    }

    .product-detail-price-group {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1rem;
    }

    .product-detail-price-group .product-stock {
        margin: 0;
        text-align: right;
    }
}

@media (max-width: 850px) {
    .product-detail-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "heading"
            "media"
            "copy";
        gap: 0;
    }

    .product-detail-heading {
        padding: 8px 8px 4px;
    }

    .product-detail-heading h2 {
        margin-bottom: .75rem;
        font-size: clamp(1.55rem, 7.5vw, 2.25rem);
    }

    .product-detail-copy {
        padding: 20px 8px 48px;
    }

    .product-detail-dialog .product-carousel-figure img {
        max-height: min(48vh, 520px);
    }

    .product-detail-purchase-shell {
        margin-top: .7rem;
    }
}

/* Mobile listing cards become complete, vertically shoppable cards. */
@media (max-width: 820px) {
    .shop-page .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .shop-page .product-card {
        display: flex;
        flex-direction: column;
        min-height: 0;
        max-height: none;
        border-radius: 14px;
    }

    .shop-page .product-image-wrapper {
        width: 100%;
        height: auto;
        min-height: 0;
        padding-top: 0;
        aspect-ratio: 4 / 3;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .shop-page .product-image {
        object-fit: contain;
    }

    .shop-page .product-photo-hint {
        display: block;
        opacity: .9;
    }

    .shop-page .product-info {
        min-width: 0;
        padding: 13px 14px 15px;
    }

    .shop-page .product-code {
        margin-bottom: 2px;
        font-size: .72rem;
        line-height: 1.1;
    }

    .shop-page .product-name {
        display: -webkit-box;
        overflow: hidden;
        margin-bottom: .3rem;
        font-size: 1.16rem;
        line-height: 1.08;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    .shop-page .product-description {
        display: -webkit-box;
        overflow: hidden;
        margin-bottom: .28rem;
        font-size: .86rem;
        line-height: 1.3;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .shop-page .product-expand-hint {
        margin-top: .15rem;
        font-size: .88rem;
        opacity: .86;
        text-decoration: underline;
        text-underline-offset: 2px;
    }

    .shop-page .product-purchase-block {
        margin-top: .7rem;
        padding-top: .7rem;
        border-top: 1px solid var(--border-color);
    }

    .shop-page .product-price {
        font-size: 1.95rem;
    }

    .shop-page .product-stock {
        font-size: .88rem;
    }

    .shop-page .product-action-row .add-to-cart-btn,
    .shop-page .product-action-row .buy-remainder-btn,
    .shop-page .product-action-row .quantity-controller,
    .shop-page .product-action-row .remainder-in-cart {
        min-height: 72px;
    }
}

@media (max-width: 430px) {
    .product-action-row {
        gap: .42rem;
    }

    .product-action-row.has-buy-all {
        grid-template-columns: minmax(0, 3fr) minmax(0, 5fr);
    }

    .product-action-row .add-to-cart-btn,
    .product-action-row .buy-remainder-btn {
        padding-inline: .38rem;
        font-size: .92rem;
    }

    .product-action-row .buy-remainder-btn .buy-all-details {
        font-size: .72em;
    }

    .product-detail-purchase-shell {
        padding: .72rem;
    }

    .product-detail-price-group .product-price,
    .shop-page .product-price {
        font-size: 1.9rem;
    }
}
.adventurer-choice-prompt {
    margin: 1.1rem 0;
    padding: 0.9rem 1rem;
    border-left: 4px solid #2bbfa6;
    border-radius: 0.45rem;
    background: rgba(43, 191, 166, 0.10);
    line-height: 1.45;
}

.adventurer-choice-prompt strong,
.adventurer-choice-prompt em {
    display: block;
}

.adventurer-choice-prompt em {
    margin-top: 0.2rem;
}

body.light-mode .adventurer-choice-prompt {
    border-left-color: #176b5e;
    background: rgba(23, 107, 94, 0.10);
    color: #14221f;
}
.hero-welcome{font-weight:850;letter-spacing:.015em;color:#8ff3df}body.light-mode .hero-welcome{color:#176d5e}

/* Build 100 — shared store availability notices */
.store-status-notice {
    max-width: 1180px;
    margin: .55rem auto .25rem;
    padding: .62rem .85rem;
    border: 1px solid rgba(243,166,66,.55);
    border-radius: 10px;
    background: rgba(243,166,66,.09);
    display: flex;
    gap: .55rem;
    align-items: baseline;
    flex-wrap: wrap;
}
.store-status-notice[hidden] { display: none !important; }
.store-status-notice strong { color: #f3a642; }
.ordering-paused-action {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: .45rem .72rem;
    border-radius: 8px;
    border: 1px solid rgba(243,166,66,.48);
    background: rgba(243,166,66,.08);
    color: #f3a642;
    font-weight: 800;
}
.store-availability-cart-notice { color: #f3a642; font-weight: 700; }
body.light-mode .store-status-notice { background: rgba(178,105,0,.07); }
@media (max-width: 640px) { .store-status-notice { margin-inline: .65rem; } }

/* Build 102 — shared configurable storefront filters */
.catalog-dynamic-filters{display:contents}
