/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c4c4c4; border-radius: 10px; border: 2px solid #f1f1f1; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }
body { scrollbar-width: thin; scrollbar-color: #c4c4c4 #f1f1f1; }

:root {
    --primary: #1A1A2E;
    --secondary: #E94560;
    --bg: #FAFAFA;
    --text: #2D3436;
    --header-bg: #1A1A2E;
    --header-text: #FFFFFF;
    --footer-bg: #1A1A2E;
    --footer-text: #CCCCCC;
    --btn-color: #E94560;
    --btn-text: #FFFFFF;
    --btn-hover: #C0392B;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.top-bar { font-size: 13px; padding: 8px 0; }
.top-bar .container { display: flex; align-items: center; justify-content: space-between; }
.top-bar-left span { margin-right: 20px; font-size: 12px; }
.top-bar-left i { margin-right: 5px; }
.top-bar-right a { margin-left: 15px; font-size: 12px; opacity: 0.9; transition: .3s; }
.top-bar-right a:hover { opacity: 1; }

.main-header { padding: 15px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 20px rgba(0,0,0,0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { flex-shrink: 0; }
.logo img { height: 40px; }
.logo-text { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.main-nav { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.main-nav a { font-size: 13px; font-weight: 500; opacity: 0.85; transition: .3s; position: relative; white-space: nowrap; }
.main-nav a:hover { opacity: 1; }
.main-nav a::after { content: ''; position: absolute; bottom: -3px; left: 0; width: 0; height: 2px; background: var(--btn-color); transition: .3s; }
.main-nav a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.action-btn { font-size: 20px; opacity: 0.85; transition: .3s; position: relative; }
.action-btn:hover { opacity: 1; }
.cart-count { position: absolute; top: -8px; right: -8px; background: var(--btn-color); color: #fff; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.mobile-menu-btn { display: none; background: none; border: none; color: inherit; font-size: 24px; cursor: pointer; }

/* Header Search */
.header-search { position: relative; display: flex; align-items: center; }
.header-search-icon { position: absolute; left: 14px; font-size: 15px; color: #999; pointer-events: none; z-index: 1; }
.header-search-input { width: 180px; padding: 7px 12px 7px 34px; border-radius: 50px; border: 2px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06); color: inherit; font-size: 13px; font-family: inherit; transition: .3s; outline: none; }
.header-search-input::placeholder { color: rgba(255,255,255,0.4); }
.header-search-input:focus { width: 220px; border-color: var(--btn-color); background: rgba(255,255,255,0.1); }
.live-search-dropdown { position: absolute; top: 100%; right: 0; margin-top: 8px; width: 360px; background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); display: none; overflow: hidden; z-index: 999; }
.live-search-dropdown.show { display: block; }
.live-search-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-decoration: none; color: var(--text); transition: .2s; border-bottom: 1px solid #f5f5f5; }
.live-search-item:last-child { border-bottom: none; }
.live-search-item:hover { background: #fafafa; }
.live-search-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.live-search-info { flex: 1; min-width: 0; }
.live-search-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-search-brand { font-size: 11px; color: #999; margin-top: 1px; }
.live-search-price { font-size: 13px; font-weight: 700; color: var(--btn-color); margin-top: 2px; }
.live-search-empty { padding: 24px; text-align: center; color: #999; font-size: 13px; }
.live-search-all { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; background: #f8f8fc; font-size: 13px; font-weight: 600; color: var(--btn-color); text-decoration: none; transition: .2s; }
.live-search-all:hover { background: #f0f0f8; }

@media (max-width: 768px) {
    .header-search-input { width: 140px; font-size: 12px; padding: 7px 10px 7px 32px; }
    .header-search-input:focus { width: 160px; }
    .header-search-icon { left: 10px; font-size: 13px; }
    .live-search-dropdown { width: 280px; right: -50px; }
}

.mobile-menu { position: fixed; top: 0; right: -100%; width: 280px; height: 100%; background: var(--primary); color: #fff; z-index: 200; transition: .4s; padding: 20px; overflow-y: auto; }
.mobile-menu.open { right: 0; }
.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.mobile-menu-close { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }
.mobile-nav a { display: block; padding: 12px 0; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.mobile-nav hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 15px 0; }
.mobile-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 150; display: none; }
.mobile-overlay.show { display: block; }

.site-main { min-height: 400px; }

.hero-section { padding: 0; overflow: hidden; }
.hero-slider { position: relative; }
.hero-slide { display: flex; align-items: center; min-height: 450px; padding: 60px 0; position: relative; overflow: hidden; }
.hero-content { flex: 1; position: relative; z-index: 2; }
.hero-content .tag { display: inline-block; background: var(--btn-color); color: #fff; padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 15px; }
.hero-content h1 { font-size: 48px; font-weight: 800; line-height: 1.2; margin-bottom: 15px; }
.hero-content p { font-size: 18px; opacity: 0.85; margin-bottom: 25px; max-width: 500px; }
.hero-image { flex: 1; position: relative; z-index: 2; display: flex; justify-content: center; }
.hero-image img { max-height: 380px; object-fit: contain; filter: drop-shadow(0 10px 30px rgba(0,0,0,0.15)); }
.hero-bg-shape { position: absolute; top: -50%; right: -20%; width: 600px; height: 600px; border-radius: 50%; opacity: 0.05; background: currentColor; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 30px; border-radius: 50px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: .3s; font-family: inherit; }
.btn-primary { background: var(--btn-color); color: var(--btn-text); }
.btn-primary:hover { background: var(--btn-hover); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(233,69,96,0.3); }
.btn-outline { background: transparent; border: 2px solid var(--btn-color); color: var(--btn-color); }
.btn-outline:hover { background: var(--btn-color); color: var(--btn-text); }
.btn-lg { padding: 16px 36px; font-size: 15px; }

.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 32px; font-weight: 800; color: var(--primary); margin-bottom: 10px; }
.section-title p { color: #888; font-size: 15px; max-width: 500px; margin: 0 auto; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.category-card { background: #fff; border-radius: var(--radius); padding: 30px 20px; text-align: center; cursor: pointer; transition: .3s; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.category-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.category-card .icon { font-size: 40px; color: var(--btn-color); margin-bottom: 12px; display: block; }
.category-card h3 { font-size: 14px; font-weight: 600; }
.category-card span { font-size: 12px; color: #999; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; }
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; transition: .3s; box-shadow: var(--shadow); position: relative; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.product-image { position: relative; overflow: hidden; aspect-ratio: 1/1; background: #f8f9fa; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: .6s; }
.product-card:hover .product-image img { transform: scale(1.08); }
.product-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; flex-direction: column; }
.product-badge { padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.product-badge.sale { background: var(--btn-color); color: #fff; }
.product-badge.new { background: #28a745; color: #fff; }
.product-badge.hit { background: #ffc107; color: #333; }
.product-actions { position: absolute; bottom: 10px; right: 10px; display: flex; gap: 5px; opacity: 0; transform: translateY(10px); transition: .3s; }
.product-card:hover .product-actions { opacity: 1; transform: translateY(0); }
.product-actions button { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1); transition: .3s; font-size: 14px; color: var(--text); }
.product-actions button:hover { background: var(--btn-color); color: #fff; }
.product-info { padding: 18px; }
.product-info h3 { font-size: 14px; font-weight: 600; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-info .brand { font-size: 12px; color: #999; margin-bottom: 5px; }
.product-info .price { display: flex; align-items: center; gap: 8px; }
.product-info .price .current { font-size: 18px; font-weight: 700; color: var(--btn-color); }
.product-info .price .old { font-size: 13px; color: #999; text-decoration: line-through; }
.product-info .price .discount { font-size: 11px; background: #ffebee; color: var(--btn-color); padding: 2px 6px; border-radius: 4px; font-weight: 600; }

.features-section { background: #fff; padding: 60px 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.feature-item { text-align: center; padding: 20px; }
.feature-item i { font-size: 36px; color: var(--btn-color); margin-bottom: 15px; }
.feature-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.feature-item p { font-size: 13px; color: #888; }

.newsletter-section { padding: 60px 0; background: var(--primary); color: #fff; text-align: center; }
.newsletter-section h2 { font-size: 28px; font-weight: 700; margin-bottom: 10px; }
.newsletter-section p { opacity: 0.8; margin-bottom: 25px; }
.newsletter-form { display: flex; max-width: 500px; margin: 0 auto; gap: 10px; }
.newsletter-form input { flex: 1; padding: 14px 20px; border-radius: 50px; border: none; font-size: 14px; font-family: inherit; outline: none; }
.newsletter-form input:focus { box-shadow: 0 0 0 3px rgba(233,69,96,0.15); }
.newsletter-form button { padding: 14px 25px; border-radius: 50px; border: none; background: var(--btn-color); color: #fff; font-weight: 600; cursor: pointer; font-family: inherit; }

.whatsapp-float { position: fixed; bottom: 20px; right: 20px; z-index: 99; }
.whatsapp-float a { display: flex; align-items: center; justify-content: center; width: 55px; height: 55px; border-radius: 50%; background: #25D366; color: #fff; font-size: 28px; box-shadow: 0 4px 15px rgba(37,211,102,0.4); transition: .3s; }
.whatsapp-float a:hover { transform: scale(1.1); }

.site-footer { padding: 60px 0 0; position: relative; overflow: hidden; }
.site-footer::before { content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(233,69,96,0.06) 0%, transparent 70%); top: -200px; right: -150px; pointer-events: none; }
.site-footer::after { content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(79,172,254,0.05) 0%, transparent 70%); bottom: -200px; left: -150px; pointer-events: none; }
.site-footer .footer-col p { line-height: 1.9; font-size: 14px; opacity: .8; max-width: 360px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; text-align: center; align-items: start; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 40px; padding: 24px 0; text-align: center; font-size: 13px; opacity: .55; position: relative; }
.footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.2); }
.footer-bottom a:hover { opacity: 1; text-decoration-color: currentColor; }
.footer-col h4 { font-size: 16px; font-weight: 700; margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 30px; height: 2px; background: var(--btn-color); }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.footer-links li i { color: var(--btn-color); width: 16px; text-align: center; }
.footer-links a { opacity: 0.8; transition: .3s; }
.footer-links a:hover { opacity: 1; color: var(--btn-color); }
.social-links { display: flex; gap: 10px; justify-content: center; }
.social-link { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; font-size: 17px; transition: .3s; text-decoration: none; color: inherit; }
.social-link:hover { background: var(--btn-color); color: #fff; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(233,69,96,0.3); }

.breadcrumb { padding: 15px 0; font-size: 13px; color: #888; }
.breadcrumb a { color: var(--btn-color); }
.breadcrumb span { color: #888; }

.page-header { padding: 30px 0; }
.page-header h1 { font-size: 28px; font-weight: 700; }

/* ===== FILTER SIDEBAR ===== */
.product-layout { display: grid; grid-template-columns: 270px 1fr; gap: 30px; align-items: start; }

.filter-sidebar { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.filter-sidebar-header { display: none; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #f0f0f0; font-weight: 700; font-size: 17px; }
.filter-sidebar-header button { background: none; border: none; font-size: 13px; color: var(--btn-color); cursor: pointer; font-weight: 600; font-family: inherit; padding: 0; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-bottom: 1px solid #f0f0f0; }
.active-filter-tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; background: #f0f0f8; border-radius: 6px; font-size: 12px; color: #555; }
.active-filter-tag button { background: none; border: none; cursor: pointer; font-size: 14px; color: #999; padding: 0; line-height: 1; display: flex; }
.active-filter-tag button:hover { color: var(--btn-color); }
.clear-all-btn { font-size: 12px; color: var(--btn-color); font-weight: 600; text-decoration: none; padding: 5px 0; }
.clear-all-btn:hover { text-decoration: underline; }

.filter-accordion { }
.filter-section { border-bottom: 1px solid #f0f0f0; }
.filter-section:last-child { border-bottom: none; }
.filter-section-title { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 18px; background: none; border: none; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; color: var(--text); text-align: left; transition: .2s; }
.filter-section-title:hover { background: #fafafa; }
.filter-section-title i { font-size: 10px; transition: .3s; color: #999; }
.filter-section-title.active i { transform: rotate(180deg); }
.filter-section-body { padding: 0 18px 14px; display: none; }
.filter-section-body.open { display: block; }

.filter-check-list { max-height: 240px; overflow-y: auto; }
.filter-check-list::-webkit-scrollbar { width: 4px; }
.filter-check-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.filter-check { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 5px; cursor: pointer; transition: .1s; font-size: 13px; }
.filter-check:hover { background: #f7f7fb; }
.filter-check input[type="checkbox"],
.filter-check input[type="radio"] { width: 16px; height: 16px; accent-color: var(--btn-color); cursor: pointer; flex-shrink: 0; margin: 0; }
.filter-check .count { margin-left: auto; font-size: 11px; color: #bbb; }
.filter-check.filter-radio input[type="radio"] { width: 15px; height: 15px; }

/* Category tree */
.filter-cat-parent { font-weight: 600; margin-bottom: 2px; }
.filter-cat-child { padding-left: 24px; font-size: 12px; }

/* Color swatches */
.filter-check.color-swatch { display: flex; align-items: center; gap: 10px; }
.color-dot { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.08); }
.color-dot.multi { background: linear-gradient(45deg, #fff 50%, #000 50%); }

/* Price range */
.price-range-inputs { display: flex; align-items: center; gap: 6px; }
.price-range-inputs input { flex: 1; padding: 8px 10px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 12px; font-family: inherit; outline: none; width: 0; min-width: 0; transition: .2s; }
.price-range-inputs input:focus { border-color: var(--btn-color); box-shadow: 0 0 0 2px rgba(233,69,96,0.08); }
.price-range-inputs span { font-size: 12px; color: #bbb; flex-shrink: 0; }
.price-apply { width: 100%; margin-top: 8px; padding: 8px; border: none; border-radius: 6px; background: var(--btn-color); color: #fff; font-weight: 600; font-size: 12px; cursor: pointer; font-family: inherit; transition: .2s; }
.price-apply:hover { opacity: .9; }

/* Sort bar (right side) */
.product-content { min-width: 0; }
.sort-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 25px; flex-wrap: wrap; }
.sort-bar-left { display: flex; align-items: center; gap: 12px; }
.sort-bar-right { font-size: 13px; color: #888; }
.filter-sidebar-toggle { display: none; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid #e0e0e0; border-radius: 8px; background: #fff; font-size: 13px; font-family: inherit; cursor: pointer; transition: .2s; }
.filter-sidebar-toggle:hover { border-color: #ccc; }
.filter-sidebar-toggle i { font-size: 14px; }
.filter-sidebar-toggle .active-count { background: var(--btn-color); color: #fff; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.sort-select { padding: 9px 32px 9px 14px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 13px; font-family: inherit; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; cursor: pointer; outline: none; transition: .2s; }
.sort-select:focus { border-color: var(--btn-color); }

/* Mobile filter sidebar */
.filter-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 199; display: none; }
.filter-overlay.show { display: block; }
.filter-apply-mobile { display: none; }

@media (max-width: 768px) {
    .product-layout { grid-template-columns: 1fr; }
    .filter-sidebar { position: fixed; top: 0; left: -100%; width: 300px; max-width: 85vw; height: 100%; z-index: 200; border-radius: 0; box-shadow: 0 0 40px rgba(0,0,0,0.2); transition: left .35s; overflow-y: auto; }
    .filter-sidebar.open { left: 0; }
    .filter-sidebar-header { display: flex; }
    .filter-sidebar-toggle { display: inline-flex; }
    .filter-apply-mobile { display: block; width: calc(100% - 36px); margin: 16px 18px; padding: 12px; border: none; border-radius: 8px; background: var(--btn-color); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
    .filter-apply-mobile:hover { opacity: .9; }
    .sort-bar-right { font-size: 12px; }
}
@media (min-width: 769px) {
    .filter-section-body { display: block !important; }
    .filter-section-title i { display: none; }
    .filter-sidebar { position: sticky; top: 90px; }
}

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 40px 0; }
.product-gallery { }
.product-main-image { background: #fff; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; }
.product-main-image img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbs { display: flex; gap: 10px; }
.product-thumbs img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: .3s; }
.product-thumbs img.active, .product-thumbs img:hover { border-color: var(--btn-color); }
.product-info-detail h1 { font-size: 28px; font-weight: 700; margin-bottom: 10px; }
.product-info-detail .rating { margin-bottom: 10px; color: #ffc107; font-size: 14px; }
.product-info-detail .rating span { color: #888; margin-left: 5px; }
.product-info-detail .price-detail { margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.product-info-detail .price-detail .current { font-size: 32px; font-weight: 800; color: var(--btn-color); }
.product-info-detail .price-detail .old { font-size: 18px; color: #999; text-decoration: line-through; }
.product-info-detail .price-detail .kdv { font-size: 13px; color: #888; }
.product-info-detail .description { color: #555; margin-bottom: 25px; line-height: 1.8; }
.variant-group { margin-bottom: 20px; }
.variant-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.variant-options { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-btn { padding: 8px 18px; border: 2px solid #eee; border-radius: 8px; background: #fff; cursor: pointer; transition: .3s; font-size: 13px; font-family: inherit; }
.variant-btn:hover, .variant-btn.active { border-color: var(--btn-color); color: var(--btn-color); }
.qty-selector { display: flex; align-items: center; gap: 10px; margin-bottom: 25px; }
.qty-selector button { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #eee; background: #fff; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.qty-selector input { width: 50px; text-align: center; border: 2px solid #eee; border-radius: 8px; padding: 8px; font-size: 14px; }
.add-to-cart-btn { padding: 16px 40px; width: 100%; justify-content: center; }

.auth-wrapper { display: flex; align-items: center; justify-content: center; min-height: 500px; padding: 40px 0; }
.auth-box { background: #fff; border-radius: var(--radius); padding: 40px; width: 450px; max-width: 100%; box-shadow: var(--shadow); }
.auth-box h2 { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 5px; }
.auth-box .subtitle { text-align: center; color: #888; font-size: 14px; margin-bottom: 25px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #555; }
.form-group label i { margin-right: 4px; color: #bbb; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 15px; border: 2px solid #eee; border-radius: 8px; font-size: 14px; transition: .3s; font-family: inherit; box-sizing: border-box; background: #fff; color: #333; }
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: #ddd; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--btn-color); outline: none; box-shadow: 0 0 0 3px rgba(233,69,96,0.08); background: #fcfcfc; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #bbb; }
.form-group select { padding-right: 15px; cursor: pointer; }
.select-filter-wrap { position: relative; }
.select-filter-wrap select { width: 100%; }
.filter-indicator { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #e94560; pointer-events: none; display: none; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 50px); background: #fff; padding: 0 4px; line-height: 1.2; }
.form-group textarea { resize: vertical; line-height: 1.6; min-height: 100px; }
.form-group input:disabled, .form-group select:disabled, .form-group textarea:disabled { opacity: .6; cursor: not-allowed; background: #f8f8fa; }
.form-group .form-help { font-size: 12px; color: #aaa; margin-top: 4px; display: block; }
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; cursor: pointer; }
.form-check input[type="checkbox"], .form-check input[type="radio"] { width: 18px; height: 18px; accent-color: var(--btn-color); cursor: pointer; flex-shrink: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.alert { padding: 12px 15px; border-radius: 8px; margin-bottom: 15px; font-size: 13px; }
.alert-success { background: #d4edda; color: #155724; }
.alert-danger { background: #f8d7da; color: #721c24; }
.alert-warning { background: #fff3cd; color: #856404; }
.alert-info { background: #d1ecf1; color: #0c5460; }

.cart-page { padding: 40px 0; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: 12px; font-size: 13px; color: #888; border-bottom: 2px solid #eee; }
.cart-table td { padding: 15px 12px; border-bottom: 1px solid #eee; vertical-align: middle; }
.cart-product { display: flex; align-items: center; gap: 15px; }
.cart-product img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.cart-product .name { font-weight: 600; font-size: 14px; }
.cart-product .variant { font-size: 12px; color: #888; }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #eee; background: #fff; cursor: pointer; }
.cart-qty input { width: 40px; text-align: center; border: 1px solid #eee; border-radius: 5px; padding: 5px; }
.cart-remove { color: var(--btn-color); cursor: pointer; font-size: 18px; }

.cart-summary { background: #fff; border-radius: var(--radius); padding: 25px; box-shadow: var(--shadow); position: sticky; top: 100px; }
.cart-summary h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; }
.summary-row.total { border-top: 2px solid #eee; margin-top: 10px; padding-top: 15px; font-size: 18px; font-weight: 700; }
.summary-row.total .value { color: var(--btn-color); }

.checkout-steps { display: flex; justify-content: center; gap: 0; margin-bottom: 40px; }
.step { display: flex; align-items: center; gap: 10px; padding: 12px 25px; background: #f0f2f5; font-size: 13px; }
.step:first-child { border-radius: 50px 0 0 50px; }
.step:last-child { border-radius: 0 50px 50px 0; }
.step.active { background: var(--btn-color); color: #fff; }
.step.completed { background: #28a745; color: #fff; }

.account-layout { display: grid; grid-template-columns: 250px 1fr; gap: 30px; padding: 40px 0; }
.account-sidebar { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.account-sidebar .user-info { text-align: center; padding: 15px 0; border-bottom: 1px solid #eee; margin-bottom: 15px; }
.account-sidebar .user-info .avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--btn-color); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 10px; }
.account-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 13px; transition: .3s; margin-bottom: 3px; }
.account-nav a:hover, .account-nav a.active { background: #f8f9fa; color: var(--btn-color); }

.empty-state { text-align: center; padding: 80px 20px; }
.empty-state i { font-size: 64px; color: #ddd; margin-bottom: 20px; }
.empty-state h3 { font-size: 20px; color: #666; margin-bottom: 10px; }
.empty-state p { color: #999; margin-bottom: 20px; }

.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 30px; }
.page-link { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: #fff; border: 1px solid #eee; color: #555; text-decoration: none; font-size: 13px; transition: .3s; }
.page-link:hover { border-color: var(--btn-color); color: var(--btn-color); }
.page-link.active { background: var(--btn-color); color: #fff; border-color: var(--btn-color); }

/* ===== RESPONSIVE ===== */
html { overflow-x: hidden; }
body { overflow-x: hidden; width: 100%; max-width: 100vw; }
img { max-width: 100%; height: auto; }
table { max-width: 100%; }
form { max-width: 100%; }
select, input, textarea, button { max-width: 100%; box-sizing: border-box; }
[style*="grid-template-columns"] { max-width: 100%; }

/* Tablet (768-1024) */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 36px; }
    .hero-slide { min-height: 350px; }
    .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .category-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .product-layout { grid-template-columns: 240px 1fr; gap: 20px; }
    .account-layout { grid-template-columns: 220px 1fr; gap: 20px; }
}

/* Mobile large (481-768) */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .main-nav { display: none; }
    .mobile-menu-btn { display: block; }
    .top-bar-left span:last-child { display: none; }
    .top-bar-left span { font-size: 11px; }
    .top-bar-right a { font-size: 11px; margin-left: 10px; }
    
    /* Header */
    .main-header { padding: 10px 0; }
    .header-inner { gap: 10px; }
    .logo img { height: 34px; }
    .header-search-input { width: 130px; padding: 6px 10px 6px 30px; font-size: 12px; }
    .header-search-input:focus { width: 160px; }
    .header-search-icon { left: 9px; font-size: 12px; }
    .live-search-dropdown { width: 280px; right: -60px; }
    .header-actions { gap: 10px; }
    .header-actions .action-btn { font-size: 17px; }
    .cart-count { width: 16px; height: 16px; font-size: 9px; top: -6px; right: -6px; }
    
    /* Hero */
    .hero-slide { flex-direction: column; text-align: center; min-height: auto; padding: 30px 0; }
    .hero-content h1 { font-size: 26px; }
    .hero-content p { font-size: 15px; margin: 0 auto 20px; }
    .hero-image { margin-top: 20px; }
    .hero-image img { max-height: 200px; }
    
    /* Sections */
    .section { padding: 40px 0; }
    .section-title { margin-bottom: 25px; }
    .section-title h2 { font-size: 22px; }
    
    /* Products */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-info { padding: 10px; }
    .product-info h3 { font-size: 13px; }
    .product-info .brand { font-size: 11px; }
    .product-info .price .current { font-size: 15px; }
    .product-badges { top: 6px; left: 6px; }
    .product-badge { font-size: 10px; padding: 3px 7px; }
    
    /* Category */
    .category-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .category-card { padding: 20px 12px; }
    .category-card .icon { font-size: 30px; }
    .category-card h3 { font-size: 12px; }
    
    /* Product detail */
    .product-detail { grid-template-columns: 1fr; gap: 20px; padding: 20px 0; }
    .product-info-detail h1 { font-size: 22px; }
    .product-info-detail .price-detail .current { font-size: 26px; }
    .product-thumbs img { width: 60px; height: 60px; }
    
    /* Account */
    .account-layout { grid-template-columns: 1fr; padding: 20px 0; }
    
    /* Cart */
    .cart-page { padding: 20px 0; }
    .cart-table { display: block; }
    .cart-table thead { display: none; }
    .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
    .cart-table tr { padding: 15px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; }
    .cart-table td { padding: 5px 0; border: none; display: flex; align-items: center; justify-content: space-between; }
    .cart-table td::before { content: attr(data-label); font-weight: 600; font-size: 12px; color: #888; }
    .cart-summary { position: static; margin-top: 20px; }
    
    /* Checkout */
    .checkout-steps { flex-wrap: nowrap; overflow-x: auto; gap: 0; padding: 0; -webkit-overflow-scrolling: touch; }
    .step { flex: 0 0 auto; padding: 10px 14px; font-size: 11px; white-space: nowrap; gap: 5px; }
    .step i { font-size: 12px; }
    
    /* Auth */
    .auth-box { padding: 25px 20px; }
    
    /* Forms */
    .form-row { grid-template-columns: 1fr; gap: 0; }
    
    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 25px; text-align: center; }
    .footer-col h4::after { left: 50%; transform: translateX(-50%); }
    .social-links { justify-content: center; }
    .footer-links li { justify-content: center; }
    .newsletter-form { flex-direction: column; }
    .newsletter-form input { width: 100%; }
    
    /* Features */
    .features-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    
    /* Pagination */
    .pagination { gap: 4px; margin-top: 20px; }
    .page-link { width: 32px; height: 32px; font-size: 12px; }
    
    /* Filter layout */
    .product-layout { grid-template-columns: 1fr; }
    .filter-sidebar { position: fixed; top: 0; left: -100%; width: 300px; max-width: 85vw; height: 100%; z-index: 200; border-radius: 0; box-shadow: 0 0 40px rgba(0,0,0,0.2); transition: left .35s; overflow-y: auto; }
    .filter-sidebar.open { left: 0; }
    .filter-sidebar-header { display: flex; }
    .filter-sidebar-toggle { display: inline-flex; }
    .filter-apply-mobile { display: block; width: calc(100% - 36px); margin: 16px 18px; padding: 12px; border: none; border-radius: 8px; background: var(--btn-color); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
    .filter-apply-mobile:hover { opacity: .9; }
    .sort-bar { gap: 10px; }
    .sort-bar-right { font-size: 12px; }
    .sort-select { font-size: 12px; padding: 7px 28px 7px 10px; }
    
    /* Address cards */
    .account-layout + div [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
    
    /* Modal */
    .modal-content { padding: 20px !important; }
}

/* Mobile small (320-480) - iPhone 4, SE etc */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .product-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .product-card { border-radius: 8px; }
    .product-info { padding: 8px; }
    .product-info h3 { font-size: 12px; margin-bottom: 3px; }
    .product-info .brand { font-size: 10px; margin-bottom: 3px; }
    .product-info .price .current { font-size: 13px; }
    .product-info .price .old { font-size: 11px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .category-card { padding: 15px 10px; }
    .hero-content h1 { font-size: 22px; }
    .hero-content p { font-size: 14px; }
    .hero-image img { max-height: 160px; }
    .section { padding: 30px 0; }
    .section-title h2 { font-size: 20px; }
    .page-header h1 { font-size: 22px; }
    .page-header { padding: 20px 0; }
    .breadcrumb { font-size: 12px; }
    .header-search-input { width: 100px; padding: 5px 8px 5px 26px; font-size: 11px; }
    .header-search-input:focus { width: 130px; }
    .header-search-icon { left: 7px; font-size: 11px; }
    .logo img { height: 30px; }
    .features-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .feature-item { padding: 12px; }
    .feature-item i { font-size: 28px; margin-bottom: 8px; }
    .feature-item h4 { font-size: 13px; }
    .feature-item p { font-size: 12px; }
    .filter-sidebar-toggle { font-size: 12px; padding: 7px 12px; }
    .filter-sidebar-toggle i { font-size: 12px; }
    .sort-bar-right { font-size: 11px; }
    
    /* Account */
    .account-sidebar { padding: 15px; }
    .account-nav a { font-size: 12px; padding: 8px 10px; }
    
    /* Empty state */
    .empty-state i { font-size: 48px; }
    .empty-state h3 { font-size: 18px; }
    .empty-state { padding: 50px 15px; }
    
    /* Cart */
    .cart-product img { width: 60px; height: 60px; }
    
    /* Auth */
    .auth-box { padding: 20px 15px; }
    
    /* Modal */
    .modal-content { padding: 15px !important; width: 95% !important; }
}

/* Very small (under 360px) */
@media (max-width: 360px) {
    .container { padding: 0 10px; }
    .product-grid { gap: 6px; }
    .product-info { padding: 6px; }
    .product-info h3 { font-size: 11px; }
    .product-info .price .current { font-size: 12px; }
    .header-search-input { width: 80px; }
    .header-search-input:focus { width: 110px; }
    .top-bar-right a { font-size: 10px; margin-left: 6px; }
    .top-bar-left span { font-size: 10px; margin-right: 6px; }
}

/* Desktop: filter sections always visible */
@media (min-width: 769px) {
    .filter-section-body { display: block !important; }
    .filter-section-title i { display: none; }
    .filter-sidebar { position: sticky; top: 90px; }
}

/* Tablet landscape fix for address grid */
@media (min-width: 481px) and (max-width: 768px) {
    .account-layout + div [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
}

/* Checkout page mobile */
@media (max-width: 768px) {
    form[style*="grid-template-columns: 1fr 350px"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns: 1fr 350px"] > * { min-width: 0; }
}