:root {
  --rswcf-bg: 220 53% 8%;
  --rswcf-white: #fff;

  --rswcf-border: 46 70% 57%;
  --rswcf-card: 40 25% 95%;
  --rswcf-border-soft: 40 15% 85%;
  --rswcf-muted: 220 20% 40%;

  --rswcf-success: #16803c;
  --rswcf-danger: #b42318;

  --rswcf-accent: hsl(var(--rswcf-border));
  --rswcf-accent-soft: hsl(var(--rswcf-border) / 0.1);

  --rswcf-radius: 0.5rem;
  --rswcf-transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   Base
========================================= */

.rswcf--single-product-page,
.rswcf--single-product-page * {
  box-sizing: border-box;
}

.rswcf--single-product-page {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;

  font-family:
    "DM Sans",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

/* =========================================
   Short Description
========================================= */

#rswcf--short-discription {
  color: hsl(var(--rswcf-muted));
  line-height: 1.625;
}

/* =========================================
   Groups
========================================= */

.rswcf-size-group,
.rswcf-roof-type-group,
.rswcf-addons-group,
.rswcf-service-options {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* =========================================
   Configure Title
========================================= */

.rswcf-configure-title {
  margin: 0 0 0.5rem;

  color: hsl(var(--rswcf-bg));
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
}

/* =========================================
   Size & Roof Type
========================================= */

.rswcf-size-group .rswcf-size-wrapper,
.rswcf-roof-type-group .rswcf-roof-type-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.rswcf-size-group .rswcf-size-option,
.rswcf-roof-type-group .rswcf-roof-type-option {
  flex: 0 1 auto;

  padding: 0.5rem 1rem;

  color: hsl(var(--rswcf-muted));
  background-color: hsl(var(--rswcf-card));
  border: 2px solid hsl(var(--rswcf-border-soft));
  border-radius: var(--rswcf-radius);

  font-size: 0.875rem;
  line-height: 1.25rem;

  transition: var(--rswcf-transition);
  cursor: pointer;
}

.rswcf-size-group .rswcf-size-option:hover,
.rswcf-roof-type-group .rswcf-roof-type-option:hover,
.rswcf-addons-group .rswcf-addon-option:hover,
.rswcf-service-options .rswcf-service-option:hover {
  border-color: hsl(220 20% 40% / 0.3);
}

/* =========================================
   Active Options
========================================= */

.rswcf-size-group .rswcf-size-option.active,
.rswcf-roof-type-group .rswcf-roof-type-option.active,
.rswcf-service-options .rswcf-service-option.active {
  color: #000;
  background-color: var(--rswcf-accent-soft);
  border-color: var(--rswcf-accent);
  font-weight: 700;
}

/* =========================================
   Addons
========================================= */

.rswcf-addons-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.rswcf-addons-wrapper .rswcf-addon-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;

  width: 100%;
  padding: 1rem;

  color: #000 !important;
  background-color: hsl(var(--rswcf-card));
  border: 2px solid hsl(var(--rswcf-border-soft));
  border-radius: var(--rswcf-radius);

  transition: var(--rswcf-transition);
  cursor: pointer;
}

.rswcf-addons-wrapper .rswcf-addon-option input {
  flex: 0 0 auto;
  accent-color: #ebab1f;
}

/* Checked addon */
.rswcf-addons-wrapper .rswcf-addon-option:has(input:checked) {
  background-color: var(--rswcf-accent-soft);
  border-color: var(--rswcf-accent);
}

/* =========================================
   Item Price
========================================= */

.rswcf-item-price {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.6;
}

.rswcf-addons-group .rswcf-addon-option .rswcf-item-price {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

/* =========================================
   Summary
========================================= */

.rswcf-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;

  width: 100%;
  margin-bottom: 1.5rem;
}

.rswcf-summary-item {
  display: flex;
  flex-direction: column;

  min-width: 0;
  padding: 0.75rem;

  background-color: #dadada36;
  border-radius: var(--rswcf-radius);
}

.rswcf-summary-item .rswcf-summary-label {
  font-size: 0.75rem;
  line-height: 1rem;
}

.rswcf-summary-item #rswcf-base-size,
.rswcf-summary-item #rswcf-material,
.rswcf-summary-item #rswcf-roof-type,
.rswcf-summary-item #rswcf-glazing {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* =========================================
   Service Options
========================================= */

.rswcf-service-options {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.rswcf-service-wrapper {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.rswcf-service-option {
  flex: 1 1 0;
  min-width: 0;

  padding: 1rem;

  color: hsl(var(--rswcf-muted));
  background-color: hsl(var(--rswcf-card));
  border: 2px solid hsl(var(--rswcf-border-soft));
  border-radius: var(--rswcf-radius);

  font-size: 0.875rem;
  line-height: 1.25rem;

  transition: var(--rswcf-transition);
  cursor: pointer;
}

.rswcf-service-option .rswcf-service-card {
  display: flex;
  flex-direction: column;
}

.rswcf-service-card .rswcf-service-icon {
  color: var(--rswcf-accent);
}

.rswcf-service-card .rswcf-service-price {
  color: #000;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 700;
}

/* =========================================
   Price Summary
========================================= */

.rswcf-price-summary .rswcf-current-price {
  color: hsl(var(--rswcf-bg));
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 700;
}

.rswcf-price-summary #rswcf-old-price {
  color: hsl(var(--rswcf-muted));
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.25rem;
  line-height: 1.75rem;
  text-decoration: line-through;
}

/* =========================================
   Postcode Checker
========================================= */

.rswcf-postcode-checker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

#rswcf-postcode {
  width: 10rem;
  max-width: 100%;

  padding: 0.625rem 1rem;

  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.25rem;

  border: 1px solid hsl(var(--rswcf-border-soft));
  border-radius: var(--rswcf-radius);
}

#rswcf-postcode:focus,
#rswcf-postcode:focus-visible {
  outline: 1px solid #ebab1f;
  outline-offset: 0;
  border-color: #ebab1f;
}

/* =========================================
   Buttons
========================================= */

#rswcf-postcode-check,
#rswcf-request-quote {
  transition: var(--rswcf-transition);
}

#rswcf-postcode-check {
  padding: 0.6rem 0.75rem;

  color: #000;
  background-color: hsl(40 30% 97%);
  border: 1px solid hsl(var(--rswcf-border-soft));
  border-radius: calc(var(--rswcf-radius) - 2px);

  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  white-space: nowrap;
}

#rswcf-postcode-check:hover,
#rswcf-postcode-check:active,
#rswcf-postcode-check:focus,
#rswcf-request-quote:hover,
#rswcf-request-quote:active,
#rswcf-request-quote:focus {
  color: var(--rswcf-white);
  background-color: #9a1933;
}

/* =========================================
   Action Buttons
========================================= */

.rswcf-action-buttons {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

#rswcf-add-to-cart {
  flex: 1 1 0;
  min-width: 0;

  padding: 0.8rem 2rem;

  color: #000;
  background-color: var(--rswcf-accent);
  border: none;
  border-radius: var(--rswcf-radius);

  transition: var(--rswcf-transition);
}

#rswcf-add-to-cart:hover,
#rswcf-add-to-cart:active,
#rswcf-add-to-cart:focus {
  background-color: var(--e-global-color-accent);
}

.rswcf-btn-text {
  font-weight: 700;
}

#rswcf-request-quote {
  padding: 0.5rem 1rem;

  color: #000;
  border: 1px solid hsl(var(--rswcf-border-soft));
  border-radius: var(--rswcf-radius);

  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 700;
}

.rswcf-service-title {
  font-weight: 700;
  color: #000;
}

.rswcf-service-card .rswcf-service-price {
  font-family: "Playfair Display", Georgia, serif;
}

/* =========================================
   Tablet
========================================= */

@media (max-width: 768px) {
  .rswcf--single-product-page {
    gap: 12px;
  }

  .rswcf-summary {
    margin-bottom: 1rem;
  }

  .rswcf-service-wrapper {
    gap: 0.5rem;
  }

  .rswcf-service-option {
    padding: 0.875rem;
  }

  .rswcf-price-summary .rswcf-current-price {
    font-size: 2rem;
    line-height: 2.25rem;
  }

  #rswcf-add-to-cart {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* =========================================
   Mobile
========================================= */

@media (max-width: 576px) {
  .rswcf--single-product-page {
    gap: 10px;
  }

  /* Size / Roof buttons */
  .rswcf-size-group .rswcf-size-wrapper,
  .rswcf-roof-type-group .rswcf-roof-type-wrapper {
    gap: 0.5rem;
  }

  .rswcf-size-group .rswcf-size-option,
  .rswcf-roof-type-group .rswcf-roof-type-option {
    padding: 0.5rem 0.75rem;
  }

  /* Summary becomes single column */
  .rswcf-summary {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  /* Services become vertical */
  .rswcf-service-wrapper {
    flex-direction: column;
    gap: 0.5rem;
  }

  .rswcf-service-option {
    width: 100%;
  }

  /* Postcode */
  .rswcf-postcode-checker {
    align-items: stretch;
    flex-direction: column;
  }

  #rswcf-postcode {
    width: 100%;
  }

  #rswcf-postcode-check {
    width: 100%;
  }

  /* Action buttons */
  .rswcf-action-buttons {
    flex-direction: column;
  }

  #rswcf-add-to-cart,
  #rswcf-request-quote {
    width: 100%;
  }

  #rswcf-add-to-cart {
    padding: 0.8rem 1rem;
  }

  /* Price */
  .rswcf-price-summary .rswcf-current-price {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  .rswcf-price-summary #rswcf-old-price {
    font-size: 1rem;
    line-height: 1.5rem;
  }

  /* Addon */
  .rswcf-addons-wrapper .rswcf-addon-option {
    padding: 0.875rem;
  }
}

/* =========================================
   Small Mobile
========================================= */

@media (max-width: 375px) {
  .rswcf-size-group .rswcf-size-option,
  .rswcf-roof-type-group .rswcf-roof-type-option {
    flex: 1 1 calc(50% - 0.25rem);
    text-align: center;
  }

  .rswcf-addons-wrapper .rswcf-addon-option {
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .rswcf-service-option {
    padding: 0.75rem;
  }
}
