/* ========== Reset & Base ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a56db;
  --primary-dark: #1040a0;
  --primary-light: #3b82f6;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --bg: #f0f2f5;
  --card-bg: #fff;
  --text: #1a1a2e;
  --text-light: #8c8c8c;
  --text-medium: #595959;
  --price: #e63946;
  --border: #e8e8e8;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 30px rgba(26,86,219,0.12);
  --radius: 14px;
  --radius-sm: 8px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ========== Header / Navbar ========== */
.navbar {
  background: #0a1929;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.navbar-logo img {
  height: 40px;
  width: auto;
}

.navbar-logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.navbar-logo-text span {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.8;
  margin-left: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.search-box {
  flex: 1;
  display: flex;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  height: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 20px;
  font-size: 0.9rem;
  background: transparent;
}

.search-box button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0 24px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}

.search-box button:hover {
  background: var(--accent-dark);
}

.navbar-icons {
  display: flex;
  gap: 20px;
  align-items: center;
}

.navbar-icons a {
  color: #fff;
  font-size: 1.3rem;
  position: relative;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.navbar-icons a:hover {
  opacity: 1;
}

.navbar-icons .badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  line-height: 1.3;
}

/* ========== Banner Carousel ========== */
.banner-section {
  max-width: 1280px;
  margin: 20px auto;
  padding: 0 20px;
}

.banner-carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 2.8 / 1;
  background: #eee;
}

.banner-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.banner-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-slide .banner-text {
  position: absolute;
  bottom: 28px;
  left: 36px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.banner-slide .banner-text h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.banner-slide .banner-text p {
  font-size: 1.05rem;
  opacity: 0.92;
}

.banner-dots {
  position: absolute;
  bottom: 14px;
  right: 24px;
  display: flex;
  gap: 8px;
}

.banner-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all 0.3s;
}

.banner-dots span.active {
  background: #fff;
  width: 26px;
  border-radius: 4px;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.8);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.banner-carousel:hover .banner-arrow {
  opacity: 1;
}

.banner-arrow:hover {
  background: rgba(255,255,255,0.95);
}

.banner-arrow.prev { left: 14px; }
.banner-arrow.next { right: 14px; }

/* ========== Category Nav ========== */
.category-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 20px;
}

.category-grid {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 22px 16px;
  box-shadow: var(--shadow);
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s;
  flex: 1;
  min-width: 0;
}

.category-item:hover {
  transform: translateY(-3px);
}

.category-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.category-item span {
  font-size: 0.78rem;
  color: var(--text-medium);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ========== Section Title ========== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.section-header .more-link {
  font-size: 0.85rem;
  color: var(--primary-light);
  cursor: pointer;
  transition: color 0.2s;
}

.section-header .more-link:hover {
  color: var(--primary-dark);
}

/* ========== Horizontal Scroll Products ========== */
.scroll-section {
  max-width: 1280px;
  margin: 0 auto 28px;
  padding: 0 20px;
}

.scroll-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

.scroll-container .product-card {
  scroll-snap-align: start;
  min-width: 210px;
  max-width: 210px;
}

/* ========== Product Card ========== */
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.product-card .card-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
}

.product-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.product-card:hover .card-img img {
  transform: scale(1.06);
}

.product-card .card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.product-card .card-tag.hot {
  background: var(--price);
}

.product-card .card-tag.new {
  background: #10b981;
}

.product-card .card-info {
  padding: 12px 14px 16px;
}

.product-card .card-title {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  font-weight: 500;
}

.product-card .card-price {
  color: var(--price);
  font-size: 1.15rem;
  font-weight: 700;
}

.product-card .card-price small {
  font-size: 0.78rem;
  font-weight: 400;
}

.product-card .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.product-card .card-sales {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ========== Group Buy Section ========== */
.groupbuy-section {
  max-width: 1280px;
  margin: 0 auto 28px;
  padding: 0 20px;
}

.groupbuy-banner {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  position: relative;
}

.groupbuy-banner img {
  width: 100%;
  aspect-ratio: 3.5 / 1;
  object-fit: cover;
}

.groupbuy-banner .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26,86,219,0.85), rgba(59,130,246,0.7));
  display: flex;
  align-items: center;
  padding: 0 40px;
}

.groupbuy-banner .overlay-content {
  color: #fff;
}

.groupbuy-banner .overlay-content h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.groupbuy-banner .overlay-content p {
  font-size: 1rem;
  opacity: 0.9;
}

.groupbuy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.groupbuy-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  cursor: pointer;
}

.groupbuy-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.groupbuy-card .gb-img {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #f5f5f5;
}

.groupbuy-card .gb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.groupbuy-card .gb-info {
  padding: 14px 16px;
}

.groupbuy-card .gb-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.groupbuy-card .gb-prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.groupbuy-card .gb-price {
  color: var(--price);
  font-size: 1.2rem;
  font-weight: 700;
}

.groupbuy-card .gb-price small {
  font-size: 0.8rem;
}

.groupbuy-card .gb-original {
  color: var(--text-light);
  font-size: 0.85rem;
  text-decoration: line-through;
}

.groupbuy-card .gb-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.groupbuy-card .gb-bar {
  flex: 1;
  height: 6px;
  background: #e8e8e8;
  border-radius: 3px;
  overflow: hidden;
}

.groupbuy-card .gb-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 3px;
  transition: width 0.5s;
}

.groupbuy-card .gb-count {
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
}

.groupbuy-card .gb-timer {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--price);
  font-weight: 600;
}

/* ========== Service Icons ========== */
.service-section {
  max-width: 1280px;
  margin: 0 auto 28px;
  padding: 0 20px;
}

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

.service-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.service-card .service-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.service-card .service-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.service-card .service-desc {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ========== Product Grid ========== */
.grid-section {
  max-width: 1280px;
  margin: 0 auto 32px;
  padding: 0 20px;
}

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

.product-grid .product-card .card-img {
  aspect-ratio: 1;
}

/* ========== Tab Filter ========== */
.tab-bar {
  display: flex;
  gap: 0;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.tab-bar .tab-item {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 0.88rem;
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 2px solid transparent;
  font-weight: 500;
}

.tab-bar .tab-item:hover {
  color: var(--primary);
  background: rgba(26,86,219,0.04);
}

.tab-bar .tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ========== Store Map ========== */
.map-section {
  max-width: 1280px;
  margin: 0 auto 28px;
  padding: 0 20px;
}

.map-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  height: 320px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.map-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  max-width: 260px;
}

.map-overlay h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.map-overlay p {
  font-size: 0.8rem;
  color: var(--text-medium);
  line-height: 1.5;
}

/* ========== Footer ========== */
.footer {
  background: #0a1929;
  color: #8899aa;
  padding: 48px 20px 0;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1.3fr;
  gap: 28px;
  padding-bottom: 36px;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.82rem;
  line-height: 1.7;
  color: #7a8fa3;
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8899aa;
  font-size: 0.85rem;
  transition: all 0.2s;
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--primary);
  color: #fff;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: #7a8fa3;
  font-size: 0.83rem;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-newsletter h4 {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-newsletter p {
  font-size: 0.83rem;
  color: #7a8fa3;
  margin-bottom: 14px;
  line-height: 1.5;
}

.newsletter-form {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
}

.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  outline: none;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.newsletter-form input::placeholder {
  color: #5a7a94;
}

.newsletter-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: var(--accent-dark);
}

.footer-trust {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #7a8fa3;
}

.trust-item .trust-icon {
  font-size: 1.1rem;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
  text-align: center;
  font-size: 0.78rem;
  color: #5a7a94;
}

/* ================================
   DETAIL PAGE
   ================================ */

.detail-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-light);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 6px;
}

/* Detail Top */
.detail-top {
  display: flex;
  gap: 28px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.detail-gallery {
  width: 440px;
  flex-shrink: 0;
}

.detail-main-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 14px;
}

.detail-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-thumbs {
  display: flex;
  gap: 10px;
}

.detail-thumbs .thumb {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.detail-thumbs .thumb.active,
.detail-thumbs .thumb:hover {
  border-color: var(--primary);
}

.detail-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.detail-info .detail-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
}

.detail-info .detail-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 18px;
}

.detail-price-box {
  background: linear-gradient(135deg, #fef3f2, #fff5f0);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 22px;
  border: 1px solid rgba(230,57,70,0.1);
}

.detail-price-box .price-label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.detail-price-box .detail-price {
  color: var(--price);
  font-size: 2.2rem;
  font-weight: 800;
}

.detail-price-box .detail-price small {
  font-size: 1.1rem;
}

.detail-price-box .original-price {
  font-size: 0.95rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-left: 14px;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.detail-meta-row {
  display: flex;
  align-items: flex-start;
  font-size: 0.9rem;
}

.detail-meta-row .label {
  color: var(--text-light);
  width: 70px;
  flex-shrink: 0;
}

.detail-meta-row .value {
  color: var(--text);
  flex: 1;
}

.detail-meta-row .value .tag {
  display: inline-block;
  background: #fff0eb;
  color: var(--price);
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 4px;
  margin-right: 6px;
}

/* Color / Storage Selector */
.detail-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-options .opt-btn {
  padding: 7px 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  color: var(--text);
}

.detail-options .opt-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.detail-options .opt-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(26,86,219,0.06);
  font-weight: 500;
}

/* Action Buttons */
.detail-actions {
  display: flex;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
}

.btn-cart, .btn-buy {
  flex: 1;
  padding: 15px 0;
  border: none;
  border-radius: 26px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-cart {
  background: #fff0eb;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-cart:hover {
  background: rgba(26,86,219,0.08);
}

.btn-buy {
  background: var(--primary);
  color: #fff;
}

.btn-buy:hover {
  background: var(--primary-dark);
}

/* Detail Specs */
.detail-specs {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.detail-specs h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr:nth-child(even) {
  background: #fafafa;
}

.specs-table td {
  padding: 12px 18px;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0f0f0;
}

.specs-table td:first-child {
  color: var(--text-light);
  width: 150px;
  font-weight: 500;
}

/* Detail Description */
.detail-desc {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.detail-desc h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.detail-desc .desc-content {
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: 1.9;
}

.detail-desc .desc-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 18px 0;
}

/* ========== Back to Top ========== */
.back-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 46px;
  height: 46px;
  background: var(--card-bg);
  border-radius: 50%;
  box-shadow: 0 2px 14px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 50;
  font-size: 1.2rem;
  border: 1px solid var(--border);
}

.back-top.show {
  opacity: 1;
}

.back-top:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(0,0,0,0.78);
  color: #fff;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 999;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== Customer Service Float ========== */
.cs-float {
  position: fixed;
  bottom: 90px;
  right: 32px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-float .cs-btn {
  width: 46px;
  height: 46px;
  background: var(--card-bg);
  border-radius: 50%;
  box-shadow: 0 2px 14px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.cs-float .cs-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.08);
}

/* ========== Chatbot Widget ========== */
.chat-toggle {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(26,86,219,0.4);
  z-index: 200;
  transition: all 0.3s;
  color: #fff;
  font-size: 1.5rem;
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(26,86,219,0.5);
}

.chat-toggle-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1.3;
}

.chat-widget {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 370px;
  max-height: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.18);
  z-index: 201;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.chat-widget.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  font-size: 1.6rem;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-status {
  font-size: 0.75rem;
  opacity: 0.85;
}

.chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  padding: 4px;
}

.chat-close:hover {
  opacity: 1;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  min-height: 120px;
  background: #f7f8fa;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.chat-msg {
  display: flex;
  max-width: 85%;
}

.chat-msg.user {
  align-self: flex-end;
  justify-content: flex-end;
}

.chat-msg.bot {
  align-self: flex-start;
}

.chat-msg .msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.chat-msg.user .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg.bot .msg-bubble {
  background: #fff;
  color: var(--text);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.chat-msg .msg-bubble p {
  margin-bottom: 4px;
}

.chat-msg .msg-bubble p:last-child {
  margin-bottom: 0;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  background: #aaa;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Quick Replies */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  background: #f7f8fa;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

.quick-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 0.78rem;
  cursor: pointer;
  background: #fff;
  color: var(--primary);
  transition: all 0.2s;
  white-space: nowrap;
}

.quick-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Chat Input */
.chat-input-area {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid #eee;
  background: #fff;
  flex-shrink: 0;
}

.chat-input-area input {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-area input:focus {
  border-color: var(--primary-light);
}

.chat-input-area button {
  background: var(--primary);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  margin-left: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.chat-input-area button:hover {
  background: var(--primary-dark);
}

/* ========== Quantity Selector ========== */
.detail-qty-row {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.detail-qty-row .label {
  color: var(--text-light);
  width: 70px;
  flex-shrink: 0;
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.qty-selector button {
  width: 36px;
  height: 36px;
  border: none;
  background: #f5f5f5;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-selector button:hover {
  background: #e8e8e8;
}

.qty-selector .qty-display {
  width: 50px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  background: #fff;
  line-height: 36px;
}

/* ========== Cart Drawer ========== */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  z-index: 301;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}

.cart-drawer.open {
  right: 0;
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-drawer-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-drawer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-clear-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.cart-clear-btn:hover {
  border-color: var(--price);
  color: var(--price);
}

.cart-close-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s;
  padding: 4px;
}

.cart-close-btn:hover {
  color: var(--text);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-drawer-body::-webkit-scrollbar {
  width: 4px;
}

.cart-drawer-body::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.cart-empty p {
  font-size: 0.95rem;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.cart-item-variant {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.cart-qty button {
  width: 28px;
  height: 28px;
  border: none;
  background: #f5f5f5;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.cart-qty button:hover {
  background: #e8e8e8;
}

.cart-qty span {
  width: 36px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.cart-item-price {
  color: var(--price);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #ccc;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}

.cart-item-remove:hover {
  color: var(--price);
}

.cart-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: #fafafa;
}

.cart-footer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.cart-footer-total {
  color: var(--price);
  font-size: 1.3rem;
  font-weight: 800;
}

.cart-checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.cart-checkout-btn:hover {
  background: var(--primary-dark);
}

/* ========== Group Buy Modal ========== */
.gb-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.gb-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.gb-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 420px;
  max-width: 90vw;
  background: #fff;
  border-radius: 16px;
  z-index: 301;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.gb-modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.gb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.gb-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.gb-modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s;
  padding: 4px;
}

.gb-modal-close:hover {
  color: var(--text);
}

.gb-modal-body {
  padding: 22px;
}

.gb-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.gb-modal-prices {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.gb-modal-price {
  color: var(--price);
  font-size: 1.8rem;
  font-weight: 800;
}

.gb-modal-orig-price {
  color: var(--text-light);
  font-size: 1rem;
  text-decoration: line-through;
}

.gb-modal-count {
  font-size: 0.9rem;
  color: var(--text-medium);
  margin-bottom: 8px;
}

.gb-modal-timer {
  font-size: 0.88rem;
  color: var(--price);
  font-weight: 600;
  margin-bottom: 16px;
}

.gb-modal-desc {
  background: #fff8f0;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--text-medium);
  line-height: 1.7;
}

.gb-modal-desc p {
  margin-bottom: 2px;
}

.gb-modal-desc p:last-child {
  margin-bottom: 0;
}

.gb-modal-footer {
  padding: 0 22px 22px;
}

.gb-modal-join-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.gb-modal-join-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245,158,11,0.4);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .navbar-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .search-box {
    order: 3;
    width: 100%;
  }

  .banner-carousel {
    aspect-ratio: 1.8 / 1;
  }

  .banner-slide .banner-text h2 {
    font-size: 1.3rem;
  }

  .category-grid {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px;
  }

  .category-item {
    width: calc(20% - 16px);
    flex: none;
  }

  .detail-top {
    flex-direction: column;
    padding: 18px;
  }

  .detail-gallery {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .scroll-container .product-card {
    min-width: 170px;
    max-width: 170px;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .groupbuy-grid {
    grid-template-columns: 1fr;
  }

  .chat-widget {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: 16px 16px 0 0;
  }

  .chat-toggle {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .cart-drawer {
    width: 100%;
    max-width: 100%;
    right: -100%;
  }

  .gb-modal {
    width: 92vw;
  }

  .detail-qty-row {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .category-item {
    width: calc(25% - 12px);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tab-bar {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tab-bar::-webkit-scrollbar {
    display: none;
  }

  .tab-bar .tab-item {
    min-width: 60px;
    flex: none;
    padding: 10px 12px;
    font-size: 0.82rem;
  }
}

/* ========== Checkout Modal ========== */
.checkout-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  background: #fff;
  border-radius: 16px;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.checkout-modal.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.checkout-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}

.checkout-modal-header h3 {
  font-size: 1.1rem;
  color: var(--text);
}

.checkout-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.ck-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  margin-top: 16px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.ck-section-title:first-child {
  margin-top: 0;
}

.ck-summary {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
}

.ck-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.88rem;
}

.ck-item:last-child {
  border-bottom: none;
}

.ck-item-name {
  color: var(--text);
  flex: 1;
}

.ck-item-price {
  color: var(--price);
  font-weight: 600;
  margin-left: 12px;
}

.ck-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 4px;
  border-top: 2px solid var(--border);
  margin-top: 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

.ck-total-price {
  color: var(--price);
  font-size: 1.05rem;
}

.ck-form-group {
  margin-bottom: 14px;
}

.ck-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 6px;
}

.ck-form-group input,
.ck-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s;
  font-family: inherit;
}

.ck-form-group input:focus,
.ck-form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.ck-form-group textarea {
  resize: vertical;
  min-height: 70px;
}

.ck-payment-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ck-payment-option {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.ck-payment-option:hover {
  border-color: var(--primary-light);
  background: #f0f4ff;
}

.ck-payment-option input[type="radio"] {
  margin-right: 10px;
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

.ck-payment-option input[type="radio"]:checked + span {
  font-weight: 600;
  color: var(--primary);
}

.checkout-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.ck-cancel-btn {
  flex: 1;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text-medium);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ck-cancel-btn:hover {
  background: #f0f0f0;
}

.ck-submit-btn {
  flex: 2;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ck-submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ========== Order Confirm Modal ========== */
.order-confirm-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 460px;
  max-height: 85vh;
  background: #fff;
  border-radius: 16px;
  z-index: 10002;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.order-confirm-modal.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.order-confirm-body {
  padding: 28px 24px 20px;
  overflow-y: auto;
  flex: 1;
  text-align: center;
}

.oc-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: popIn 0.4s ease;
}

@keyframes popIn {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.oc-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.oc-order-id {
  font-size: 0.88rem;
  color: var(--text-medium);
  margin-bottom: 20px;
  padding: 8px 14px;
  background: #f0f4ff;
  border-radius: 8px;
  display: inline-block;
}

.oc-order-id strong {
  color: var(--primary);
}

.oc-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: left;
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.oc-items {
  text-align: left;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 10px 14px;
}

.oc-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid #eee;
}

.oc-item:last-child {
  border-bottom: none;
}

.oc-total {
  text-align: right;
  font-size: 1.05rem;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px solid var(--border);
}

.oc-total strong {
  color: var(--price);
}

.oc-info-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.88rem;
  text-align: left;
}

.oc-info-row span:first-child {
  color: var(--text-light);
}

.oc-info-row span:last-child {
  color: var(--text);
  font-weight: 500;
  text-align: right;
  max-width: 60%;
}

.oc-note {
  margin-top: 16px;
  padding: 10px 14px;
  background: #fffbeb;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #92400e;
}

.order-confirm-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.order-confirm-footer .ck-submit-btn {
  width: 100%;
  flex: none;
}

/* Checkout Modal Responsive */
@media (max-width: 768px) {
  .checkout-modal,
  .order-confirm-modal {
    width: 95%;
    max-height: 90vh;
  }

  .checkout-modal-body,
  .order-confirm-body {
    padding: 16px;
  }
}

/* ========== Auth Page (Login/Register) ========== */
.auth-page {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f0f2f5 0%, #e8ecf1 100%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  padding: 36px 32px 32px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo img {
  height: 40px;
}

.auth-tabs {
  display: flex;
  background: #f0f2f5;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.25s;
}

.auth-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.auth-form-group {
  margin-bottom: 18px;
}

.auth-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 6px;
}

.auth-form-group input[type="text"],
.auth-form-group input[type="email"],
.auth-form-group input[type="tel"],
.auth-form-group input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.auth-form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.auth-password-wrap {
  position: relative;
}

.auth-password-wrap input {
  padding-right: 44px;
}

.auth-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  padding: 4px;
}

.auth-eye-btn:hover,
.auth-eye-btn.active {
  opacity: 1;
}

.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-medium);
  cursor: pointer;
}

.auth-remember input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.auth-forgot {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-forgot:hover {
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.3px;
}

.auth-submit-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 86, 219, 0.3);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0 20px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  padding: 0 14px;
  font-size: 0.82rem;
  color: var(--text-light);
  white-space: nowrap;
}

.auth-social {
  display: flex;
  gap: 12px;
}

.auth-social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-social-btn:hover {
  border-color: var(--primary-light);
  background: #f8f9ff;
}

.social-icon {
  font-size: 1.1rem;
  font-weight: 700;
}

.social-icon.google {
  color: #4285f4;
}

.social-icon.whatsapp {
  color: #25d366;
}

.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-medium);
  margin-bottom: 20px;
  line-height: 1.5;
}

.auth-agree input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.auth-agree a {
  color: var(--primary);
  text-decoration: none;
}

.auth-agree a:hover {
  text-decoration: underline;
}

.nav-login-active {
  color: var(--primary) !important;
  font-weight: 700;
}

/* Auth Page Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px 24px;
    border-radius: 16px;
  }

  .auth-social {
    flex-direction: column;
  }

  .auth-options {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

/* ========== Navbar User Dropdown ========== */
.nav-user-wrap {
  position: relative;
}

.nav-user-wrap > a {
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s;
}

.nav-user-wrap > a:hover {
  color: var(--primary);
}

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.13);
  z-index: 1000;
  overflow: hidden;
  animation: dropIn 0.2s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
}

.nav-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.nav-user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
  line-height: 1.3;
}

.nav-user-menu {
  padding: 6px 0;
}

.nav-user-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}

.nav-user-menu a:hover {
  background: #f5f6fa;
  color: var(--primary);
}

.nav-user-menu a:last-child {
  color: #e74c3c;
}

.nav-user-menu a:last-child:hover {
  background: #fef2f2;
  color: #c0392b;
}
