/* ==========================================================================
   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: #2557e8;
    --pink-hover: #1b46c7;
    --pink-bright: #3e86ff;
    --pink-soft: #e6f0ff;
    --pink-pastel: #f0f6ff;
    --pink-border: #c5dcff;
    --bg-main: #f8faff;
    --bg-card: #FFFFFF;
    --text-main: #231920;
    --text-muted: #7B6B74;
    --green-live: #16A34A;
    --green-bg: #DCFCE7;
    --shadow-soft: 0 10px 30px -10px rgba(37, 105, 255, 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;
    touch-action: manipulation;
}

html, body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: clip;
    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: 950;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(142, 197, 255, 0.55);
    box-shadow: 0 4px 20px rgba(37, 105, 255, 0.06);
    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 #dce8fa;
    background: #f0f5fc;
    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(37, 105, 255, 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, #3e86ff 0%, #1b46c7 100%);
    color: #FFFFFF;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(37, 105, 255, 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(37, 105, 255, 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 #dce8fa;
    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 CAROUSEL SLIDER ==================== */
.hero-carousel-box {
    position: relative;
    width: 100%;
    height: 260px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: #FFEAF2;
    user-select: none;
}

.hero-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.hero-carousel-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    position: relative;
}

.hero-carousel-slide picture,
.hero-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--pink-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 105, 255, 0.18);
    transition: all 0.22s ease;
    opacity: 0;
}

.hero-carousel-box:hover .hero-carousel-arrow {
    opacity: 1;
}

.hero-carousel-arrow:hover {
    background: #FFFFFF;
    transform: translateY(-50%) scale(1.08);
}

.hero-carousel-arrow.prev { left: 14px; }
.hero-carousel-arrow.next { right: 14px; }

.hero-carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 6;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.75);
}

.hero-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    background: rgba(37, 105, 255, 0.35);
    cursor: pointer;
    padding: 0;
    transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-carousel-dot.active {
    width: 24px;
    background: var(--pink-primary);
}

@media (max-width: 640px) {
    .hero-carousel-box {
        height: auto;
        aspect-ratio: 2 / 1;
    }
    .hero-carousel-arrow {
        opacity: 1;
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

.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, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.sticker-card {
    width: 100%;
    min-width: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1.5px solid #F1E8EC;
    padding: 14px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

@media (hover: hover) and (pointer: fine) {
    .sticker-card:hover {
        transform: translateY(-6px);
        border-color: var(--pink-border);
        box-shadow: 0 14px 28px rgba(37, 105, 255, 0.12);
    }
    .sticker-card:hover .card-thumb-img {
        transform: scale(1.08);
    }
}

.sticker-card:active {
    transform: scale(0.97);
    border-color: var(--pink-primary);
}

.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%;
    height: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 6px 6px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.card-media-icon {
    position: absolute;
    bottom: 6px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1.5px solid #E5DCE0;
    color: #5C4B54;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    box-shadow: 0 3px 10px rgba(35, 25, 32, 0.12);
    z-index: 3;
    transition: all 0.2s ease;
}

.card-media-icon.has-sound {
    border-color: var(--pink-border);
    color: var(--pink-primary);
}

.card-media-icon:hover {
    background: var(--pink-primary);
    color: #FFFFFF;
    border-color: var(--pink-primary);
    transform: scale(1.14);
}

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

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

.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);
}

/* ==================== CUTE PINK SHIMMER SKELETON LOADING ==================== */
@keyframes shimmerWave {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-card {
    pointer-events: none;
    user-select: none;
    border-color: #F6ECF0;
}

.skeleton-box {
    background: linear-gradient(
        90deg,
        #F9EFF3 25%,
        #e6f0ff 50%,
        #F9EFF3 75%
    );
    background-size: 200% 100%;
    animation: shimmerWave 1.35s infinite linear;
    border-radius: 12px;
}

.skeleton-thumb {
    width: 100%;
    height: 140px;
    border-radius: 16px;
    margin-bottom: 12px;
}

.skeleton-line-title {
    width: 82%;
    height: 15px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.skeleton-line-sub {
    width: 54%;
    height: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.skeleton-line-price {
    width: 42%;
    height: 20px;
    border-radius: 8px;
}

.skeleton-line-pill {
    width: 38px;
    height: 18px;
    border-radius: 99px;
}

