/**
 * J5 Hype Store — 與「J5糖果店_全站整合版.html」相同的基礎元件與版面變數
 */
:root {
    --bg-cement: #E4E4E7;
    --pure-white: #FFFFFF;
    --pure-black: #000000;
    --hype-orange: #FF4500;
    --retro-green: #00E676;
    --border-thick: 4px;
}

body.j5-hype-store {
    background-color: var(--bg-cement);
    color: var(--pure-black);
    font-family: 'Noto Sans TC', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

.font-street { font-family: 'Chakra Petch', sans-serif; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.noise-overlay {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.25;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.tape-yellow {
    background: repeating-linear-gradient(-45deg, #FFD700, #FFD700 15px, var(--pure-black) 15px, var(--pure-black) 30px);
    border: 2px solid var(--pure-black); box-shadow: 2px 2px 0px rgba(0,0,0,0.5); z-index: 20;
}
.tape-black {
    background: var(--pure-black); color: var(--pure-white); font-weight: 900; font-family: 'Chakra Petch', monospace;
    border: 2px solid var(--pure-white); box-shadow: 3px 3px 0px rgba(0,0,0,0.8); z-index: 20; text-transform: uppercase;
}
.barcode {
    background: repeating-linear-gradient(to right, var(--pure-black), var(--pure-black) 2px, transparent 2px, transparent 4px, var(--pure-black) 4px, var(--pure-black) 5px, transparent 5px, transparent 8px, var(--pure-black) 8px, var(--pure-black) 12px, transparent 12px, transparent 14px, var(--pure-black) 14px, var(--pure-black) 18px);
    height: 24px;
}

.brutal-card {
    background-color: var(--pure-white); border: var(--border-thick) solid var(--pure-black);
    border-radius: 12px; box-shadow: 6px 6px 0px var(--pure-black);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); position: relative; z-index: 10;
}
.brutal-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0px var(--pure-black); }

.brutal-btn {
    border: var(--border-thick) solid var(--pure-black); border-radius: 9999px;
    box-shadow: 4px 4px 0px var(--pure-black); font-weight: 900; text-transform: uppercase;
    transition: all 0.1s ease-in-out; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    position: relative; z-index: 10;
}
.brutal-btn:active { transform: translate(4px, 4px) !important; box-shadow: 0px 0px 0px var(--pure-black) !important; }

.sticker-tag {
    display: inline-block; background-color: var(--pure-black); color: var(--pure-white);
    border: 2px solid var(--pure-black); padding: 4px 12px; font-weight: 900;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.5); transform: rotate(-2deg); text-transform: uppercase;
}

.input-field {
    background-color: var(--pure-white); border: var(--border-thick) solid var(--pure-black);
    color: var(--pure-black); padding: 14px; width: 100%; font-size: 16px; font-weight: 700; outline: none; transition: all 0.2s;
}
.input-field:focus { box-shadow: 4px 4px 0px var(--hype-orange); transform: translate(-2px, -2px); }

/* Placeholder style: scope to custom input class only. */
input.input-field::placeholder,
textarea.input-field::placeholder {
    color: #52525b !important;
    opacity: 1 !important;
}
input.input-field::-webkit-input-placeholder,
textarea.input-field::-webkit-input-placeholder {
    color: #52525b !important;
    opacity: 1 !important;
}
input.input-field::-moz-placeholder,
textarea.input-field::-moz-placeholder {
    color: #52525b !important;
    opacity: 1 !important;
}

/* My account: login/register error & info (native Woo styles may be dequeued). */
.missvape-account-auth .missvape-account-notices .woocommerce-error,
.missvape-account-auth .missvape-account-notices .woocommerce-message,
.missvape-account-auth .missvape-account-notices .woocommerce-info,
.missvape-account-auth .missvape-account-notices .woocommerce-notice {
    list-style: none;
    margin: 0 0 12px;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 14px;
    border: 3px solid var(--pure-black);
    border-radius: 8px;
    box-shadow: 4px 4px 0 var(--pure-black);
}
.missvape-account-auth .missvape-account-notices .woocommerce-error {
    background: #fee2e2;
    color: var(--pure-black);
}
.missvape-account-auth .missvape-account-notices .woocommerce-message,
.missvape-account-auth .missvape-account-notices .woocommerce-info,
.missvape-account-auth .missvape-account-notices .woocommerce-notice--success {
    background: #dcfce7;
    color: var(--pure-black);
}

/* Checkout submit: remove WooCommerce white blockUI overlay/mask. */
body.j5-hype-store .blockUI.blockOverlay,
body.j5-hype-store .blockUI.blockMsg,
body.j5-hype-store .woocommerce .blockUI.blockOverlay,
body.j5-hype-store .woocommerce .blockUI.blockMsg {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

.marquee-container {
    overflow: hidden; white-space: nowrap; border-bottom: var(--border-thick) solid var(--pure-black);
    background-color: var(--pure-black); color: var(--pure-white); position: relative; z-index: 40;
}
.marquee-content {
    display: inline-block; animation: j5-marquee 15s linear infinite; font-weight: 900; font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
}
@keyframes j5-marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

.custom-scrollbar { overflow-y: auto; padding-right: 4px; }
.custom-scrollbar::-webkit-scrollbar { width: 8px; }
.custom-scrollbar::-webkit-scrollbar-track { background: var(--bg-cement); border-left: 2px solid var(--pure-black); }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--pure-black); border: 2px solid var(--bg-cement); }

.horizontal-scroll-container {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth;
    padding-bottom: 16px; padding-right: 16px; padding-left: 4px; padding-top: 4px;
}
.horizontal-scroll-container::-webkit-scrollbar { display: none; }

body.j5-hype-store .sidebar {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-100%); z-index: 160;
}
body.j5-hype-store .sidebar.open { transform: translateX(0); }
body.j5-hype-store .overlay {
    transition: opacity 0.3s ease-in-out; opacity: 0; pointer-events: none; z-index: 150;
}
body.j5-hype-store .overlay.open { opacity: 1; pointer-events: auto; }

.pb-safe { padding-bottom: calc(env(safe-area-inset-bottom) + 80px); }

body.j5-hype-store .j5-woo-wrap .main-content-wrapper {
    padding-bottom: calc(env(safe-area-inset-bottom) + 100px);
    min-height: 50vh;
    position: relative;
    z-index: 10;
}
@media (min-width: 768px) {
    body.j5-hype-store .j5-woo-wrap .main-content-wrapper { padding-bottom: 2rem; }
}

/* J5糖果店 HTML 參考：規格 SKU 按鈕、數量快捷鍵選中 */
.sku-btn {
    border: 2px solid var(--pure-black);
    background: var(--bg-cement);
    color: var(--pure-black);
    font-weight: 700;
    transition: all 0.1s ease;
    cursor: pointer;
}
.sku-btn:hover {
    background: var(--pure-white);
    box-shadow: 2px 2px 0 var(--pure-black);
    transform: translate(-1px, -1px);
}
.sku-btn.selected {
    background-color: var(--pure-black);
    color: var(--pure-white);
    box-shadow: 2px 2px 0 var(--hype-orange);
    transform: translate(-1px, -1px);
}
.mv-qty-chip.selected {
    background: var(--hype-orange) !important;
    color: #fff !important;
    border: 2px solid var(--pure-black) !important;
    box-shadow: 2px 2px 0 var(--pure-black);
}

/* 單品頁：主圖區（brutal 方塊內嵌 Woo 畫廊） */
body.j5-hype-store .j5-product-gallery-brutal .woocommerce-product-gallery {
    width: 100% !important;
    max-width: 100%;
    margin: 0;
    opacity: 1 !important;
}
body.j5-hype-store .j5-product-gallery-brutal .woocommerce-product-gallery__wrapper {
    margin: 0;
}
body.j5-hype-store .j5-product-gallery-brutal .woocommerce-product-gallery__image,
body.j5-hype-store .j5-product-gallery-brutal .flex-viewport {
    background: transparent;
}
body.j5-hype-store .j5-product-gallery-brutal .woocommerce-product-gallery__image img {
    max-height: min(70vw, 480px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
}
body.j5-hype-store .j5-product-gallery-brutal .flex-control-thumbs {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
body.j5-hype-store .j5-product-gallery-brutal .flex-control-thumbs li {
    width: 4.5rem !important;
    float: none !important;
}
body.j5-hype-store .j5-product-gallery-brutal .flex-control-thumbs img {
    border: 2px solid var(--pure-black);
    opacity: 1;
}

/* 會員子頁時間軸（與 HTML 物流追蹤一致） */
.j5-timeline-item {
    position: relative;
    padding-left: 1.5rem;
    padding-bottom: 1.5rem;
    border-left: 3px solid var(--pure-black);
}
.j5-timeline-item:last-child {
    border-left-color: transparent;
}
.j5-timeline-dot {
    position: absolute;
    left: -0.45rem;
    top: 0.15rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    border: 2px solid var(--pure-black);
    background: var(--retro-green);
}
.j5-timeline-item.is-past .j5-timeline-dot {
    background: var(--pure-black);
}

.j5-stock-dot {
    background: var(--hype-orange);
}
.j5-stock-dot-warn {
    background: #dc2626 !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 單品頁自訂數量按鈕時，隱藏 Woo 內建 quantity 欄位（仍保留於表單供結帳使用） */
body.j5-hype-store.single-product .j5-brutal-single form.cart .quantity {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

/* 首頁 hash 區塊：#home #shop #cart #member — 站內「潮人帳戶」（與 /my-account/ 儀表板視覺一致） */
#j5-spa-root .j5-hub-member-hero-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 12px;
    border: 4px solid var(--hype-orange);
    background-color: #000000;
    color: #ffffff;
    box-shadow: 8px 8px 0 var(--hype-orange);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#j5-spa-root .j5-hub-member-hero-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0 var(--hype-orange);
}
#j5-spa-root .j5-hub-member-hero-tape {
    position: absolute;
    right: 0;
    top: 0;
    width: 8rem;
    height: 8rem;
    z-index: 20;
    pointer-events: none;
    transform: rotate(45deg) translateX(4rem) translateY(-2rem);
}
#j5-spa-root .j5-hub-member-hero-inner {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}
@media (min-width: 768px) {
    #j5-spa-root .j5-hub-member-hero-inner {
        flex-direction: row;
    }
}
#j5-spa-root .j5-hub-member-hero-avatar {
    flex-shrink: 0;
    width: 6rem;
    height: 6rem;
    border-radius: 9999px;
    border: 4px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    line-height: 1;
    background-color: #000000;
    box-shadow: 0 0 20px var(--hype-orange);
}
#j5-spa-root .j5-hub-member-hero-text {
    flex: 1;
    min-width: 0;
    text-align: center;
}
@media (min-width: 768px) {
    #j5-spa-root .j5-hub-member-hero-text {
        text-align: left;
    }
}
#j5-spa-root .j5-hub-member-hero-name {
    margin: 0 0 0.25rem;
    font-size: 1.875rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.15;
}
#j5-spa-root .j5-hub-member-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
@media (min-width: 768px) {
    #j5-spa-root .j5-hub-member-hero-meta {
        justify-content: flex-start;
    }
}
#j5-spa-root .j5-hub-member-hero-badge {
    display: inline-block;
    background-color: var(--hype-orange);
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 900;
    border: 2px solid #ffffff;
}
#j5-spa-root .j5-hub-member-hero-points {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
}
#j5-spa-root .j5-hub-member-hero-tagline {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--hype-orange);
}
/* 專屬指揮中心網格：與整合版 HTML 相同（brutal-card + Tailwind 工具類），僅重置 button 預設 */
#j5-spa-root .j5-hub-member-actions-grid > button.brutal-card {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}
#j5-spa-root .j5-hub-member-actions-grid > button.brutal-card:focus-visible {
    outline: 3px solid var(--hype-orange);
    outline-offset: 3px;
}

#j5-spa-root .j5-spa-page[hidden] {
    display: none !important;
}
#j5-spa-root .j5-spa-page.is-active:not([hidden]) {
    display: block;
    animation: j5-spa-fade 0.28s ease-out;
}
@keyframes j5-spa-fade {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* 頂欄／側欄分類與 #shop 商品網格聯動 */
#j5-hub-cat-nav a.j5-cat-nav-link.j5-cat-active {
    background: var(--bg-cement);
    border: 2px solid var(--pure-black);
    color: var(--hype-orange);
    box-shadow: 3px 3px 0 var(--pure-black);
}
#j5-header-cat-row a.j5-cat-nav-link.j5-cat-active {
    color: var(--hype-orange);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}
