/* Velocity Weave — core theme styles (ported from OpenCart tema_velocityweave_single) */

:root {
  --brand-primary: #1d1f21;
  --brand-primary-rgb: 29, 31, 33;
  --brand-primary-hover: #000000;
  --brand-accent: #29bb9d;
  --brand-accent-rgb: 41, 187, 157;
  --brand-secondary: #29bb9d;
  --brand-dark: #1d1f21;
  --brand-light: #f8f8f8;
  --brand-body-bg: #ffffff;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --border-radius-lg: 8px;
  --border-radius-md: 6px;
  --border-radius-sm: 4px;
  --box-shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --box-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --box-shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.1);
  --transition-smooth: all 0.2s ease;
  --container-max: 1320px;
  --header-tap: 44px;
  --page-pad-x: 1.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  font-family: var(--font-family);
  background-color: var(--brand-body-bg);
  color: #1d1f21;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
}

img {
  vertical-align: middle;
}

table {
  max-width: 100%;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--brand-accent);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  color: #222222;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-pad-x);
  padding-right: var(--page-pad-x);
}

.text-center { text-align: center; }
.text-muted { color: #666666; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.list-unstyled {
  list-style: none;
  margin: 0;
  padding: 0;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.vw-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.vw-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===== Header (desktop-first base, mobile/tablet overrides below) ===== */
.vw-header {
  background: #ffffff;
  border-bottom: 1px solid #ebebeb;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.vw-header-top {
  padding: 0.5rem 0 0;
}

.vw-header-inner {
  display: grid;
  grid-template-columns: var(--header-tap) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-tap);
}

.vw-header-logo {
  justify-self: center;
  min-width: 0;
}

.vw-header-logo img,
.vw-header-logo .custom-logo {
  max-height: 36px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.vw-header-logo .custom-logo-link {
  display: inline-block;
  line-height: 0;
}

.vw-logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1d1f21;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
  display: inline-block;
}

.vw-header-search {
  display: none;
  width: min(400px, 34vw);
  min-width: 200px;
  max-width: 400px;
}

.vw-account-link {
  display: none;
}

.vw-header-utilities {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-self: end;
}

.vw-header-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1d1f21;
  white-space: nowrap;
}

.vw-header-link:hover {
  color: var(--brand-accent);
}

.vw-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--header-tap);
  height: var(--header-tap);
  color: #1d1f21;
  font-size: 1.15rem;
}

.vw-cart-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.vw-search-form {
  position: relative;
  width: 100%;
}

.vw-search-form .form-control {
  width: 100%;
  font-size: 16px; /* avoid iOS zoom */
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 0.4rem 2.5rem 0.4rem 1rem;
  background: #f8f8f8;
  height: 42px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.vw-search-form .form-control:focus {
  outline: none;
  border-color: rgba(var(--brand-primary-rgb), 0.5);
  box-shadow: 0 0 0 0.2rem rgba(var(--brand-primary-rgb), 0.12);
}

.vw-search-btn {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #666;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.vw-header-search-mobile {
  display: none;
  padding: 0.5rem 0 0.65rem;
}

.header-mobile-menu-btn {
  border: none;
  background: none;
  color: #1d1f21;
  width: var(--header-tap);
  height: var(--header-tap);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

/* —— Phone + tablet (match OpenCart ≤991.98px) —— */
@media (max-width: 991.98px) {
  :root {
    --page-pad-x: 1rem;
  }

  .vw-header-top {
    padding: 0.35rem 0 0;
  }

  .vw-header-inner {
    grid-template-columns: var(--header-tap) minmax(0, 1fr) auto;
    column-gap: 0.5rem;
    min-height: var(--header-tap);
  }

  .vw-header-logo {
    justify-self: center;
    text-align: center;
  }

  .vw-header-logo img,
  .vw-header-logo .custom-logo {
    max-height: 42px;
    max-width: min(160px, 42vw);
  }

  .vw-header-search {
    display: none !important;
  }

  .vw-account-link {
    display: none !important;
  }

  .vw-header-utilities {
    justify-self: end;
  }

  .vw-header-search-mobile {
    display: block;
  }

  .vw-header-search-mobile .vw-search-form {
    max-width: none;
  }
}

/* —— Desktop ≥992 —— */
@media (min-width: 992px) {
  .header-mobile-menu-btn {
    display: none !important;
  }

  .vw-header-top {
    padding: 0.5rem 0;
  }

  /* Logo 左 | 搜索居中 | Account/购物车右 — 左右对称 */
  .vw-header-inner {
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem 1.5rem;
  }

  .vw-header-logo {
    justify-self: start;
  }

  .vw-header-logo img,
  .vw-header-logo .custom-logo {
    max-height: 40px;
    max-width: 220px;
  }

  .vw-logo-text {
    font-size: 1.25rem;
    max-width: none;
  }

  .vw-header-search {
    display: block;
    justify-self: center;
    width: min(420px, 36vw);
    min-width: 240px;
    max-width: 420px;
  }

  .vw-account-link {
    display: block;
  }

  .vw-header-utilities {
    justify-self: end;
    gap: 0.85rem;
  }

  .vw-header-search-mobile {
    display: none !important;
  }

  .vw-search-form .form-control {
    font-size: 0.875rem;
    height: 40px;
  }
}

/* —— Small phones —— */
@media (max-width: 379.98px) {
  .vw-logo-text {
    font-size: 1rem;
    max-width: 44vw;
  }

  .vw-header-logo img,
  .vw-header-logo .custom-logo {
    max-width: min(120px, 38vw);
  }
}

/* ===== Footer ===== */
.vw-footer {
  background: #1d1f21;
  color: #cccccc;
  margin-top: 2rem;
}

.vw-footer-help {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vw-footer-help p,
.vw-footer-help a {
  color: #cccccc;
  font-size: 0.9rem;
}

.vw-footer-help a:hover {
  color: #ffffff;
}

.vw-footer-brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin: 0 0 0.5rem;
}

.vw-footer-main {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

.vw-footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.vw-footer h5 {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 1rem;
}

.vw-footer ul li {
  margin-bottom: 0.5rem;
}

.vw-footer ul li a {
  color: #aaaaaa;
  font-size: 0.875rem;
  display: inline-block;
  padding: 0.15rem 0;
}

.vw-footer ul li a:hover {
  color: #ffffff;
}

.vw-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  margin: 0 0.5rem 0.5rem 0;
  font-size: 0.9rem;
}

.vw-footer-social a:hover {
  background: var(--brand-accent);
  color: #ffffff;
}

.vw-footer-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 2rem 0 1.5rem;
}

.vw-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.vw-footer-bottom p {
  font-size: 0.8rem;
  color: #888888;
  margin: 0;
}

.vw-footer-bottom a {
  color: #aaaaaa;
}

.vw-footer .payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.vw-footer .payment-methods i {
  font-size: 1.5rem;
  color: #666666;
}

@media (max-width: 575.98px) {
  .vw-footer-help {
    padding: 1.5rem 0;
  }

  .vw-footer-brand {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
  }

  .vw-footer-main {
    padding-top: 1.75rem;
    padding-bottom: 1.25rem;
  }

  .vw-footer-grid {
    gap: 1.25rem 1rem;
  }

  .vw-footer-bottom {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .vw-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }
}

@media (min-width: 992px) {
  .vw-footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ===== Content layout ===== */
.vw-content-wrap {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.vw-layout.has-sidebar {
  display: grid;
  gap: 1.5rem;
}

.vw-page-title {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.vw-page-header {
  margin-bottom: 1.25rem;
}

.vw-meta {
  font-size: 0.875rem;
  color: #888;
}

.vw-meta-sep {
  margin: 0 0.35rem;
}

.vw-entry-content {
  font-size: 1rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.vw-entry-content p {
  margin: 0 0 1.25rem;
}

.vw-entry-content .alignwide,
.vw-entry-content .alignfull {
  max-width: 100%;
}

.vw-featured-image {
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.vw-post-card {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #ebebeb;
}

.vw-post-thumb {
  display: block;
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

.vw-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.vw-post-title {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.vw-read-more {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}

.vw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--brand-primary);
  color: #fff !important;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  padding: 0.55rem 1.5rem;
  transition: var(--transition-smooth);
}

.vw-btn:hover {
  background: var(--brand-primary-hover);
}

.vw-widget {
  margin-bottom: 1.75rem;
}

.vw-widget .widget-title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #ebebeb;
}

.navigation.pagination,
.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  justify-content: center;
}

.navigation.pagination a,
.navigation.pagination span,
.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.6rem;
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  color: var(--brand-primary);
}

.navigation.pagination .current {
  background: var(--brand-accent);
  border-color: var(--brand-primary);
  color: #fff;
}

.vw-404 {
  padding: 3rem 1rem;
}

.vw-comments {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ebebeb;
}

.vw-comments input[type="text"],
.vw-comments input[type="email"],
.vw-comments input[type="url"],
.vw-comments textarea {
  width: 100%;
  max-width: 100%;
  font-size: 16px;
}

body.vw-nav-open {
  overflow: hidden;
  touch-action: none;
}

@media (min-width: 640px) {
  .vw-post-card {
    grid-template-columns: 200px 1fr;
    align-items: start;
  }

  .vw-post-thumb img {
    aspect-ratio: 1 / 1;
  }
}

@media (min-width: 768px) {
  .vw-content-wrap {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .vw-post-title {
    font-size: 1.25rem;
  }
}

@media (min-width: 992px) {
  .vw-layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2rem;
  }
}

/* Tablet: sidebar below content */
@media (max-width: 991.98px) {
  .vw-layout.has-sidebar {
    grid-template-columns: 1fr;
  }

  .vw-sidebar {
    order: 2;
    border-top: 1px solid #ebebeb;
    padding-top: 1.5rem;
  }
}
