/* ═══════════════════════════════════════════════════════════════
   HappyZhopi Demo Stores — CSS
   happyzhopi.com
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --bg: #F5F5F7;
    --card: #FFFFFF;
    --text: #1a1a2e;
    --text-light: #999999;
    --border: #f0f0f0;
    --danger: #EF4444;
    --success: #10B981;
    --warning: #F59E0B;
    --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans Thai', 'Noto Sans', sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.fade-up { animation: fadeUp 0.4s ease both; }

/* ═══ HEADER ═══ */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.promo-bar { background: linear-gradient(90deg, var(--primary), var(--primary-light)); color: #fff; font-size: 12px; text-align: center; padding: 8px 16px; font-weight: 500; }
.promo-bar strong { font-weight: 800; }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.logo-text { font-size: 17px; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo-sub { font-size: 12px; color: var(--text-light); margin-left: 4px; }
.header-nav { display: flex; gap: 4px; }
.header-nav a { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: #555; transition: all 0.2s; }
.header-nav a:hover, .header-nav a.active { background: #F3F0FF; color: var(--primary); }
.btn-outline-sm { background: transparent; border: 1px solid #e0e0e0; color: #555; padding: 8px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; display: inline-block; }
.btn-primary-sm { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; padding: 8px 18px; border-radius: 10px; font-size: 13px; font-weight: 700; display: inline-block; }
@media (max-width: 768px) {
    .header-nav { display: none; }
    .header-inner { gap: 8px; }
}

/* ═══ PRICING PAGE ═══ */
.pricing-page { max-width: 1100px; margin: 0 auto; padding: 40px 24px 60px; }
.pricing-title { text-align: center; margin-bottom: 40px; }
.pricing-title h1 { font-size: 36px; font-weight: 900; margin-bottom: 8px; }
.pricing-title p { font-size: 16px; color: var(--text-light); margin-bottom: 24px; }
.pricing-title p strong { color: var(--text); }

/* Tabs */
.tabs { display: inline-flex; gap: 4px; background: #fff; border-radius: 12px; padding: 4px; border: 1px solid var(--border); }
.tab-btn { padding: 9px 20px; border-radius: 10px; border: none; cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; background: transparent; color: #666; transition: all 0.2s; }
.tab-btn.active { background: var(--primary); color: #fff; }

/* Package Grid */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 30px; }

/* Package Card */
.pkg-card { background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); position: relative; transition: all 0.25s; }
.pkg-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.pkg-card.popular { border-width: 2px; }
.pkg-popular-badge { color: #fff; font-size: 11px; font-weight: 700; padding: 5px; text-align: center; }
.pkg-body { padding: 24px 22px; }
.pkg-tier { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.pkg-name { margin: 8px 0 2px; font-size: 22px; font-weight: 900; }
.pkg-price { font-size: 28px; font-weight: 900; }
.pkg-price-sub { font-size: 12px; color: var(--text-light); }

/* Capacity Row */
.pkg-capacity { display: flex; gap: 8px; margin: 16px 0; }
.pkg-cap-item { flex: 1; background: #F9FAFB; border-radius: 10px; padding: 10px 12px; text-align: center; }
.pkg-cap-val { font-size: 18px; font-weight: 900; }
.pkg-cap-label { font-size: 10px; color: var(--text-light); }

/* Demo Preview */
.pkg-demo-preview { border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; position: relative; overflow: hidden; }
.pkg-demo-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pkg-demo-avatar { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.pkg-demo-name { font-size: 13px; font-weight: 800; }
.pkg-demo-tag { font-size: 10px; color: #666; }
.pkg-demo-products { display: flex; gap: 6px; overflow-x: auto; }
.pkg-demo-product { min-width: 56px; background: #fff; border-radius: 8px; padding: 6px; text-align: center; flex-shrink: 0; }
.pkg-demo-product .emoji { font-size: 20px; }
.pkg-demo-product .price { font-size: 9px; font-weight: 700; color: var(--danger); }

/* Features List */
.pkg-features { margin-bottom: 16px; }
.pkg-feature { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 12px; color: #555; }
.pkg-feature-more { font-size: 11px; color: var(--text-light); padding-top: 2px; }

/* Buttons */
.btn-demo { width: 100%; padding: 13px; border-radius: 12px; border: none; color: #fff; font-size: 14px; font-weight: 800; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.2s; }
.btn-demo:hover { opacity: 0.9; transform: scale(1.01); }
.btn-select { width: 100%; padding: 11px; border-radius: 12px; border: 2px solid; background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; margin-top: 8px; transition: all 0.2s; }
.btn-select:hover { opacity: 0.8; }

/* Compare Hint */
.compare-hint { text-align: center; margin-top: 40px; padding: 28px; background: #fff; border-radius: 16px; border: 1px solid var(--border); }
.compare-hint h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.compare-hint p { font-size: 14px; color: var(--text-light); margin-bottom: 16px; }
.compare-tags { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.compare-tag { font-size: 12px; color: #666; background: #F9FAFB; padding: 6px 14px; border-radius: 8px; }

/* ═══ DEMO STORE PAGE ═══ */
.demo-bar { border-radius: 12px; padding: 12px 18px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.demo-bar-left { display: flex; align-items: center; gap: 10px; }
.demo-badge { color: #fff; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.demo-bar-title { font-size: 13px; font-weight: 700; }
.demo-bar-sub { font-size: 12px; color: var(--text-light); }
.btn-back { background: #fff; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.btn-back:hover { opacity: 0.8; }

/* Store Container */
.store-container { background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }
.store-watermark { background: #6B7280; color: #fff; font-size: 11px; text-align: center; padding: 6px; font-weight: 500; }
.store-watermark a { color: #fff; text-decoration: underline; }

/* Store Header */
.store-header { padding: 32px 28px 24px; }
.store-header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.store-info { display: flex; align-items: center; gap: 14px; }
.store-avatar { width: 52px; height: 52px; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.store-name { font-size: 20px; font-weight: 900; }
.store-tagline { font-size: 13px; color: #666; margin-top: 2px; }
.store-rating { font-size: 12px; color: var(--warning); margin-top: 4px; }
.store-actions { display: flex; gap: 12px; align-items: center; }
.btn-chat { background: #fff; border-radius: 10px; padding: 8px 14px; font-size: 12px; font-weight: 600; color: var(--success); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.06); border: none; font-family: inherit; }
.cart-icon { position: relative; font-size: 24px; cursor: pointer; }
.cart-badge { position: absolute; top: -6px; right: -8px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }

/* Search */
.store-search { margin-top: 16px; display: flex; gap: 8px; }
.store-search-box { flex: 1; display: flex; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.store-search-box .icon { padding: 0 12px; display: flex; align-items: center; color: #ccc; font-size: 14px; }
.store-search-box input { flex: 1; border: none; outline: none; padding: 10px 0; font-size: 13px; font-family: inherit; background: transparent; }

/* Promo Banner */
.store-promo { margin: 16px 20px 0; border-radius: 14px; padding: 18px 22px; color: #fff; position: relative; overflow: hidden; }
.store-promo::after { content: ''; position: absolute; top: -20px; right: -20px; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,0.1); }
.store-promo h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; position: relative; z-index: 1; }
.store-promo p { font-size: 13px; opacity: 0.9; position: relative; z-index: 1; }

/* Coupon */
.store-coupon-toggle { margin: 12px 20px 0; }
.coupon-toggle-btn { width: 100%; background: #FEF3C7; border-radius: 10px; padding: 10px 14px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; border: 1px dashed #F59E0B; font-family: inherit; font-size: 13px; font-weight: 600; color: #92400E; }
.coupon-list { margin: 8px 20px 0; display: flex; gap: 8px; }
.coupon-item { flex: 1; background: #FFFBEB; border: 1px dashed #FDE68A; border-radius: 10px; padding: 10px 12px; text-align: center; }
.coupon-label { font-size: 15px; font-weight: 800; color: #D97706; }
.coupon-code { font-size: 10px; color: #92400E; background: #FEF3C7; border-radius: 4px; padding: 2px 6px; display: inline-block; margin: 4px 0; font-family: monospace; }
.coupon-cond { font-size: 10px; color: var(--text-light); }

/* Flash Sale */
.flash-sale { margin: 16px 20px 0; background: linear-gradient(135deg, #1F2937, #374151); border-radius: 14px; padding: 16px 18px; }
.flash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.flash-title { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 15px; }
.flash-timer { display: flex; gap: 4px; }
.flash-timer-digit { background: var(--danger); color: #fff; padding: 3px 7px; border-radius: 5px; font-size: 13px; font-weight: 800; font-family: monospace; }
.flash-timer-sep { color: var(--danger); font-weight: 800; display: flex; align-items: center; }
.flash-products { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.flash-product { min-width: 130px; background: #fff; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.flash-product-img { height: 80px; display: flex; align-items: center; justify-content: center; background: #F9FAFB; font-size: 32px; position: relative; }
.flash-discount { position: absolute; top: 4px; left: 4px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.flash-product-info { padding: 8px 10px; }
.flash-product-price { font-size: 14px; font-weight: 800; color: var(--danger); }
.flash-product-og { font-size: 10px; color: var(--text-light); text-decoration: line-through; }

/* Products Grid */
.store-products { padding: 20px 20px 24px; }
.products-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.products-header h3 { font-size: 16px; font-weight: 800; }
.products-header span { font-size: 12px; color: var(--text-light); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

/* Product Card */
.product-card { background: #FAFAFA; border-radius: 14px; overflow: hidden; cursor: pointer; transition: all 0.2s; border: 1px solid var(--border); }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.product-img { height: 110px; display: flex; align-items: center; justify-content: center; background: #fff; font-size: 42px; position: relative; }
.product-discount-badge { position: absolute; top: 6px; left: 6px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.product-info { padding: 10px 12px 12px; }
.product-name { font-size: 12px; font-weight: 600; height: 32px; overflow: hidden; line-height: 1.4; margin-bottom: 6px; color: #333; }
.product-prices { display: flex; align-items: baseline; gap: 5px; margin-bottom: 4px; }
.product-price { font-size: 17px; font-weight: 800; color: var(--danger); }
.product-og-price { font-size: 11px; color: #bbb; text-decoration: line-through; }
.product-meta { font-size: 11px; color: var(--text-light); margin-bottom: 6px; }
.product-meta .star { color: var(--warning); }
.btn-add-cart { width: 100%; padding: 7px; border-radius: 8px; border: none; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.btn-add-cart:hover { opacity: 0.9; }

/* Empty Slots */
.empty-slots { margin-top: 16px; text-align: center; padding: 20px; background: #F9FAFB; border-radius: 12px; border: 2px dashed #E5E7EB; }
.empty-slots .icon { font-size: 24px; margin-bottom: 6px; }
.empty-slots p { font-size: 13px; color: var(--text-light); }
.empty-slots strong { }

/* Feature Badges */
.feature-badge { margin: 0 20px 12px; border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; }
.badge-seo { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.badge-affiliate { background: #FDF4FF; border: 1px solid #F5D0FE; color: #86198F; }
.badge-ai { background: #EEF2FF; border: 1px solid #C7D2FE; color: #3730A3; }

/* Store Footer */
.store-footer { background: #F9FAFB; padding: 16px 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-light); flex-wrap: wrap; gap: 8px; }
.wl-badge { margin-left: 8px; background: #EDE9FE; color: #7C3AED; padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 11px; }
.store-footer-links { display: flex; gap: 14px; }
.store-footer-links span { cursor: pointer; }

/* Feature Comparison Box */
.feature-compare { margin-top: 20px; background: #fff; border-radius: 16px; padding: 20px 22px; border: 1px solid var(--border); }
.feature-compare h4 { font-size: 15px; font-weight: 800; margin-bottom: 14px; }
.feature-compare h5 { font-size: 13px; font-weight: 700; color: var(--text-light); margin: 14px 0 10px; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-tag { padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.feature-tag.has { }
.feature-tag.miss { background: #F3F4F6; color: #9CA3AF; }
.btn-choose-pkg { width: 100%; margin-top: 16px; padding: 14px; border-radius: 12px; border: none; color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; font-family: inherit; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .pricing-title h1 { font-size: 26px; }
    .pkg-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .coupon-list { flex-direction: column; }
    .store-header-inner { flex-direction: column; align-items: flex-start; }
    .demo-bar { flex-direction: column; align-items: flex-start; }
    .compare-tags { flex-direction: column; align-items: center; }
}
