/* Phase 5 only: native controls, focus, validation and modal geometry. */
[hidden] { display: none !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.skip-link { position:fixed; top:8px; left:8px; z-index:100000; transform:translateY(-200%); padding:12px; background:#fff; color:#172554; }
.skip-link:focus { transform:none; }
:focus-visible { outline:3px solid #1d4ed8 !important; outline-offset:3px; }
.brand-home,.cart-trigger,.nav-link,.nav-pill,.mega-item,.category-card,.sub-cat-circle,.trash-btn,.qty-btn { font:inherit; color:inherit; cursor:pointer; }
.brand-home { background:none; border:0; padding:0; }
.brand-home .brand-logo-header { display:block; }
.nav-link,.mega-item { border:0; background:transparent; }
.mega-item { visibility:inherit; transition-property:color,background-color; }
.section-title h2 { font:inherit; margin:0; }
.card { position:relative; }
.product-link { color:inherit; text-decoration:none; }
.product-link::after { content:''; position:absolute; inset:0; z-index:1; }
.card .add-btn { position:relative; z-index:2; }
.card:focus-within { outline:3px solid #1d4ed8; outline-offset:2px; }
.price-original { color:#526074 !important; }
.modal-discount-badge { background:#9d174d; color:#fff; }
.category-sub { color:#334155; }
.nav-link.active { color:#9d174d !important; }
.chk-input::placeholder { color:#526074; opacity:1; }
#discountBadge > span { background:#fef08a !important; color:#332400 !important; }
.modal-thumb img { width:100%; height:100%; object-fit:cover; }
.modal-overlay { z-index:1050; } /* Above the header; below the existing drawers. */
.attribute-tag strong { color:#9d174d; }
.modal-thumb { padding:0; }
.payment-controls { border:0; padding:0; min-width:0; margin:10px 0; }
.payment-tab { display:flex; align-items:center; justify-content:center; gap:8px; }
.payment-tab input { accent-color:#1d4ed8; width:18px; height:18px; flex-shrink:0; }
.field-error { color:#9f1239; font-size:13px; margin:5px 0 12px; }
[aria-invalid="true"] { border-color:#be123c; }
#checkoutErrors { color:#881337; background:#fff1f2; border:1px solid #be123c; padding:14px; margin-bottom:20px; }
#checkoutErrors a { color:inherit; text-decoration:underline; }
.nav-item-wrapper:focus-within:not(.keyboard-closed) .mega-menu,.nav-item-wrapper.keyboard-open .mega-menu { opacity:1; visibility:visible; pointer-events:auto; transform:translateX(-50%) translateY(0); }
.nav-item-wrapper.keyboard-closed .mega-menu { opacity:0; visibility:hidden; pointer-events:none; }
@media(max-width:767px) {
    #productModal .modal-window { height:min(92dvh,820px); max-height:calc(100dvh - 16px); width:calc(100% - 16px); margin:auto; }
    #productModal .modal-split-layout { display:flex; flex-direction:column; height:100%; min-height:0; overflow:hidden; }
    #productModal .modal-images-col { display:flex; flex-direction:column; flex:0 1 30%; min-height:80px; max-height:30%; padding:12px 50px 4px; overflow:hidden; }
    #productModal .modal-image-container-fixed { flex:1 1 0; height:auto; min-height:0; margin:0; }
    #productModal .modal-thumbnails { flex:0 0 36px; height:36px; margin-top:4px; }
    #productModal .modal-thumb { width:36px; height:36px; }
    #productModal .modal-main-img { height:100%; max-height:100%; object-fit:contain; }
    #productModal .modal-details-col { flex:1 1 0; min-height:0; height:auto; overflow:hidden; padding:12px 16px 0; }
    #productModal .modal-details-scroll { flex:1 1 0; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding-bottom:12px; }
    #productModal .modal-actions { position:static; inset:auto; z-index:auto; flex:0 0 auto; margin:0; box-shadow:none; gap:10px; padding:10px 0 max(12px,env(safe-area-inset-bottom)); }
    #productModal .modal-price-box,#productModal .modal-stock-badge { position:static; }
}
