/* Sheettally - components */

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.06s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--section-bg);
  border-color: #c3d2c9;
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--green-dark);
  padding-left: 6px;
  padding-right: 6px;
}

.btn-ghost:hover {
  color: var(--green);
  text-decoration: underline;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 1.03rem;
}

.btn-block {
  width: 100%;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ---------- hero ---------- */

.hero {
  padding: 64px 0 72px;
  background:
    radial-gradient(1100px 420px at 12% -12%, #eef8f1 0%, rgba(255, 255, 255, 0) 62%),
    var(--white);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.02fr;
  gap: 56px;
  align-items: center;
}

.hero-copy .eyebrow {
  margin-bottom: 16px;
}

.hero-copy h1 {
  margin-bottom: 18px;
}

.hero-copy .lead {
  font-size: 1.14rem;
  max-width: 46ch;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.hero-meta {
  font-size: 0.86rem;
  color: var(--secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-media {
  position: relative;
}

.hero-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(23, 35, 29, 0.13);
  background: var(--white);
}

/* ---------- trust strip ---------- */

.trust-strip {
  border-bottom: 1px solid var(--border);
  background: var(--section-bg);
  padding: 20px 0;
}

.trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.trust-list li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text);
}

.trust-list svg {
  width: 20px;
  height: 20px;
  color: var(--green);
  flex: 0 0 auto;
}

/* ---------- product cards ---------- */

.grid-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.16s ease, border-color 0.16s ease,
    transform 0.16s ease;
}

.card:hover {
  border-color: #c9d8ce;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-media {
  display: block;
  background: var(--section-bg);
  border-bottom: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--section-bg);
  transition: transform 0.25s ease;
}

.card:hover .card-media img {
  transform: scale(1.02);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  flex: 1;
}

.card-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
}

.card h3 {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.card h3 a {
  color: var(--text);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-weight: 700;
  font-size: 1.06rem;
  color: var(--text);
  white-space: nowrap;
}

.price small {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--secondary);
}

.card-foot .btn {
  padding: 8px 13px;
  font-size: 0.86rem;
}

/* ---------- category cards ---------- */

.grid-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease,
    transform 0.16s ease;
}

.cat-card:hover {
  border-color: #c9d8ce;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}

.cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--green-light);
  color: var(--green-dark);
  margin-bottom: 4px;
}

.cat-icon svg {
  width: 22px;
  height: 22px;
}

.cat-card h3 {
  margin: 0;
  font-size: 1.06rem;
}

.cat-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--secondary);
}

.cat-count {
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-dark);
}

/* ---------- value cards ---------- */

.grid-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.value-card {
  padding: 26px 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.value-card h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.value-card p {
  font-size: 0.93rem;
  color: var(--secondary);
  margin: 0;
}

.value-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

/* ---------- free band ---------- */

.free-band {
  background: var(--green-light);
  border: 1px solid #cfe6d8;
  border-radius: var(--radius);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 28px;
  align-items: center;
}

.free-band h2 {
  margin-bottom: 8px;
}

.free-band p {
  color: #2c4a3a;
  margin: 0;
  max-width: 62ch;
}

/* ---------- cta band ---------- */

.cta-band {
  background: #10241b;
  color: var(--white);
  padding: 64px 0;
}

.cta-band h2 {
  color: var(--white);
}

.cta-band p {
  color: #b9cdc2;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-inner {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.cta-inner .btn-row {
  justify-content: center;
  margin-top: 24px;
}

.cta-band .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.cta-band .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
}

/* ---------- breadcrumb ---------- */

.breadcrumb {
  padding: 18px 0 0;
  font-size: 0.85rem;
  color: var(--secondary);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb li + li::before {
  content: "/";
  color: #a6b5ac;
}

.breadcrumb a {
  color: var(--secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

/* ---------- product detail ---------- */

.pdp {
  padding: 26px 0 72px;
}

.pdp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 52px;
  align-items: start;
  margin-top: 22px;
}

.pdp-media {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.pdp-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--section-bg);
  box-shadow: var(--shadow-sm);
}

.pdp-media .media-note {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--secondary);
}

.pdp-info h1 {
  font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.35rem);
  margin-bottom: 10px;
}

.pdp-sub {
  color: var(--secondary);
  font-size: 1.02rem;
  margin-bottom: 18px;
}

.pdp-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.pdp-price .amount {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.pdp-price .note {
  font-size: 0.86rem;
  color: var(--secondary);
}

.buy-note {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--secondary);
  line-height: 1.5;
}

.pdp-facts {
  list-style: none;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.pdp-facts li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  color: var(--secondary);
}

.pdp-facts svg {
  width: 17px;
  height: 17px;
  color: var(--green);
  flex: 0 0 auto;
  margin-top: 3px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--muted-bg);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-green {
  background: var(--green-light);
  color: var(--green-dark);
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--secondary);
}

.badge svg {
  width: 14px;
  height: 14px;
}

/* ---------- prose blocks ---------- */

.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 2.1em;
  margin-bottom: 0.6em;
  font-size: 1.45rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
}

.prose ul,
.prose ol {
  color: var(--text);
}

.prose li {
  margin-bottom: 0.5em;
}

.prose > p {
  color: #2b3a32;
}

.panel {
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}

.panel h3 {
  margin-top: 0;
}

.panel p:last-child,
.panel ul:last-child {
  margin-bottom: 0;
}

.notice {
  border: 1px solid #e2d6bf;
  background: #fdf8ee;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.92rem;
  color: #5a4620;
}

.notice strong {
  color: #4a3818;
}

.placeholder-box {
  border: 1px dashed #b9c9bf;
  background: repeating-linear-gradient(
    -45deg,
    #f7faf8,
    #f7faf8 10px,
    #f1f6f3 10px,
    #f1f6f3 20px
  );
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  color: var(--secondary);
}

.placeholder-box p {
  margin: 0;
}

/* ---------- accordion / faq ---------- */

.accordion {
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 44px 18px 0;
  position: relative;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--green-dark);
  border-bottom: 2px solid var(--green-dark);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.16s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq-item summary:hover {
  color: var(--green-dark);
}

.faq-body {
  padding: 0 44px 20px 0;
  color: var(--secondary);
  font-size: 0.96rem;
}

.faq-body p:last-child {
  margin-bottom: 0;
}

/* ---------- shop toolbar ---------- */

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.search-field {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
}

.search-field svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--secondary);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--text);
}

.search-field input:focus {
  border-color: var(--green);
}

.select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--secondary);
}

.select-wrap select {
  padding: 11px 34px 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.92rem;
  background: var(--white);
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2359665F' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.chip:hover {
  border-color: #c3d2c9;
  background: var(--section-bg);
  color: var(--text);
}

.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.chip-count {
  font-size: 0.78rem;
  opacity: 0.75;
}

.results-line {
  font-size: 0.88rem;
  color: var(--secondary);
  margin-bottom: 16px;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--secondary);
}

/* ---------- sticky mobile buy bar ---------- */

.sticky-buy {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  align-items: center;
  gap: 12px;
  box-shadow: 0 -6px 18px rgba(23, 35, 29, 0.08);
}

.sticky-buy.is-visible {
  display: flex;
}

.sticky-buy .sticky-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.sticky-buy .sticky-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-buy .sticky-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green-dark);
}

.sticky-buy .btn {
  flex: 0 0 auto;
  padding: 11px 18px;
}

/* ---------- tables ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  background: var(--white);
}

th,
td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--section-bg);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
}

tr:last-child td {
  border-bottom: 0;
}

/* ---------- misc ---------- */

.article-list {
  display: grid;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-list li {
  margin: 0;
}

.article-list a {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}

.article-list a:hover {
  border-color: #c9d8ce;
  background: var(--section-bg);
}

.article-list h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.article-list p {
  margin: 0;
  color: var(--secondary);
  font-size: 0.92rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 14px;
}

.contact-list li {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-list .label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 4px;
}

.contact-list a {
  font-weight: 600;
  font-size: 1.02rem;
  word-break: break-word;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 32px 0;
}

.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--white);
}

.stat b {
  display: block;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.stat span {
  font-size: 0.85rem;
  color: var(--secondary);
}

.related {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

/* ---------- utilities ---------- */

.pt-0 {
  padding-top: 0;
}

.mt-sm {
  margin-top: 6px;
}

.mt-md {
  margin-top: 18px;
}

.mt-lg {
  margin-top: 32px;
}

.btn-row-center {
  justify-content: center;
}

/* ---------- preview grid ---------- */

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.preview-fig {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.preview-fig img {
  width: 100%;
  height: auto;
}

.preview-fig figcaption {
  padding: 12px 16px;
  font-size: 0.84rem;
  color: var(--secondary);
  border-top: 1px solid var(--border);
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 22px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0;
}

.steps h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.steps p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--secondary);
}

.step-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .preview-grid,
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- inline icon sizing in text contexts ---------- */

.hero-meta svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  flex: 0 0 auto;
}

.hero-meta span {
  align-items: flex-start;
}

.hero-meta svg {
  margin-top: 3px;
}

.card-media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #8ea79a;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: repeating-linear-gradient(-45deg, #f7faf8, #f7faf8 10px, #eef4f0 10px, #eef4f0 20px);
}

/* hidden must win over the component display rules */
[hidden] {
  display: none !important;
}
