/* MallAfrica Custom Styles */
:root {
  --primary: #0284c7;
  --primary-dark: #0270a8;
  --accent: #0284c7;
  --accent-dark: #0270a8;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: linear-gradient(160deg, #ffffff 0%, #f1f5f9 55%, #e8eef5 100%);
  --white: rgba(255,255,255,0.72);
  --border: rgba(148,163,184,0.38);
  --error: #ef4444;
  --success: #10b981;
  --glass-blur: 14px;
  --glass-shadow: 0 8px 32px rgba(2,132,199,0.12);
}
* { box-sizing: border-box; }
body { font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; color: var(--text); background: var(--bg); background-attachment: fixed; min-height: 100vh; margin: 0; line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ===== Top Bar ===== */
.top-bar { background: var(--primary-dark); color: rgba(255,255,255,0.7); font-size: 0.8rem; }
.top-bar-inner { max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: flex; justify-content: space-between; align-items: center; height: 34px; }
.top-bar a { color: rgba(255,255,255,0.7); margin-left: 1rem; font-size: 0.78rem; }
.top-bar a:hover { color: #fff; }
.top-bar-left a { margin-left: 0; margin-right: 1rem; }

/* ===== Header ===== */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center; height: 72px; gap: 2rem; }
.site-logo-wrap { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; text-decoration: none; }
.site-logo-img { height: 44px; max-width: 180px; object-fit: contain; display: block; }
.site-brand-text { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.site-logo-wrap:hover .site-brand-text { color: var(--primary-dark); }
.site-logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); flex-shrink: 0; letter-spacing: -0.5px; }
.site-logo:hover { color: var(--primary-dark); }

.header-search { flex: 1; max-width: 620px; position: relative; }
.header-search form { display: flex; }
.search-type-select { appearance: none; -webkit-appearance: none; height: 40px; padding: 0 1.7rem 0 1rem; border: 2px solid var(--primary); border-right: none; border-radius: 20px 0 0 20px; background: rgba(255,255,255,0.72) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 0.6rem center; font-size: 0.82rem; font-weight: 500; color: var(--text); cursor: pointer; flex-shrink: 0; outline: none; }
.search-type-select option { background: #fff; color: #000; }
.header-search input { flex: 1; height: 40px; padding: 0 1rem; border: 2px solid var(--primary); border-left: none; border-right: none; border-radius: 0; font-size: 0.9rem; outline: none; background: #fff; }
.header-search input:focus { border-color: var(--primary-dark); }
.header-search button { width: 44px; height: 40px; border: 2px solid var(--primary); border-left: none; background: var(--primary); color: #fff; border-radius: 0 20px 20px 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.header-search button:hover { background: var(--primary-dark); }

.header-actions { display: flex; align-items: center; gap: 1rem; margin-left: auto; flex-shrink: 0; }
.cart-link { position: relative; display: flex; align-items: center; color: var(--text); padding: 0.4rem 0.6rem; border-radius: 6px; transition: all 0.2s; }
.cart-link:hover { color: var(--primary); background: #f0f9ff; }
.cart-count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--error); color: #fff; font-size: 0.7rem; font-weight: 700; position: absolute; top: -4px; right: -6px; }
.user-icon-btn { background:none; border:none; cursor:pointer; font-family:inherit; }
.user-dropdown .header-dropdown-menu { min-width: 140px; }

/* ===== Header Actions - Unified ===== */
.header-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-shrink: 0; }
.hi-link { position: relative; display: inline-flex; align-items: center; gap: 3px; padding: 0 8px; height: 34px; border-radius: 6px; color: var(--text); transition: all 0.15s; border: none; background: none; cursor: pointer; font-family: inherit; font-size: 0.78rem; font-weight: 500; white-space: nowrap; text-decoration: none; }
.hi-link:hover { color: var(--primary); background: #f0f9ff; }
.hi-link.active { color: var(--primary); background: #e0f2fe; }
.hi-link-text { position: relative; display: inline-flex; align-items: center; gap: 3px; padding: 0 0.6rem; height: 34px; border-radius: 6px; color: var(--text); transition: all 0.15s; border: none; background: none; cursor: pointer; font-family: inherit; font-size: 0.8rem; font-weight: 500; white-space: nowrap; text-decoration: none; }
.hi-link-text:hover { color: var(--primary); background: #f0f9ff; }
.hi-link-text.active { color: var(--primary); background: #e0f2fe; }
.hi-link-text .caret { font-size: 0.7rem; margin-left: 1px; }
.hi-link svg { flex-shrink: 0; }
.hi-label { font-size: 0.78rem; font-weight: 500; }
.hi-currency { font-weight: 700; min-width: 16px; text-align: center; }
.hi-badge { position: absolute; top: -2px; right: 0; display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--error); color: #fff; font-size: 0.65rem; font-weight: 700; }
.hi-dropdown { position: relative; display: flex; }
.hi-dropdown .hi-link { width: auto; }
.hi-menu { display: none; position: absolute; top: 100%; right: 0; z-index: 200; min-width: 160px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); margin-top: 4px; padding: 0.3rem 0; backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); }
.hi-dropdown.open .hi-menu { display: block; }
.hi-menu a, .hi-menu button { display: block; width: 100%; padding: 0.45rem 0.85rem; font-size: 0.83rem; color: var(--text); text-decoration: none; transition: background 0.12s; border: none; background: none; cursor: pointer; font-family: inherit; text-align: left; }
.hi-menu a:hover, .hi-menu button:hover { background: #f3f4f6; }
.hi-menu a.active { background: #e0f2fe; color: var(--primary); font-weight: 600; }
.hi-menu form { margin: 0; }

.cart-dropdown { min-width: 240px; padding: 0; max-height: 320px; overflow-y: auto; }
.cart-preview-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.85rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cart-preview-thumb { width: 32px; height: 32px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: #f3f4f6; display: flex; align-items: center; justify-content: center; }
.cart-preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-preview-name { flex: 1; font-size: 0.8rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cart-preview-qty { flex-shrink: 0; font-size: 0.78rem; color: var(--text-light); }
.cart-preview-price { flex-shrink: 0; font-size: 0.82rem; color: var(--primary); font-weight: 600; }
.cart-preview-remove { background: none; border: none; color: #cbd5e1; font-size: 1.05rem; line-height: 1; cursor: pointer; padding: 0 0.1rem; flex-shrink: 0; width: auto !important; display: inline-flex !important; align-items: center; justify-content: center; }
.cart-preview-row .cart-preview-remove { width: auto; padding: 0 0.1rem; font-size: 1.05rem; }
.cart-preview-remove:hover { color: #dc2626; }
.cart-preview-empty { text-align: center; padding: 1rem 0.85rem; color: var(--text-light); font-size: 0.85rem; }
.cart-preview-total { padding: 0.45rem 0.85rem; font-size: 0.82rem; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); text-align: right; }
.cart-dropdown .cart-preview-link { display: block; text-align: center; padding: 0.55rem 0.85rem; background: var(--primary); color: #fff; font-weight: 600; font-size: 0.85rem; border-radius: 0 0 8px 8px; }
.cart-dropdown .cart-preview-link:hover { background: var(--primary-dark); }

/* ===== Category Nav Welcome ===== */
.cat-nav-welcome { font-size: 0.82rem; color: var(--text-light); padding: 0 0.5rem; }

/* ===== Hero Social Buttons ===== */
.hero-social { display: flex; gap: 0.75rem; margin-top: 1rem; }
.hero-social a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.85rem; font-weight: 600; text-decoration: none; transition: all 0.2s; color: #fff; }
.hero-social .facebook-btn { background: #1877f2; }
.hero-social .facebook-btn:hover { background: #166fe5; transform: translateY(-1px); }
.hero-social .youtube-btn { background: #ff0000; }
.hero-social .youtube-btn:hover { background: #cc0000; transform: translateY(-1px); }

/* ===== Header Dropdowns ===== */
.header-dropdown { position: relative; display: inline-block; }
.header-dropdown-btn { display: flex; align-items: center; gap: 3px; font-size: 0.8rem; font-weight: 500; color: var(--text); cursor: pointer; padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--white); user-select: none; white-space: nowrap; font-family: inherit; line-height: 1; }
.header-dropdown-btn:hover { border-color: var(--primary); color: var(--primary); }
.header-dropdown.open .header-dropdown-btn { border-color: var(--primary); }
.header-dropdown-menu { display: none; position: absolute; top: 100%; right: 0; z-index: 200; min-width: 180px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); margin-top: 4px; padding: 0.35rem 0; backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); }
.header-dropdown.open .header-dropdown-menu { display: block; }
.header-dropdown-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.85rem; font-size: 0.83rem; color: var(--text); text-decoration: none; transition: background 0.15s; cursor: pointer; white-space: nowrap; }
.header-dropdown-item:hover { background: #f3f4f6; }
.header-dropdown-item.active { background: #e0f2fe; color: var(--primary); font-weight: 600; }
.currency-symbol { font-weight: 700; min-width: 22px; display: inline-block; }
.top-bar-dropdown-btn { display:inline-flex; align-items:center; gap:3px; background:none; border:none; color:rgba(255,255,255,0.7); font-size:0.78rem; cursor:pointer; padding:0; font-family:inherit; }
.top-bar-dropdown-btn:hover { color:#fff; }
.top-bar-sep { color:rgba(255,255,255,0.3); margin:0 0.5rem; }

/* ===== Category Nav ===== */
.cat-nav { background: var(--white); border-bottom: 1px solid var(--border); }
.cat-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center; height: 44px; gap: 0; }
.cat-nav-all { display: flex; align-items: center; gap: 0.5rem; padding: 0 1.1rem; height: 44px; background: var(--primary); color: #fff; font-weight: 600; font-size: 0.85rem; border-radius: 20px; flex-shrink: 0; cursor: pointer; position: relative; }
.cat-nav-all:hover { background: var(--primary-dark); }
.cat-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 9999; min-width: 220px; max-width: 260px; max-height: min(70vh, 540px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; background: rgba(255,255,255,0.97); border: 1px solid var(--border); border-radius: 0 0 8px 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.cat-dropdown-menu::-webkit-scrollbar { width: 6px; }
.cat-dropdown-menu::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.cat-nav-all.open .cat-dropdown-menu { display: block; }
.cat-mega-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 300; min-width: 560px; background: rgba(255,255,255,0.98); border: 1px solid var(--border); border-top: 2px solid var(--primary); border-radius: 0 0 8px 8px; box-shadow: 0 12px 32px rgba(0,0,0,0.12); padding: 1.1rem 1.25rem; backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); }
.cat-nav-all:hover .cat-mega-menu, .cat-nav-all.open .cat-mega-menu { display: block; }
.cat-mega-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem 1.5rem; }
.cat-mega-group { display: flex; flex-direction: column; gap: 0.3rem; }
.cat-mega-top { font-weight: 600; color: var(--text); font-size: 0.85rem; text-decoration: none; padding-bottom: 0.2rem; border-bottom: 1px solid #f1f5f9; margin-bottom: 0.15rem; }
.cat-mega-top:hover { color: var(--primary); }
.cat-mega-child { font-size: 0.78rem; color: var(--text-light); text-decoration: none; padding: 0.1rem 0; }
.cat-mega-child:hover { color: var(--primary); }
.cat-dropdown-item { display: block; padding: 0.55rem 1rem; font-size: 0.85rem; color: var(--text); text-decoration: none; border-bottom: 1px solid #f3f4f6; transition: background 0.12s; }
.cat-dropdown-item:last-child { border-bottom: none; border-radius: 0 0 8px 8px; }
.cat-dropdown-item:hover { background: #f0f9ff; color: var(--primary); }
.cat-nav-items { display: flex; align-items: center; gap: 0; overflow-x: auto; flex: 1; }
.cat-nav-items a { display: block; padding: 0 1.2rem; height: 44px; line-height: 44px; font-size: 0.85rem; color: var(--text); white-space: nowrap; transition: all 0.2s; position: relative; }
.cat-nav-items a:hover, .cat-nav-items a.active { color: var(--primary); }
.cat-nav-items a.active::after { content: ''; position: absolute; bottom: 0; left: 1rem; right: 1rem; height: 2px; background: var(--primary); }

/* ===== Hero ===== */
.hero-carousel { position: relative; width: 100%; height: 280px; overflow: hidden; border-radius: 8px; margin-bottom: 1.5rem; background: var(--primary-dark); }
.hero-carousel-inner { display: flex; transition: transform 0.5s ease; height: 100%; }
.hero-slide { min-width: 100%; height: 100%; position: relative; display: flex; align-items: center; }
.hero-slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.8; }
.hero-slide-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.12) 100%); }
.hero-slide-content { position: relative; z-index: 2; width: 100%; max-width: 760px; margin: 0 auto; padding: 1.25rem 1.5rem; color: #fff; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; height: 100%; }
.hero-slide-content h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.4rem; line-height: 1.2; }
.hero-slide-content .subtitle { font-size: 1rem; opacity: 0.92; margin-bottom: 0.35rem; }
.hero-slide-content .description { font-size: 0.9rem; opacity: 0.8; margin-bottom: 0.9rem; line-height: 1.5; }
.hero-slide-btns { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 0.6rem; flex-wrap: wrap; }
.hero-slide-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1.35rem; border-radius: 999px; font-weight: 700; text-decoration: none; transition: all 0.2s; font-size: 0.82rem; border: 1px solid transparent; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,0.18); letter-spacing: 0.2px; }
.hero-slide-btn.btn-primary { background: linear-gradient(135deg, #0284c7, #0369a1); color: #fff; }
.hero-slide-btn.btn-primary:hover { background: linear-gradient(135deg, #0369a1, #0270a8); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(2,132,199,0.4); }
.hero-slide-btn.btn-outline { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.hero-slide-btn.btn-outline:hover { background: rgba(255,255,255,0.28); }
.hero-slide-btn.btn-facebook { background: linear-gradient(135deg, #1877f2, #1463cc); color: #fff; }
.hero-slide-btn.btn-facebook:hover { background: linear-gradient(135deg, #1463cc, #115fc0); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(24,119,242,0.4); }
.hero-slide-content .btn-primary { background: var(--primary); color: #fff; }
.hero-slide-content .btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.hero-dots { position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.4rem; z-index: 3; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); border: none; cursor: pointer; transition: all 0.3s; padding: 0; }
.hero-dot.active { background: #fff; width: 24px; border-radius: 4px; }
.hero-arrows { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 100%; display: flex; justify-content: space-between; padding: 0 0.75rem; pointer-events: none; }
.hero-arrow { pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.15); border: none; color: #fff; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; backdrop-filter: blur(4px); opacity: 0; }
.hero-carousel:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: rgba(255,255,255,0.3); }

/* ===== Sections ===== */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.section-header h2 { font-size: 1.3rem; font-weight: 700; }
.section-header a { font-size: 0.85rem; color: var(--text-light); font-weight: 500; }
.section-header a:hover { color: var(--primary); }
.section { margin-bottom: 2rem; background: var(--white); border-radius: 8px; padding: 1.5rem; border: 1px solid var(--border); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); box-shadow: var(--glass-shadow); }

/* ===== Category Cards ===== */
.categories-grid { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; scroll-snap-type: x mandatory; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.categories-grid::-webkit-scrollbar { height: 6px; }
.categories-grid::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.category-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; flex: 0 0 150px; scroll-snap-align: start; padding: 1.2rem 0.75rem; background: rgba(255,255,255,0.6); border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text); transition: all 0.2s; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.category-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); border-color: var(--primary); }
.category-card-img { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; margin-bottom: 0.5rem; }
.category-card-placeholder { width: 64px; height: 64px; border-radius: 50%; background: #e0f2fe; display: flex; align-items: center; justify-content: center; color: var(--primary); margin-bottom: 0.5rem; }
.category-card-name { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.15rem; }
.category-card-count { font-size: 0.75rem; color: var(--text-light); }

/* ===== Pagination ===== */
.site-pagination { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; margin-top: 1.5rem; }
.site-pagination .page-link { display: inline-flex; align-items: center; padding: 0.45rem 0.85rem; font-size: 0.85rem; color: var(--text); background: var(--white); border: 1px solid var(--border); border-radius: 6px; text-decoration: none; transition: all 0.15s; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.site-pagination .page-link:hover:not(.disabled):not(.active) { border-color: var(--primary); color: var(--primary); }
.site-pagination .page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.site-pagination .page-link.disabled { color: #cbd5e1; background: #f9fafb; cursor: not-allowed; }
.site-pagination .page-link.dots { border-color: transparent; background: transparent; color: var(--text-light); }

/* ===== Product Grid ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.9rem; }
.section .products-grid { grid-template-columns: repeat(6, 1fr); gap: 0.9rem; }
.product-card { position: relative; aspect-ratio: 1 / 1; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: all 0.25s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.product-card > a { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; text-decoration: none; color: inherit; }
.product-card-img-wrap { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #f3f4f6; }
.product-card-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .product-card-image { transform: scale(1.05); }
.product-badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 3px; font-size: 0.7rem; font-weight: 700; z-index: 2; }
.sale-badge { background: var(--error); color: #fff; }
.new-badge { background: var(--primary); color: #fff; }
.product-card-body { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; padding: 0.35rem 0.5rem; }
.product-card-title { flex: 1; min-width: 0; font-size: 0.72rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; line-height: 1.2; }
.product-card-title:hover { color: var(--primary); }
.product-card-price-row { display: inline-flex; align-items: center; flex-shrink: 0; gap: 0.3rem; }
.product-card-price { font-size: 0.8rem; font-weight: 700; color: var(--error); white-space: nowrap; }
.product-card-price-original { font-size: 0.68rem; color: var(--text-light); text-decoration: line-through; }
.product-card-actions { display: flex; gap: 0.3rem; padding: 0.1rem 0.5rem 0.45rem; }
.card-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0.28rem 0.3rem; border-radius: 6px; font-size: 0.68rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; white-space: nowrap; font-family: inherit; line-height: 1.2; }
.card-btn-cart { background: var(--primary); color: #fff; }
.card-btn-cart:hover { background: var(--primary-dark); }
.card-btn-buy { background: #e53935; color: #fff; }
.card-btn-buy:hover { background: #c62828; }

/* ===== Buttons ===== */
.btn { display: inline-block; padding: 0.6rem 1.4rem; border-radius: 6px; font-weight: 600; font-size: 0.88rem; border: none; cursor: pointer; transition: all 0.2s; text-decoration: none; line-height: 1.4; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(2,132,199,0.3); }
.btn-lg { padding: 0.75rem 2rem; font-size: 0.95rem; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.78rem; }

/* ===== Auth Pages ===== */
.auth-page { display: flex; justify-content: center; align-items: center; min-height: 70vh; }
.auth-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 2.5rem; width: 100%; max-width: 460px; backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); box-shadow: var(--glass-shadow); }
.auth-card h1 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 500; font-size: 0.9rem; }
.form-control { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem; transition: border-color 0.2s; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(2,132,199,0.1); }
.form-error { color: var(--error); font-size: 0.8rem; margin-top: 0.25rem; display: block; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; }
.auth-link { text-align: center; margin-top: 1rem; font-size: 0.9rem; color: var(--text-light); }
.auth-link a { color: var(--primary); }
.role-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.role-option { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 1rem; border: 2px solid var(--border); border-radius: 8px; cursor: pointer; transition: all 0.2s; text-align: center; }
.role-option:hover { border-color: var(--primary); }
.role-option.selected { border-color: var(--primary); background: rgba(2,132,199,0.06); }
.role-option input { display: none; }
.role-title { font-weight: 600; font-size: 1rem; }
.role-desc { font-size: 0.8rem; color: var(--text-light); }

/* ===== Footer ===== */
.site-footer { background: #0284c7; color: #e0f2fe; padding: 2.5rem 0 1.5rem; margin-top: 3rem; font-size: 0.85rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand h3 { color: #fff; font-size: 1.2rem; margin-bottom: 0.5rem; }
.footer-brand-row { display: flex; align-items: center; gap: 1rem; }
.footer-logo { width: 108px; height: 108px; border-radius: 50%; object-fit: contain; flex-shrink: 0; display: block; background: #fff; padding: 6px; border: 2px solid rgba(255,255,255,0.35); }
.footer-legal { font-size: 0.78rem; color: rgba(255,255,255,0.75); margin-top: 0.5rem; line-height: 1.6; }
.footer-brand p { line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: 0.9rem; margin-bottom: 0.75rem; }
.footer-col a { display: block; color: #e0f2fe; margin-bottom: 0.4rem; font-size: 0.85rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { max-width: 1200px; margin: 1.5rem auto 0; padding: 1rem 1rem 0; border-top: 1px solid rgba(255,255,255,0.2); text-align: center; font-size: 0.8rem; }
.site-footer a { color: #e0f2fe; }
.site-footer a:hover { color: #fff; }

/* ===== Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.site-content { min-height: 60vh; padding: 1rem 0; }

/* ===== Page Content ===== */
.page-content { max-width: 800px; margin: 2rem auto; }
.page-content h1 { margin-bottom: 1rem; font-size: 1.8rem; }
.about-lead { font-size: 1.1rem; color: var(--text-light); margin-bottom: 2rem; line-height: 1.6; }
.about-grid, .policy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.about-card, .policy-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); }
.about-card h2, .policy-card h2 { font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--primary); }
.about-card p, .policy-card p { font-size: 0.92rem; line-height: 1.6; color: var(--text-light); }

/* ===== WhatsApp ===== */
.float-tools { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.whatsapp-float { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: #25D366; color: #fff; border-radius: 50%; text-decoration: none; box-shadow: 0 4px 16px rgba(37,211,102,0.4); transition: all 0.2s; }
.whatsapp-float:hover { background: #1ebe5a; color: #fff; }
.whatsapp-float svg { flex-shrink: 0; }
.back-to-top { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; border: none; cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(2,132,199,0.35); font-size: 1.1rem; line-height: 1; transition: all 0.2s; }
.back-to-top:hover { background: var(--primary-dark); }
.back-to-top.show { display: flex; }
.market-select { appearance: none; -webkit-appearance: none; border: none; border-radius: 16px; height: 32px; padding: 0 1.8rem 0 0.9rem; font-size: 0.82rem; font-weight: 600; color: #fff; background: var(--primary) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff' fill='none' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 0.8rem center; cursor: pointer; flex-shrink: 0; margin-right: 0.75rem; transition: background-color 0.15s; }
.market-select:hover { background-color: var(--primary-dark); }
.market-select:focus { outline: none; background-color: var(--primary-dark); }
.market-select option { background: #fff; color: #000; }

/* ===== Seller Layout ===== */
.sel-layout { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); background-attachment: fixed; }
.sel-header { background: var(--primary-dark); color: #fff; position: sticky; top: 0; z-index: 100; }
.sel-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center; height: 52px; gap: 1.5rem; }
.sel-brand { font-size: 1rem; font-weight: 800; color: #fff; white-space: nowrap; flex-shrink: 0; }
.sel-brand:hover { opacity: 0.85; }
.sel-nav { display: flex; align-items: center; gap: 0; flex: 1; }
.sel-nav a { display: block; padding: 0 1rem; height: 52px; line-height: 52px; font-size: 0.85rem; color: rgba(255,255,255,0.7); white-space: nowrap; transition: all 0.15s; position: relative; }
.sel-nav a:hover { color: #fff; }
.sel-nav a.active { color: #fff; }
.sel-nav a.active::after { content: ''; position: absolute; bottom: 0; left: 1rem; right: 1rem; height: 2px; background: #fff; }
.sel-header-right { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.sel-view-store { font-size: 0.83rem; color: rgba(255,255,255,0.7); white-space: nowrap; }
.sel-view-store:hover { color: #fff; }
.sel-logout { background: none; border: 1px solid rgba(255,255,255,0.3); border-radius: 6px; color: rgba(255,255,255,0.7); font-size: 0.8rem; padding: 0.35rem 0.75rem; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.sel-logout:hover { border-color: #fff; color: #fff; }
.sel-main { flex: 1; }
.alert { padding: 0.75rem 1rem; border-radius: 6px; margin: 1rem; font-size: 0.9rem; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .header-inner { height: 56px; gap: 0.5rem; }
  .header-search { max-width: none; }
  .header-actions .header-dropdown { display: none; }
  .header-text-link { font-size: 0.75rem; }
  .cat-nav { overflow-x: auto; }
  .cat-nav-items a { padding: 0 0.75rem; font-size: 0.8rem; }
  .hero-carousel { height: 160px; }
  .hero-slide-content h1 { font-size: 1.1rem; }
  .hero-slide-content .subtitle { font-size: 0.85rem; }
  .hero-slide-content .description { font-size: 0.8rem; margin-bottom: 0.5rem; }
  .hero-slide-btn { padding: 0.38rem 1rem; font-size: 0.75rem; }
  .hero-slide-content { padding: 0.75rem 1rem; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
  .section .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
  .categories-grid { gap: 0.5rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .section { padding: 1rem; }
}

/* Tablet: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-carousel { height: 213px; }
  .hero-slide-content h1 { font-size: 1.35rem; }
  .hero-slide-content .subtitle { font-size: 0.9rem; }
  .hero-slide-content .description { font-size: 0.85rem; }
  .hero-slide-btn { padding: 0.4rem 1.05rem; font-size: 0.78rem; }
  .hero-slide-content { padding: 1.25rem; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.9rem; }
  .section .products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.9rem; }
  .categories-grid { gap: 0.75rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .seller-recruit-inner { padding: 2rem 1.5rem; }
}

/* Small phones: <=480px */
@media (max-width: 480px) {
  .hero-carousel { height: 147px; }
  .hero-slide-content { padding: 0.6rem 0.75rem; }
  .hero-slide-content h1 { font-size: 0.95rem; }
  .hero-slide-content .subtitle { font-size: 0.78rem; }
  .hero-slide-content .description { font-size: 0.75rem; margin-bottom: 0.4rem; }
  .hero-slide-btn { padding: 0.34rem 0.9rem; font-size: 0.72rem; }
  .categories-grid { gap: 0.5rem; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .section .products-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.25rem; }
  .section { padding: 0.85rem; }
  .section-header h2 { font-size: 1.1rem; }
  .seller-recruit-inner { padding: 1.5rem 1.25rem; text-align: center; flex-direction: column; }
  .seller-recruit-actions { justify-content: center; }
}

/* ===== Crystal / Frosted Glass Overrides ===== */
/* 统一给各白色面板应用半透明水晶玻璃效果（覆盖卖家中心等内联背景） */
.form-card,
.data-table,
.seller-table,
.stat-card,
.card,
.order-detail-card,
.qr-generate-form,
.dash-section,
.product-card,
.store-front .product-card,
.banner-modal-card,
.detail-img-item .img-preview,
.img-preview,
.section-card,
.cart-summary-card,
.address-card,
.address-form,
.detail-card,
.pm-form,
.profile-card,
.empty-state,
.buyer-card,
.wishlist-card {
  background: rgba(255,255,255,0.72) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-shadow);
}
.form-card,
.card,
.stat-card,
.order-detail-card,
.qr-generate-form,
.dash-section,
.banner-modal-card,
.section-card,
.cart-summary-card,
.address-card,
.address-form,
.detail-card,
.pm-form,
.profile-card,
.empty-state {
  border: 1px solid var(--border);
}
.seller-table th,
.data-table th {
  background: rgba(241,245,249,0.8);
}
.banner-modal-overlay { background: rgba(15,23,42,0.5) !important; }
