/* ==========================================================================
   COMPONENTS - INSIDE ART PROTOTYPE
   Buttons, Cards, Configurator, Texture Selector, Filters, Modals, Tabs, Forms
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px 20px;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  line-height: 1.2;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background-color: var(--c-black);
  color: var(--c-invert);
  border-color: var(--c-black);
}

.btn--primary:hover {
  background-color: var(--c-ink-2);
  border-color: var(--c-ink-2);
}

.btn--secondary {
  background-color: transparent;
  color: var(--c-black);
  border-color: var(--c-line-2);
}

.btn--secondary:hover {
  background-color: var(--c-surface);
  border-color: var(--c-black);
}

.btn--ghost {
  background-color: transparent;
  color: var(--c-ink);
  border-color: transparent;
}

.btn--ghost:hover {
  background-color: var(--c-surface);
}

.btn--sm {
  padding: 6px 14px;
  font-size: var(--fs-xs);
}

.btn--lg {
  padding: 14px 28px;
  font-size: var(--fs-base);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--invert {
  background-color: var(--c-invert);
  color: var(--c-black);
  border-color: var(--c-invert);
}

.btn--invert:hover {
  background-color: var(--c-surface-2);
  border-color: var(--c-surface-2);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--c-muted);
  list-style: none !important;
  padding: var(--sp-4) 0;
  margin: 0;
  flex-wrap: wrap;
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 !important;
  padding: 0 !important;
}

.breadcrumbs__item::after {
  content: "/";
  color: var(--c-line-2);
}

.breadcrumbs__item:last-child::after {
  display: none;
}

.breadcrumbs__link {
  color: var(--c-muted);
  text-decoration: none;
}

.breadcrumbs__link:hover {
  color: var(--c-black);
  text-decoration: underline;
}

.breadcrumbs__current {
  color: var(--c-ink);
  font-weight: 600;
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 4px 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.badge--dark {
  background-color: var(--c-black);
  color: var(--c-invert);
}

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

.badge--surface {
  background-color: var(--c-surface-2);
  color: var(--c-ink);
}

/* ==========================================================================
   PRODUCT & COLLECTION CARDS (Entire Card Clickable)
   ========================================================================== */
.card-product {
  background-color: var(--c-bg);
  border: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  transition: border-color var(--t-fast);
  position: relative;
  text-decoration: none;
  color: inherit;
}

.card-product:hover {
  border-color: var(--c-black);
}

.card-product__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: var(--c-surface-3);
  border-bottom: 1px solid var(--c-line);
  overflow: hidden;
}

.card-product__content {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-product__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: var(--c-muted);
  margin-bottom: var(--sp-1);
}

.card-product__title {
  font-size: var(--fs-base);
  font-weight: 600;
  margin-bottom: var(--sp-2);
  color: var(--c-black);
}

.card-product__price {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--c-black);
  margin-top: auto;
  padding-top: var(--sp-3);
  margin-bottom: var(--sp-3);
}

/* Grid Collection Card (Vertical) */
.card-collection {
  background-color: var(--c-bg);
  border: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  transition: border-color var(--t-fast);
  text-decoration: none;
  color: inherit;
}

.card-collection:hover {
  border-color: var(--c-black);
}

.card-collection__media {
  aspect-ratio: 16 / 9;
  background-color: var(--c-surface-3);
  border-bottom: 1px solid var(--c-line);
}

.card-collection__content {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-collection__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-2);
  color: var(--c-black);
}

.card-collection__desc {
  font-size: var(--fs-sm);
  color: var(--c-ink-2);
  line-height: 1.5;
  margin-bottom: var(--sp-4);
  flex-grow: 1;
}

/* Horizontal Row Collection Card (for /collections) */
.card-collection-row {
  background-color: var(--c-bg);
  border: 1px solid var(--c-line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  cursor: pointer;
  transition: border-color var(--t-fast);
  text-decoration: none;
  color: inherit;
}

.card-collection-row:hover {
  border-color: var(--c-black);
}

.card-collection-row__media {
  background-color: var(--c-surface-3);
  border-right: 1px solid var(--c-line);
  min-height: 280px;
}

.card-collection-row__content {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .card-collection-row {
    grid-template-columns: 1fr;
  }
  .card-collection-row__media {
    border-right: none;
    border-bottom: 1px solid var(--c-line);
    min-height: 200px;
  }
}

/* Texture Big Feature Cards */
.card-texture {
  background-color: var(--c-bg);
  border: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-texture__header {
  padding: var(--sp-6);
  background-color: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
}

.card-texture__body {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-texture__price {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--c-black);
  margin-top: var(--sp-2);
}

.card-texture__samples {
  display: flex;
  gap: var(--sp-2);
  margin: var(--sp-4) 0;
  flex-wrap: wrap;
}

.card-texture__sample-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  background-color: var(--c-surface-2);
  border: 1px solid var(--c-line);
}

/* Branch Detail Cards */
.branch-card-detail {
  background-color: var(--c-bg);
  border: 1px solid var(--c-line);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.branch-map-box {
  background-color: var(--c-surface-2);
  border: 1px solid var(--c-line);
  padding: var(--sp-6);
  text-align: center;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Info & Content Blocks */
.info-card {
  background-color: var(--c-bg);
  border: 1px solid var(--c-line);
  padding: var(--sp-8);
  margin-bottom: var(--sp-12);
}

.info-card--surface {
  background-color: var(--c-surface);
}

/* Data & Comparison Tables */
.table-container {
  border: 1px solid var(--c-line);
  background-color: var(--c-bg);
  margin-bottom: var(--sp-12);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--fs-sm);
}

.data-table th {
  background-color: var(--c-surface-2);
  padding: 16px 20px;
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--c-line);
  color: var(--c-black);
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-ink);
  line-height: 1.6;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background-color: var(--c-surface);
}

/* Full-Width CTA Banner */
.cta-banner {
  background-color: var(--c-surface);
  border: 1px solid var(--c-line);
  padding: var(--sp-8);
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.cta-banner__content {
  flex: 1;
  min-width: 280px;
}

.cta-banner__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: var(--sp-1);
}

.cta-banner__desc {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  margin: 0;
}

.cta-banner__actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* Feature & Service Cards */
.card-feature {
  background-color: var(--c-surface);
  border: 1px solid var(--c-line);
  padding: var(--sp-6);
  height: 100%;
}

.card-feature__num {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--c-black);
  margin-bottom: var(--sp-2);
}

.card-feature__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-2);
}

.card-feature__text {
  font-size: var(--fs-sm);
  color: var(--c-ink-2);
}

.card-service {
  border: 1px solid var(--c-line);
  padding: var(--sp-6);
  background-color: var(--c-bg);
  display: flex;
  flex-direction: column;
}

.card-service__header {
  border-bottom: 1px solid var(--c-line);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.card-service__price {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--c-black);
  margin-top: var(--sp-2);
}

/* ==========================================================================
   PRODUCT CONFIGURATOR - AIRY & MINIMAL DESIGN
   ========================================================================== */
.configurator-toolbar {
  background-color: var(--c-surface);
  border: 1px solid var(--c-line);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

.configurator-toolbar__inputs {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.dim-field {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.dim-field input {
  width: 76px;
  padding: 6px 8px;
  border: 1px solid var(--c-line);
  background-color: var(--c-bg);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-align: center;
}

.configurator-toolbar__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.configurator-preview-box {
  position: relative;
  background-color: var(--c-surface-2);
  border: 1px solid var(--c-line);
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: var(--sp-4);
  padding: var(--sp-4);
}

.configurator-preview-canvas {
  width: 80%;
  height: 80%;
  border: 1px solid var(--c-ink-2);
  background-color: var(--c-surface-3);
  position: relative;
  transition: transform var(--t-fast);
}

.configurator-preview-canvas.is-flipped {
  transform: scaleX(-1);
}

/* Texture Selector Tabs & Grid */
.config-block {
  border: 1px solid var(--c-line);
  background-color: var(--c-bg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}

.config-block__title {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-line);
  padding-bottom: var(--sp-2);
}

.texture-tabs {
  display: flex;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: var(--sp-3);
}

.texture-tab-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  color: var(--c-muted);
}

.texture-tab-btn.is-active {
  color: var(--c-black);
  border-bottom-color: var(--c-black);
  background-color: var(--c-surface);
}

.texture-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}

.texture-item {
  border: 1px solid var(--c-line);
  padding: var(--sp-2);
  text-align: center;
  cursor: pointer;
  background-color: var(--c-bg);
  transition: border-color var(--t-fast);
}

.texture-item:hover {
  border-color: var(--c-black);
}

.texture-item.is-selected {
  border: 2px solid var(--c-black);
  background-color: var(--c-surface);
}

.texture-item__thumb {
  aspect-ratio: 1;
  background-color: var(--c-surface-3);
  margin-bottom: var(--sp-1);
}

.texture-item__name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

/* Choice Blocks */
.choice-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}

.choice-box {
  border: 1px solid var(--c-line);
  padding: var(--sp-3);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.choice-box.is-selected {
  border: 2px solid var(--c-black);
  background-color: var(--c-surface);
}

.choice-box.is-disabled {
  opacity: .42;
  cursor: not-allowed;
  background: #f1efe9;
  border-color: var(--c-line);
}

.choice-box__title {
  font-size: var(--fs-sm);
  font-weight: 700;
}

.choice-box__desc {
  font-size: var(--fs-xs);
  color: var(--c-muted);
}

/* Summary Box */
.summary-bar {
  background-color: var(--c-surface);
  border: 1px solid var(--c-line);
  padding: var(--sp-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

.summary-bar__specs {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.summary-spec {
  font-size: var(--fs-xs);
}

.summary-spec__label {
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.summary-spec__val {
  font-weight: 700;
  color: var(--c-black);
  font-size: var(--fs-sm);
}

.summary-bar__price {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--c-black);
  white-space: nowrap;
}

/* Tabs */
.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--c-line);
  gap: var(--sp-4);
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 var(--sp-6) 0 !important;
  overflow-x: auto;
}

.tabs-nav li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.tab-btn {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn.is-active {
  color: var(--c-black);
  border-bottom-color: var(--c-black);
}

.tab-pane {
  display: none;
}

.tab-pane.is-active {
  display: block;
}

/* Forms */
.form-group {
  margin-bottom: var(--sp-4);
}

.form-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-1);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: var(--fs-base);
  border: 1px solid var(--c-line);
  background-color: var(--c-bg);
  border-radius: var(--radius-sm);
  color: var(--c-ink);
  box-sizing: border-box;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--c-black);
  outline: none;
}

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

.form-check {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Cart Specific */
.cart-card {
  background-color: var(--c-bg);
  border: 1px solid var(--c-line);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.checkout-card {
  background-color: var(--c-surface);
  border: 1px solid var(--c-line);
  padding: var(--sp-6);
}

.cart-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: var(--sp-6);
  font-size: var(--fs-sm);
}

.cart-table th {
  background-color: var(--c-surface);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  padding: 12px 14px;
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
}

.cart-table th:first-child { border-left: 1px solid var(--c-line); }
.cart-table th:last-child { border-right: 1px solid var(--c-line); }

.cart-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--c-line);
  vertical-align: middle;
  background-color: var(--c-bg);
}

.cart-table td:first-child { border-left: 1px solid var(--c-line); }
.cart-table td:last-child { border-right: 1px solid var(--c-line); }

.cart-summary-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-4);
  flex-wrap: wrap;
  gap: var(--sp-4);
}

/* Filter Sidebar */
.filter-box {
  border: 1px solid var(--c-line);
  background-color: var(--c-bg);
  margin-bottom: var(--sp-4);
}

.filter-box__header {
  padding: var(--sp-3) var(--sp-4);
  background-color: var(--c-surface);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--c-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.filter-box__body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-height: 260px;
  overflow-y: auto;
}

/* Global Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  cursor: pointer;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-card {
  background-color: var(--c-bg);
  border: 2px solid var(--c-black);
  max-width: 540px;
  width: 100%;
  padding: var(--sp-8);
  position: relative;
  cursor: default;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  background: none;
  border: none;
  font-size: var(--fs-xl);
  cursor: pointer;
  line-height: 1;
  color: var(--c-ink);
}

.modal-close:hover {
  color: var(--c-black);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-8) 0;
}

.pagination__item {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-line);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-decoration: none;
  color: var(--c-ink);
}

.pagination__item.is-active {
  background-color: var(--c-black);
  color: var(--c-invert);
  border-color: var(--c-black);
}

.pagination__item:hover:not(.is-active) {
  background-color: var(--c-surface);
  border-color: var(--c-black);
}

.pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  color: var(--c-muted);
}

.pagination__arrow {
  text-decoration: none;
}

/* Added to Cart Notification Toast */
.cart-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--c-black);
  color: var(--c-invert);
  padding: 12px 20px;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
