/* ============================================================
   PetHub Pet Shop - global styles
   Warm modern e-commerce look (warm orange primary + fresh white)
   ============================================================ */

:root {
  --primary: #FF6B35;
  --primary-dark: #E8551F;
  --primary-light: #FFF1EA;
  --teal: #2EC4B6;
  --teal-light: #E8F9F7;
  --yellow: #FFD23F;
  --dark: #1F2430;
  --gray-800: #2E3440;
  --gray-600: #6B7280;
  --gray-400: #9CA3AF;
  --gray-200: #E5E7EB;
  --gray-100: #F4F5F7;
  --white: #FFFFFF;
  --red: #E53935;
  --green: #43A047;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(31, 36, 48, 0.08);
  --shadow-lg: 0 12px 40px rgba(31, 36, 48, 0.14);
  --max-width: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ============ Top announcement bar ============ */
.topbar {
  background: var(--dark);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  padding: 8px 0;
  text-align: center;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar strong { color: var(--yellow); }
.topbar a { color: rgba(255,255,255,0.75); margin-left: 16px; transition: color .2s; }
.topbar a:hover { color: var(--yellow); }

/* ============ Header navigation ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}
.header .container { display: flex; align-items: center; height: auto; flex-wrap: wrap; row-gap: 10px; column-gap: 24px; padding: 12px 20px; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--yellow));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}
.logo-text { font-size: 22px; font-weight: 800; color: var(--dark); letter-spacing: -0.5px; }
.logo-text span { color: var(--primary); }

.nav { display: flex; gap: 4px; flex: 1; min-width: 0; order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; justify-content: center; }
.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav a:hover { color: var(--primary); background: var(--primary-light); }
.nav a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: auto; }

.search-box {
  display: flex; align-items: center;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 0 6px 0 16px;
  border: 2px solid transparent;
  transition: border-color .2s;
  width: 220px;
}
.search-box:focus-within { border-color: var(--primary); background: var(--white); }
.search-box input { border: none; outline: none; background: transparent; width: 100%; padding: 9px 0; font-size: 14px; }
.search-box button {
  background: var(--primary);
  color: white;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.search-box button:hover { background: var(--primary-dark); }

.cart-btn {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  transition: all .2s;
}
.cart-btn:hover { background: var(--primary-light); transform: translateY(-1px); }

/* Language switcher */
.lang-switch {
  display: flex;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}
.lang-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  color: var(--gray-600);
  letter-spacing: 0.5px;
  transition: all .2s;
}
.lang-btn:hover { color: var(--primary); }
.lang-btn.active { background: var(--primary); color: white; box-shadow: 0 3px 10px rgba(255,107,53,0.35); }

.cart-badge {
  position: absolute;
  top: 0; right: 0;
  min-width: 18px; height: 18px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid white;
}

/* ============ Hero banner ============ */
.hero {
  background: linear-gradient(135deg, #FFF4EC 0%, #FFE8D9 45%, #FFD9C2 100%);
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  min-height: 420px;
  gap: 40px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.85);
  color: var(--primary);
  font-size: 13px; font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.hero h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { font-size: 16px; color: var(--gray-600); margin-bottom: 28px; max-width: 460px; }
.hero-cta { display: flex; gap: 12px; }
.hero-art {
  position: relative;
  display: flex; justify-content: center; align-items: center;
}
.hero-art .pet-emoji {
  font-size: 190px;
  filter: drop-shadow(0 20px 40px rgba(255,107,53,0.25));
  animation: float 4s ease-in-out infinite;
  transform: rotate(-6deg);
}
.hero-art .pet-emoji.small {
  position: absolute;
  font-size: 80px;
  bottom: 30px; left: 30px;
  animation-delay: 1.2s;
  transform: rotate(12deg);
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-16px) rotate(-6deg); }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  transition: all .25s;
  border: 2px solid transparent;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 6px 18px rgba(255,107,53,0.35); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-dark { background: var(--dark); color: white; }
.btn-dark:hover { background: #000; transform: translateY(-2px); }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ============ Category navigation ============ */
.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 30px; font-weight: 800; color: var(--dark); letter-spacing: -0.5px; }
.section-title p { color: var(--gray-600); margin-top: 8px; font-size: 15px; }

.cats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px 12px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.cat-card .cat-icon { font-size: 38px; display: block; margin-bottom: 10px; }
.cat-card .cat-name { font-size: 14px; font-weight: 600; color: var(--dark); }
.cat-card .cat-count { font-size: 12px; color: var(--gray-400); margin-top: 3px; }

/* ============ Product card ============ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .3s;
  position: relative;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }

.product-img {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #FFF7F2, #FFEFE6);
  font-size: 84px;
  position: relative;
  transition: transform .4s;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card:hover .product-img { transform: scale(1.04); }

.product-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--primary);
  color: white;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}
.product-tag.hot { background: var(--red); }

.product-info { padding: 16px; }
.product-info .p-cat { font-size: 12px; color: var(--gray-400); }
.product-info h3 {
  font-size: 15px; font-weight: 600;
  margin: 4px 0 8px;
  color: var(--dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-400); margin-bottom: 10px; }
.stars { color: #FFB300; letter-spacing: 1px; }

.product-bottom { display: flex; align-items: center; justify-content: space-between; }
.price-box { display: flex; align-items: baseline; gap: 6px; }
.price { font-size: 20px; font-weight: 800; color: var(--primary); }
.old-price { font-size: 13px; color: var(--gray-400); text-decoration: line-through; }

.add-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s;
  box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}
.add-btn:hover { background: var(--primary-dark); transform: scale(1.1) rotate(90deg); }

/* ============ Promo banner ============ */
.promo {
  background: linear-gradient(120deg, #2EC4B6, #1FB5A7);
  border-radius: 20px;
  padding: 40px;
  display: flex; align-items: center; justify-content: space-between;
  color: white;
  overflow: hidden;
  position: relative;
}
.promo::after {
  content: '🐾';
  position: absolute; right: -20px; bottom: -30px;
  font-size: 160px; opacity: 0.15;
  transform: rotate(-15deg);
}
.promo h3 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.promo p { opacity: 0.92; font-size: 15px; margin-bottom: 18px; }
.promo .btn { background: white; color: var(--teal); }
.promo .btn:hover { background: var(--dark); color: white; }

/* ============ Brand story ============ */
.story {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
  background: linear-gradient(135deg, #FFF4EE, #FFEADD);
  border: 1px solid rgba(255,107,53,0.15);
  border-radius: 24px;
  padding: 52px 56px;
  margin-top: 40px;
}
.story-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: rgba(255,107,53,0.1);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}
.story h2 { font-size: 30px; line-height: 1.35; margin-bottom: 14px; color: var(--dark); }
.story-text p { color: var(--gray-600); font-size: 15px; line-height: 1.9; }
.story-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat-card {
  background: white;
  border-radius: 18px;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(255,107,53,0.08);
}
.stat-num { display: block; font-size: 32px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.stat-label { display: block; margin-top: 6px; font-size: 13px; color: var(--gray-600); }

/* ============ Service perks ============ */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 60px; }
.perk {
  display: flex; align-items: center; gap: 14px;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.perk .perk-icon { font-size: 30px; flex-shrink: 0; }
.perk h4 { font-size: 14px; font-weight: 600; color: var(--dark); }
.perk p { font-size: 12px; color: var(--gray-600); }

/* ============ Footer ============ */
.footer { background: var(--dark); color: rgba(255,255,255,0.75); margin-top: 40px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 50px 0 40px;
}
.footer h4 { color: white; font-size: 15px; margin-bottom: 16px; }
.footer p { font-size: 13px; line-height: 1.9; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { font-size: 13px; transition: color .2s; }
.footer ul a:hover { color: var(--yellow); }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo .logo-icon { width: 34px; height: 34px; font-size: 18px; }
.footer-logo .logo-text { color: white; font-size: 19px; }
.footer-logo .logo-text span { color: var(--yellow); }
.footer-social { display: flex; gap: 10px; margin-top: 24px; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: all .2s;
}
.footer-social a:hover { background: var(--primary); transform: translateY(-3px); }
.footer-contact { margin-top: 14px; }
.footer-contact p { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0;
  font-size: 12px;
  text-align: center;
  color: rgba(255,255,255,0.45);
}

/* ============ Section extras ============ */
.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}
.section-alt { background: var(--gray-100); }
.section-cta { text-align: center; margin-top: 36px; }

/* anchor offset so sticky header does not cover targets */
[id] { scroll-margin-top: 90px; }

/* ============ FAQ accordion ============ */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow .25s, border-color .25s;
}
.faq-item[open] { border-color: rgba(255,107,53,0.3); box-shadow: var(--shadow); }
.faq-item summary {
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform .25s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 24px 20px; color: var(--gray-600); font-size: 14px; line-height: 1.8; }

/* ============ Join us ============ */
.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.join-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  transition: all .25s;
}
.join-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.join-icon { font-size: 44px; display: block; margin-bottom: 16px; }
.join-card h3 { font-size: 20px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.join-card p { color: var(--gray-600); font-size: 14px; line-height: 1.8; margin-bottom: 24px; }

/* ============ Rewards & Partnerships (two-column) ============ */
.rewards-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.rewards-left .section-eyebrow { margin-bottom: 14px; }
.rewards-left h2 { font-size: 28px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.rewards-left > p { color: var(--gray-600); font-size: 15px; margin-bottom: 28px; }
.member-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.member-item { display: flex; align-items: flex-start; gap: 14px; }
.member-item .perk-icon { font-size: 28px; flex-shrink: 0; line-height: 1.2; }
.member-item h4 { font-size: 15px; font-weight: 600; color: var(--dark); }
.member-item p { font-size: 13px; color: var(--gray-600); margin-top: 2px; }
.rewards-right .join-card { padding: 40px 32px; }

/* ============ Contact ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 22px; }
.contact-item { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--dark); }
.ci-icon { font-size: 26px; flex-shrink: 0; }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button { align-self: flex-start; }
.contact-note { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ============ Page header (inner pages) ============ */
.page-head {
  background: linear-gradient(135deg, #FFF4EC, #FFE8D9);
  padding: 44px 0;
  text-align: center;
}
.page-head h1 { font-size: 30px; font-weight: 800; color: var(--dark); }
.page-head p { color: var(--gray-600); margin-top: 6px; font-size: 14px; }

/* ============ Product listing page ============ */
.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap; gap: 12px;
}
.shop-toolbar .result { font-size: 14px; color: var(--gray-600); }
.shop-toolbar .result strong { color: var(--primary); }

.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-pill {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--gray-100);
  font-size: 13px; font-weight: 500;
  color: var(--gray-600);
  transition: all .2s;
  cursor: pointer;
}
.filter-pill:hover { color: var(--primary); }
.filter-pill.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(255,107,53,0.3); }

.sort-select {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: white;
  font-size: 13px;
  color: var(--gray-600);
  outline: none;
  cursor: pointer;
}
.sort-select:focus { border-color: var(--primary); }

/* ============ Product detail page ============ */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 48px 0;
}
.detail-img {
  background: linear-gradient(145deg, #FFF7F2, #FFEFE6);
  border-radius: 20px;
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  font-size: 200px;
  position: sticky;
  top: 100px;
  overflow: hidden;
}
.detail-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.detail-cat { font-size: 13px; color: var(--gray-400); font-weight: 500; }
.detail-title { font-size: 28px; font-weight: 800; color: var(--dark); margin: 8px 0 12px; line-height: 1.3; }
.detail-meta { display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--gray-600); margin-bottom: 18px; }
.detail-meta .stars { font-size: 14px; }

.detail-price {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex; align-items: baseline; gap: 12px;
}
.detail-price .price { font-size: 34px; }
.detail-price .old-price { font-size: 16px; }
.detail-price .save { font-size: 12px; background: var(--primary); color: white; padding: 3px 10px; border-radius: 999px; }

.detail-desc { color: var(--gray-600); font-size: 14px; line-height: 1.9; margin-bottom: 24px; }

.detail-tags { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.detail-tags span {
  background: var(--gray-100);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--gray-600);
}

/* ---- Specifications table ---- */
.spec-block { margin: 4px 0 24px; }
.spec-title { font-size: 16px; font-weight: 800; color: var(--dark); margin-bottom: 10px; }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #F0E8E2;
  background: #fff;
}
.spec-table td {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  border-bottom: 1px solid #F3EDE8;
  vertical-align: top;
}
.spec-table tr:last-child td { border-bottom: none; }
.spec-table td:first-child {
  width: 38%;
  font-weight: 600;
  color: var(--gray-400);
  background: #FAF6F3;
  white-space: nowrap;
}

.qty-box { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.qty-box .qty-label { font-size: 14px; font-weight: 600; margin-right: 14px; color: var(--dark); }
.qty-btn {
  width: 36px; height: 36px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  font-size: 16px;
  color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.qty-btn:first-of-type { border-radius: 8px 0 0 8px; }
.qty-btn:last-of-type { border-radius: 0 8px 8px 0; }
.qty-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.qty-input {
  width: 56px; height: 36px;
  border: 1px solid var(--gray-200);
  border-left: none; border-right: none;
  text-align: center;
  font-size: 15px; font-weight: 600;
  outline: none;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.detail-actions { display: flex; gap: 12px; }
.detail-actions .btn { flex: 1; }

/* ============ Cart page ============ */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  padding: 40px 0;
  align-items: start;
}
.cart-items { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.cart-item {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--gray-100);
  align-items: center;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 84px; height: 84px;
  border-radius: 12px;
  background: linear-gradient(145deg, #FFF7F2, #FFEFE6);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
}
.cart-item-info h3 { font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.cart-item-info .ci-cat { font-size: 12px; color: var(--gray-400); margin-bottom: 8px; }
.cart-item-info .ci-price { font-size: 16px; font-weight: 800; color: var(--primary); }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-item-actions .qty-box { margin-bottom: 0; }
.cart-item-actions .qty-btn { width: 30px; height: 30px; }
.cart-item-actions .qty-input { width: 44px; height: 30px; font-size: 13px; }
.remove-btn { font-size: 12px; color: var(--gray-400); transition: color .2s; }
.remove-btn:hover { color: var(--red); }

.cart-summary {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 100px;
}
.cart-summary h3 { font-size: 17px; font-weight: 700; color: var(--dark); margin-bottom: 20px; }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--gray-600); margin-bottom: 12px; }
.sum-row.total { border-top: 1px dashed var(--gray-200); padding-top: 14px; margin-top: 6px; font-weight: 700; color: var(--dark); font-size: 15px; }
.sum-row.total .amount { color: var(--primary); font-size: 24px; font-weight: 800; }
.free-ship-note { font-size: 12px; color: var(--teal); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }

.empty-cart { text-align: center; padding: 80px 20px; }
.empty-cart .empty-icon { font-size: 80px; margin-bottom: 16px; }
.empty-cart h3 { font-size: 20px; color: var(--dark); margin-bottom: 8px; }
.empty-cart p { color: var(--gray-600); font-size: 14px; margin-bottom: 24px; }

/* ============ Toast notification ============ */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark);
  color: white;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  opacity: 0;
  transition: all .4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.hidden { display: none !important; }

/* ============ Checkout payment modal ============ */
.pay-mask {
  position: fixed; inset: 0;
  background: rgba(30, 22, 18, 0.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.pay-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 26px 28px;
}
.pay-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pay-modal-head h3 { font-size: 20px; font-weight: 800; color: var(--dark); }
.pay-close {
  width: 32px; height: 32px; border: none;
  background: var(--gray-100); color: var(--gray-600);
  border-radius: 50%; cursor: pointer; font-size: 14px;
}
.pay-close:hover { background: var(--gray-200); }
.pay-modal-sub { color: var(--gray-600); font-size: 13px; margin-bottom: 18px; }
.po-summary {
  background: #FAF6F3;
  border: 1px solid #F0E8E2;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.po-title { font-size: 13px; font-weight: 700; color: var(--gray-400); margin-bottom: 10px; }
.po-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--gray-600); padding: 4px 0; }
.po-row span:first-child { overflow-wrap: anywhere; }
.po-total { border-top: 1px dashed #E4D9D1; margin-top: 8px; padding-top: 10px; font-weight: 800; color: var(--dark); font-size: 15px; }
.pay-method {
  border: 1.5px solid #EFE7E1;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: #fff;
}
.pay-method.muted { background: #FAFAFA; opacity: 0.75; }
.pm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pm-head strong { font-size: 16px; color: var(--dark); }
.pm-badge {
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.stripe-badge { background: #635BFF; }
.alipay-badge { background: #1677FF; }
.email-badge { background: var(--primary); }
.pay-method p { font-size: 13px; color: var(--gray-600); line-height: 1.6; margin: 0 0 4px; }
.pm-note { font-size: 12px; color: var(--gray-400); }
.pm-warn {
  font-size: 12px; color: #B45309;
  background: #FEF3C7; border-radius: 8px;
  padding: 8px 10px; margin-top: 10px !important;
}
.pay-link-btn { text-align: left; justify-content: flex-start; margin-top: 8px; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .cats-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 36px; }
  .search-box { width: 160px; }
  .detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .detail-img { position: static; font-size: 140px; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .join-grid { grid-template-columns: 1fr; }
  .rewards-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header .container { height: auto; flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
  .nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .nav a { padding: 6px 12px; font-size: 14px; flex-shrink: 0; }
  .search-box { order: 2; flex: 1; width: auto; }
  .header-actions { margin-left: auto; }
  .hero .container { grid-template-columns: 1fr; text-align: center; min-height: auto; padding: 40px 20px; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { display: none; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-img { font-size: 60px; }
  .cats-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .perks { grid-template-columns: 1fr 1fr; }
  .story { grid-template-columns: 1fr; padding: 32px 24px; gap: 28px; }
  .story h2 { font-size: 24px; }
  .section { padding: 40px 0; }
  .section-title h2 { font-size: 24px; }
  .promo { padding: 28px; flex-direction: column; text-align: center; gap: 16px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .faq-item summary { padding: 14px 16px; font-size: 14px; }
  .faq-answer { padding: 0 16px 16px; }
  .join-card { padding: 28px 20px; }
  .cart-item { grid-template-columns: 64px 1fr; }
  .cart-item-img { width: 64px; height: 64px; font-size: 32px; }
  .cart-item-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .detail-title { font-size: 22px; }
}
