/* ==========================================================================
   TIKDIWASTORE (ติ๊กดิวะ) — Main Responsive Layout & Brand Theme
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800&display=swap');

:root {
    --pink-primary: #C2185B;
    --pink-hover: #AD1457;
    --pink-bright: #E91E63;
    --pink-soft: #FCE4EC;
    --pink-pastel: #FFF0F5;
    --pink-border: #F8BBD0;
    --bg-main: #FFFBFD;
    --bg-card: #FFFFFF;
    --text-main: #231920;
    --text-muted: #7B6B74;
    --green-live: #16A34A;
    --green-bg: #DCFCE7;
    --shadow-soft: 0 10px 30px -10px rgba(194, 24, 91, 0.12);
    --shadow-card: 0 4px 16px rgba(35, 25, 32, 0.05);
    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-pill: 999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
    min-height: 100vh;
}

body {
    padding-bottom: 84px; /* เผื่อพื้นที่ให้ Mobile Bottom Nav */
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== HEADER & SEARCH BAR ==================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid rgba(248, 187, 208, 0.45);
    transition: all 0.25s ease;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
}

.brand-logo-img {
    height: 54px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-logo:hover .brand-logo-img {
    transform: scale(1.05);
}

.search-box-wrap {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 46px 12px 44px;
    border-radius: var(--radius-pill);
    border: 1.5px solid #EFE6EA;
    background: #F7F2F5;
    font-family: inherit;
    font-size: 0.96rem;
    color: var(--text-main);
    transition: all 0.25s ease;
}

.search-input:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--pink-primary);
    box-shadow: 0 0 0 4px rgba(194, 24, 91, 0.12);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--pink-soft);
    color: var(--pink-primary);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-outline-pink {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--pink-primary);
    background: #FFFFFF;
    color: var(--text-main);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline-pink:hover {
    background: var(--pink-pastel);
    transform: translateY(-1px);
}

.btn-primary-pink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    border: none;
    background: linear-gradient(135deg, #D81B60 0%, #AD1457 100%);
    color: #FFFFFF;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(194, 24, 91, 0.28);
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-primary-pink:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 24px rgba(194, 24, 91, 0.36);
}

.btn-primary-pink:active {
    transform: translateY(0) scale(0.98);
}

/* ==================== SUB-NAVIGATION BAR ==================== */
.header-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #F5ECF0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.header-nav-bar::-webkit-scrollbar { display: none; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    position: relative;
    padding: 11px 4px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--pink-primary);
    font-weight: 700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: var(--pink-primary);
    border-radius: 4px 4px 0 0;
}

.live-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    padding-left: 12px;
}

.live-dot {
    width: 9px;
    height: 9px;
    background: #22C55E;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
    animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.18); opacity: 0.75; }
}

/* ==================== HERO SECTION ==================== */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    margin-top: 22px;
}

.hero-banner {
    background: linear-gradient(135deg, #FFD6E7 0%, #FFEAF2 55%, #FFDCEB 100%);
    border-radius: var(--radius-xl);
    padding: 34px 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
}

.hero-banner::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,0.65) 0%, transparent 70%);
    top: -80px;
    right: 120px;
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    max-width: 460px;
    z-index: 2;
}

.hero-title {
    font-size: 2.35rem;
    font-weight: 800;
    color: #1F161C;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 1.02rem;
    color: #4A3942;
    margin-bottom: 22px;
    font-weight: 500;
}

.hero-art {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
    user-select: none;
}

.hero-how-card {
    background: #FFFFFF;
    border-radius: var(--radius-xl);
    padding: 24px 26px;
    border: 1px solid #F2E8EC;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.how-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-main);
}

.how-step-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.how-step-item {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 0.96rem;
    font-weight: 600;
    color: #362830;
}

.how-step-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--pink-soft);
    color: var(--pink-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* ==================== FILTER PILLS ==================== */
.filter-pills-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 26px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.filter-pills-bar::-webkit-scrollbar { display: none; }

.filter-pill {
    padding: 9px 22px;
    border-radius: var(--radius-pill);
    border: 1px solid #EFE7EB;
    background: #F6F2F4;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-pill:hover {
    background: var(--pink-soft);
    color: var(--pink-primary);
    border-color: var(--pink-border);
}

.filter-pill.active {
    background: #1F1924;
    color: #FFFFFF;
    border-color: #1F1924;
    box-shadow: 0 4px 12px rgba(31, 25, 36, 0.2);
}

/* ==================== PRODUCT SECTIONS & GRID ==================== */
.catalog-section {
    margin-bottom: 36px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-more-link {
    color: var(--pink-primary);
    font-weight: 700;
    font-size: 0.94rem;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.sticker-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1.5px solid #F1E8EC;
    padding: 14px;
    position: relative;
    cursor: pointer;
    transition: all 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
}

.sticker-card:hover {
    transform: translateY(-6px);
    border-color: var(--pink-border);
    box-shadow: 0 14px 28px rgba(194, 24, 91, 0.12);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--pink-soft);
    color: var(--pink-primary);
    font-size: 0.73rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.card-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: #7B6B74;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
}

.card-fav-btn:hover, .card-fav-btn.liked {
    color: var(--pink-bright);
    background: var(--pink-soft);
    transform: scale(1.12);
}

.card-thumb-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 8px 8px;
}

.card-thumb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sticker-card:hover .card-thumb-img {
    transform: scale(1.08);
}

.card-info {
    margin-top: 8px;
}

.card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-author {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.card-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-price {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text-main);
}

.card-coin-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pink-primary);
    background: var(--pink-pastel);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

/* ==================== FLOATING HELP & MOBILE BOTTOM NAV ==================== */
.floating-help-btn {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 90;
    background: linear-gradient(135deg, #C2185B 0%, #880E4F 100%);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-pill);
    padding: 11px 20px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(194, 24, 91, 0.35);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-help-btn:hover {
    transform: translateY(-3px) scale(1.04);
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 98;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(248, 187, 208, 0.6);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
    box-shadow: 0 -6px 24px rgba(194, 24, 91, 0.08);
}

.mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 12px;
    transition: all 0.2s;
}

.mob-nav-item.active {
    color: var(--pink-primary);
}

/* ==================== FULL RESPONSIVE BREAKPOINTS (ALL SIZES) ==================== */
@media (max-width: 1180px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .hero-grid {
        grid-template-columns: 1fr 300px;
    }
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-how-card {
        display: none;
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 14px;
    }
    .header-top {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 0;
    }
    .brand-logo-img {
        height: 44px;
    }
    .search-box-wrap {
        order: 3;
        max-width: 100%;
        width: 100%;
        flex-basis: 100%;
    }
    .header-nav-bar {
        display: none;
    }
    .hero-banner {
        padding: 22px 20px;
        margin-top: 6px;
    }
    .hero-title {
        font-size: 1.55rem;
    }
    .hero-subtitle {
        font-size: 0.88rem;
        margin-bottom: 14px;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .mobile-bottom-nav {
        display: flex;
    }
    .floating-help-btn {
        bottom: 78px;
        right: 14px;
        padding: 9px 15px;
        font-size: 0.82rem;
    }
}

@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .sticker-card {
        padding: 10px;
    }
    .hero-title {
        font-size: 1.35rem;
    }
}
