/* =========================================================
   CMT3001 Group 2: Chiikawa & Sanrio IP Collectibles Platform
   Soft & Healing Kawaii Pastel Aesthetic
   ========================================================= */
:root {
    --cream-white: #FFFDF9;
    --soft-pink: #FFE4EC;
    --pink-accent: #FF85A2;
    --sky-blue: #E0F4FF;
    --blue-accent: #56CCF2;
    --mint-green: #E2F8EE;
    --mint-accent: #4CD995;
    --text-dark: #4A4453;
    --text-muted: #8C8296;
    --card-shadow: 0 8px 20px rgba(255, 133, 162, 0.12);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-pill: 50px;
}

* {
    box-sizing: border-box;
    font-family: 'Nunito', 'Quicksand', 'Segoe UI', sans-serif;
}

body {
    margin: 0;
    padding: 0 0 70px 0; /* Space for mobile bottom bar */
    background-color: var(--cream-white);
    color: var(--text-dark);
    transition: cursor 0.2s ease;
}

/* 1. Chiikawa 游標（使用你資料夾內的圖片） */
body.cursor-chiikawa {
    cursor: url('images/Chiikawa.png'), auto;
}

/* 2. Hachiware 游標 */
body.cursor-hachiware {
    cursor: url('images/Hachiware.png'), auto;
}

/* 3. Kuromi 游標 */
body.cursor-sanrio {
    cursor: url('images/kuromi.png'), auto;
}

/* 4. Hello Kitty 游標 */
body.cursor-hellokitty {
    cursor: url('images/HelloKitty.png'), auto;
}
/* 2. Dynamic Live Announcement Bar (Ticker) */
.live-ticker {
    background: linear-gradient(90deg, var(--pink-accent), var(--blue-accent));
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    animation: tickerMove 22s linear infinite;
}

@keyframes tickerMove {
    0% { transform: translateX(60%); }
    100% { transform: translateX(-100%); }
}

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px dashed var(--soft-pink);
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--pink-accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    background: var(--soft-pink);
    color: var(--text-dark);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: transform 0.2s, background 0.2s;
}

.nav-btn:hover {
    transform: translateY(-2px);
    background: var(--pink-accent);
    color: white;
}

.cart-trigger {
    background: var(--sky-blue);
    position: relative;
}

.cart-badge {
    background: var(--pink-accent);
    color: white;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 11px;
    margin-left: 4px;
}

/* Container */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px;
}

/* 2. Immersive IP Character Hub */
.character-hub {
    background: linear-gradient(135deg, var(--soft-pink) 0%, var(--sky-blue) 50%, var(--mint-green) 100%);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    margin-bottom: 28px;
    box-shadow: var(--card-shadow);
}

.character-hub h1 {
    margin: 0 0 8px 0;
    font-size: 26px;
    color: var(--text-dark);
}

.character-hub p {
    margin: 0 0 20px 0;
    color: var(--text-muted);
    font-size: 15px;
}

.avatar-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
}

.avatar-item {
    background: white;
    border: 3px solid transparent;
    border-radius: var(--radius-lg);
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 115px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.avatar-item:hover, .avatar-item.active {
    transform: translateY(-5px) scale(1.03);
    border-color: var(--pink-accent);
}

.avatar-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    margin: 0 auto 8px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.avatar-item span {
    display: block;
    font-weight: 700;
    font-size: 13px;
}

/* Smart Tagging & Filtering System */
.filter-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    background: white;
    padding: 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-btn {
    background: var(--cream-white);
    border: 1.5px solid #E2D9EC;
    color: var(--text-dark);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-btn:hover, .tag-btn.active {
    background: var(--pink-accent);
    color: white;
    border-color: var(--pink-accent);
}

.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    padding: 8px 14px;
    border: 2px solid var(--sky-blue);
    border-radius: var(--radius-pill);
    outline: none;
    font-size: 14px;
}

/* Interactive Plushie Size Comparison Tool Banner */
.size-tool-banner {
    background: var(--mint-green);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border: 2px dashed var(--mint-accent);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 22px;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--card-shadow);
    position: relative;
    transition: transform 0.25s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-6px);
}

/* Stock Badges & Scarcity Triggers */
.badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-instock { background: var(--mint-green); color: #1E824C; }
.badge-preorder { background: var(--sky-blue); color: #1B6CA8; }
.badge-soldout { background: #EEE; color: #777; }

.scarcity-alert {
    color: #E74C3C;
    font-size: 11px;
    font-weight: 800;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.product-img-wrap {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--cream-white);
    text-align: center;
    margin-bottom: 12px;
}

.product-img-wrap img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}

.unboxing-pill {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255,255,255,0.9);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    color: var(--pink-accent);
    cursor: pointer;
    border: 1px solid var(--soft-pink);
}

.product-ip-tag {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
}

.product-title {
    font-size: 16px;
    font-weight: 800;
    margin: 4px 0 8px 0;
}

.product-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--pink-accent);
    margin-bottom: 12px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.btn-primary {
    flex: 1;
    background: var(--pink-accent);
    color: white;
    border: none;
    padding: 10px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #ff6b8e;
}

.btn-waitlist {
    flex: 1;
    background: #F0ECF5;
    color: var(--text-dark);
    border: 1.5px dashed #B8A9C9;
    padding: 10px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    cursor: pointer;
}

.btn-icon {
    background: var(--sky-blue);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}

/* 5. Slide-out Mini Cart Drawer */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 200;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 360px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    z-index: 201;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: right 0.3s ease;
    border-top-left-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-lg);
    box-shadow: -5px 0 25px rgba(0,0,0,0.12);
}

.cart-drawer.open {
    right: 0;
}

.shipping-bar-box {
    background: var(--sky-blue);
    padding: 12px;
    border-radius: var(--radius-md);
    margin: 12px 0;
    font-size: 13px;
    font-weight: 700;
}

.progress-track {
    background: white;
    height: 10px;
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-top: 6px;
}

.progress-fill {
    background: var(--mint-accent);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin: 10px 0;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #F2EEF7;
}

/* Trust Badges Footer */
.trust-footer {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 40px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 16px;
    text-align: center;
    border: 2px solid var(--soft-pink);
}

.trust-item {
    font-size: 13px;
    font-weight: 700;
}

/* Modal (Size Comparison & Unboxing) */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 300;
    padding: 16px;
}

.modal-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 520px;
    width: 100%;
    position: relative;
    text-align: center;
}

.size-stage {
    background: var(--cream-white);
    border: 2px dashed var(--sky-blue);
    border-radius: var(--radius-md);
    height: 240px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 40px;
    padding: 20px;
    margin: 16px 0;
}

/* 6. Mobile-First Fixed Bottom App Bar */
.bottom-app-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid var(--soft-pink);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 150;
}

.bottom-app-bar a, .bottom-app-bar button {
    background: none;
    border: none;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
}

.bottom-app-bar span.icon {
    font-size: 18px;
}
