/*
Theme Name: SALUSIA
Theme URI: https://salusiaworking.com
Author: SALUSIA
Author URI: https://salusiaworking.com
Description: Premium home fitness equipment brand theme
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: salusia
*/

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

:root {
  --bg: #F5F0E8;
  --card: #FFFBF5;
  --text: #2A221A;
  --text-secondary: #6B5D4F;
  --text-light: #9A8B7B;
  --border: #E8E0D5;
  --accent: #2A221A;
  --radius: 24px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ===== Top Navigation ===== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 36px;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-menu a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: 20px;
  padding: 8px 14px;
  width: 180px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  color: var(--text);
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-light);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: var(--border);
}

.icon-btn svg {
  width: 14px;
  height: 14px;
  stroke: var(--text);
}

/* ===== Container ===== */
.container {
  width: 100%;
  padding: 20px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: calc(100vh - 70px);
}

/* ===== Home Layout ===== */
.layout {
  display: flex;
  width: 100%;
  max-width: 1400px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.layout::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 30px;
  bottom: 30px;
  width: 1px;
  background: var(--border);
  z-index: 10;
}

.left-panel {
  flex: 1;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
}

.right-panel {
  flex: 1;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 0;
  justify-content: center;
}

.main-image {
  width: 100%;
  flex: 1;
  min-height: 500px;
  border-radius: 16px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 12px;
  position: relative;
}

.img-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(0,0,0,0.02) 10px,
    rgba(0,0,0,0.02) 20px
  );
}

.img-placeholder svg {
  width: 40px;
  height: 40px;
  stroke: var(--text-light);
  position: relative;
  z-index: 1;
}

.img-placeholder span {
  position: relative;
  z-index: 1;
}

.thumbs-row {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  z-index: 5;
}

.thumb {
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(255,251,245,0.92);
  border: 2px solid rgba(255,251,245,0.8);
  cursor: pointer;
  transition: all 0.3s;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 12px rgba(42,34,26,0.12);
  backdrop-filter: blur(10px);
}

.thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.thumb.active {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transform: scale(1.05);
}

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

.side-image {
  width: 70%;
  max-width: 320px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.side-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.right-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 280px;
  flex-shrink: 0;
}

.right-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.3px;
  max-width: 360px;
  white-space: pre-line;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.right-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 340px;
  white-space: pre-line;
  min-height: 66px;
}

.right-sub {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.6;
  max-width: 300px;
  white-space: pre-line;
  min-height: 35px;
}

.btn-explore {
  background: transparent;
  color: var(--text);
  border: none;
  padding: 10px 24px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.2s;
  margin-top: 8px;
}

.btn-explore:hover {
  opacity: 0.6;
}

/* ===== Page Content (通用页面) ===== */
.page-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.page-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.page-content p {
  margin-bottom: 16px;
}

/* ===== Product Grid (产品分类页) ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.product-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(42,34,26,0.12);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg);
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-info {
  padding: 20px;
}

.product-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-card-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.product-card-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Filter Tags ===== */
.filter-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-tag {
  padding: 8px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 40px 32px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer-column h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 8px;
}

.footer-column a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-column a:hover {
  color: var(--text);
}

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-light);
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .top-nav {
    padding: 12px 16px;
  }
  .top-nav-left {
    gap: 16px;
  }
  .top-nav .nav-menu {
    display: none;
  }
  .top-nav .search-box {
    width: 140px;
  }
  .container {
    padding: 12px;
  }
  .layout {
    flex-direction: column;
  }
  .layout::before {
    display: none;
  }
  .left-panel {
    padding: 20px;
    gap: 16px;
  }
  .right-panel {
    padding: 20px;
    gap: 20px;
    border-top: 1px solid var(--border);
  }
  .main-image {
    min-height: 400px;
  }
  .thumbs-row {
    bottom: 12px;
    width: 75%;
    gap: 6px;
  }
  .side-image {
    width: 60%;
    max-width: 240px;
  }
  .right-title {
    font-size: 18px;
  }
  .right-desc {
    font-size: 12px;
  }
  .page-title {
    font-size: 28px;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}

/* ===== iPad ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  .top-nav {
    padding: 14px 24px;
  }
  .top-nav-left {
    gap: 24px;
  }
  .top-nav .nav-menu {
    gap: 18px;
  }
  .top-nav .nav-menu a {
    font-size: 12px;
  }
  .top-nav .search-box {
    width: 150px;
  }
  .container {
    padding: 16px;
  }
  .left-panel, .right-panel {
    padding: 24px;
  }
  .main-image {
    min-height: 420px;
  }
  .thumbs-row {
    gap: 10px;
  }
  .side-image {
    width: 65%;
    max-width: 280px;
  }
  .right-title {
    font-size: 19px;
  }
  .right-desc {
    font-size: 12px;
  }
}
