:root {
    --primary: #FFC107;
    --primary-dark: #e6ac00;
    --black: #111111;
    --dark: #1a1a1a;
    --gray: #f5f5f5;
    --gray-2: #eeeeee;
    --text: #333333;
    --text-light: #777777;
    --white: #ffffff;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

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

/* Header */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 12px;
}
.logo img {
    height: 105px;
    width: auto;
}
.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.5px;
}
.logo-text span { color: var(--primary); }

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}
.search-box input {
    width: 100%;
    padding: 10px 42px 10px 16px;
    border: 1px solid var(--gray-2);
    border-radius: 24px;
    background: var(--gray);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}
.search-box input:focus {
    border-color: var(--primary);
    background: var(--white);
}
.search-box button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: var(--primary);
    color: var(--black);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.contact-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--black);
}

/* Category pills */
.category-bar {
    background: var(--white);
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-2);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.category-bar::-webkit-scrollbar { display: none; }
.category-list {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.category-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: 24px;
    background: var(--gray);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.category-list a.active,
.category-list a:hover {
    background: var(--black);
    color: var(--primary);
}
.category-list img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 50%;
}

/* Banner */
.banner-section {
    padding: 16px 0;
}
.banner-slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--dark);
}
.banner-slide {
    display: none;
    width: 100%;
}
.banner-slide.active { display: block; }
.banner-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}
.banner-mobile { display: none; }

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
}
.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-2);
    border: none;
    cursor: pointer;
}
.banner-dot.active { background: var(--primary); width: 24px; border-radius: 4px; }

/* Filters */
.filter-bar {
    background: var(--white);
    padding: 14px 0;
    margin-bottom: 16px;
    border-radius: 0 0 var(--radius) var(--radius);
}
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-form select,
.filter-form input {
    padding: 8px 12px;
    border: 1px solid var(--gray-2);
    border-radius: var(--radius-sm);
    background: var(--gray);
    font-size: 0.85rem;
    outline: none;
}
.filter-form button {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--black);
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

/* Product grid */
.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 24px 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

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

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.product-image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--gray);
}
.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.product-card:hover .product-image-wrap img { transform: scale(1.05); }
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: var(--black);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
}
.product-badge.sale { background: #ff3b30; color: #fff; }
.product-badge.new { background: #34c759; color: #fff; }

.product-info { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.product-category {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 4px;
}
.product-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--black);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}
.product-rating {
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.product-rating .count {
    color: var(--text-light);
    font-size: 0.75rem;
}
.product-price {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.price-current {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--black);
}
.price-old {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* Product detail */
.product-detail {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin: 16px 0;
    box-shadow: var(--shadow-sm);
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.detail-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.detail-main-img {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--gray);
}
.detail-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.detail-thumbs img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
}
.detail-thumbs img.active { border-color: var(--primary); }

.detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--black);
    margin: 0 0 12px;
}
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    color: var(--text-light);
    font-size: 0.85rem;
}
.detail-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 8px;
}
.detail-price .old {
    font-size: 1.1rem;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 10px;
}
.detail-stock {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 16px;
}
.detail-desc {
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 20px;
}
.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--primary);
    color: var(--black);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-dark {
    background: var(--black);
    color: var(--white);
}
.btn-dark:hover { background: var(--dark); }
.btn-outline {
    background: transparent;
    color: var(--black);
    border: 2px solid var(--gray-2);
}

/* Contact */
.contact-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin: 16px 0;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-2);
}
.contact-list .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.contact-list a { color: var(--text); word-break: break-all; }
.contact-list a:hover { color: var(--primary-dark); }
.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 300px;
    background: var(--gray);
}
.map-wrap iframe { width: 100%; height: 100%; min-height: 300px; border: 0; }

/* Footer */
.site-footer {
    background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 40px;
    position: relative;
}
.footer-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #ff9800, #ff5722, #9c27b0, #2196f3);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}
.footer-brand img { height: 105px; margin-bottom: 12px; }
.footer-brand .logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}
.footer-brand .logo-text span { color: var(--primary); }
.footer-brand p {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}
.footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}
.footer-cat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-cat-tags a {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    color: #ccc;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.footer-cat-tags a:hover {
    background: var(--primary);
    color: var(--black);
    border-color: var(--primary);
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #aaa; font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); }
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: #aaa;
    font-size: 0.9rem;
}
.footer-contact-list .c-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}
.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}
.footer-social a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.social-line { background: #06C755; }
.social-phone { background: var(--primary); color: var(--black); }
.social-fb { background: #1877f2; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: #777;
    font-size: 0.85rem;
}

/* Empty */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
.empty-state h3 { color: var(--black); margin-bottom: 8px; }

/* Responsive */
@media (max-width: 1200px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .header-inner { height: 60px; }
    .search-box { order: 3; max-width: none; width: 100%; margin-top: 8px; }
    .site-header .container { padding-bottom: 10px; }
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid,
    .contact-grid,
    .footer-grid { grid-template-columns: 1fr; }
    .banner-pc { display: none; }
    .banner-mobile { display: block; }
}

@media (max-width: 600px) {
    .container { padding: 0 12px; }
    .logo-text { font-size: 1rem; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-grid.mobile-1 { grid-template-columns: 1fr; }
    .product-name { font-size: 0.85rem; }
    .price-current { font-size: 0.95rem; }
    .price-old { font-size: 0.75rem; }
    .filter-form { flex-direction: column; align-items: stretch; }
    .filter-group { justify-content: space-between; }
    .category-list a { padding: 6px 12px; font-size: 0.8rem; }
    .detail-title { font-size: 1.2rem; }
    .detail-price { font-size: 1.3rem; }
    .detail-thumbs { grid-template-columns: repeat(3, 1fr); }
    .btn { padding: 10px 16px; font-size: 0.9rem; }
}

/* Mobile app feel */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-2);
    z-index: 100;
    padding: 8px 0;
}
.mobile-nav-list {
    display: flex;
    justify-content: space-around;
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--text-light);
}
.mobile-nav a.active { color: var(--primary); }
.mobile-nav .icon {
    font-size: 1.3rem;
    line-height: 1;
}

@media (max-width: 900px) {
    .mobile-nav { display: block; }
    body { padding-bottom: 70px; }
}
