:root {
    --accent: #e8654a;
    --accent-hover: #d4543a;
    --bg: #ffffff;
    --bg-warm: #f5f0eb;
    --bg-dark: #1a1a1a;
    --text: #1a1a1a;
    --text-secondary: #6b6b6b;
    --text-light: #999;
    --border: #e5e5e5;
    --radius: 4px;
    --font: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--text); }
a:hover { color: var(--accent); }

/* Announcement Bar */
.announcement-bar {
    background: var(--bg-dark);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

/* Navigation */
.site-nav {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.site-logo:hover { color: var(--text); text-decoration: none; }

.navbar-toggler {
    border: none;
    background: none;
    padding: 0;
    color: var(--text);
}

.site-nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.site-nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.site-nav-links a:hover,
.site-nav-links a.active {
    color: var(--text);
}

.site-nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 2rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}
.cart-link:hover { color: var(--accent); }

.cart-badge {
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Hero Section */
.hero-section {
    background: var(--bg-warm);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section .hero-content {
    max-width: 600px;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-section h1 strong {
    font-weight: 700;
}

.hero-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}
.btn-accent:hover { background: var(--accent-hover); color: #fff; }

.btn-outline-dark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--text);
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-outline-dark:hover { background: var(--text); color: #fff; }

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-warm {
    background: var(--bg-warm);
}

.section-dark {
    background: var(--bg-dark);
    color: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}

.section-header h2 strong {
    font-weight: 700;
}

.section-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.section-header .see-all {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}
.section-header .see-all:hover { text-decoration: underline; }

/* Category Pills */
.category-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.category-pills a {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.category-pills a:hover {
    border-color: var(--text);
    color: var(--text);
}

.category-pills a.active {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.product-card {
    position: relative;
}

.product-card a { text-decoration: none; color: var(--text); }

.product-card .card-image {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-warm);
    margin-bottom: 1rem;
}

.product-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .card-image img {
    transform: scale(1.05);
}

.product-card .card-image .img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 3rem;
}

.product-card .badge-sale {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: #fff;
    padding: 3px 10px;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.product-card .card-category {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.product-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .card-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-card .price-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.product-card .price-original {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-card .btn-cart {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s;
    font-size: 0.85rem;
}

.product-card:hover .btn-cart {
    opacity: 1;
    transform: translateY(0);
}

.product-card .btn-cart:hover {
    background: var(--accent);
}

/* Product Detail */
.product-detail {
    padding: 3rem 0;
}

.product-gallery .gallery-main img,
.product-gallery > img {
    width: 100%;
    border-radius: var(--radius);
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-warm);
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    padding-bottom: 4px;
}

.gallery-thumb {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.5;
    transition: all 0.2s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--accent);
    opacity: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.product-info .product-meta {
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.product-info .product-price-block {
    margin-bottom: 2rem;
}

.product-info .price-main {
    font-size: 2rem;
    font-weight: 700;
}

.product-info .price-old {
    font-size: 1.1rem;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 0.75rem;
}

.product-info .price-save {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 2px 10px;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.75rem;
}

.product-info .product-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.product-info .product-spec {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-warm);
    border-radius: var(--radius);
}

.qty-group {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.qty-group button {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text);
}
.qty-group button:hover { background: var(--bg-warm); }

.qty-group input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1.5px solid var(--border);
    border-right: 1.5px solid var(--border);
    height: 40px;
    font-weight: 600;
    font-size: 0.95rem;
}
.qty-group input:focus { outline: none; }

/* Cart & Checkout */
.page-section {
    padding: 3rem 0;
}

.page-section .container { max-width: 1100px; }

.page-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.card-clean {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-clean .card-body { padding: 1.5rem; }
.card-clean .card-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg-warm);
}

.quantity-input {
    width: 50px;
    text-align: center;
}

/* Order Success */
.order-success {
    text-align: center;
    padding: 5rem 0;
}
.order-success .check-icon {
    font-size: 4rem;
    color: #2e7d32;
}

/* CTA Section */
.cta-section {
    background: var(--bg-dark);
    color: #fff;
    padding: 5rem 0;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.cta-section h2 strong { font-weight: 700; }

.cta-section p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 2rem;
}

/* Footer */
.site-footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 4rem 0 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li { margin-bottom: 0.5rem; }

.footer-col ul a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-col ul a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom p { margin: 0; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 0;
    font-size: 0.85rem;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* Pagination */
.pagination .page-link {
    color: var(--text);
    border-color: var(--border);
    font-size: 0.9rem;
}
.pagination .page-item.active .page-link {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}

/* Form Controls Override */
.form-control:focus,
.form-select:focus {
    border-color: var(--text);
    box-shadow: 0 0 0 2px rgba(26,26,26,0.1);
}

/* Toast */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-dark);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: translateY(0); }
}

/* Admin Sidebar */
.admin-sidebar {
    background: #2c3e50;
    min-height: 100vh;
    padding-top: 1rem;
}
.admin-sidebar a {
    color: rgba(255,255,255,0.7);
    display: block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 991px) {
    .site-nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 1rem 0;
    }
    .site-nav-links li { width: 100%; }
    .site-nav-links a {
        display: block;
        padding: 0.6rem 0;
        border-bottom: 1px solid var(--border);
    }
    .site-nav-links a.active::after { display: none; }
    .cart-link { margin: 1rem 0 0; }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 767px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .hero-section {
        padding: 3rem 0;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .section {
        padding: 3rem 0;
    }
    .section-header h2 {
        font-size: 1.6rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .page-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .product-card .card-title { font-size: 0.85rem; }
    .product-card .price-current { font-size: 0.95rem; }
}