:root {
    --blue: #1d4466;
    --blue-dark: #183954;
    --purple: #8224e3;
    --button: #44515e;
    --ink: #222;
    --text: #444;
    --muted: #777;
    --line: #eee;
    --footer: #3d2626;
    --cream: #efeee3;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: #fff;
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
    font-size: 16px;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button:disabled {
    cursor: not-allowed;
    opacity: .62;
}
.col-full { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.topbar-wrapper { border-bottom: 1px solid var(--line); background: #fff; }
.top-bar .col-full {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    align-items: center;
    min-height: 40px;
    gap: 18px;
    color: #121313;
    font-size: 14px;
}
.top-bar-center { text-align: center; }
.top-bar-right { text-align: right; }
.top-bar-right a { color: #1e68c4; }

.site-header { background: #fff; }
.main-header {
    display: grid;
    grid-template-columns: 270px minmax(260px, 1fr) auto auto;
    gap: 24px;
    align-items: center;
    padding-top: 30px;
    padding-bottom: 30px;
}
.site-branding { display: flex; align-items: center; gap: 14px; }
.menu-toggle {
    display: none;
    width: 42px;
    border: 0;
    background: transparent;
    color: #1e73be;
}
.menu-toggle .bar { display: block; width: 24px; height: 2px; margin: 5px 0; background: #1e73be; }
.bar-text { font-size: 12px; }
.custom-logo-link { display: grid; line-height: 1; color: #111; }
.logo-large { font-weight: 900; font-size: 32px; letter-spacing: 0; }
.logo-sub { margin-top: 7px; color: #777; font-weight: 700; font-size: 13px; }

.woocommerce-product-search {
    display: grid;
    grid-template-columns: 1fr 92px;
    border: 1px solid #ddd;
}
.search-field {
    min-height: 46px;
    padding: 0 14px;
    border: 0;
    outline: 0;
}
.woocommerce-product-search button,
.button,
.elementor-button,
.checkout-section button,
.wm-dialog button {
    border: 0;
    background: var(--button);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}
.secondary-navigation .menu {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #404040;
    font-size: 14px;
}
.secondary-navigation a.is-member {
    color: #1769aa;
    font-weight: 900;
}
.site-header-cart { justify-self: end; }
.cart-contents {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: #333;
    cursor: pointer;
}
.count {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    color: #81d742;
    border: 2px solid #81d742;
    border-radius: 99px;
    font-weight: 700;
}

.col-full-nav { background: var(--blue); }
.shoptimizer-primary-navigation { min-height: 60px; display: flex; align-items: center; }
.main-navigation .menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}
.main-navigation a {
    display: block;
    padding: 20px 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}
.main-navigation a:hover { background: var(--blue-dark); }
.main-navigation li {
    position: relative;
}
.main-navigation .sub-menu-wrapper {
    position: absolute;
    z-index: 50;
    top: 100%;
    left: 0;
    min-width: 235px;
    padding-top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    pointer-events: none;
}
.main-navigation .sub-menu-wrapper .sub-menu-wrapper {
    top: 0;
    left: 100%;
    padding-top: 0;
    transform: translateX(8px);
}
.main-navigation li:hover > .sub-menu-wrapper,
.main-navigation li:focus-within > .sub-menu-wrapper,
.main-navigation li.dropdown-open > .sub-menu-wrapper {
    opacity: 1;
    visibility: visible;
    transform: translate(0, 0);
    pointer-events: auto;
}
.main-navigation .sub-menu {
    display: block;
    min-width: 235px;
    margin: 0;
    padding: 8px 0;
    background: #fff;
    border: 1px solid #e7edf2;
    box-shadow: 0 16px 34px rgba(24, 43, 61, .18);
    list-style: none;
}
.main-navigation .sub-menu a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 18px;
    color: #323232;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}
.main-navigation .sub-menu a:hover {
    color: #dc9814;
    background: #f7f9fb;
}
.main-navigation .caret {
    display: inline-block;
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-left: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .9;
}
.main-navigation .menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.main-navigation .sub-menu .caret {
    margin-left: auto;
    color: #738394;
    transform: rotate(-45deg);
}
.main-navigation .sub-menu .menu-item-has-children > a {
    padding-right: 34px;
}

.site-content { background: #fff; }
.archive-header {
    background: var(--cream);
    padding: 16px 0;
}
.archive .archive-header {
    padding: 24px 0;
}
.archive .archive-header h1 {
    margin: 8px 0;
    color: #111;
    font-size: 32px;
    line-height: 1.2;
}
.archive .archive-header p {
    margin: 0;
    color: #555;
}
.woocommerce-breadcrumb {
    color: #666;
    font-size: 14px;
}
.breadcrumb-separator { margin: 0 8px; color: #999; }
.home-banner { padding-top: 18px; }
.hero-banner {
    display: block;
    min-height: 430px;
    padding: 52px 58px;
    background:
        linear-gradient(90deg, rgba(255,255,255,.92), rgba(255,255,255,.28)),
        url("https://images.unsplash.com/photo-1464965911861-746a04b4bca6?auto=format&fit=crop&w=1800&q=80") center/cover;
}
.hero-banner div { max-width: 560px; }
.hero-banner span { color: #dc9814; font-size: 18px; font-weight: 800; }
.hero-banner h1 {
    margin: 12px 0;
    color: #111;
    font-size: 42px;
    line-height: 1.2;
    font-weight: 600;
}
.hero-banner p { line-height: 1.7; }
.hero-banner strong { display: inline-block; margin-top: 12px; color: #111; }

.home-section { padding: 34px 0 18px; }
.archive-products { padding: 32px 0 52px; }
.promo-section { background: #f8f8f8; margin-top: 28px; }
.home-section h2,
.archive-products h2 {
    margin: 0 0 22px;
    color: #222;
    font-size: 30px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: 0;
    text-align: center;
}
.promo-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.promo-row article {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line);
}
.promo-row strong,
.promo-row span { display: block; }
.promo-row span { margin-top: 5px; color: var(--muted); font-size: 14px; }

.woocommerce ul.products,
.related.products ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}
li.product {
    position: relative;
    min-width: 0;
    background: #fff;
}
.woocommerce-image__wrapper {
    position: relative;
    overflow: hidden;
    background: #f6f6f6;
}
.woocommerce-image__wrapper img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform .2s ease;
}
li.product:hover img { transform: scale(1.035); }
.product-label {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    min-width: 48px;
    padding: 7px 8px;
    color: #fff;
    background: var(--purple);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}
.product-state-label {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 10px;
    min-width: 52px;
    padding: 7px 9px;
    color: #fff;
    background: #b42318;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}
.woocommerce-card__header { padding: 12px 0 0; }
.product__categories {
    min-height: 34px;
    margin: 0 0 7px;
    color: #888;
    font-size: 12px;
    line-height: 1.45;
}
.product__categories a { color: #777; }
.woocommerce-loop-product__title {
    min-height: 42px;
    margin-bottom: 8px;
    color: #222;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}
.price {
    display: block;
    min-height: 26px;
    margin-bottom: 10px;
    color: #000;
    font-size: 17px;
    font-weight: 700;
}
.price del {
    margin-right: 5px;
    color: #999;
    font-weight: 400;
}
.price ins { color: #000; text-decoration: none; }
.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.add_to_cart_button,
.buy-now-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    font-size: 14px;
}
.buy-now-button { background: #1d4466; }
.add_to_cart_button:disabled,
.buy-now-button:disabled,
.single_add_to_cart_button:disabled,
.dialog-actions button:disabled {
    background: #c7cdd3 !important;
    color: #66727f !important;
    box-shadow: none !important;
}
.add_to_cart_button:hover,
.elementor-button:hover,
.checkout-section button:hover,
.wm-dialog button:hover { background: #000; }
.wpced {
    margin-top: 10px;
    color: #666;
    font-size: 13px;
}
.wpced-inner {
    display: inline-block;
    padding: 7px 9px;
    background: #f7f7f7;
    border-left: 3px solid #dc9814;
}
.ws-note {
    margin: -12px 0 20px;
    color: #777;
    text-align: center;
    font-size: 14px;
}
.more-wrap { text-align: center; margin-top: 28px; }
.elementor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
    border-radius: 3px;
}
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}
.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    color: #333;
    font-weight: 700;
}
.pagination a.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.testimonial-section { background: #fff; }
.testimonials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.testimonials article {
    padding: 22px;
    border: 1px solid var(--line);
    text-align: center;
}
.testimonials strong,
.testimonials span { display: block; }
.testimonials span { margin-top: 8px; color: #777; }

.checkout-section {
    margin-top: 28px;
    padding: 34px 0;
    background: var(--cream);
}
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 430px;
    gap: 32px;
    align-items: start;
}
.checkout-section h2 { margin-top: 0; color: #222; font-size: 30px; }
.checkout-section form {
    display: grid;
    gap: 12px;
    padding: 18px;
    background: #fff;
    border: 1px solid #ddd;
}
label { display: grid; gap: 6px; color: #555; font-size: 14px; font-weight: 600; }
input, select, textarea {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    background: #fff;
}
.checkout-section button { min-height: 44px; }

.product-content .col-full {
    max-width: calc(1400px + 5.2325em);
}
.product-details-wrapper {
    display: grid;
    grid-template-columns: minmax(360px, .92fr) minmax(360px, 1fr);
    gap: 46px;
    align-items: start;
    padding: 36px 0 28px;
    background: #f8f8f8;
}
.woocommerce-product-gallery,
.summary {
    background: #fff;
}
.woocommerce-product-gallery {
    padding: 18px;
}
.woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.product-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.product-thumbs button {
    padding: 0;
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
}
.product-thumbs button.selected,
.product-thumbs button:hover { border-color: var(--blue); }
.product-thumbs img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.summary {
    position: relative;
    padding: 22px 24px;
}
.onsale {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 9px;
    color: #fff;
    background: var(--purple);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}
.product_title {
    margin: 0 0 12px;
    color: #111;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 600;
}
.summary > .product-label {
    position: static;
    display: inline-block;
    margin-bottom: 14px;
}
.woocommerce-product-details__short-description {
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    line-height: 1.75;
}
.product-detail-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
.variations {
    width: 100%;
    border-collapse: collapse;
}
.variations th,
.variations td {
    padding: 10px 0;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}
.variations th {
    width: 92px;
    color: #222;
    text-align: left;
}
.swatchly-type-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.swatchly-swatch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
}
.swatchly-swatch:hover,
.swatchly-swatch.swatchly-selected {
    border-color: #111;
    box-shadow: inset 0 0 0 1px #111;
}
.swatchly-swatch.swatchly-disabled,
.swatchly-swatch:disabled {
    color: #999;
    background: #f1f1f1;
    border-color: #e1e1e1;
    box-shadow: none;
    cursor: not-allowed;
    opacity: .62;
}
.swatchly-swatch.swatchly-disabled:hover,
.swatchly-swatch:disabled:hover {
    border-color: #e1e1e1;
    box-shadow: none;
}
.swatchly-swatch.swatchly-selected {
    background: #111;
    color: #fff;
}
.selected-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 6px;
    background: #dc9814;
    color: #111;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}
.variant-select {
    width: 100%;
    min-height: 42px;
}
.quantity {
    display: inline-flex;
    align-items: center;
}
.quantity .qty {
    width: 86px;
    text-align: center;
}
.single-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.single_add_to_cart_button {
    width: fit-content;
    min-height: 46px;
    padding: 0 26px;
}
.variation-message {
    min-height: 22px;
    margin: 0;
    color: #2f7a4f;
    font-size: 14px;
}
.variation-message.error { color: #b42318; }
.direct-buy-note {
    margin: 0;
    padding: 12px;
    background: #f7f7f7;
    border-left: 3px solid #dc9814;
}
.product-widget {
    margin-top: 18px;
    padding: 16px;
    background: #fbfbfb;
    border: 1px solid var(--line);
}
.product-widget ul { margin-bottom: 0; padding-left: 20px; }
.woocommerce-tabs {
    margin-top: 20px;
    background: #fff;
}
.wc-tabs {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid var(--line);
}
.wc-tabs a {
    display: block;
    padding: 15px 18px;
    color: #222;
    font-weight: 700;
}
.wc-tabs a:hover { color: #1e68c4; }
.wc-tab {
    padding: 24px 0;
    line-height: 1.75;
}
.shop_attributes {
    width: 100%;
    border-collapse: collapse;
}
.shop_attributes th,
.shop_attributes td {
    padding: 12px;
    border: 1px solid var(--line);
    text-align: left;
}
.related.products {
    margin: 28px 0 50px;
}
.related.products h2 {
    margin-bottom: 20px;
    text-align: center;
}

.shoptimizer-mini-cart-wrap {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 80;
    display: none;
    width: min(390px, 92vw);
    height: 100dvh;
    max-height: 100vh;
    padding: 0;
    background: #f7fafc;
    box-shadow: -18px 0 50px rgba(0,0,0,.2);
    overflow: hidden;
}
.shoptimizer-mini-cart-wrap.open {
    display: flex;
    flex-direction: column;
}
.cart-drawer-head {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 16px 18px;
    background: #fff;
    border-bottom: 1px solid #dfe7ee;
}
.cart-drawer-head div {
    display: grid;
    gap: 4px;
}
.cart-drawer-head span {
    color: #637487;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.cart-drawer-head strong {
    color: #13212f;
    font-size: 22px;
    line-height: 1.2;
}
.close-drawer {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: #eef3f8;
    color: #29445c;
    cursor: pointer;
    font-weight: 900;
}
.cart-drawer-items {
    display: grid;
    align-content: start;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 14px;
}
.cart-drawer-items.widget_shopping_cart_content {
    max-height: none;
}
.cart-drawer-items > p {
    margin: 0;
    padding: 18px;
    color: #637487;
    background: #fff;
    border: 1px dashed #cbd8e2;
    text-align: center;
    font-weight: 800;
}
.cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 22px 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #e1e8ef;
    box-shadow: 0 8px 20px rgba(25, 45, 65, .06);
}
.cart-item.is-disabled {
    opacity: .58;
    filter: grayscale(.35);
}
.cart-item-check {
    width: 18px;
    height: 18px;
}
.cart-item-remove {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 26px;
    height: 26px;
    border: 0;
    background: #b42318;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}
.cart-item-thumb {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    overflow: hidden;
    background: #f3f6f8;
    border: 1px solid #e1e7ed;
}
.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-item-thumb span {
    color: #637487;
    font-size: 12px;
    font-weight: 900;
}
.cart-item-body {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.cart-item-name {
    color: #1e68c4;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.cart-item-name:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cart-item-spec {
    color: #5f6f7f;
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.cart-item-body > span:last-child {
    color: #111;
    font-weight: 900;
}
.cart-item-stock {
    color: #b42318;
    font-size: 13px;
    font-weight: 900;
}
.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.cart-item-bottom > span {
    color: #111;
    font-weight: 900;
}
.cart-qty {
    display: grid;
    grid-template-columns: 30px 44px 30px;
    align-items: center;
}
.cart-qty button,
.cart-qty input {
    width: 100%;
    min-height: 30px;
    padding: 0;
    border: 1px solid #cbd8e2;
    text-align: center;
}
.cart-qty button {
    background: #eef3f8;
    color: #29445c;
    cursor: pointer;
    font-weight: 900;
}
.cart-drawer-footer {
    flex: 0 0 auto;
    display: grid;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-top: 1px solid #dfe7ee;
    box-shadow: 0 -10px 30px rgba(25, 45, 65, .08);
}
.mini-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #111;
}
.mini-cart-total span {
    color: #637487;
    font-size: 13px;
    font-weight: 900;
}
.mini-cart-total strong {
    color: #13212f;
    font-size: 22px;
}
.cart-checkout-button {
    width: 100%;
    min-height: 44px;
    border: 0;
    background: #1769aa;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}
.cart-checkout-button:disabled {
    background: #c7cdd3;
    color: #66727f;
    cursor: not-allowed;
}

.wm-dialog {
    width: min(520px, calc(100vw - 28px));
    padding: 0;
    border: 0;
    background: transparent;
}
.product-option-dialog { width: min(640px, calc(100vw - 28px)); }
.wm-dialog::backdrop { background: rgba(0,0,0,.45); }
.dialog-shell {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 22px 80px rgba(0,0,0,.26);
}
.dialog-shell h2 {
    margin: 0;
    color: #111;
    font-size: 26px;
}
.dialog-message {
    margin: 0;
    color: #666;
    line-height: 1.65;
}
.dialog-message.error { color: #b42318; }
.dialog-grid { display: grid; gap: 12px; }
.auth-shell { gap: 16px; }
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line);
}
.auth-tabs button {
    min-height: 42px;
    background: #fff;
    color: #333;
}
.auth-tabs button:hover {
    background: #f7fbff;
    color: #183954;
}
.auth-tabs button.active {
    background: #e9f4ff;
    color: #183954;
    box-shadow: inset 0 -3px 0 #1e68c4;
}
.auth-panel {
    display: none;
    gap: 12px;
}
.auth-panel.active { display: grid; }
.password-meter {
    display: grid;
    gap: 7px;
}
.password-meter::before {
    content: "";
    display: block;
    height: 8px;
    background: #eee;
}
.password-meter span {
    display: block;
    height: 8px;
    width: 0;
    margin-top: -15px;
    background: #b42318;
    transition: width .18s ease, background .18s ease;
}
.password-meter.medium span { background: #dc9814; }
.password-meter.strong span { background: #2f7a4f; }
.password-meter strong,
.password-hint {
    margin: 0;
    color: #666;
    font-size: 13px;
}
.option-dialog-head {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    align-items: center;
    padding-right: 58px;
}
.option-dialog-head img {
    width: 96px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f6f6f6;
}
.option-dialog-head .price {
    margin: 8px 0 0;
    min-height: auto;
}
.option-group {
    display: grid;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.confirm-dialog .dialog-shell {
    max-width: 480px;
}
.confirm-dialog .dialog-actions .secondary {
    background: #eef3f8;
    color: #29445c;
}
.confirm-dialog .dialog-actions .danger {
    background: #b42318;
    color: #fff;
}
.dialog-shell button {
    min-height: 44px;
    padding: 0 16px;
}
.dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    min-height: 34px !important;
    padding: 0 10px !important;
    background: #f1f1f1 !important;
    color: #333 !important;
}

.wm-toast {
    position: fixed;
    z-index: 120;
    right: 22px;
    bottom: 22px;
    max-width: min(380px, calc(100vw - 32px));
    padding: 13px 16px;
    background: #111;
    color: #fff;
    box-shadow: 0 14px 46px rgba(0,0,0,.28);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    transform: translateY(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
.wm-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.platform-home {
    min-height: 100vh;
    background: #f5f8fb;
}
.platform-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 54px 20px;
}
.platform-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 42px;
    align-items: center;
}
.platform-kicker {
    margin: 0 0 12px;
    color: #1e68c4;
    font-weight: 900;
}
.platform-hero h1 {
    margin: 0 0 18px;
    color: #111;
    font-size: 46px;
    line-height: 1.15;
}
.platform-hero p {
    max-width: 620px;
    line-height: 1.8;
}
.platform-create-form {
    display: grid;
    gap: 14px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(0,0,0,.08);
}
.platform-create-form h2 {
    margin: 0;
    color: #111;
}
.platform-create-form button {
    min-height: 46px;
    border: 0;
    background: #1d4466;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}
.subdomain-input {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border: 1px solid #ddd;
    background: #fff;
}
.subdomain-input input {
    border: 0;
}
.subdomain-input em {
    padding: 0 10px;
    color: #666;
    font-style: normal;
}
.platform-create-form .error {
    color: #b42318;
    font-weight: 700;
}
.platform-create-form .success {
    color: #2f7a4f;
    font-weight: 700;
}

.site-footer,
.copyright {
    background: var(--footer);
    color: #fff;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    padding-top: 34px;
    padding-bottom: 34px;
}
.widget-title {
    display: block;
    margin-bottom: 12px;
    color: #1e73be;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 7px 0; }
.site-footer p { margin: 0; line-height: 1.7; }
.copyright .col-full {
    padding-top: 16px;
    padding-bottom: 16px;
    border-top: 1px solid rgba(255,255,255,.15);
    font-size: 14px;
}

.admin-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 20px 56px;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.topbar nav {
    display: flex;
    gap: 14px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #111;
    font-weight: 800;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: #1d4466;
    color: #fff;
}
.admin-login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
    background: #f6f7f8;
}
.admin-login-form {
    display: grid;
    gap: 14px;
    width: min(420px, 100%);
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(0,0,0,.08);
}
.admin-login-form h1 { margin: 0; color: #111; font-size: 26px; }
.admin-login-form button {
    min-height: 44px;
    border: 0;
    background: var(--button);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}
.admin-error {
    margin: 0;
    color: #b42318;
    font-weight: 700;
}
.admin-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.admin-form, .admin-table {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
}
.admin-table table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 11px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.admin-table-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.admin-table-heading h2 { margin: 0; }
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.admin-actions button,
.admin-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 0;
    background: var(--button);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}
.admin-button.secondary {
    background: #f1f1f1;
    color: #333;
}
.admin-button.small {
    min-height: 32px;
    padding: 0 10px;
}
.admin-product-link {
    color: #1e68c4;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.admin-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-height: 32px;
}
.admin-row-actions form { margin: 0; }
.admin-row-actions button {
    min-height: 32px;
    padding: 0 10px;
    border: 0;
    background: #b42318;
    color: #fff;
    cursor: pointer;
}
.admin-help {
    margin: 0;
    color: #666;
    line-height: 1.6;
}
.nav-builder {
    display: grid;
    gap: 8px;
}
.nav-palette {
    display: grid;
    gap: 10px;
    padding: 14px;
    background: #f8fbfd;
    border: 1px solid #d9e3eb;
}
.nav-palette strong {
    color: #1c3549;
}
.nav-palette div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nav-palette button {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #cbd8e2;
    background: #fff;
    color: #29445c;
    cursor: grab;
    font-weight: 900;
}
.nav-palette button:hover {
    background: #eaf6ff;
    border-color: #1e73be;
}
.nav-root-drop {
    padding: 10px;
    color: #666;
    background: #f6f7f8;
    border: 1px dashed #bbb;
    font-size: 13px;
}
.nav-row {
    display: grid;
    grid-template-columns: 28px minmax(90px, 1fr) minmax(120px, 1.3fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    background: #fff;
}
.nav-row.depth-1,
.nav-row.depth-2,
.nav-row.depth-3 {
    margin-left: 24px;
    background: #f9fbfd;
}
.nav-row.depth-2 { margin-left: 48px; }
.nav-row.depth-3 { margin-left: 72px; }
.nav-row.drop-target {
    border-color: #1e68c4;
    box-shadow: inset 0 0 0 1px #1e68c4;
}
.drag-handle {
    color: #777;
    cursor: grab;
    font-weight: 900;
}
.nav-row input {
    width: 100%;
    min-width: 0;
}
.nav-row button {
    min-height: 36px;
    border: 0;
    background: #eef3f8;
    color: #333;
    cursor: pointer;
    font-weight: 700;
}
.nav-children {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
}

.admin-body {
    min-height: 100vh;
    color: #1f2933;
    background: #eef3f7;
}
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 12px 24px;
    border-bottom: 1px solid #d8e1ea;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 30px rgba(27, 47, 65, .08);
}
.admin-topbar nav {
    display: flex;
    gap: 10px;
}
.admin-topbar nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    color: #25435c;
    background: #f4f8fb;
    border: 1px solid #d8e1ea;
    font-weight: 800;
}
.admin-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    max-width: 1420px;
    margin: 0 auto;
    padding: 24px;
}
.admin-sidebar {
    position: sticky;
    top: 76px;
    align-self: start;
    display: grid;
    gap: 14px;
}
.admin-store-card,
.admin-panel,
.admin-quick-grid a {
    background: #fff;
    border: 1px solid #d9e3eb;
    box-shadow: 0 18px 45px rgba(25, 45, 65, .07);
}
.admin-store-card {
    display: grid;
    gap: 6px;
    padding: 18px;
}
.admin-store-card span,
.admin-eyebrow,
.admin-stats span {
    color: #637487;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.admin-store-card strong {
    color: #13212f;
    font-size: 20px;
}
.admin-store-card small {
    color: #506275;
    overflow-wrap: anywhere;
}
.admin-menu {
    display: grid;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border: 1px solid #d9e3eb;
}
.admin-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 13px;
    color: #33495d;
    font-weight: 900;
    border-left: 4px solid transparent;
}
.admin-menu a:hover,
.admin-menu a.active {
    color: #0c4a6e;
    background: #eaf6ff;
    border-left-color: #1e73be;
}
.admin-content {
    min-width: 0;
    display: grid;
    gap: 18px;
}
.admin-page-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
}
.admin-page-head h1 {
    margin: 2px 0 0;
    color: #13212f;
    font-size: 30px;
}
.admin-eyebrow { margin: 0; letter-spacing: 0; }
.admin-message {
    margin: 0;
    padding: 13px 16px;
    color: #14532d;
    background: #eaf8ef;
    border: 1px solid #bfe8c9;
    font-weight: 800;
}
.admin-stats,
.admin-quick-grid,
.admin-settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.admin-stats article {
    display: grid;
    gap: 8px;
    padding: 18px;
    background: #fff;
    border: 1px solid #d9e3eb;
}
.admin-stats strong {
    color: #12273a;
    font-size: 32px;
    line-height: 1;
}
.admin-quick-grid a {
    display: grid;
    gap: 8px;
    padding: 20px;
    color: #263b50;
}
.admin-quick-grid strong {
    color: #0f2d42;
    font-size: 18px;
}
.admin-quick-grid span {
    color: #5a6c7d;
    line-height: 1.6;
}
.admin-panel {
    display: grid;
    gap: 16px;
    padding: 20px;
}
.admin-panel h2 {
    margin: 0;
    color: #152839;
    font-size: 20px;
}
.admin-form {
    padding: 0;
    border: 0;
    background: transparent;
}
.admin-product-editor {
    display: grid;
    gap: 18px;
}
.admin-form label {
    display: grid;
    gap: 7px;
    color: #30475a;
    font-size: 14px;
    font-weight: 900;
}
.admin-form label small {
    color: #637487;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}
.admin-form input:not([type="checkbox"]),
.admin-form select,
.admin-form textarea,
.nav-row input {
    border: 1px solid #cbd8e2;
    background: #fbfdff;
}
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.nav-row input:focus {
    border-color: #1e73be;
    box-shadow: 0 0 0 3px rgba(30, 115, 190, .16);
    outline: 0;
}
.admin-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.admin-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.admin-checks label {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: #f4f8fb;
    border: 1px solid #d8e1ea;
}
.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid #d9e3eb;
}
.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    padding: 12px;
    background: #f7fafc;
    border: 1px solid #d9e3eb;
}
.admin-filter-bar label {
    display: grid;
    gap: 6px;
    color: #30475a;
    font-size: 13px;
    font-weight: 900;
}
.admin-filter-bar select {
    min-width: 180px;
    border: 1px solid #cbd8e2;
    background: #fff;
}
.admin-filter-bar button {
    min-height: 38px;
    padding: 0 13px;
    border: 0;
    border-radius: 4px;
    background: #1769aa;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}
.admin-filter-bar span {
    margin-left: auto;
    color: #506275;
    font-weight: 800;
}
.admin-panel table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: #fff;
}
.admin-panel th,
.admin-panel td {
    padding: 13px;
    text-align: left;
    border-bottom: 1px solid #e4ebf1;
}
.admin-panel th {
    color: #516679;
    background: #f7fafc;
    font-size: 12px;
    text-transform: uppercase;
}
.admin-panel tr:hover td {
    background: #fbfdff;
}
.admin-product-cell {
    display: grid;
    grid-template-columns: 58px minmax(180px, 1fr);
    gap: 12px;
    align-items: center;
}
.admin-product-cell small {
    display: block;
    margin-top: 4px;
    color: #637487;
    font-size: 12px;
    overflow-wrap: anywhere;
}
.admin-product-thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    background: #eef3f7;
    border: 1px solid #d9e3eb;
}
.admin-product-thumb.empty {
    display: grid;
    place-items: center;
    color: #637487;
    font-size: 12px;
    font-weight: 900;
}
.admin-empty-row {
    color: #637487;
    font-weight: 800;
    text-align: center;
}
.admin-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.admin-pagination a {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: #25435c;
    background: #fff;
    border: 1px solid #cbd8e2;
    font-weight: 900;
}
.admin-pagination a.active,
.admin-pagination a:hover {
    color: #fff;
    background: #1769aa;
    border-color: #1769aa;
}
.admin-button,
.admin-actions button {
    border-radius: 4px;
    background: #1769aa;
    box-shadow: 0 8px 18px rgba(23, 105, 170, .18);
}
.admin-button:hover,
.admin-actions button:hover {
    background: #0f568d;
}
.admin-button.secondary {
    border: 1px solid #cdd9e4;
    background: #fff;
    color: #29445c;
    box-shadow: none;
}
.admin-button.secondary:hover {
    background: #f4f8fb;
}
.admin-status {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    color: #7c2d12;
    background: #fff3e8;
    font-weight: 900;
}
.admin-status.is-active,
.admin-status.is-published {
    color: #166534;
    background: #e7f8ee;
}
.admin-status.is-sold_out {
    color: #92400e;
    background: #fff7d6;
}
.admin-status.is-discontinued {
    color: #7f1d1d;
    background: #fee2e2;
}
.admin-status.is-unpublished {
    color: #475569;
    background: #e8eef4;
}
.admin-inline-status {
    margin: 0;
}
.admin-status-select {
    min-height: 34px;
    min-width: 92px;
    padding: 0 30px 0 10px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
}
.admin-status-select.is-published {
    color: #166534;
    background: #e7f8ee;
}
.admin-status-select.is-sold_out {
    color: #92400e;
    background: #fff7d6;
}
.admin-status-select.is-discontinued {
    color: #7f1d1d;
    background: #fee2e2;
}
.admin-status-select.is-unpublished {
    color: #475569;
    background: #e8eef4;
}
.markdown-editor-shell {
    display: grid;
    overflow: hidden;
    border: 1px solid #cbd8e2;
    background: #fff;
}
.markdown-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: #f4f8fb;
    border-bottom: 1px solid #d9e3eb;
}
.markdown-editor-toolbar button {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #cbd8e2;
    background: #fff;
    color: #29445c;
    cursor: pointer;
    font-weight: 900;
}
.markdown-editor-toolbar button:hover {
    background: #eaf6ff;
    border-color: #1e73be;
}
.markdown-editor-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 430px;
}
.markdown-editor-shell:not(.is-previewing) .markdown-editor-body {
    grid-template-columns: 1fr;
}
.markdown-editor-body textarea {
    min-height: 430px;
    border: 0;
    border-right: 1px solid #d9e3eb;
    resize: vertical;
}
.markdown-preview {
    min-height: 430px;
    padding: 18px;
    overflow: auto;
    background: #fff;
}
.markdown-preview img,
.markdown-content img {
    max-width: 100%;
    height: auto;
}
.md-image {
    margin: 18px 0;
}
.md-image img {
    display: block;
}
.md-image-wrap-left {
    float: left;
    width: min(42%, 320px);
    margin: 4px 18px 12px 0;
}
.md-image-wrap-right {
    float: right;
    width: min(42%, 320px);
    margin: 4px 0 12px 18px;
}
.md-image-text-first {
    margin-top: 28px;
    text-align: right;
}
.md-image-text-first img {
    margin-left: auto;
}
.md-image-image-first {
    margin-bottom: 28px;
}
.markdown-content::after,
.markdown-preview::after {
    content: "";
    display: block;
    clear: both;
}
.variant-builder {
    display: grid;
    gap: 16px;
}
.discount-box {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: #f8fbfd;
    border: 1px solid #d9e3eb;
}
.variant-builder-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}
.variant-builder-head h3 {
    margin: 0;
    color: #1c3549;
    font-size: 16px;
}
.variant-builder-head button,
.variant-option-row button,
.variant-row button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #cbd8e2;
    background: #fff;
    color: #29445c;
    cursor: pointer;
    font-weight: 900;
}
.variant-builder-head button:hover,
.variant-option-row button:hover,
.variant-row button:hover {
    background: #eaf6ff;
    border-color: #1e73be;
}
.variant-option-list,
.variant-list {
    display: grid;
    gap: 10px;
}
.variant-option-row,
.variant-row {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 14px;
    background: #f8fbfd;
    border: 1px solid #d9e3eb;
}
.variant-option-row {
    grid-template-columns: minmax(120px, .8fr) minmax(220px, 1.4fr) auto auto;
    align-items: end;
}
.variant-check {
    min-height: 40px;
    display: flex !important;
    align-items: center;
    gap: 8px !important;
    white-space: nowrap;
}
.variant-check input[type="checkbox"] {
    flex: 0 0 auto;
}
.variant-required-badge {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: #166534;
    background: #e7f8ee;
    border: 1px solid #bfe8c9;
    font-size: 13px;
    font-weight: 900;
}
.variant-row {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    align-items: end;
    padding-top: 42px;
}
.variant-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    min-height: 30px !important;
    padding: 0 !important;
    border: 0 !important;
    background: #b42318 !important;
    color: #fff !important;
    cursor: pointer;
    font-weight: 900;
}
.variant-row > label {
    min-width: 0;
}
.variant-row > label input {
    width: 100%;
    min-width: 0;
}
.variant-row-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2px;
}
.variant-row-actions .variant-check {
    flex: 0 0 auto;
    margin: 0;
}
.variant-row-actions button {
    flex: 0 0 auto;
}
.variant-combo-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.tag-manager {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: #f8fbfd;
    border: 1px solid #d9e3eb;
}
.tag-manager > strong {
    color: #17324a;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 36px;
    align-items: center;
}
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 0 6px 0 11px;
    color: #17324a;
    background: #eaf6ff;
    border: 1px solid #b7d9f2;
    font-size: 13px;
    font-weight: 900;
}
.tag-chip button {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: #fff;
    color: #385066;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}
.tag-chip button:hover {
    background: #b42318;
    color: #fff;
}
.tag-add {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 8px;
}
.tag-add button {
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 4px;
    background: #1769aa;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}
.tag-add button:hover {
    background: #0f568d;
}
.r2-uploader {
    display: grid;
    gap: 6px;
    padding: 18px;
    color: #385066;
    background: #f8fbfd;
    border: 2px dashed #b8c9d8;
    cursor: pointer;
}
.r2-uploader strong {
    color: #17324a;
}
.r2-uploader span {
    color: #637487;
    line-height: 1.5;
}
.r2-uploader::after {
    content: attr(data-status);
    color: #1769aa;
    font-weight: 900;
}
.r2-uploader.dragover,
.r2-uploader.uploading {
    background: #eaf6ff;
    border-color: #1e73be;
}
.r2-uploader.error::after {
    color: #b42318;
}
.admin-hidden-field {
    display: none !important;
}
.gallery-manager {
    display: grid;
    gap: 12px;
}
.content-image-manager {
    display: grid;
    gap: 12px;
}
.gallery-manager-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.gallery-manager-head strong {
    color: #17324a;
}
.gallery-manager-head span,
.gallery-empty {
    color: #637487;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}
.gallery-thumb {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 8px;
    background: #f8fbfd;
    border: 1px solid #d9e3eb;
}
.gallery-thumb.is-main {
    border-color: #1769aa;
    box-shadow: 0 0 0 2px rgba(23, 105, 170, .16);
}
.gallery-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #eef3f7;
}
.content-image-thumb span {
    color: #385066;
    font-size: 12px;
    font-weight: 900;
    overflow-wrap: anywhere;
}
.gallery-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    border: 0;
    background: #b42318;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}
.gallery-main {
    min-height: 34px;
    border: 1px solid #cbd8e2;
    background: #fff;
    color: #29445c;
    cursor: pointer;
    font-weight: 900;
}
.gallery-thumb.is-main .gallery-main {
    background: #1769aa;
    color: #fff;
    border-color: #1769aa;
}
.gallery-picker {
    width: min(760px, calc(100vw - 28px));
    border: 0;
    padding: 0;
    box-shadow: 0 22px 70px rgba(10, 25, 41, .28);
}
.gallery-picker::backdrop {
    background: rgba(12, 22, 32, .45);
}
.gallery-picker-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #d9e3eb;
}
.gallery-picker-head button {
    min-height: 34px;
    border: 1px solid #cbd8e2;
    background: #fff;
    cursor: pointer;
    font-weight: 900;
}
.gallery-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    max-height: 70vh;
    overflow: auto;
    padding: 16px;
}
.gallery-picker-grid button {
    display: grid;
    gap: 8px;
    padding: 8px;
    border: 1px solid #d9e3eb;
    background: #f8fbfd;
    cursor: pointer;
    font-weight: 900;
}
.gallery-picker-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.admin-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 992px) {
    .top-bar .col-full { grid-template-columns: 1fr; text-align: center; padding-top: 9px; padding-bottom: 9px; }
    .top-bar-right { text-align: center; }
    .main-header { grid-template-columns: 1fr auto; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
    .menu-toggle { display: block; }
    .site-search, .secondary-navigation { grid-column: 1 / -1; }
    .main-navigation .menu { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; }
    .main-navigation .menu .menu {
        position: static;
        display: block;
        min-width: 0;
        box-shadow: none;
    }
    .main-navigation a { padding: 14px; }
    .hero-banner { min-height: 330px; padding: 34px 24px; }
    .woocommerce ul.products, .related.products ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
    .checkout-grid, .admin-grid { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; padding: 16px; }
    .admin-sidebar { position: static; }
    .admin-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-stats, .admin-quick-grid, .admin-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .markdown-editor-body { grid-template-columns: 1fr; }
    .markdown-editor-body textarea { border-right: 0; border-bottom: 1px solid #d9e3eb; }
    .variant-option-row, .variant-row, .variant-combo-fields { grid-template-columns: 1fr; }
    .footer-widgets, .testimonials { grid-template-columns: repeat(2, 1fr); }
    .product-details-wrapper { grid-template-columns: 1fr; gap: 18px; }
    .product_title { font-size: 28px; }
}

@media (max-width: 600px) {
    .col-full { padding-left: 14px; padding-right: 14px; }
    .logo-large { font-size: 24px; }
    .woocommerce ul.products, .related.products ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
    .product__categories { display: none; }
    .woocommerce-loop-product__title { font-size: 13px; }
    .price { font-size: 15px; }
    .add_to_cart_button { width: 100%; padding: 0 10px; }
    .wpced { font-size: 11px; }
    .promo-row, .footer-widgets, .testimonials { grid-template-columns: 1fr; }
    .admin-topbar, .admin-page-head { align-items: stretch; flex-direction: column; }
    .admin-menu, .admin-stats, .admin-quick-grid, .admin-settings-grid, .admin-field-grid { grid-template-columns: 1fr; }
}
