/* Shared presentation layer. Keep availability and transaction states in page logic. */
:root {
    --visual-ink: #20252d;
    --visual-muted: #596270;
    --visual-line: #e2e6eb;
    --visual-surface: #f5f7f9;
    --visual-radius: 6px;
}

.main-content { color: var(--visual-ink); background: #fff; }
.main-content .store-page-title { font-size: 28px; line-height: 1.3; font-weight: 750; }
.store-header { box-shadow: none; border-bottom: 1px solid var(--visual-line); }
.desktop-header { min-height: 80px; }
.desktop-nav-link { font-weight: 600; }
.main-content .btn { border-radius: var(--visual-radius); min-height: 44px; }
.main-content :is(input, select, textarea, button) { letter-spacing: 0; }
.main-content :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* Quiet account surfaces share the same form rhythm, not decorative login cards. */
.main-content .auth-shell { width: min(520px, 100%); margin: 32px auto 56px; }
.main-content .auth-shell:has(#registerForm) { width: min(620px, 100%); }
.main-content .auth-panel { border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.auth-panel .auth-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 0 24px; border-bottom: 1px solid var(--visual-line); }
.auth-panel .auth-panel__title { font-size: 28px; font-weight: 650; line-height: 1.4; }
.auth-panel .auth-panel__body { padding: 28px 0 0; }
.auth-panel .auth-panel__tabs { border: 0; border-bottom: 1px solid var(--visual-line); border-radius: 0; margin-bottom: 24px; gap: 24px; }
.auth-panel .auth-panel__tab { background: #fff; color: var(--visual-muted); border-bottom: 2px solid transparent; font-weight: 500; }
.auth-panel .auth-panel__tab.is-active { color: var(--primary); background: #fff; border-bottom-color: var(--primary); font-weight: 650; }
.auth-panel .auth-form, .auth-panel .auth-form-grid { gap: 20px; }
.auth-panel :is(.form-input, .register-input, .reset-input) { background: #fff; border: 1px solid #cbd3dd; border-radius: 6px; min-height: 48px; font-size: 16px; }
.auth-panel :is(.form-label, .register-field label, .reset-field label) { font-weight: 550; font-size: 14px; margin-bottom: 8px; }
.auth-panel .auth-panel__submit { margin-top: 4px; min-height: 48px; font-weight: 650; }
.auth-panel .auth-divider { margin-block: 24px; font-size: 12px; }
.auth-panel .auth-panel__social { min-height: 48px; font-weight: 550; border-radius: 6px; }
.auth-panel .auth-panel__footer { margin-top: 28px; padding-top: 20px; font-size: 14px; }
.auth-panel .auth-form__aside { margin-top: 16px; font-size: 14px; }
.auth-panel .auth-password-tools { background: var(--visual-surface); border: 0; border-radius: 6px; padding: 16px; }
.desktop-header .desktop-nav-link { font-size: 14px; font-weight: 550; }
.desktop-header .desktop-nav-link.is-current { color: var(--primary); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.desktop-header .header-search-form { border-radius: 6px; background: #f6f8fa; box-shadow: none; }
.store-header :is(.header-cart-icon svg, .mobile-icon-button > svg) { width: 22px; height: 22px; stroke-width: 1.75; }
.store-header .mobile-icon-button { min-width: 44px; min-height: 44px; border-radius: 6px; }
@media (max-width: 640px) {
    .main-content .auth-shell { margin-block: 20px 40px; }
    .auth-panel .auth-panel__title { font-size: 24px; }
    .auth-panel .auth-panel__header { padding-bottom: 20px; }
    .auth-panel .auth-panel__body { padding-top: 24px; }
}

/* Hero layout is owned by the original homepage template. */
.homepage-v2 { gap: 48px; overflow: visible; }
.homepage-v2 .homepage-v2__section-head { align-items: center; margin-bottom: 20px; }
.homepage-v2 .homepage-v2__section-head h2 { font-size: 23px; }
.homepage-v2 .homepage-v2__category-card {
    display: grid;
    grid-template-rows: auto minmax(70px, auto);
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--visual-ink);
    overflow: visible;
}
.homepage-v2 .homepage-v2__category-card::after { content: none; }
.homepage-v2 .homepage-v2__category-image {
    position: static;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: contain;
    border-radius: var(--visual-radius);
    background: var(--visual-surface);
}
.homepage-v2 .homepage-v2__category-fallback { position: static; aspect-ratio: 4 / 3; border-radius: var(--visual-radius); }
.homepage-v2 .homepage-v2__category-copy { padding: 12px 0 0; }
.homepage-v2 .homepage-v2__category-copy h3 { font-size: 16px; }
.homepage-v2 .homepage-v2__category-copy span { color: var(--visual-muted); font-size: 13px; }
.homepage-v2 .homepage-v2__benefit-grid { gap: 24px; padding: 24px 0; border-block: 1px solid var(--visual-line); }
.homepage-v2 .homepage-v2__benefit { padding: 0; border: 0; border-radius: 0; }
.homepage-v2 .homepage-v2__benefit-icon { background: none; justify-content: flex-start; margin-bottom: 8px; }

/* One product card treatment for home, listings and related products. */
.main-content .product-card { border: 0; border-radius: 0; box-shadow: none; }
.main-content .product-card__media { border-radius: var(--visual-radius); background: var(--visual-surface); }
.main-content .product-card__media img { object-fit: contain; }
.main-content .product-card__body { padding: 16px 0 0; }
.main-content .product-card__title { font-size: 16px; line-height: 1.5; }
.main-content .product-price__current { color: var(--visual-ink); font-size: 20px; font-variant-numeric: tabular-nums; }
.main-content .product-card__body > .btn {
    background: #fff;
    border: 1px solid var(--visual-line);
    color: var(--primary);
    box-shadow: none;
}
.main-content .product-card__body > .btn:hover { background: var(--primary-soft); border-color: var(--primary); }
.main-content .product-detail { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; }
.product-detail .gallery-main { border: 0; background: var(--visual-surface); }
.product-detail .gallery-main img, .product-detail .gallery-thumb img { object-fit: contain; }
.product-detail .product-panel { padding: 0; border: 0; border-radius: 0; }
.product-detail .product-title { color: var(--visual-ink); font-size: 28px; }
.product-detail .price-current { color: var(--primary); font-size: 30px; }
.product-detail .price-block { padding-block: 12px 20px; border-bottom: 1px solid var(--visual-line); }
.product-detail .product-meta li { border-color: var(--visual-line); padding-block: 6px; }
.product-detail .option-value-btn { border-radius: var(--visual-radius); }
.product-detail .product-description h2, .related-section h2 { color: var(--visual-ink); font-size: 20px; }

/* Order navigation shares the primary account action treatment. */
.main-content a.order-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.55rem 1rem;
    border: 1px solid var(--primary);
    border-radius: 6px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.main-content a.order-nav-link:hover { text-decoration: underline; }
.main-content a.order-nav-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* Checkout: unframed sections, with borders reserved for selectable controls. */
.checkout-page .checkout-heading h1 { font-size: 28px; letter-spacing: 0; }
.checkout-page .checkout-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
.checkout-page .checkout-main { gap: 24px; }
.checkout-page .checkout-section { border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
.checkout-page .section-header { background: #fff; padding: 0 0 16px; align-items: center; }
.checkout-page .section-header h2 { font-size: 18px; }
.checkout-page .section-body { padding: 20px 0 8px; gap: 16px; }
.checkout-page .section-state { min-width: 0; padding: 4px 10px; }
.checkout-page .checkout-section.is-error .section-header { border-bottom-color: #b91c1c; }
.checkout-page .form-label { font-size: 14px; margin-bottom: 6px; }
.checkout-page .form-input { min-height: 44px; border-radius: var(--visual-radius); }
.checkout-page .method-card { padding: 14px; border-radius: var(--visual-radius); box-shadow: none; }
.checkout-page .method-card-title { font-size: 15px; }
.checkout-page .method-card-price { font-size: 15px; font-variant-numeric: tabular-nums; }
.checkout-page .discount-panel, .checkout-page .confirm-panel { border: 0; background: none; padding: 0; border-radius: 0; }
.checkout-page .summary-card { border-radius: var(--visual-radius); box-shadow: none; border-color: var(--visual-line); }
.checkout-page .summary-header { background: var(--visual-surface); }
.checkout-page .summary-header h2 { font-size: 18px; }
.checkout-page .summary-footer-total strong { color: var(--primary); font-variant-numeric: tabular-nums; }

@media (max-width: 1080px) {
    .checkout-page .checkout-layout { gap: 24px; grid-template-columns: minmax(0, 1fr) 300px; }
    .main-content .product-detail { gap: 28px; }
}
@media (max-width: 960px) {
    .checkout-page .checkout-layout, .main-content .product-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .homepage-v2 { gap: 32px; }
    .homepage-v2 .homepage-v2__section-head { flex-direction: row; align-items: center; }
    .homepage-v2 .homepage-v2__section-head h2 { font-size: 20px; }
    .homepage-v2 .homepage-v2__category-copy h3 { font-size: 14px; }
    .main-content .store-page-title, .product-detail .product-title, .checkout-page .checkout-heading h1 { font-size: 24px; }
    .main-content .product-card__title { font-size: 14px; }
    .main-content .product-price__current { font-size: 18px; }
    .checkout-page .section-header h2 { font-size: 16px; }
    .checkout-page .summary-footer { box-shadow: 0 -2px 12px rgb(0 0 0 / 0.05); }
}
@media (prefers-reduced-motion: reduce) {
    .main-content .product-card__media img { transition: none; }
    .main-content .product-card:hover .product-card__media img { transform: none; }
}
