:root {
    --cyan: #74def4;
    --cyan-deep: #16aac7;
    --ink: #172f3d;
    --muted: #66727e;
    --pink: #ff5d83;
    --green: #25b981;
    --purple: #7b6cff;
    --line: rgba(24, 112, 135, .12);
    --panel: rgba(255, 255, 255, .68);
}

html { min-height: 100%; }

body.storefront-body {
    min-height: 100vh;
    color: var(--ink);
    background-color: #20b0cc;
    background-image: linear-gradient(180deg, rgba(20, 174, 204, .2), rgba(255, 255, 255, .62)), var(--store-bg);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    font-family: HarmonyOS, "Microsoft YaHei", sans-serif !important;
}

a { color: inherit; }
a:hover { color: inherit; text-decoration: none; }

.store-navbar {
    position: relative;
    z-index: 20;
    min-height: 72px;
    background: rgba(220, 247, 250, .91);
    border-bottom: 1px solid rgba(24, 112, 135, .08);
    backdrop-filter: blur(12px);
}

.store-navbar-inner {
    width: min(1600px, calc(100% - 40px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.store-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #60c397;
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.store-brand img { width: 31px; height: 31px; border-radius: 9px; object-fit: cover; }
.store-nav-links { display: flex; align-items: center; gap: 4px; }
.store-nav-links a { padding: 10px 8px; color: #64717a; font-size: 16px; font-weight: 600; }
.store-nav-links a:hover { color: #129bc0; }
.store-nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.store-search {
    width: 255px;
    height: 40px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid rgba(35, 117, 137, .24);
    border-radius: 13px;
    background: rgba(255, 255, 255, .24);
    color: #52636c;
}

.store-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.nav-outline, .nav-primary { padding: 7px 11px; border-radius: 12px; font-size: 14px; white-space: nowrap; }
.nav-outline { border: 1px solid #81949d; color: #53646c; background: rgba(255,255,255,.22); }
.nav-primary { border: 1px solid #2979ff; color: white; background: #2979ff; }
.store-menu-button { display: none; margin-left: auto; border: 0; background: transparent; font-size: 22px; color: #41616e; }

.store-wide { width: min(1250px, calc(100% - 32px)); margin: 13px auto 26px; }
.store-container { width: min(1080px, calc(100% - 32px)); margin: 13px auto 26px; }
.glass-panel {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 19px;
    background: var(--panel);
    box-shadow: 0 14px 34px rgba(46, 97, 91, .14);
    backdrop-filter: blur(16px) saturate(115%);
    -webkit-backdrop-filter: blur(16px) saturate(115%);
}
.glass-panel + .glass-panel { margin-top: 18px; }
.panel-heading { min-height: 48px; display: flex; align-items: center; gap: 7px; padding: 0 17px; font-size: 15px; font-weight: 700; border-bottom: 1px solid rgba(255, 255, 255, .58); background: rgba(255, 255, 255, .12); }
.notice-content { min-height: 164px; padding: 15px 17px 18px; font-size: 12px; font-weight: 600; line-height: 1.5; }
.notice-content p:last-child { margin-bottom: 0; }
.catalog-content { padding: 13px 16px 19px; }
.category-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }

.category-tab {
    height: 31px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    border: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .68);
    background: rgba(255, 255, 255, .48);
    box-shadow: 0 4px 12px rgba(28, 129, 151, .19);
    color: #657079;
    font-size: 12px;
    transition: transform .16s ease, background .16s ease, color .16s ease;
}

.category-tab:hover { transform: translateY(-1px); }
.category-tab.active { color: white; background: linear-gradient(135deg, #7767ff, #b26dff); }
.category-tab img { width: 19px; height: 19px; border-radius: 3px; object-fit: contain; }
.category-tab i { width: 22px; text-align: center; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product-card { min-width: 0; min-height: 308px; display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 2px 0 rgba(255,255,255,.4); transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(33, 120, 139, .20); }
.product-card.is-sold-out { opacity: .66; }
.product-cover-wrap { height: 164px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; border-bottom: 1px solid #f2f4f5; }
.product-cover { width: 100%; height: 100%; object-fit: contain; }
.product-card-body { min-height: 144px; display: flex; flex-direction: column; padding: 11px 13px; }
.product-tags { min-height: 25px; display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.tag { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border-radius: 999px; font-size: 11px; line-height: 1.2; }
.tag-green { color: #18a56d; background: #dcf8eb; border: 1px solid #b8edd6; }
.tag-purple { color: #6863f2; background: #e4e2ff; border: 1px solid #d4d0ff; }
.product-card h3 { margin: 0; color: #20262b; font-size: 13px; font-weight: 700; line-height: 1.42; }
.product-card-spacer { flex: 1; }
.product-price, .item-price { color: var(--pink); font-weight: 800; }
.product-price { margin: 5px 0 3px; font-size: 18px; }
.product-meta { display: flex; justify-content: space-between; color: #687486; font-size: 11px; }
.empty-state { padding: 70px 20px; text-align: center; color: #57717c; font-size: 18px; }

.item-main-panel { padding: 16px; }
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(430px, 1fr); gap: 26px; align-items: stretch; }
.item-cover-card { min-height: 328px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 14px; background: white; }
.item-cover-card img { width: 100%; height: 100%; max-height: 344px; object-fit: contain; }
.item-purchase { padding: 0 2px; }
.item-purchase h1 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.item-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.share-button { width: 28px; height: 28px; border: 0; border-radius: 8px; color: #6e70f8; background: #d9d6ff; }
.item-price { margin-bottom: 6px; font-size: 20px; }
.purchase-form { display: grid; gap: 8px; }
.form-row-clean label { display: block; margin: 0 0 4px; color: #58717c; font-size: 12px; }
.form-row-clean .form-control { height: 34px; padding: 6px 10px; border-color: rgba(38, 136, 158, .16); background: rgba(255,255,255,.13); border-radius: 6px; box-shadow: none; font-size: 12px; }
.form-row-clean .form-control:focus { border-color: #43bdd6; background: rgba(255,255,255,.42); box-shadow: 0 0 0 3px rgba(67,189,214,.12); }
.quantity-box { width: 136px; height: 38px; display: grid; grid-template-columns: 38px 1fr 38px; padding: 4px; border-radius: 8px; background: #ffd1de; box-shadow: 0 5px 12px rgba(255, 93, 131, .18); }
.quantity-box button { border: 0; color: white; background: #ff5d8e; font-size: 17px; font-weight: 700; }
.quantity-box button:first-child { border-radius: 5px 0 0 5px; }
.quantity-box button:last-child { border-radius: 0 5px 5px 0; }
.quantity-box input { width: 100%; border: 0; outline: 0; text-align: center; color: #ff4f83; background: white; font-weight: 700; }
.quantity-box input::-webkit-outer-spin-button, .quantity-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.captcha-box { width: 245px; display: flex; }
.captcha-box input { border-radius: 6px 0 0 6px !important; }
.captcha-box img { width: 80px; height: 34px; object-fit: cover; cursor: pointer; border: 1px solid #ff71ac; border-radius: 0 5px 5px 0; background: white; }
.pay-amount-row { color: #5d6d75; font-size: 12px; }
.pay-amount-row span { color: var(--pink); font-size: 16px; font-weight: 800; }
.login-required { padding: 12px; border-radius: 10px; background: rgba(255,255,255,.38); text-align: center; }
.login-required a { color: #2876f5; }
.pay-panel { padding: 8px; border: 1px solid rgba(255,255,255,.72); border-radius: 14px; background: rgba(255,255,255,.34); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.pay-panel-title { padding-bottom: 6px; margin-bottom: 7px; color: #806bff; font-size: 12px; font-weight: 700; border-bottom: 1px dashed rgba(48, 137, 158, .18); }
.pay-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-method { min-height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 0; border-radius: 10px; color: #667078; background: rgba(245, 254, 255, .78); font-size: 12px; font-weight: 700; }
.pay-method:hover { color: #1589aa; background: white; }
.pay-method img { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; }
.item-detail-panel .panel-heading { min-height: 62px; background: rgba(255, 255, 255, .16); }
.item-detail-panel .panel-heading i { color: #856cf5; }
.item-description { min-height: 150px; padding: 14px 19px 22px; color: #273b44; font-size: 13px; font-weight: 600; line-height: 1.75; }
.item-description p:last-child { margin-bottom: 0; }
.item-description img { max-width: 100%; height: auto; border-radius: 12px; }

@media (max-width: 1350px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .store-search { width: 210px; }
}

@media (max-width: 992px) {
    .store-navbar-inner { flex-wrap: wrap; padding: 12px 0; }
    .store-menu-button { display: block; }
    .store-nav-links, .store-nav-actions { display: none; width: 100%; }
    .store-nav-links.is-open, .store-nav-actions.is-open { display: flex; }
    .store-nav-links { order: 5; }
    .store-nav-actions { order: 6; margin-left: 0; flex-wrap: wrap; }
    .store-search { width: 100%; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .item-layout { grid-template-columns: 1fr; }
    .item-cover-card { min-height: 360px; }
}

@media (max-width: 640px) {
    .store-navbar-inner, .store-container { width: calc(100% - 24px); }
    .store-brand { max-width: calc(100% - 52px); font-size: 17px; }
    .store-brand span { overflow: hidden; text-overflow: ellipsis; }
    .store-wide { width: calc(100% - 16px); margin-top: 10px; }
    .glass-panel { border-radius: 18px; }
    .glass-panel + .glass-panel { margin-top: 14px; }
    .panel-heading { min-height: 58px; padding: 0 17px; font-size: 18px; }
    .notice-content { min-height: 0; padding: 17px; font-size: 14px; line-height: 1.65; }
    .catalog-content { padding: 15px 12px 20px; }
    .category-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 2px 0 8px; }
    .category-tab { flex: 0 0 auto; height: 38px; padding: 0 13px; font-size: 14px; }
    .product-grid { grid-template-columns: 1fr; gap: 14px; }
    .product-card { min-height: 0; }
    .product-cover-wrap { height: auto; aspect-ratio: 1.92 / 1; }
    .product-card-body { min-height: 170px; padding: 14px 15px; }
    .product-card h3 { font-size: 17px; }
    .item-page { margin-top: 10px; }
    .item-main-panel { padding: 12px; }
    .item-layout { gap: 17px; }
    .item-cover-card { min-height: 0; aspect-ratio: 1.92 / 1; border-radius: 14px; }
    .item-cover-card img { max-height: none; }
    .item-purchase h1 { font-size: 22px; line-height: 1.35; }
    .item-price { font-size: 26px; }
    .captcha-box { width: 100%; }
    .item-description { padding: 16px; font-size: 14px; }
}
