/* ============================================
   Poker Shop 電商前台
   Logo: #D5001C (Red)  |  UI: #333 / #555 / #fff / #f5f5f5
   ============================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft JhengHei", "Noto Sans TC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #222;
  background: #f5f5f5;
  line-height: 1.6;
}
a { text-decoration: none; color: #222; }
a:hover { color: #555; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ===== TOP BAR ===== */
.top-bar {
  background: #f0f0f0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 12px;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; height: 32px; }
.top-bar a { color: #555; padding: 0 10px; }
.top-bar a:hover { color: #222; }
.top-bar .top-left a { border-right: 1px solid #ddd; }
.top-bar .top-right { display: flex; align-items: center; gap: 2px; }

/* ===== HEADER MAIN ===== */
.header-main {
  background: #fff;
  padding: 10px 0;
}
.header-main .container { display: flex; align-items: center; gap: 20px; }

/* Logo — keep red */
.logo a {
  display: flex; align-items: center; font-size: 28px; font-weight: 900; color: #D5001C;
}
.logo a img { height: 40px; }

/* Search */
.search-box {
  flex: 1; max-width: 600px; position: relative;
}
.search-box form { display: flex; }
.search-box input {
  flex: 1; height: 40px; border: 2px solid #ccc; border-right: none; border-radius: 4px 0 0 4px;
  padding: 0 12px; font-size: 14px; outline: none;
}
.search-box input:focus { border-color: #333; }
.search-box button {
  width: 72px; height: 40px; background: #333; color: #fff; border: none;
  border-radius: 0 4px 4px 0; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.search-box button:hover { background: #222; }
.search-hot { display: flex; gap: 8px; margin-top: 4px; font-size: 12px; }
.search-hot a { color: #999; }
.search-hot a:hover { color: #222; }

/* Header actions (icons) */
.header-actions { display: flex; gap: 20px; align-items: center; }
.header-action {
  display: flex; flex-direction: column; align-items: center; font-size: 11px; color: #555; position: relative;
}
.header-action .icon { font-size: 22px; margin-bottom: 2px; }
.header-action:hover { color: #222; }
.cart-count {
  position: absolute; top: -6px; right: -10px; background: #333; color: #fff;
  font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ===== CATEGORY NAV — dark gray ===== */
.cat-nav {
  background: #333;
  position: sticky; top: 0; z-index: 1000;
}
.cat-nav .container { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cat-nav .container::-webkit-scrollbar { display: none; }
.cat-nav a {
  color: #fff; font-size: 15px; padding: 12px 16px; display: block; white-space: nowrap;
  transition: background .2s;
}
.cat-nav a:hover, .cat-nav a.active { background: #555; }
.cat-nav .cat-all {
  background: #222; font-weight: 700; font-size: 16px; padding: 12px 20px;
}

/* Mega dropdown */
.mega-item { position: relative; }
.mega-dropdown {
  position: absolute; top: 100%; left: 0; background: #fff; color: #222;
  min-width: 800px; box-shadow: 0 4px 12px rgba(0,0,0,.15); display: none; z-index: 999;
  border-radius: 0 0 4px 4px; padding: 20px;
}
.mega-item:hover .mega-dropdown { display: flex; }
.mega-col { flex: 1; min-width: 150px; }
.mega-col h4 { font-size: 14px; color: #222; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid #333; }
.mega-col a { color: #555; font-size: 13px; padding: 3px 0; display: block; }
.mega-col a:hover { color: #D5001C; }

/* ===== HERO CAROUSEL ===== */
.hero { margin: 10px 0; }
.hero .container { position: relative; }
.hero-slider { position: relative; overflow: hidden; border-radius: 4px; background: #e8e8e8; }
.hero-slide {
  display: none; height: 360px; background-size: cover; background-position: center;
  align-items: center; justify-content: center; color: #fff; text-align: center;
}
.hero-slide.active { display: flex; }
.hero-slide .hero-content { max-width: 500px; }
.hero-slide h2 { font-size: 36px; margin-bottom: 10px; text-shadow: 0 2px 4px rgba(0,0,0,.3); }
.hero-slide p { font-size: 16px; margin-bottom: 20px; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.hero-btn {
  display: inline-block; background: #D5001C; color: #fff; padding: 12px 32px; border-radius: 4px;
  font-size: 16px; transition: background .2s;
}
.hero-btn:hover { background: #b80017; color: #fff; }
.hero-prev, .hero-next {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.3); color: #fff;
  width: 40px; height: 60px; border: none; font-size: 24px; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
}
.hero-prev { left: 15px; border-radius: 0 4px 4px 0; }
.hero-next { right: 15px; border-radius: 4px 0 0 4px; }
.hero-dots { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; border: none; }
.hero-dot.active { background: #333; }

/* ===== QUICK ENTRY ICONS ===== */
.quick-entry { background: #fff; padding: 20px 0; margin: 0 0 10px; }
.quick-grid { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.quick-item {
  display: flex; flex-direction: column; align-items: center; width: 80px; padding: 10px 0;
  font-size: 12px; color: #222; text-align: center; transition: transform .2s;
}
.quick-item:hover { transform: translateY(-2px); color: #555; }
.quick-item .quick-icon { font-size: 32px; margin-bottom: 6px; color: #555; }

/* ===== SECTION TITLE ===== */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 0 10px; border-bottom: 2px solid #333; margin-bottom: 15px;
}
.section-header h2 { font-size: 22px; color: #222; }
.section-header .more { font-size: 13px; color: #999; }
.section-header .more:hover { color: #222; }

/* ===== PRODUCT GRID ===== */
.product-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.product-card {
  background: #fff; border-radius: 4px; overflow: hidden; transition: box-shadow .2s;
}
.product-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.product-card .card-img {
  display: block; height: 180px; background: #f9f9f9; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.product-card .card-img img { max-height: 160px; object-fit: contain; }
.product-card .card-body { padding: 10px; }
.product-card .card-name {
  font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; height: 36px; color: #222;
}
.product-card .card-name:hover { color: #D5001C; }
.product-card .card-price { color: #222; font-size: 20px; font-weight: 700; margin: 6px 0; }
.product-card .card-price .dollar { font-size: 14px; }
.product-card .card-orig { font-size: 12px; color: #999; text-decoration: line-through; margin-left: 6px; }
.product-card .card-tag {
  position: absolute; top: 0; left: 0; background: #333; color: #fff; font-size: 12px;
  padding: 2px 8px; border-radius: 0 0 4px 0;
}

/* ===== PRODUCT PAGE V2 (momoshop style) ===== */
.product-layout { display: flex; gap: 20px; margin-top: 15px; }
.product-sidebar { width: 200px; flex-shrink: 0; }
.product-main { flex: 1; min-width: 0; display: flex; gap: 24px; }

/* Left Sidebar */
.sidebar-cat { background: #fff; border-radius: 4px; margin-bottom: 12px; overflow: hidden; }
.sidebar-cat-title {
  display: block; padding: 12px 14px; font-size: 15px; font-weight: 700; color: #D5001C;
  background: #fff5f5; border-bottom: 1px solid #fee;
}
.sidebar-cat-subs { padding: 6px 0; }
.sidebar-cat-sub {
  display: block; padding: 7px 14px 7px 22px; font-size: 13px; color: #555;
  border-left: 2px solid transparent; transition: all .15s;
}
.sidebar-cat-sub:hover, .sidebar-cat-sub.active { color: #D5001C; border-left-color: #D5001C; background: #fffafa; }

.sidebar-hot { background: #fff; border-radius: 4px; padding: 14px; }
.sidebar-hot h3 { font-size: 15px; color: #222; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid #333; }
.sidebar-hot-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f0f0;
  transition: background .15s;
}
.sidebar-hot-item:last-child { border-bottom: none; }
.sidebar-hot-item:hover { background: #fafafa; }
.sidebar-hot-rank {
  width: 22px; height: 22px; border-radius: 4px; background: #333; color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-hot-item:first-child .sidebar-hot-rank { background: #D5001C; }
.sidebar-hot-item:nth-child(2) .sidebar-hot-rank { background: #e67400; }
.sidebar-hot-item:nth-child(3) .sidebar-hot-rank { background: #e6a800; }
.sidebar-hot-info { min-width: 0; }
.sidebar-hot-name { font-size: 12px; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-hot-price { font-size: 14px; color: #D5001C; font-weight: 700; }

/* Product Gallery V2 */
.product-gallery-v2 { width: 420px; flex-shrink: 0; }
.gallery-main {
  width: 420px; height: 420px; background: #f9f9f9; border-radius: 4px; position: relative;
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px; overflow: hidden;
}
.gallery-placeholder { font-size: 120px; color: #ddd; }
.gallery-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-tag {
  position: absolute; top: 10px; left: 10px; background: #D5001C; color: #fff;
  padding: 3px 12px; border-radius: 4px; font-size: 12px; z-index: 1;
}
.gallery-thumbs { display: flex; gap: 8px; }
.gallery-thumb {
  width: 64px; height: 64px; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 20px; color: #ccc; transition: border-color .15s;
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: #333; }

/* Product Info V2 */
.product-info-v2 { flex: 1; min-width: 0; }
.promo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.promo-tag {
  display: inline-block; padding: 3px 10px; font-size: 12px; color: #D5001C; background: #fff0f0;
  border-radius: 3px; border: 1px solid #ffcccc;
}
.product-title-v2 { font-size: 21px; font-weight: 700; color: #222; line-height: 1.4; margin: 0 0 8px; }
.product-meta-v2 { font-size: 12px; color: #999; margin-bottom: 12px; }
.product-meta-v2 .meta-sep { margin: 0 8px; color: #ddd; }
.product-price-v2 {
  background: #fafafa; border-radius: 4px; padding: 14px 16px; margin-bottom: 14px;
}
.product-price-v2 .price-row { display: flex; align-items: baseline; gap: 8px; }
.product-price-v2 .price-label { font-size: 12px; color: #999; }
.product-price-v2 .price-value { font-size: 32px; color: #D5001C; font-weight: 700; }
.product-price-v2 .price-orig { font-size: 14px; color: #999; text-decoration: line-through; }
.price-report { margin-top: 6px; font-size: 12px; color: #999; background: none; border: none; cursor: pointer; padding: 0; }
.price-report:hover { color: #D5001C; text-decoration: underline; }

.info-label { font-size: 13px; color: #555; font-weight: 500; margin-right: 4px; }
.payment-methods { margin-bottom: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.payment-icons { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.payment-item { font-size: 12px; color: #777; }
.payment-item i { margin-right: 2px; color: #999; font-size: 13px; }

.shipping-info { margin-bottom: 8px; font-size: 13px; color: #555; }
.shipping-note { font-size: 12px; color: #999; margin-left: 8px; }

.qty-section { display: flex; align-items: center; margin-bottom: 10px; }
.qty-control { display: flex; align-items: center; }
.qty-input {
  width: 44px; height: 34px; text-align: center; border: 1px solid #ddd; border-left: none; border-right: none;
  font-size: 14px; font-weight: 600; outline: none; color: #222;
}

.coupon-link { font-size: 13px; color: #1683E9; cursor: pointer; margin-bottom: 14px; }
.coupon-link:hover { text-decoration: underline; }

.buy-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-buy-now {
  height: 44px; padding: 0 28px; background: #D5001C; color: #fff; border: none; border-radius: 4px;
  font-size: 16px; font-weight: 700; cursor: pointer; transition: background .2s;
  display: flex; align-items: center; gap: 6px;
}
.btn-buy-now:hover { background: #b80017; }
.btn-add-cart {
  height: 44px; padding: 0 24px; background: #333; color: #fff; border: none; border-radius: 4px;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s;
  display: flex; align-items: center; gap: 6px;
}
.btn-add-cart:hover { background: #222; }
.btn-add-cart.added { background: #28a745; }
.btn-wishlist {
  height: 44px; padding: 0 20px; background: #fff; color: #555; border: 1px solid #ddd; border-radius: 4px;
  font-size: 14px; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; gap: 4px;
}
.btn-wishlist:hover { border-color: #D5001C; color: #D5001C; }

/* Add-on Products */
.addon-section { background: #fff; border-radius: 4px; padding: 16px 20px; margin-top: 20px; }
.addon-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.addon-header h3 { font-size: 16px; color: #222; margin: 0; }
.addon-hint { font-size: 12px; color: #999; cursor: pointer; }
.addon-scroll { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.addon-scroll::-webkit-scrollbar { display: none; }
.addon-card {
  flex-shrink: 0; width: 140px; text-align: center; padding: 10px; border: 1px solid #eee; border-radius: 4px;
  transition: box-shadow .15s;
}
.addon-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.addon-img {
  width: 100%; height: 100px; background: #f9f9f9; border-radius: 4px; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 36px; color: #ddd;
}
.addon-name { font-size: 12px; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 4px; }
.addon-price { font-size: 15px; color: #D5001C; font-weight: 700; }

/* Product Description V2 */
.product-desc-v2 { background: #fff; border-radius: 4px; padding: 20px; margin-top: 20px; }
.product-desc-v2 h3 { font-size: 18px; color: #222; border-left: 4px solid #333; padding-left: 10px; margin-bottom: 12px; }
.product-desc-v2 p { font-size: 14px; color: #555; line-height: 1.7; }
.desc-specs { margin-top: 16px; }
.desc-specs h4 { font-size: 15px; color: #222; margin-bottom: 8px; }
.desc-specs ul { list-style: none; padding: 0; margin: 0; }
.desc-specs ul li { padding: 4px 0; font-size: 13px; color: #696763; border-bottom: 1px dotted #eee; }
.desc-note { font-size: 12px; color: #999; margin-top: 16px; }

/* Member Page */
.member-layout { display: flex; gap: 24px; margin-top: 20px; min-height: 600px; }
.member-sidebar { width: 240px; flex-shrink: 0; }
.member-content { flex: 1; min-width: 0; }

/* Sidebar avatar card */
.member-avatar-card {
  background: linear-gradient(135deg, #1a5276, #2980b9); color: #fff;
  border-radius: 10px; padding: 20px; text-align: center; margin-bottom: 16px;
}
.member-avatar {
  width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; margin: 0 auto 10px;
}
.member-info h4 { font-size: 16px; margin: 0 0 4px; }
.member-level { font-size: 12px; opacity: .85; }
.member-points { font-size: 13px; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* Sidebar nav */
.member-nav { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,.04); }
.member-nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 18px;
  border: none; background: none; font-size: 14px; color: #555; cursor: pointer;
  transition: background .15s; text-align: left;
}
.member-nav-item:hover { background: #f5f5f5; }
.member-nav-item.active { background: #fef0f0; color: #D5001C; font-weight: 600; border-right: 3px solid #D5001C; }
.member-nav-item i { width: 20px; text-align: center; }
.member-sidebar-footer { margin-top: 12px; }
.member-logout {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px;
  color: #999; font-size: 13px; text-decoration: none; border-radius: 8px;
  transition: background .15s;
}
.member-logout:hover { background: #f5f5f5; color: #e74c3c; }

/* Main content sections */
.member-section {
  background: #fff; border-radius: 10px; padding: 24px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}
.member-section h3 { font-size: 18px; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.member-section h3 i { color: #D5001C; }

/* Profile */
.member-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.member-profile-row {
  display: flex; padding: 14px 0; border-bottom: 1px solid #f0f0f0;
}
.profile-label { width: 100px; color: #999; font-size: 14px; flex-shrink: 0; }
.profile-value { font-size: 14px; color: #333; font-weight: 500; }
.member-btn-outline {
  padding: 8px 20px; border: 1px solid #ccc; border-radius: 6px;
  background: #fff; color: #555; font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.member-btn-outline:hover { border-color: #D5001C; color: #D5001C; }

/* Orders table */
.member-order-table { border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
.order-table-header, .order-table-row {
  display: grid; grid-template-columns: 2fr 1fr 1fr 0.5fr 0.8fr; gap: 8px;
  padding: 12px 16px; font-size: 13px; align-items: center;
}
.order-table-header { background: #fafafa; color: #999; font-weight: 500; }
.order-table-row {
  display: grid; grid-template-columns: 2fr 1fr 1fr 0.5fr 0.8fr; gap: 8px;
  padding: 12px 16px; font-size: 13px; align-items: center;
  border-top: 1px solid #f0f0f0; color: #333; text-decoration: none;
  transition: background .15s;
}
.order-table-row:hover { background: #fafafa; }
.order-id { color: #1a5276; }
.order-amount { font-weight: 600; }
.order-status { padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.member-link-more {
  display: inline-block; margin-top: 12px; font-size: 13px;
  color: #1a5276; text-decoration: none;
}
.member-link-more:hover { text-decoration: underline; }

/* Wishlist */
.member-wishlist { display: flex; flex-direction: column; gap: 0; }
.member-wish-item {
  display: flex; align-items: center; gap: 16px; padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.member-wish-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.wish-info { flex: 1; }
.wish-name { color: #333; font-size: 14px; text-decoration: none; display: block; }
.wish-name:hover { color: #D5001C; }
.wish-price { color: #D5001C; font-size: 16px; font-weight: 700; margin-top: 4px; }
.member-btn-sm {
  padding: 6px 14px; background: #D5001C; color: #fff; border: none;
  border-radius: 6px; font-size: 12px; cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.member-btn-sm:hover { background: #b8001a; }
.member-btn-sm.outline {
  background: #fff; color: #555; border: 1px solid #ccc;
}
.member-btn-sm.outline:hover { border-color: #D5001C; color: #D5001C; }

/* Coupons */
.member-coupon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.member-coupon-card {
  display: flex; border: 1px solid #eee; border-radius: 8px; overflow: hidden;
  position: relative;
}
.member-coupon-card.used { opacity: .5; }
.coupon-left {
  width: 140px; background: linear-gradient(135deg, #fef0f0, #fde8e8);
  padding: 16px; display: flex; flex-direction: column; justify-content: center;
}
.coupon-left .coupon-code { font-size: 16px; font-weight: 700; color: #D5001C; }
.coupon-left .coupon-desc { font-size: 12px; color: #888; margin-top: 4px; }
.coupon-right { flex: 1; padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.coupon-min { font-size: 13px; color: #333; font-weight: 500; }
.coupon-expiry { font-size: 12px; color: #999; }
.coupon-used-badge {
  position: absolute; top: 8px; right: 8px; background: #e74c3c; color: #fff;
  font-size: 10px; padding: 2px 6px; border-radius: 3px;
}

/* Addresses */
.member-address-list { display: flex; flex-direction: column; gap: 12px; }
.member-address-card {
  border: 1px solid #eee; border-radius: 8px; padding: 16px;
  transition: box-shadow .15s;
}
.member-address-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.address-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.address-name { font-weight: 600; font-size: 14px; }
.address-phone { color: #888; font-size: 13px; }
.address-default {
  background: #fef0f0; color: #D5001C; font-size: 11px;
  padding: 2px 8px; border-radius: 3px;
}
.address-body { font-size: 13px; color: #555; }
.address-actions { display: flex; gap: 16px; margin-top: 10px; }
.member-btn-text {
  background: none; border: none; color: #1a5276; font-size: 12px;
  cursor: pointer; padding: 0;
}
.member-btn-text:hover { text-decoration: underline; }

/* Security */
.member-security-list { display: flex; flex-direction: column; gap: 0; }
.member-security-row {
  display: flex; align-items: center; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.security-icon {
  width: 44px; height: 44px; border-radius: 10px; background: #f5f5f5;
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: #555;
}
.security-info { flex: 1; }
.security-label { font-size: 14px; font-weight: 500; }
.security-desc { font-size: 12px; color: #999; margin-top: 2px; }

@media (max-width: 768px) {
  .member-layout { flex-direction: column; }
  .member-sidebar { width: 100%; }
  .member-profile-grid { grid-template-columns: 1fr; }
  .member-coupon-grid { grid-template-columns: 1fr; }
  .order-table-header, .order-table-row { grid-template-columns: 1.5fr 1fr 1fr 0.5fr 0.7fr; font-size: 12px; }
}

.member-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-top: 15px; }
.member-card {
  background: #fafafa; border-radius: 8px; padding: 28px 16px; text-align: center;
  border: 1px solid #eee; transition: box-shadow .15s; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.member-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.member-card i { font-size: 32px; color: #555; }
.member-card span { font-size: 14px; color: #222; font-weight: 600; }

/* Malls List Page */
.malls-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.malls-list-card { border-radius: 8px; overflow: hidden; background: #fff; transition: box-shadow .15s; }
.malls-list-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.malls-list-banner {
  height: 140px; display: flex; align-items: center; justify-content: center; font-size: 48px; color: rgba(255,255,255,.85);
}
.malls-list-body { padding: 16px; }
.malls-list-body h3 { font-size: 18px; color: #222; margin: 0 0 4px; }
.malls-list-body p { font-size: 13px; color: #999; margin: 0 0 10px; }
.malls-list-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.malls-list-cats span {
  font-size: 11px; color: #555; background: #f5f5f5; padding: 3px 10px; border-radius: 12px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb { padding: 12px 0; font-size: 12px; color: #999; }
.breadcrumb a { color: #999; }
.breadcrumb a:hover { color: #222; }
.breadcrumb span { color: #222; }

/* ===== FOOTER ===== */
.footer {
  background: #2d2d2d; color: #ccc; margin-top: 30px; padding: 30px 0 0;
}
.footer .container { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #444; }
.footer-col a { color: #999; font-size: 13px; display: block; padding: 3px 0; }
.footer-col a:hover { color: #D5001C; }
.footer-bottom {
  border-top: 1px solid #444; margin-top: 20px; padding: 15px 0;
  text-align: center; font-size: 12px; color: #888;
}

/* ===== CART PAGE ===== */
.cart-page { background: #fff; border-radius: 4px; padding: 20px; margin-top: 15px; }
.cart-page h2 { font-size: 22px; color: #222; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #333; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { background: #f8f8f8; padding: 10px; text-align: left; font-size: 13px; border-bottom: 1px solid #e0e0e0; color: #222; }
.cart-table td { padding: 12px 10px; border-bottom: 1px solid #e0e0e0; font-size: 14px; color: #222; }
.cart-table .product-cell { display: flex; align-items: center; gap: 10px; }
.cart-table .product-cell img { width: 60px; height: 60px; object-fit: contain; background: #f9f9f9; border-radius: 4px; }
.cart-remove { background: none; border: none; color: #999; cursor: pointer; font-size: 18px; }
.cart-remove:hover { color: #333; }
.cart-summary { text-align: right; padding: 15px 0; font-size: 16px; }
.cart-summary .total { color: #222; font-size: 24px; font-weight: 700; }
.checkout-btn {
  display: inline-block; background: #333; color: #fff; padding: 14px 40px; border-radius: 4px;
  font-size: 18px; font-weight: 700; cursor: pointer; border: none; transition: background .2s;
}
.checkout-btn:hover { background: #222; }

/* ===== MALL STORE PAGE ===== */
.mall-banner { margin: 15px 0; }
.mall-banner-inner { border-radius: 8px; padding: 40px 36px; overflow: hidden; }
.mall-banner-content { display: flex; align-items: center; gap: 24px; color: #fff; }
.mall-banner-icon { font-size: 56px; opacity: .9; flex-shrink: 0; }
.mall-banner-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.mall-banner-text h1 { font-size: 28px; margin: 0 0 6px; }
.mall-banner-text p { font-size: 14px; margin: 0; opacity: .85; }

.mall-info-bar { background: #fff; border-bottom: 1px solid #eee; margin-bottom: 15px; }
.mall-info-row { display: flex; gap: 24px; padding: 12px 0; }
.mall-info-item { font-size: 13px; color: #555; }
.mall-info-item i { margin-right: 4px; color: #999; }

.mall-layout { display: flex; gap: 20px; }
.mall-sidebar { width: 200px; flex-shrink: 0; }
.mall-sidebar-box { background: #fff; border-radius: 4px; overflow: hidden; }
.mall-sidebar-box h3 {
  padding: 14px 16px; font-size: 15px; color: #fff; background: #333; margin: 0;
}
.mall-cat-tree { list-style: none; padding: 0; margin: 0; }
.mall-cat-link {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 16px;
  font-size: 13px; color: #555; border-bottom: 1px solid #f5f5f5; transition: all .15s;
}
.mall-cat-link:hover, .mall-cat-link.active { background: #fafafa; color: #D5001C; font-weight: 600; }
.mall-cat-link .cat-count { font-size: 11px; color: #999; font-weight: 400; }
.mall-cat-link.active .cat-count { color: #D5001C; }

.mall-main { flex: 1; min-width: 0; }
.mall-sort-bar {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 16px;
  background: #fff; border-radius: 4px; margin-bottom: 12px;
}
.mall-result-count { font-size: 13px; color: #999; }
.mall-sort-btns { display: flex; gap: 6px; }
.mall-sort-btn {
  padding: 5px 14px; font-size: 13px; color: #555; background: #f5f5f5; border: none;
  border-radius: 4px; cursor: pointer; transition: all .15s;
}
.mall-sort-btn:hover, .mall-sort-btn.active { background: #333; color: #fff; }

.mall-product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mall-product-card {
  background: #fff; border-radius: 4px; overflow: hidden; transition: box-shadow .15s;
}
.mall-product-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.mpc-img {
  height: 180px; background: #f9f9f9; position: relative; display: flex;
  align-items: center; justify-content: center; font-size: 48px; color: #ddd;
}
.mpc-img img { max-height: 160px; object-fit: contain; }
.mpc-tag {
  position: absolute; top: 0; left: 0; background: #D5001C; color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 0 0 4px 0;
}
.mpc-body { padding: 10px; }
.mpc-name {
  font-size: 13px; color: #222; line-height: 1.4; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; height: 36px;
  margin-bottom: 6px;
}
.mpc-price { font-size: 20px; font-weight: 700; color: #D5001C; }
.mpc-price .mpc-dollar { font-size: 14px; }
.mpc-orig { font-size: 12px; color: #999; text-decoration: line-through; margin-left: 6px; font-weight: 400; }
.cat-page { margin-top: 15px; }
.cat-page .page-title { font-size: 22px; margin-bottom: 15px; }
.subcat-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; padding: 12px; background: #fff; border-radius: 4px; }
.subcat-chip {
  padding: 6px 16px; border: 1px solid #ddd; border-radius: 20px; font-size: 13px; color: #555; transition: all .2s;
}
.subcat-chip:hover, .subcat-chip.active { border-color: #333; color: #222; background: #f0f0f0; }

/* ===== MALL BANNERS ===== */
.mall-section { margin: 15px 0; }
.mall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.mall-card {
  border-radius: 8px; overflow: hidden; position: relative; cursor: pointer;
  transition: transform .2s, box-shadow .2s; min-height: 180px;
  display: flex; flex-direction: column; justify-content: center; padding: 24px;
}
.mall-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.mall-card-icon { font-size: 42px; margin-bottom: 10px; opacity: .9; }
.mall-card-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,.15); padding: 6px; }
.mall-card h3 { font-size: 22px; color: #fff; margin: 0 0 4px; }
.mall-card .mall-subtitle { font-size: 13px; color: rgba(255,255,255,.8); margin-bottom: 8px; }
.mall-card .mall-desc { font-size: 12px; color: rgba(255,255,255,.7); margin-bottom: 14px; }
.mall-card .mall-btn {
  display: inline-block; background: rgba(255,255,255,.2); color: #fff;
  padding: 8px 20px; border-radius: 20px; font-size: 13px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.4); transition: background .2s; width: fit-content;
}
.mall-card .mall-btn:hover { background: rgba(255,255,255,.35); color: #fff; }

/* ===== GRID BANNER 左1右2 ===== */
.grid-banner { margin-bottom: 15px; }
.grid-banner-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gb-left {
  border-radius: 8px; padding: 32px 28px; color: #fff; display: flex; flex-direction: column;
  justify-content: center; gap: 10px; position: relative; overflow: hidden; min-height: 240px;
  transition: transform .2s;
}
.gb-left:hover, .gb-right-item:hover { transform: scale(1.02); }
.gb-left::after {
  content: ''; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px;
  border-radius: 50%; background: rgba(255,255,255,.06);
}
.gb-left .gb-icon { font-size: 48px; opacity: .85; }
.gb-left h3 { font-size: 24px; margin: 0; }
.gb-left p { font-size: 14px; opacity: .85; margin: 0; }
.gb-right { display: flex; flex-direction: column; gap: 12px; }
.gb-right-item {
  flex: 1; border-radius: 8px; padding: 20px 24px; color: #fff; display: flex; align-items: center;
  gap: 16px; position: relative; overflow: hidden; transition: transform .2s;
}
.gb-right-item::after {
  content: ''; position: absolute; right: -20px; bottom: -20px; width: 100px; height: 100px;
  border-radius: 50%; background: rgba(255,255,255,.06);
}
.gb-right-item .gb-icon { font-size: 36px; opacity: .85; flex-shrink: 0; }
.gb-right-item h4 { font-size: 17px; margin: 0 0 3px; }
.gb-right-item p { font-size: 12px; margin: 0; opacity: .8; }

/* ===== PROMO BANNER (全幅廣告) ===== */
.promo-banner { margin: 15px 0; }
.promo-banner-inner {
  border-radius: 8px; padding: 28px 32px; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; color: #fff; overflow: hidden;
  position: relative;
}
.promo-banner-inner::after {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.promo-banner-text h3 { font-size: 24px; margin: 0 0 6px; }
.promo-banner-text p { font-size: 14px; margin: 0; opacity: .9; }
.promo-banner-cta {
  flex-shrink: 0; display: inline-block; background: #fff; color: inherit;
  padding: 10px 24px; border-radius: 4px; font-size: 14px; font-weight: 700;
  transition: opacity .2s;
}
.promo-banner-cta:hover { opacity: .9; }

/* Promo carousel */
.promo-slider { position: relative; overflow: hidden; }
.promo-track { display: flex; transition: transform .5s ease; }
.promo-slide { flex: 0 0 100%; min-width: 0; }
.promo-prev, .promo-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); color: #fff; border: none;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: background .2s;
}
.promo-prev:hover, .promo-next:hover { background: rgba(255,255,255,.3); }
.promo-prev { left: 8px; }
.promo-next { right: 8px; }
.promo-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.promo-dot {
  width: 10px; height: 10px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.15); cursor: pointer; padding: 0; transition: background .2s;
}
.promo-dot.active { background: #D5001C; }

/* ===== 限時特惠 (FLASH SALE) ===== */
.flash-sale { margin-bottom: 15px; }
.flash-sale-header {
  display: flex; align-items: center; gap: 10px; padding: 15px 0 10px;
  border-bottom: 2px solid #D5001C; margin-bottom: 15px;
}
.flash-sale-header .flash-icon { font-size: 28px; animation: flashPulse 1s infinite; }
@keyframes flashPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.flash-sale-header h2 { font-size: 22px; color: #222; margin: 0; }
.flash-sale-header .flash-timer { margin-left: auto; font-size: 14px; color: #D5001C; font-weight: 700; }
.flash-sale-header .flash-timer span {
  display: inline-block; background: #333; color: #fff; padding: 2px 6px; border-radius: 3px;
  margin: 0 2px; font-size: 13px; min-width: 24px; text-align: center;
}
.flash-scroll { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 5px; }
.flash-scroll::-webkit-scrollbar { display: none; }
.flash-scroll .product-card { min-width: 180px; flex-shrink: 0; }
.flash-scroll .product-card .card-img { height: 160px; }
.flash-scroll .product-card .card-price { color: #D5001C; }

/* ===== 品牌旗艦館 ===== */
.brand-section { margin-bottom: 15px; }
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.brand-card {
  background: #fff; border-radius: 8px; padding: 20px; text-align: center;
  border: 1px solid #e8e8e8; transition: box-shadow .2s; cursor: pointer;
}
.brand-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.brand-card .brand-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.brand-card h4 { font-size: 16px; color: #222; margin: 0 0 4px; }
.brand-card .brand-sub { font-size: 12px; color: #999; margin: 0 0 10px; }
.brand-card .brand-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.brand-card .brand-tag {
  font-size: 11px; color: #555; background: #f5f5f5; padding: 3px 10px; border-radius: 12px;
}

/* ===== SHARED QTY + BUY ===== */
.qty-btn {
  width: 32px; height: 32px; border: 1px solid #ddd; background: #fff; cursor: pointer;
  font-size: 16px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
}
.qty-val { font-size: 16px; min-width: 40px; text-align: center; }
.buy-btn {
  display: block; width: 200px; background: #333; color: #fff; border: none; padding: 14px 0;
  font-size: 18px; font-weight: 700; border-radius: 4px; cursor: pointer; text-align: center;
  transition: background .2s;
}
.buy-btn:hover { background: #222; }
.buy-btn.cart-added { background: #28a745; }

/* ===== AD CAROUSEL 廣告輪播 ===== */
.ad-carousel { margin: 15px 0; }
.ad-carousel .container { position: relative; }
.ad-track { display: flex; overflow: hidden; border-radius: 8px; }
.ad-slide-group { display: flex; gap: 15px; min-width: 100%; transition: transform .4s ease; }
.ad-banner {
  flex: 1; border-radius: 8px; padding: 28px 24px; color: #fff; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 20px; cursor: pointer; min-height: 120px;
  transition: transform .2s;
}
.ad-banner-img {
  padding: 0; background-size: cover; background-position: center; min-height: 130px;
}
.ad-banner:hover { transform: scale(1.02); }
.ad-banner::after {
  content: ''; position: absolute; right: -20px; bottom: -20px; width: 100px; height: 100px;
  border-radius: 50%; background: rgba(255,255,255,.06);
}
.ad-banner-icon { font-size: 48px; opacity: .85; flex-shrink: 0; }
.ad-banner-text h4 { font-size: 20px; margin: 0 0 4px; }
.ad-banner-text p { font-size: 13px; margin: 0; opacity: .8; }
.ad-prev, .ad-next {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.35); color: #fff;
  width: 36px; height: 36px; border-radius: 50%; border: none; font-size: 16px; cursor: pointer;
  z-index: 5; display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.ad-prev:hover, .ad-next:hover { background: rgba(0,0,0,.6); }
.ad-prev { left: 10px; }
.ad-next { right: 10px; }
.ad-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.ad-dot { width: 8px; height: 8px; border-radius: 50%; background: #ddd; border: none; cursor: pointer; padding: 0; }
.ad-dot.active { background: #333; width: 20px; border-radius: 4px; }
.btn { display: inline-block; padding: 8px 20px; border-radius: 4px; font-size: 14px; cursor: pointer; border: none; transition: all .2s; }
.btn-primary { background: #333; color: #fff; }
.btn-primary:hover { background: #222; }
.btn-outline { background: #fff; color: #333; border: 1px solid #333; }
.btn-outline:hover { background: #f0f0f0; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ===== RESPONSIVE ===== */

/* Tablet: 769 – 1024 */
@media (max-width: 1024px) {
  .container { padding: 0 12px; }
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .product-detail { flex-direction: column; }
  .product-gallery { width: 100%; }
  .product-gallery .main-img { width: 100%; height: 350px; }
  .product-sidebar { display: none; }
  .product-gallery-v2 { width: 340px; }
  .gallery-main { width: 340px; height: 340px; }
  .footer .container { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .mega-dropdown { min-width: 500px; }
  .hero-slide { height: 280px; }
  .hero-slide h2 { font-size: 28px; }
  .quick-item { width: 70px; font-size: 11px; }
  .cat-nav a { font-size: 13px; padding: 10px 10px; }
  .cat-nav .cat-all { font-size: 14px; padding: 10px 14px; }
  .mall-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .ad-banner { padding: 20px 16px; min-height: 100px; }
  .ad-banner-icon { font-size: 36px; }
  .ad-banner-text h4 { font-size: 16px; }
  .mall-sidebar { width: 170px; }
  .mall-product-grid { grid-template-columns: repeat(3, 1fr); }
  .mpc-img { height: 150px; }
}

/* Mobile landscape / small tablet: 577 – 768 */
@media (max-width: 768px) {
  .top-bar { display: block; }
  .top-bar .container { height: auto; flex-wrap: nowrap; padding: 6px 0; }
  .top-bar .top-left { flex-shrink: 0; }
  .top-bar .top-right { flex: 1; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 2px; }
  .top-bar .top-right::-webkit-scrollbar { display: none; }
  .top-bar .top-right > * { white-space: nowrap; flex-shrink: 0; }
  .header-main { padding: 8px 0; }
  .header-main .container { flex-wrap: wrap; gap: 8px; }
  .logo a { font-size: 22px; }
  .search-box { order: 3; max-width: 100%; flex: 100%; margin-top: 6px; }
  .search-box input { height: 36px; font-size: 13px; }
  .search-box button { height: 36px; width: 56px; }
  .search-hot { display: none; }

  .cat-nav { position: sticky; top: 0; z-index: 1001; }
  .cat-nav .container { flex-wrap: wrap; }
  .cat-nav .cat-all { font-size: 14px; }
  .cat-nav .mega-item { display: none; }
  .cat-nav.mobile-open .mega-item {
    display: block; width: 100%; border-top: 1px solid rgba(255,255,255,.2);
  }
  .cat-nav.mobile-open .mega-item > a {
    padding: 10px 16px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .mega-dropdown {
    position: static !important; box-shadow: none; border-radius: 0;
    min-width: 100% !important; padding: 10px; background: #f5f5f5;
    display: none !important;
  }
  .cat-nav.mobile-open .mega-item:hover .mega-dropdown,
  .cat-nav.mobile-open .mega-item .mega-dropdown { display: flex !important; flex-wrap: wrap; }
  .mega-col { min-width: 50%; padding: 5px; }
  .mega-col h4 { font-size: 13px; }

  .hero { margin: 6px 0; }
  .hero-slide { height: 200px; }
  .hero-slide h2 { font-size: 22px; }
  .hero-slide p { font-size: 13px; }
  .hero-btn { padding: 8px 20px; font-size: 14px; }
  .hero-prev, .hero-next { width: 30px; height: 40px; font-size: 18px; }

  .quick-entry { padding: 12px 0; }
  .quick-grid { gap: 4px; }
  .quick-item { width: 60px; padding: 6px 0; font-size: 10px; }
  .quick-item .quick-icon { font-size: 24px; }

  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .product-card .card-img { height: 140px; }
  .product-card .card-name { font-size: 12px; height: 32px; }
  .product-card .card-price { font-size: 16px; }
  .section-header h2 { font-size: 18px; }

  .product-detail { flex-direction: column; padding: 15px; gap: 15px; }
  .product-gallery { width: 100%; }
  .product-gallery .main-img { width: 100%; height: 280px; }
  .product-info h1 { font-size: 18px; }
  .product-price-box .price { font-size: 28px; }
  .buy-btn { width: 100%; }
  .product-main { flex-direction: column; }
  .product-gallery-v2 { width: 100%; }
  .gallery-main { width: 100%; height: 300px; }
  .product-title-v2 { font-size: 17px; }
  .product-price-v2 .price-value { font-size: 26px; }
  .btn-buy-now, .btn-add-cart { flex: 1; justify-content: center; }
  .addon-card { width: 120px; }

  .cart-table { font-size: 12px; }
  .cart-table th, .cart-table td { padding: 8px 6px; }
  .cart-table .product-cell img { width: 40px; height: 40px; }
  .checkout-btn { padding: 12px 30px; font-size: 16px; }
  .footer { padding: 20px 0 0; }
  .footer .container { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer-col h4 { font-size: 14px; }
  .breadcrumb { font-size: 11px; padding: 8px 0; }
  .mall-grid { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: 1fr; }
  .promo-banner-inner { flex-direction: column; text-align: center; padding: 20px; }
  .promo-banner-text h3 { font-size: 18px; }
  .flash-scroll .product-card { min-width: 150px; }
  .ad-slide-group { flex-direction: column; }
  .ad-banner { min-height: 90px; padding: 16px; }
  .ad-banner-icon { font-size: 32px; }
  .ad-banner-text h4 { font-size: 14px; }
  .grid-banner-layout { grid-template-columns: 1fr; }
  .gb-left { min-height: 150px; padding: 24px 20px; }
  .gb-left h3 { font-size: 20px; }
  .mall-sidebar { display: none; }
  .mall-product-grid { grid-template-columns: repeat(2, 1fr); }
  .mall-banner-inner { padding: 24px 20px; }
  .mall-banner-text h1 { font-size: 20px; }
  .mall-banner-icon { font-size: 36px; }
  .mall-sort-bar { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* Mobile: ≤ 576 */
@media (max-width: 576px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .product-card .card-img { height: 150px; }
  .product-card .card-name { font-size: 11px; height: 30px; }
  .product-card .card-price { font-size: 15px; }
  .product-card .card-body { padding: 8px; }
  .hero-slide { height: 180px; }
  .hero-slide h2 { font-size: 18px; }
  .hero-slide p { font-size: 12px; }
  .quick-grid { justify-content: center; }
  .quick-item { width: 55px; }
  .product-detail { padding: 10px; }
  .product-gallery .main-img { height: 220px; }
  .product-info h1 { font-size: 16px; }
  .cart-table { display: block; overflow-x: auto; white-space: nowrap; }
  .cart-summary { font-size: 14px; }
  .cart-summary .total { font-size: 20px; }
  .footer .container { grid-template-columns: 1fr; gap: 15px; }
  .cat-page .page-title { font-size: 18px; }
  .container { padding: 0 8px; }
}

/* Very small: ≤ 400 */
@media (max-width: 400px) {
  .product-card .card-img { height: 120px; }
  .product-card .card-name { font-size: 10px; }
  .product-card .card-price { font-size: 13px; }
  .hero-slide { height: 140px; padding: 10px; }
  .hero-slide h2 { font-size: 16px; }
  .hero-slide .hero-content > div { font-size: 36px !important; }
}

/* ═══ Admin Backend ═══ */
.admin-layout { display: flex; gap: 24px; min-height: 600px; }
.admin-sidebar { width: 180px; flex-shrink: 0; }
.admin-content { flex: 1; min-width: 0; }

.admin-nav { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,.04); }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px;
  border: none; background: none; font-size: 14px; color: #555; cursor: pointer;
  transition: background .15s; text-align: left;
}
.admin-nav-item:hover { background: #f5f5f5; }
.admin-nav-item.active { background: #e8f4f8; color: #1a5276; font-weight: 600; border-right: 3px solid #1a5276; }
.admin-nav-item i { width: 20px; text-align: center; }

/* Stat cards */
.admin-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.admin-stat-card {
  background: #fff; border-radius: 10px; padding: 20px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
  display: flex; align-items: center; gap: 16px;
}
.stat-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-label { font-size: 13px; color: #999; }
.stat-value { font-size: 22px; font-weight: 700; color: #333; }

/* Admin panels */
.admin-panel {
  background: #fff; border-radius: 10px; padding: 24px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04); margin-bottom: 20px;
}
.admin-panel h3 { font-size: 17px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.admin-panel h3 i { color: #1a5276; }
.admin-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.admin-panel-header h3 { margin-bottom: 0; }
.admin-panel-actions { display: flex; gap: 10px; align-items: center; }

.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Buttons */
.admin-btn-primary {
  padding: 7px 16px; background: #1a5276; color: #fff; border: none;
  border-radius: 6px; font-size: 13px; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.admin-btn-primary:hover { background: #154360; }
.admin-btn-sm {
  padding: 4px 10px; border: 1px solid #ddd; border-radius: 4px;
  background: #fff; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.admin-btn-sm:hover { background: #f5f5f5; border-color: #aaa; }
.admin-btn-sm.primary { background: #1a5276; color: #fff; border-color: #1a5276; }
.admin-btn-sm.danger { color: #e74c3c; }
.admin-btn-sm.danger:hover { background: #fdedec; border-color: #e74c3c; }
.admin-btn-outline-sm {
  padding: 5px 14px; border: 1px solid #ddd; border-radius: 6px;
  background: #fff; color: #555; font-size: 12px; cursor: pointer;
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.admin-btn-outline-sm:hover { border-color: #1a5276; color: #1a5276; }
.admin-action-btns { display: flex; gap: 4px; }

/* Search input */
.admin-search {
  padding: 7px 14px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 13px; outline: none; width: 200px;
}
.admin-search:focus { border-color: #1a5276; }

/* Filter tabs */
.admin-filter-tabs { display: flex; gap: 6px; }
.admin-filter-btn {
  padding: 5px 14px; border: 1px solid #ddd; border-radius: 20px;
  background: #fff; font-size: 12px; cursor: pointer; color: #555;
}
.admin-filter-btn:hover { border-color: #1a5276; color: #1a5276; }
.admin-filter-btn.active { background: #1a5276; color: #fff; border-color: #1a5276; }

/* Tables */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  background: #fafafa; padding: 10px 12px; text-align: left;
  color: #888; font-weight: 500; border-bottom: 2px solid #eee; white-space: nowrap;
}
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; }
.admin-table tbody tr:hover { background: #fafafa; }
.admin-table-footer { font-size: 12px; color: #999; margin-top: 12px; padding-top: 8px; border-top: 1px solid #f0f0f0; }
.admin-product-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
.admin-product-name { font-weight: 500; }
.admin-price { font-weight: 600; color: #D5001C; }
.admin-orig-price { color: #999; text-decoration: line-through; font-size: 12px; }
.admin-order-id { color: #1a5276; font-family: monospace; }

/* Pagination */
.admin-pagination {
  display: flex; align-items: center; gap: 4px;
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}
.admin-pagination button {
  min-width: 32px; height: 32px;
  padding: 0 8px; border: 1px solid #ddd;
  border-radius: 4px; background: #fff;
  font-size: 13px; cursor: pointer; color: #555;
  transition: all .15s;
}
.admin-pagination button:hover { border-color: #1a5276; color: #1a5276; }
.admin-pagination button.active { background: #1a5276; color: #fff; border-color: #1a5276; }
.admin-pagination button:disabled { opacity: .4; cursor: not-allowed; }
.admin-pagination span { font-size: 13px; color: #999; margin-left: 12px; }

/* Tags */
.admin-tag { font-size: 11px; padding: 2px 8px; border-radius: 3px; font-weight: 500; }
.admin-tag.sale { background: #fdedec; color: #e74c3c; }
.admin-tag.new { background: #eaf2f8; color: #2980b9; }
.admin-tag.none { background: #f5f5f5; color: #999; }
.admin-tag.gold { background: #fef9e7; color: #d4a017; }
.admin-tag.silver { background: #eaecee; color: #7f8c8d; }

/* Simple table (overview) */
.admin-simple-table { border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
.ast-header, .ast-row {
  display: grid; grid-template-columns: 2fr 1fr 1fr 0.8fr; gap: 8px;
  padding: 10px 14px; font-size: 13px; align-items: center;
}
.ast-header { background: #fafafa; color: #999; font-weight: 500; }
.ast-row { border-top: 1px solid #f0f0f0; }
.ast-row:hover { background: #fafafa; }
.ast-name { font-weight: 500; }
.ast-cat { color: #888; }
.ast-amount { font-weight: 600; }
.ast-status {
  padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500;
}
.ast-status.bg-warn { background: #fef9e7; color: #d4a017; }
.ast-status.bg-info { background: #eaf2f8; color: #2980b9; }
.ast-status.bg-ok { background: #eafaf1; color: #27ae60; }
.ast-status.bg-err { background: #fdedec; color: #e74c3c; }

/* Mall cards (admin) */
.admin-mall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.admin-mall-card { border: 1px solid #eee; border-radius: 10px; overflow: hidden; }
.admin-mall-header {
  padding: 20px; color: #fff; display: flex; align-items: center; gap: 14px;
}
.admin-mall-header h4 { font-size: 16px; margin: 0 0 2px; }
.admin-mall-header p { font-size: 12px; margin: 0; opacity: .85; }
.admin-mall-icon {
  width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.admin-mall-stats { display: flex; padding: 16px; gap: 0; border-bottom: 1px solid #f0f0f0; }
.admin-mall-stat { flex: 1; text-align: center; }
.ams-label { font-size: 11px; color: #999; display: block; }
.ams-value { font-size: 18px; font-weight: 700; color: #333; }
.admin-mall-actions { display: flex; gap: 8px; padding: 12px 16px; }

/* Banner cards (admin) */
.admin-banner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.admin-banner-card { border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
.admin-banner-preview {
  height: 100px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.banner-active-badge {
  position: absolute; top: 6px; right: 6px; background: #27ae60; color: #fff;
  font-size: 10px; padding: 2px 8px; border-radius: 3px;
}
.admin-banner-info { padding: 10px 12px; font-size: 13px; color: #555; }

/* ═══ Info Pages (Privacy / Returns / About) ═══ */
.info-page { max-width: 860px; margin: 20px auto 60px; }
.info-page h2 { font-size: 24px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.info-page h2 i { color: #D5001C; }
.info-date { color: #999; font-size: 13px; margin-bottom: 32px; }
.info-page section { margin-bottom: 28px; }
.info-page section h3 { font-size: 17px; color: #333; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #f0f0f0; }
.info-page section p { font-size: 14px; color: #555; line-height: 1.8; margin-bottom: 10px; }
.info-page section ul, .info-page section ol { padding-left: 20px; }
.info-page section li { font-size: 14px; color: #555; line-height: 1.8; margin-bottom: 6px; }
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.info-table th { background: #fafafa; padding: 10px 14px; text-align: left; border-bottom: 2px solid #eee; color: #555; }
.info-table td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; color: #666; }
.info-table tr:hover td { background: #fafafa; }

@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .admin-stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-grid-2 { grid-template-columns: 1fr; }
  .admin-mall-grid { grid-template-columns: 1fr; }
  .admin-banner-grid { grid-template-columns: 1fr 1fr; }
}

/* ═══ Wishlist Page ═══ */
.wishlist-table-wrap { overflow-x: auto; }
.wishlist-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wishlist-table th {
  background: #fafafa; padding: 12px 14px; text-align: left;
  color: #888; font-weight: 500; border-bottom: 2px solid #eee;
}
.wishlist-table td { padding: 12px 14px; border-bottom: 1px solid #f0f0f0; }
.wishlist-table tbody tr:hover { background: #fafafa; }
.wishlist-product { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #333; }
.wishlist-product img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.wishlist-product:hover .wishlist-name { color: #D5001C; }
.wishlist-name { font-weight: 500; transition: color .15s; }
.wishlist-cat { color: #888; font-size: 13px; }
.wishlist-price { font-weight: 600; color: #D5001C; }
.wishlist-orig { font-size: 12px; color: #999; text-decoration: line-through; }
.wishlist-date { color: #999; font-size: 13px; }
.wishlist-actions { display: flex; align-items: center; gap: 8px; }
.wishlist-remove {
  background: none; border: none; color: #ccc; font-size: 15px; cursor: pointer;
  padding: 4px; transition: color .15s;
}
.wishlist-remove:hover { color: #e74c3c; }
