/* ================================================================
   shopifyrate.com — main.css
   Custom component styles layered on top of Tailwind (Play CDN).
   Keeps shared/injected UI independent of utility classes so the
   site stays readable even if the CDN is temporarily unavailable.
   Theme: deep gray + blue, minimalist overseas review blog style.
   ================================================================ */

:root {
  --c-blue: #2563eb;
  --c-blue-dark: #1d4ed8;
  --c-blue-50: #eff6ff;
  --c-blue-100: #dbeafe;
  --c-ink: #111827;        /* deep gray */
  --c-ink-2: #1f2937;
  --c-ink-soft: #374151;
  --c-muted: #6b7280;
  --c-line: #e5e7eb;
  --c-bg: #f3f4f6;
  --c-card: #ffffff;
  --c-green: #059669;
  --c-red: #dc2626;
  --c-amber: #f59e0b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--c-bg);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
.hidden { display: none !important; }

.container-site { max-width: 1200px; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 640px) { .container-site { padding-left: 1.5rem; padding-right: 1.5rem; } }

/* ================= Header / navigation ================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-ink);
  border-bottom: 2px solid var(--c-blue);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; color: #fff; letter-spacing: -.01em; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: var(--c-blue); color: #fff; border-radius: 2px; }
.logo-dot { color: #60a5fa; }

.nav-desktop { display: none; align-items: center; gap: .25rem; }
@media (min-width: 768px) { .nav-desktop { display: flex; } }
.nav-link {
  position: relative; display: inline-flex; align-items: center;
  padding: .5rem .9rem; font-size: .9rem; font-weight: 600; color: #d1d5db;
  border: 1px solid transparent; border-radius: 2px; transition: color .15s, background .15s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active { color: #fff; background: var(--c-blue); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; color: #fff; background: transparent;
  border: 1px solid rgba(255,255,255,.2); border-radius: 2px; cursor: pointer;
}
.nav-toggle:hover { border-color: var(--c-blue); color: #60a5fa; }
@media (min-width: 768px) { .nav-toggle { display: none; } }

.nav-mobile { display: none; flex-direction: column; border-top: 1px solid rgba(255,255,255,.1); padding: .5rem 1rem 1rem; gap: .25rem; }
.nav-mobile.open { display: flex; }
.nav-mobile-link { padding: .625rem .75rem; font-size: .95rem; font-weight: 600; color: #d1d5db; border-radius: 2px; }
.nav-mobile-link:hover { color: #fff; }
.nav-mobile-link.active { color: #fff; background: var(--c-blue); }

/* ================= Buttons (square corners) ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.4rem; font-size: .9rem; font-weight: 700; line-height: 1;
  color: #fff; background: var(--c-blue); border: 1px solid var(--c-blue); border-radius: 0;
  cursor: pointer; transition: background .15s, border-color .15s, transform .1s, opacity .15s;
  user-select: none;
}
.btn:hover { background: var(--c-blue-dark); border-color: var(--c-blue-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: .5rem 1rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn-outline { background: #fff; color: var(--c-ink-soft); border-color: #d1d5db; }
.btn-outline:hover { background: #fff; color: var(--c-blue); border-color: var(--c-blue); }
.btn-dark { background: var(--c-ink); border-color: var(--c-ink); }
.btn-dark:hover { background: #000; border-color: #000; }
.btn svg { flex-shrink: 0; }

/* ================= Forms ================= */
.label { display: block; font-size: .8125rem; font-weight: 700; color: var(--c-ink-soft); margin-bottom: .375rem; }
.input {
  display: block; width: 100%; padding: .65rem .8rem; font-size: .9rem; color: var(--c-ink);
  background: #fff; border: 1px solid #d1d5db; border-radius: 0; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #9ca3af; }
.input:focus { border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.input.invalid { border-color: var(--c-red); }
.input.invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.15); }
textarea.input { resize: vertical; min-height: 150px; }
.field-error { display: none; margin-top: .375rem; font-size: .75rem; font-weight: 600; color: var(--c-red); }
.field-error.show { display: block; }
.sm-grid2 { display: grid; gap: 1rem; }
@media (min-width: 640px) { .sm-grid2 { grid-template-columns: 1fr 1fr; } }

/* ================= Cards ================= */
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--c-card); border: 1px solid var(--c-line); border-radius: 4px;
  box-shadow: 0 1px 2px rgba(17,24,39,.05);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(17,24,39,.12); border-color: #bfdbfe; }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #e5e7eb; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.1rem 1.2rem; }
.card-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: .28rem .55rem; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: capitalize;
  color: #fff; background: rgba(37,99,235,.92); border-radius: 2px;
}
.card-meta { font-size: .75rem; font-weight: 600; color: var(--c-muted); }
.card-title { margin: .4rem 0 0; font-size: 1.05rem; font-weight: 700; line-height: 1.35; color: var(--c-ink); transition: color .15s; }
.card:hover .card-title { color: var(--c-blue); }
.card-rating { display: flex; align-items: center; gap: .4rem; margin-top: .45rem; }
.card-summary { margin-top: .55rem; font-size: .875rem; color: var(--c-muted); }
.card-link { display: inline-flex; align-items: center; gap: .3rem; margin-top: auto; padding-top: .9rem; font-size: .8125rem; font-weight: 700; color: var(--c-blue); }
.card-link svg { transition: transform .15s; }
.card:hover .card-link svg { transform: translateX(3px); }

/* ================= Section headers ================= */
.section { padding-top: 3rem; }
.section-kicker { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: capitalize; color: var(--c-blue); }
.section-title { margin: .25rem 0 0; font-size: 1.55rem; font-weight: 800; line-height: 1.25; color: var(--c-ink); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-more { display: inline-flex; align-items: center; gap: .35rem; font-size: .875rem; font-weight: 700; color: var(--c-blue); white-space: nowrap; }
.section-more:hover { color: var(--c-blue-dark); }

/* ================= Stars ================= */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars .star { width: 1em; height: 1em; color: #d1d5db; }
.stars .star.filled { color: var(--c-amber); }
.rating-value { font-size: .78rem; font-weight: 800; color: var(--c-muted); }

/* ================= Skeleton ================= */
.skeleton { position: relative; overflow: hidden; background: #e5e7eb; border-radius: 2px; }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ================= Empty / error states ================= */
.state-box { padding: 3.5rem 1rem; text-align: center; background: #fff; border: 1px dashed #d1d5db; border-radius: 4px; }
.state-icon { display: inline-flex; color: #9ca3af; margin-bottom: .75rem; }
.state-title { margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--c-ink); }
.state-msg { margin: .4rem auto 0; max-width: 30rem; font-size: .875rem; color: var(--c-muted); }
.btn-state svg { transition: transform .15s; }
.btn-state:hover svg { transform: translateX(3px); }

/* ================= Toast ================= */
#toast-box { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; max-width: min(92vw, 360px); }
.toast {
  display: flex; align-items: flex-start; gap: .55rem;
  padding: .8rem 1rem; font-size: .875rem; font-weight: 600; color: #fff;
  border-radius: 2px; box-shadow: 0 10px 24px rgba(0,0,0,.2);
  border-left: 3px solid rgba(255,255,255,.35);
  animation: toast-in .25s ease;
}
.toast-success { background: var(--c-green); }
.toast-error { background: var(--c-red); }
.toast-info { background: var(--c-ink); }
.toast-icon { display: inline-flex; margin-top: 2px; }
.toast-msg { line-height: 1.35; }
.toast.leaving { opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ================= Hero carousel ================= */
.hero-wrap { position: relative; }
.hero-skeleton { position: absolute; inset: 0; z-index: 3; }
.hero-skeleton-block { width: 100%; height: 100%; border-radius: 4px; }
.carousel { position: relative; overflow: hidden; height: 400px; border-radius: 4px; background: var(--c-ink-2); }
@media (min-width: 768px) { .carousel { height: 470px; } }
@media (min-width: 1024px) { .carousel { height: 520px; } }
.carousel-track { display: flex; height: 100%; transition: transform .55s cubic-bezier(.4,0,.2,1); }
.carousel-slide { position: relative; min-width: 100%; height: 100%; }
.carousel-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carousel-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(17,24,39,.9) 0%, rgba(17,24,39,.35) 55%, rgba(17,24,39,.05) 100%);
}
.carousel-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 2.25rem 1.25rem 3.25rem; color: #fff; }
@media (min-width: 768px) { .carousel-caption { padding: 3rem 2.75rem 3.5rem; } }
.carousel-chip { display: inline-block; padding: .3rem .6rem; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: capitalize; background: var(--c-blue); border-radius: 2px; margin-bottom: .7rem; }
.carousel-title { margin: 0; max-width: 46rem; font-size: 1.45rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
@media (min-width: 768px) { .carousel-title { font-size: 2.1rem; } }
@media (min-width: 1024px) { .carousel-title { font-size: 2.5rem; } }
.carousel-summary { margin: .6rem 0 0; max-width: 40rem; font-size: .9rem; color: rgba(255,255,255,.82); }
@media (min-width: 768px) { .carousel-summary { font-size: 1rem; } }
.carousel-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.1rem; }
.carousel-stars { display: inline-flex; align-items: center; gap: .4rem; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; color: #fff; cursor: pointer;
  background: rgba(17,24,39,.55); border: 1px solid rgba(255,255,255,.2); border-radius: 2px;
  transition: background .15s;
}
.carousel-btn:hover { background: var(--c-blue); border-color: var(--c-blue); }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
.carousel-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 6px; }
.carousel-dots button { width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; transition: all .2s; }
.carousel-dots button.active { width: 26px; border-radius: 999px; background: #fff; }

/* ================= About section ================= */
.about-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1.1fr 1fr; } }
.about-img { border-radius: 4px; overflow: hidden; border: 1px solid var(--c-line); }
.about-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.about-points { margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.about-points li { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--c-ink-soft); }
.about-points li svg { flex-shrink: 0; margin-top: 2px; color: var(--c-green); }

/* ================= Category page ================= */
.cat-layout { display: grid; gap: 1.75rem; align-items: start; }
@media (min-width: 1024px) { .cat-layout { grid-template-columns: 270px 1fr; } }
.cat-sidebar { background: #fff; border: 1px solid var(--c-line); border-radius: 4px; padding: 1.1rem; }
@media (min-width: 1024px) { .cat-sidebar { position: sticky; top: 88px; } }
.cat-sidebar-title { margin: 0 0 .75rem; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: capitalize; color: var(--c-muted); }
.cat-list { display: flex; flex-direction: column; gap: .25rem; }
.cat-item { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; font-size: .875rem; font-weight: 600; color: var(--c-ink-soft); border: 1px solid transparent; border-radius: 2px; cursor: pointer; transition: all .15s; }
.cat-item:hover { color: var(--c-blue); background: var(--c-blue-50); border-color: var(--c-blue-100); }
.cat-item.active { color: #fff; background: var(--c-blue); border-color: var(--c-blue); }
.cat-count { font-size: .7rem; font-weight: 700; color: var(--c-muted); background: var(--c-bg); padding: .15rem .45rem; border-radius: 999px; }
.cat-item.active .cat-count { color: #fff; background: rgba(255,255,255,.22); }

.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.list-toolbar h1 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.list-count { font-size: .8125rem; font-weight: 600; color: var(--c-muted); }

/* ================= Pagination ================= */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .375rem; margin-top: 2.25rem; }
.pagination button {
  min-width: 2.35rem; height: 2.35rem; padding: 0 .55rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  font-size: .875rem; font-weight: 700; color: var(--c-ink-soft);
  background: #fff; border: 1px solid #d1d5db; border-radius: 2px; cursor: pointer;
  transition: all .15s;
}
.pagination button:hover:not(:disabled):not(.active) { border-color: var(--c-blue); color: var(--c-blue); }
.pagination button.active { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
.pagination button:disabled { opacity: .5; cursor: not-allowed; }
.pagination .pg-ellipsis { display: inline-flex; align-items: flex-end; padding: 0 .2rem; color: var(--c-muted); user-select: none; }

/* ================= Detail page ================= */
.breadcrumb { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .8rem; font-weight: 600; color: var(--c-muted); margin-bottom: 1.25rem; }
.breadcrumb a:hover { color: var(--c-blue); }
.breadcrumb .sep { color: #9ca3af; }
.detail-head { margin-bottom: 1.5rem; }
.detail-title { margin: .6rem 0 .75rem; font-size: 1.7rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
@media (min-width: 768px) { .detail-title { font-size: 2.2rem; } }
.detail-meta { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; font-size: .8125rem; font-weight: 600; color: var(--c-muted); }
.detail-meta .sep-dot { color: #d1d5db; }
.detail-grid { display: grid; gap: 1.75rem; align-items: start; }
@media (min-width: 1024px) { .detail-grid { grid-template-columns: minmax(0,1fr) 330px; } }
.detail-main { min-width: 0; }
.detail-image { margin-bottom: 1.75rem; border-radius: 4px; overflow: hidden; border: 1px solid var(--c-line); background: #e5e7eb; }
.detail-image img { width: 100%; height: auto; max-height: 560px; object-fit: cover; }

.review-content { font-size: .95rem; color: var(--c-ink-soft); }
.review-content p { margin: 0 0 1.1rem; }
.review-content h2, .review-content h3 { color: var(--c-ink); margin: 1.75rem 0 .6rem; font-weight: 800; }
.review-content h2 { font-size: 1.3rem; }
.review-content h3 { font-size: 1.1rem; }
.review-content ul, .review-content ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.review-content li { margin-bottom: .35rem; }
.review-content a { color: var(--c-blue); font-weight: 600; }
.review-content img { border-radius: 4px; margin: 1rem 0; }

.detail-side { display: flex; flex-direction: column; gap: 1rem; }
.pc-box { background: #fff; border: 1px solid var(--c-line); border-radius: 4px; padding: 1.15rem 1.25rem; }
.pc-box.pros { border-top: 3px solid var(--c-green); }
.pc-box.cons { border-top: 3px solid var(--c-red); }
.pc-title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; font-size: .9rem; font-weight: 800; color: var(--c-ink); }
.pc-list { list-style: none; margin: 0; padding: 0; }
.pc-list li { display: flex; gap: .55rem; align-items: flex-start; padding: .32rem 0; font-size: .85rem; color: var(--c-ink-soft); }
.pc-list li svg { flex-shrink: 0; margin-top: 2px; }
.pc-box.pros li svg { color: var(--c-green); }
.pc-box.cons li svg { color: var(--c-red); }

.summary-card { background: var(--c-ink); color: #fff; border-radius: 4px; padding: 1.25rem; }
.summary-card .sc-label { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: capitalize; color: #9ca3af; }
.summary-card .sc-rating { display: flex; align-items: baseline; gap: .6rem; margin: .3rem 0 .15rem; }
.summary-card .sc-score { font-size: 2.1rem; font-weight: 800; line-height: 1; }
.summary-card .sc-outof { font-size: .85rem; color: #9ca3af; }
.summary-card .sc-stars { margin: .5rem 0 1rem; }
.summary-card .sc-verdict { font-size: .875rem; color: rgba(255,255,255,.85); margin: 0 0 1rem; }
.summary-card .btn { width: 100%; }

/* ================= Contact page ================= */
.contact-layout { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 1024px) { .contact-layout { grid-template-columns: minmax(0,1fr) 360px; } }
.contact-card { background: #fff; border: 1px solid var(--c-line); border-radius: 4px; padding: 1.75rem; }
.contact-card h2 { margin: 0 0 .35rem; font-size: 1.35rem; font-weight: 800; }
.contact-card .lead { margin: 0 0 1.5rem; font-size: .9rem; color: var(--c-muted); }
.info-list { display: grid; gap: 1rem; }
.info-item { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem; background: var(--c-bg); border: 1px solid var(--c-line); border-radius: 4px; }
.info-item .info-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; color: #fff; background: var(--c-blue); border-radius: 2px; }
.info-item h3 { margin: 0 0 .2rem; font-size: .85rem; font-weight: 800; color: var(--c-ink); }
.info-item p { margin: 0; font-size: .85rem; color: var(--c-muted); }
.info-item a { color: var(--c-blue); font-weight: 600; }
.info-item a:hover { text-decoration: underline; }
.required-note { font-size: .75rem; color: var(--c-muted); margin-top: .9rem; }
.success-panel { text-align: center; padding: 3rem 1.5rem; }
.success-panel .sp-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; color: #fff; background: var(--c-green); border-radius: 50%; margin-bottom: 1rem; }
.success-panel h2 { margin: 0 0 .4rem; font-size: 1.35rem; font-weight: 800; }
.success-panel p { margin: 0 0 1.5rem; font-size: .9rem; color: var(--c-muted); }

/* ================= Footer ================= */
.site-footer { margin-top: 4rem; background: var(--c-ink); color: #d1d5db; }
.footer-grid { display: grid; gap: 2rem; padding-top: 3rem; padding-bottom: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1.2fr; } }
.footer-brand p { margin: .75rem 0 0; font-size: .85rem; color: #9ca3af; max-width: 24rem; }
.footer-col h4 { margin: 0 0 .85rem; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: capitalize; color: #fff; }
.footer-col a, .footer-col span { display: block; margin-bottom: .55rem; font-size: .875rem; color: #9ca3af; }
.footer-col a:hover { color: #60a5fa; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.25rem 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; font-size: .78rem; color: #9ca3af; }

/* ================= Utilities ================= */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.grid-cards { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ================= Sentence case ================= */
/* 菜单/标题仅第一个单词首字母大写（文本源已转换），禁用 capitalize */
.card-badge, .section-kicker, .carousel-chip, .cat-sidebar-title,
.summary-card .sc-label, .footer-col h4 { text-transform: none; }
