/* GLASSMAX — cart & enquiry (ecommerce-style, minimal) */

.cart-link {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 18px;
  text-align: center;
}

.cart-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 10000;
  margin: 0;
  max-width: min(320px, calc(100vw - 2rem));
  padding: 0.75rem 1.1rem;
  background: #1a1a1a;
  color: #fff;
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
  border: none;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.cart-toast.is-visible,
.cart-toast--premium.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.product-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: var(--space-md);
}

.product-actions__buy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.product-actions--premium .product-actions__buy-row {
  width: 100%;
}

.product-actions--premium .product-actions__buy-row .add-to-cart-btn {
  flex: 1 1 auto;
  min-width: 140px;
}

body.page-rooflights .product-actions .btn--ghost,
body.page-glazing .product-actions .btn--ghost,
body.page-walkon .product-actions .btn--ghost,
body.page-smartglass .product-actions .btn--ghost,
body.page-product .product-actions .btn--ghost {
  /* superseded by .view-product-btn when premium layout active */
  color: var(--color-text, #2a2a2a);
  border-color: #d8d8d5;
  background: #fff;
}

.btn-text {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #333;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.btn-text:hover {
  color: var(--color-cta, #1e3228);
}

.cart-page {
  background: #fff;
  padding-block: var(--space-xl);
}

.cart-page__intro {
  max-width: 52ch;
  margin-top: 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.cart-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  align-items: center;
}

.cart-page h1 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-md);
}

.cart-table-wrap {
  border: 1px solid var(--color-border);
  overflow-x: auto;
  margin-bottom: var(--space-xl);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.cart-table th,
.cart-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.cart-table th {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-bg-muted, #f5f5f4);
}

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

.cart-qty-input {
  width: 4rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--color-border);
  font: inherit;
}

.cart-empty {
  color: var(--color-text-muted);
  padding: var(--space-lg) !important;
}

.cart-empty a {
  font-weight: 500;
}

.cart-summary {
  padding: var(--space-md);
  background: var(--color-bg-muted, #f5f5f4);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-xl);
  font-size: 0.9375rem;
  line-height: 1.65;
  white-space: pre-line;
}

.enquiry-block {
  max-width: 560px;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.enquiry-block h2 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 var(--space-md);
}

.enquiry-block .quote-form label {
  display: block;
}

.enquiry-status {
  margin-top: var(--space-md);
  font-size: 0.875rem;
  line-height: 1.55;
}

.enquiry-status--ok {
  color: #1a5d1a;
}

.enquiry-status--error {
  color: #8a1c1c;
}

.enquiry-status--warn {
  color: #5a4a1a;
}

.enquiry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.products-shop-grid {
  display: grid;
  gap: clamp(1.35rem, 2.5vw, 2rem);
  background: transparent;
  border: 0;
}

@media (min-width: 768px) {
  .products-shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .products-shop-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.product-shop-card {
  background: #fff;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 15, 15, 0.07);
  transition: box-shadow 0.3s ease;
}

.product-shop-card:hover {
  box-shadow: 0 20px 56px rgba(15, 15, 15, 0.1);
}

.product-shop-card__img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eaeaea;
}

@media (min-width: 900px) {
  .product-shop-card__img {
    aspect-ratio: 4 / 5;
  }
}

.product-shop-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.22, 0.12, 0.2, 1);
}

.product-shop-card:hover .product-shop-card__img img {
  transform: scale(1.06);
}

.product-shop-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 12, 0.42);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.product-shop-card:hover .product-shop-card__overlay {
  opacity: 1;
  pointer-events: auto;
}

.product-shop-card__enquiry-cta {
  display: inline-flex;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #121212;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(8px);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease;
}

.product-shop-card:hover .product-shop-card__enquiry-cta {
  transform: translateY(0);
}

.product-shop-card__enquiry-cta:hover {
  background: #fff;
  color: #000;
  text-decoration: none;
}

.product-shop-card__body {
  padding: var(--space-md);
  border-top: 1px solid var(--color-border);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-shop-card h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-xs);
}

.product-shop-card p {
  margin: 0 0 var(--space-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  flex: 1;
}

/* --------------------------------------------------------------------------
   Premium add to cart — quantity, primary CTA, view product
   -------------------------------------------------------------------------- */

.qty-control {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.qty-control__btn {
  width: 36px;
  min-height: 36px;
  border: none;
  background: #f7f7f6;
  color: #2a2a2a;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.qty-control__btn:hover {
  background: #ececea;
}

.qty-control__btn:focus-visible {
  outline: 2px solid #2a2a2a;
  outline-offset: 2px;
  z-index: 1;
}

.qty-control__value {
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: #2a2a2a;
  background: #fff;
  border-left: 1px solid #e8e8e6;
  border-right: 1px solid #e8e8e6;
}

.add-to-cart-btn {
  height: 52px;
  padding: 0 1.5rem;
  background: #2a2a2a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.add-to-cart-btn:hover {
  background: #111;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.add-to-cart-btn:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

.view-product-btn,
.product-actions--premium > a.btn--ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.35rem;
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #2a2a2a;
  background: #fff;
  border: 1px solid #d8d8d5;
  border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  align-self: flex-start;
}

.view-product-btn:hover,
.product-actions--premium > a.btn--ghost:hover {
  background: #fafafa;
  border-color: #c8c8c4;
  color: #111;
}

.product-shop-card {
  border-radius: 8px;
  border-color: #e6e6e3;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  background: #fff;
}

.product-shop-card__body {
  background: #fff;
  border-top-color: #e8e8e6;
}

.product-shop-card h2 {
  color: #2a2a2a;
}

body.page-product .product-tile {
  border-radius: 8px;
  border: 1px solid #e6e6e3;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.055);
  overflow: hidden;
  background: #fafafa;
}

body.page-product .product-tile__body {
  background: #fff;
  padding: 1.25rem 1.35rem 1.35rem;
}

body.page-product .product-tile__meta {
  color: #5c5c58;
  font-size: 0.875rem;
  line-height: 1.55;
}

body.page-product .product-tile__title {
  color: #2a2a2a;
}

.pdc-actions.product-actions--premium {
  margin-top: 2rem;
  padding: 1.5rem 1.5rem 1.65rem;
  background: #fafafa;
  border: 1px solid #e8e8e6;
  border-radius: 8px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.06);
}

@media (min-width: 640px) {
  .pdc-actions.product-actions--premium .product-actions__buy-row {
    flex-wrap: nowrap;
  }

  .pdc-actions.product-actions--premium .add-to-cart-btn {
    max-width: 280px;
  }
}
