/* ร้านค้า + บัญชีลูกค้า — ต่อยอดจาก landing-home.css (ใช้ token สี/ฟอนต์ชุดเดียวกัน) */

.shop-body {
    background: var(--bg-alt);
    padding-top: 68px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.shop-body main {
    flex: 1 0 auto;
}

/* ---------- nav ---------- */

.shop-nav .landing-links a.active {
    color: var(--accent);
    font-weight: 600;
}

.shop-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 500;
}

.shop-icon-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.shop-icon-link .badge-count {
    position: absolute;
    top: 2px;
    left: 24px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.shop-btn,
.shop-btn-ghost,
.shop-btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 600;
    font-size: 0.97rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.shop-btn {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.shop-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.32);
}

.shop-btn-ghost {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.shop-btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.shop-btn-soft {
    background: var(--accent-soft);
    color: var(--accent);
}

.shop-btn-sm {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.88rem;
}

.shop-btn-block {
    width: 100%;
}

.shop-btn-danger {
    background: #fff;
    border-color: #fecaca;
    color: #dc2626;
}

/* ---------- header / hero ---------- */

.shop-hero {
    padding: 44px 0 26px;
    background:
        radial-gradient(circle at 85% 0%, rgba(124, 58, 237, 0.12), transparent 45%),
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.12), transparent 40%),
        #fff;
    border-bottom: 1px solid var(--line);
}

.shop-hero h1 {
    margin: 6px 0 8px;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    line-height: 1.25;
}

.shop-hero p {
    margin: 0;
    max-width: 640px;
    color: var(--muted);
}

.shop-eyebrow {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
}

.shop-search {
    display: flex;
    gap: 8px;
    margin-top: 22px;
    max-width: 640px;
}

.shop-search input {
    flex: 1;
    min-width: 0;
}

/* ---------- forms ---------- */

.shop-input,
.shop-body input[type="text"],
.shop-body input[type="email"],
.shop-body input[type="password"],
.shop-body input[type="search"],
.shop-body input[type="tel"],
.shop-body select,
.shop-body textarea {
    width: 100%;
    min-height: 44px;
    padding: 9px 13px;
    border: 1px solid #d5dbe6;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 0.97rem;
}

.shop-body textarea {
    min-height: 90px;
    resize: vertical;
}

.shop-body input:focus,
.shop-body select:focus,
.shop-body textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.shop-field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.shop-field label {
    font-size: 0.92rem;
    font-weight: 600;
}

.shop-field .hint {
    color: var(--muted);
    font-size: 0.84rem;
}

.field-validation-error,
.shop-error-text {
    color: #dc2626;
    font-size: 0.85rem;
}

.input-validation-error {
    border-color: #f87171 !important;
}

.shop-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.93rem;
}

.shop-check input {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    accent-color: var(--accent);
}

.shop-check a {
    color: var(--accent);
    text-decoration: underline;
}

/* ---------- alerts ---------- */

.shop-alert {
    margin: 0 0 18px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-size: 0.95rem;
}

.shop-alert.success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.shop-alert.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.shop-alert.info {
    background: var(--accent-soft);
    border-color: #c7d7fb;
    color: #1e3a8a;
}

.shop-alert ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

/* ---------- layout blocks ---------- */

.shop-section {
    padding: 30px 0 60px;
}

.shop-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.shop-card + .shop-card {
    margin-top: 18px;
}

.shop-card h2 {
    margin: 0 0 14px;
    font-size: 1.2rem;
}

.shop-catalog {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.shop-filter {
    position: sticky;
    top: 88px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.shop-filter h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: var(--muted);
}

.shop-filter a {
    display: flex;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 0.93rem;
}

.shop-filter a:hover {
    background: var(--bg-alt);
}

.shop-filter a.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.shop-filter a span {
    color: var(--muted);
    font-size: 0.85rem;
}

.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 0.93rem;
}

.shop-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.shop-sort a {
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 0.86rem;
}

.shop-sort a.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

/* ---------- product grid ---------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.product-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #e0e9ff, #ede4ff);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumb-empty {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #6d80b8;
    font-weight: 700;
    font-size: 1.05rem;
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
}

.product-badge {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
}

.product-badge.sale {
    background: #ef4444;
}

.product-badge.free {
    background: #16a34a;
}

.product-badge.featured {
    background: #f59e0b;
}

.product-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
}

.product-category {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}

.product-body h3 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.45;
}

.product-body h3 a::after {
    position: absolute;
    inset: 0;
    content: "";
}

.product-body p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.88rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ink);
}

.product-price del {
    color: #94a3b8;
    font-size: 0.88rem;
    font-weight: 500;
}

.product-price .free-text {
    color: #16a34a;
}

.shop-empty {
    padding: 50px 24px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    background: #fff;
    text-align: center;
    color: var(--muted);
}

.shop-empty h2 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 1.2rem;
}

.shop-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 26px;
}

.shop-pager a,
.shop-pager span {
    min-width: 38px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    text-align: center;
    font-size: 0.9rem;
}

.shop-pager .current {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

/* ---------- product page ---------- */

.shop-breadcrumb {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.88rem;
}

.shop-breadcrumb a:hover {
    color: var(--accent);
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.product-gallery-main {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #e0e9ff, #ede4ff);
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.product-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
}

.product-gallery-thumbs button {
    flex: 0 0 auto;
    width: 84px;
    height: 56px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.product-gallery-thumbs button.active {
    border-color: var(--accent);
}

.product-gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-buy {
    position: sticky;
    top: 88px;
}

.product-buy h1 {
    margin: 4px 0 10px;
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    line-height: 1.3;
}

.product-buy .lede {
    margin: 0 0 16px;
    color: var(--muted);
}

.product-buy .product-price {
    margin: 0 0 16px;
    padding: 0;
    font-size: 1.9rem;
}

.product-buy .product-price del {
    font-size: 1.05rem;
}

.save-chip {
    padding: 2px 10px;
    border-radius: 999px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.82rem;
    font-weight: 700;
}

.product-actions {
    display: grid;
    gap: 10px;
}

.product-meta-list {
    display: grid;
    gap: 8px;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
}

.product-meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.product-meta-list dt {
    color: var(--muted);
    font-weight: 500;
}

.product-meta-list dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.demo-box {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px dashed #c7d7fb;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    font-size: 0.92rem;
}

.demo-box code {
    padding: 1px 7px;
    border-radius: 6px;
    background: #fff;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 0.88rem;
}

.product-description {
    margin-top: 26px;
}

.product-description p {
    margin: 0 0 12px;
}

.product-description ul {
    margin: 0 0 14px;
    padding-left: 22px;
}

.product-description li {
    margin-bottom: 4px;
}

.product-files-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-files-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 0.93rem;
}

.product-files-list small {
    color: var(--muted);
}

/* ---------- cart / checkout / order ---------- */

.shop-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}

.cart-line {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.cart-line:last-child {
    border-bottom: none;
}

.cart-line .product-thumb {
    border-radius: 10px;
}

.cart-line h3 {
    margin: 0;
    font-size: 1rem;
}

.cart-line small {
    color: var(--muted);
}

.cart-line .line-price {
    display: grid;
    justify-items: end;
    gap: 4px;
    font-weight: 700;
}

.link-button {
    padding: 0;
    border: none;
    background: none;
    color: #dc2626;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.summary-rows {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
}

.summary-rows div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.summary-rows .total {
    padding-top: 10px;
    border-top: 1px solid var(--line);
    font-size: 1.25rem;
    font-weight: 700;
}

.order-status {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.order-status.status-draft {
    background: #fff7ed;
    color: #c2410c;
}

.order-status.status-sent {
    background: #eff6ff;
    color: #1d4ed8;
}

.order-status.status-approved {
    background: #ecfdf5;
    color: #047857;
}

.order-status.status-rejected {
    background: #f1f5f9;
    color: #64748b;
}

.pay-box {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.pay-qr {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    text-align: center;
}

.pay-qr img {
    width: 100%;
    height: auto;
    image-rendering: pixelated;
}

.pay-qr small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.pay-amount {
    margin: 0 0 6px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.pay-steps {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    font-size: 0.93rem;
}

.slip-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
}

.slip-form input[type="file"] {
    flex: 1;
    min-width: 220px;
    padding: 8px;
    border: 1px dashed #c7d7fb;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
}

/* ---------- account ---------- */

.auth-wrap {
    display: grid;
    min-height: calc(100vh - 68px - 120px);
    place-items: center;
    padding: 40px 0;
}

.auth-card {
    width: min(440px, 100%);
}

.auth-card h1 {
    margin: 0 0 4px;
    font-size: 1.6rem;
}

.auth-card .sub {
    margin: 0 0 20px;
    color: var(--muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    flex: 1;
    height: 1px;
    background: var(--line);
    content: "";
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 0.92rem;
}

.auth-links a,
.text-link {
    color: var(--accent);
    font-weight: 600;
}

.google-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    border: 1px solid #d5dbe6;
    border-radius: var(--radius-sm);
    background: #fff;
    font-weight: 600;
}

.google-btn:hover {
    border-color: var(--accent);
}

.line-btn {
    margin-top: 8px;
    border-color: #06c755;
    background: #06c755;
    color: #fff;
}

.line-btn:hover {
    border-color: #05b34c;
    background: #05b34c;
}

.facebook-btn {
    margin-top: 8px;
    border-color: #1877f2;
    background: #1877f2;
    color: #fff;
}

.facebook-btn:hover {
    border-color: #0f66d6;
    background: #0f66d6;
    color: #fff;
}

.account-grid {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.account-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.account-menu a:hover {
    background: var(--bg-alt);
}

.account-menu a.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.account-menu .who {
    margin: 0 0 12px;
    padding: 0 12px 12px;
    border-bottom: 1px solid var(--line);
}

.account-menu .who strong {
    display: block;
}

.account-menu .who small {
    color: var(--muted);
    word-break: break-all;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}

.shop-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}

.shop-table th {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-weight: 600;
    text-align: left;
}

.shop-table td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.shop-table .num {
    text-align: right;
    white-space: nowrap;
}

.download-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.download-card:last-child {
    border-bottom: none;
}

.download-card .product-thumb {
    border-radius: 10px;
}

.download-card h3 {
    margin: 0 0 2px;
    font-size: 1.02rem;
}

.download-card small {
    color: var(--muted);
}

.download-card .product-files-list {
    margin-top: 10px;
}

/* ---------- footer ---------- */

.shop-footer {
    padding: 26px 0;
    border-top: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: 0.88rem;
}

.shop-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

.shop-footer a:hover {
    color: var(--accent);
}

.shop-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* ---------- ระยะ 2: VIP / Flash Sale / ชุดรวม / รีวิว / คูปอง ---------- */

.product-badge.vip {
    background: linear-gradient(120deg, #f59e0b, #d97706);
}

.product-badge.bundle {
    background: #0f766e;
}

.stars {
    --rating: 0;
    display: inline-block;
    font-size: 0.95em;
    letter-spacing: 1px;
    line-height: 1;
    background: linear-gradient(90deg, #f59e0b calc(var(--rating) / 5 * 100%), #d5dbe6 0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stars::before {
    content: "★★★★★";
}

.stars-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 500;
}

.countdown-chip {
    display: inline-flex;
    align-self: flex-start;
    gap: 4px;
    margin-top: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #fef2f2;
    color: #dc2626;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 600;
}

.flash-strip {
    margin: 0 0 28px;
    padding: 18px;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #fff1f2, #fff7ed);
    border: 1px solid #fecdd3;
}

.flash-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
}

.flash-head h2 {
    margin: 0;
    color: #dc2626;
    font-size: 1.3rem;
}

.flash-head span {
    color: #9f1239;
    font-size: 0.9rem;
}

.flash-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.flash-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: linear-gradient(120deg, #ef4444, #f97316);
    color: #fff;
    font-weight: 600;
}

.flash-box strong {
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 1.15rem;
}

.vip-crown {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.3);
}

.vip-banner,
.vip-status-card,
.vip-upsell {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #fffbeb, #fef3c7);
}

.vip-banner,
.vip-status-card {
    margin: 0 0 22px;
}

.vip-banner > span:nth-child(2),
.vip-status-card > div {
    display: grid;
    flex: 1;
    gap: 2px;
}

.vip-banner small,
.vip-status-card small,
.vip-upsell small {
    color: #92400e;
    font-size: 0.86rem;
}

.vip-banner:hover {
    border-color: #f59e0b;
}

.vip-upsell {
    margin-top: 14px;
    font-size: 0.93rem;
    font-weight: 600;
}

.vip-upsell .vip-crown {
    width: 38px;
    height: 38px;
}

.vip-hero {
    background:
        radial-gradient(circle at 85% 0%, rgba(245, 158, 11, 0.18), transparent 45%),
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.1), transparent 40%),
        #fff;
}

.vip-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 380px));
    gap: 18px;
    justify-content: center;
}

.vip-plan {
    display: grid;
    gap: 6px;
    border-color: #fde68a;
    text-align: left;
}

.vip-plan h2 {
    margin: 8px 0 0;
}

.vip-price {
    margin: 0;
    color: #b45309;
    font-size: 2.2rem;
    font-weight: 800;
}

.vip-price small {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 500;
}

.vip-benefits {
    margin: 6px 0 14px;
    padding-left: 20px;
    font-size: 0.94rem;
}

.vip-benefits li {
    margin-bottom: 4px;
}

.bundle-list {
    display: grid;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.bundle-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 0.94rem;
}

.bundle-list a {
    color: var(--accent);
    font-weight: 600;
}

.bundle-saving {
    margin: 0;
    color: #0f766e;
    font-size: 0.93rem;
}

.review-form {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
    padding: 14px;
    border: 1px dashed #c7d7fb;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
}

.review-form button {
    justify-self: start;
}

.star-input {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
    margin: 0;
    padding: 0;
    border: 0;
}

.star-input input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.star-input label {
    color: #cbd5e1;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label {
    color: #f59e0b;
}

.star-input input:focus-visible + label {
    outline: 2px solid var(--accent);
    border-radius: 4px;
}

.review-item {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.review-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.review-head small {
    color: var(--muted);
}

.review-item p {
    margin: 6px 0 0;
    font-size: 0.94rem;
    white-space: pre-line;
}

.share-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 0.86rem;
}

.share-row > span {
    color: var(--muted);
    margin-right: 4px;
}

.share-row a,
.share-row button {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.share-row a:hover,
.share-row button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.coupon-form {
    display: flex;
    gap: 8px;
}

.coupon-form input {
    flex: 1;
    min-width: 0;
}

.coupon-note {
    margin: 10px 0 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.coupon-note.ok {
    color: #047857;
}

.coupon-note.bad {
    color: #dc2626;
}

.summary-rows .discount {
    color: #047857;
}

.discount-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.discount-form label:only-of-type {
    grid-column: span 2;
}

.summary-rows .earn-note {
    color: #b45309;
    font-size: 0.9rem;
}

.points-card {
    background: linear-gradient(120deg, #eff6ff, #f5f3ff);
    border-color: #c7d7fb;
}

.points-label {
    display: block;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
}

.points-balance {
    display: block;
    font-size: 2rem;
    line-height: 1.2;
}

.points-balance small {
    font-size: 1rem;
    font-weight: 500;
}

.points-card small {
    color: var(--muted);
}

.points-card details {
    margin-top: 12px;
}

.points-card summary {
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
    .product-grid,
    .flash-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .shop-catalog,
    .product-detail,
    .shop-two-col,
    .account-grid {
        grid-template-columns: 1fr;
    }

    .shop-filter,
    .product-buy {
        position: static;
    }

    /* มือถือ: ราคาและปุ่มซื้อขึ้นมาต่อจากรูป ไม่ต้องเลื่อนผ่านรายละเอียดทั้งหมด */
    .product-detail > div:first-child {
        display: contents;
    }

    .product-detail .product-buy {
        order: 1;
    }

    .product-detail > div:first-child > .shop-card {
        order: 2;
        margin-top: 0;
    }

    .shop-filter-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .shop-filter a {
        border: 1px solid var(--line);
    }

    .shop-nav-actions .label {
        display: none;
    }
}

@media (max-width: 640px) {
    .discount-form {
        grid-template-columns: 1fr;
    }

    .discount-form label:only-of-type {
        grid-column: auto;
    }

    .vip-banner,
    .vip-status-card {
        flex-wrap: wrap;
    }

    .vip-banner > span:nth-child(2),
    .vip-status-card > div {
        flex: 1 1 calc(100% - 60px);
        min-width: 0;
    }

    .vip-banner > .shop-btn-soft,
    .vip-status-card > a {
        width: 100%;
    }

    .product-grid,
    .flash-grid,
    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .pay-box {
        grid-template-columns: 1fr;
    }

    .pay-qr {
        max-width: 240px;
        margin: 0 auto;
    }

    .cart-line {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .cart-line .line-price {
        grid-column: 2;
        justify-items: start;
    }

    .download-card {
        grid-template-columns: 1fr;
    }

    .shop-card {
        padding: 18px;
    }

    .shop-table thead {
        display: none;
    }

    .shop-table tr {
        display: grid;
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
    }

    .shop-table td {
        padding: 2px 0;
        border: none;
    }

    .shop-table .num {
        text-align: left;
    }
}
