/* ==========================================================================
   SAINO HOUSE — COMPONENT STYLES
   Buttons, Product Cards, Maker Features, Purpose Blocks, Spec Tables
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons & CTAs
   Understated luxury: quiet borders, subtle hover transforms, refined text
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.9rem 1.8rem;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-editorial);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-charcoal);
  color: var(--color-ivory);
  border: 1px solid var(--color-charcoal);
}

.btn-primary:hover {
  background-color: var(--color-graphite);
  color: var(--color-ivory);
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-charcoal);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  border-color: var(--color-charcoal);
  background-color: rgba(24, 23, 21, 0.03);
}

.btn-light {
  background-color: transparent;
  color: var(--color-ivory);
  border: 1px solid rgba(250, 247, 242, 0.4);
}

.btn-light:hover {
  border-color: var(--color-ivory);
  background-color: rgba(250, 247, 242, 0.08);
  color: var(--color-ivory);
}

.btn-text {
  padding: 0;
  background: none;
  border: none;
  color: var(--color-charcoal);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  position: relative;
}

.btn-text::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform-origin: left;
  transition: transform var(--duration-fast) var(--ease-editorial);
}

.btn-text:hover::after {
  transform: scaleX(0.7);
}

/* --------------------------------------------------------------------------
   Badges & Tags
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-weight: 500;
}

.badge-outline {
  border: 1px solid var(--border-medium);
  color: var(--color-charcoal-soft);
}

.badge-craft {
  background-color: var(--color-sand);
  color: var(--color-charcoal-muted);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Product Cards
   -------------------------------------------------------------------------- */
.product-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  transition: transform var(--duration-medium) var(--ease-editorial);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card-media {
  position: relative;
  overflow: hidden;
  background-color: var(--color-cream);
  border-radius: var(--radius-xs);
  aspect-ratio: 4 / 3;
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-editorial);
}

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

.product-card-meta {
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.product-card-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--color-charcoal);
}

.product-card-price {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-charcoal-soft);
  font-family: var(--font-sans);
}

.product-card-desc {
  font-size: var(--text-xs);
  color: var(--color-charcoal-soft);
  line-height: 1.5;
}

.product-card-material {
  margin-top: 4px;
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-stone);
}

/* --------------------------------------------------------------------------
   Purpose & Contrast Highlights (Maker -> Modern Living)
   -------------------------------------------------------------------------- */
.purpose-box {
  padding: var(--space-xl);
  background: var(--color-cream);
  border-radius: var(--radius-xs);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.purpose-box-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-charcoal);
}

.purpose-box-desc {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-charcoal-muted);
}

/* --------------------------------------------------------------------------
   Editorial Image Block
   -------------------------------------------------------------------------- */
.editorial-image-block {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xs);
  background-color: var(--color-cream);
}

.editorial-image-block img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.editorial-caption {
  margin-top: var(--space-xs);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--color-charcoal-soft);
  display: flex;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   Specifications Table
   -------------------------------------------------------------------------- */
.spec-table {
  width: 100%;
  border-top: 1px solid var(--border-subtle);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
}

.spec-label {
  color: var(--color-charcoal-soft);
  font-weight: 400;
}

.spec-value {
  color: var(--color-charcoal);
  font-weight: 500;
  text-align: right;
}

/* --------------------------------------------------------------------------
   Forms & Inputs
   -------------------------------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.form-label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-charcoal-soft);
  font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
  font-size: var(--text-sm);
  color: var(--color-charcoal);
  transition: border-color var(--duration-fast) var(--ease-editorial);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-charcoal);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   Drawer / Modal
   -------------------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(24, 23, 21, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-medium) var(--ease-editorial),
              visibility var(--duration-medium) var(--ease-editorial);
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 500px;
  height: 100vh;
  background-color: var(--color-ivory);
  box-shadow: var(--shadow-floating);
  z-index: 2005;
  padding: var(--space-2xl);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--duration-medium) var(--ease-editorial);
  display: flex;
  flex-direction: column;
}

.drawer-backdrop.active .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-editorial);
}

.drawer-close:hover {
  background-color: var(--color-sand);
}
