:root {
    --primary-color: #7F0019;
    /* MUJI Red */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #FFFFFF;
    --bg-alt: #F7F7F7;
    --border-color: #E5E5E5;
    --container-width: 1200px;
    --font-main: 'Noto Sans TC', 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: var(--transition);
}

/* Header */
header {
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}

header.scrolled {
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo span {
    font-weight: 300;
    color: var(--text-light);
    margin-left: 4px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 15px;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    padding: 6px 12px;
    border-radius: 20px;
    width: 200px;
}

.search-bar i {
    width: 18px;
    height: 18px;
    color: var(--text-light);
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    padding-left: 8px;
    font-size: 14px;
    width: 100%;
}

.icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.icon-btn i {
    width: 24px;
    height: 24px;
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.mobile-menu-btn {
    display: none;
}

/* Hero */
.hero {
    height: 60vh;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url('https://images.unsplash.com/photo-1513519245088-0e12902e35ca?q=80&w=2070&auto=format&fit=crop') center/cover;
    display: flex;
    align-items: center;
}

.hero-content {
    color: var(--text-color);
    max-width: 600px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 16px;
    margin-bottom: 24px;
    color: #444;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #600013;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* Products */
.products {
    padding: 60px 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
}

.filter-btns {
    display: flex;
    gap: 15px;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.filter-btn.active {
    background: var(--text-color);
    color: white;
    border-color: var(--text-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px 20px;
}

.product-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card.show {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover .product-img img {
    transform: scale(1.02);
}

.product-img {
    aspect-ratio: 1/1;
    background: #fdfdfd;
    overflow: hidden;
    position: relative;
    border-radius: 2px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.product-card:hover .product-img {
    border-color: #f0f0f0;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.quick-add {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-img:hover .quick-add {
    opacity: 1;
    transform: translateY(0);
}

.product-info h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.product-info .category {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.product-info .price {
    font-weight: 600;
    font-size: 14px;
    color: #000;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-light);
    margin-top: 50px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    background: var(--bg-alt);
    border-radius: 4px;
    overflow: hidden;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.cart-item-info .price {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 10px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 20px;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1500;
    display: none;
    backdrop-filter: blur(2px);
}

.cart-overlay.open {
    display: block;
}

/* Mobile Navigation Drawer */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: white;
    z-index: 3000;
    transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
}

.mobile-nav.open {
    left: 0;
}

.mobile-nav-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-links {
    padding: 20px;
}

.mobile-nav-links li {
    margin-bottom: 25px;
}

.mobile-nav-links a {
    font-size: 18px;
    font-weight: 500;
    display: block;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2500;
    display: none;
    backdrop-filter: blur(2px);
}

.mobile-nav-overlay.open {
    display: block;
}

/* Footer */
.footer {
    background: var(--bg-alt);
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.footer h4 {
    margin-bottom: 20px;
    font-size: 16px;
}

.footer p {
    color: var(--text-light);
    font-size: 14px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul a {
    color: var(--text-light);
    font-size: 14px;
}

.footer-links ul a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    outline: none;
    font-size: 14px;
}

.newsletter-form button {
    background: var(--text-color);
    color: white;
    padding: 0 20px;
    font-size: 14px;
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* Responsive */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero h1 {
        font-size: 42px;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .search-bar {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    header {
        height: 60px;
    }

    .hero {
        height: 60vh;
    }

    .hero h1 {
        font-size: 32px;
    }

    .cart-drawer {
        width: 100%;
        right: -100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Floating LINE Button */
.floating-line-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #06C755;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(6, 199, 85, 0.3);
    z-index: 999;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    animation: pulse 3s infinite ease-in-out;
}

.floating-line-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
    background-color: #05b04a;
}

.floating-line-btn i {
    width: 24px;
    height: 24px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(6, 199, 85, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(6, 199, 85, 0.3);
    }
}

@media (max-width: 768px) {
    .floating-line-btn {
        bottom: 20px;
        right: 20px;
        padding: 10px 16px;
    }

    .floating-line-btn span {
        display: none;
    }

    .floating-line-btn {
        width: 50px;
        height: 50px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}