/* Student-PC | Offers (PCs page): tab shell, product cards, payment options, cart buttons, insurance popover, accessories. */

/* || || PCS PAGE: sidebar shell + tab content || || */
/* The PC selection layout needs more room than the default 1200px CAAS container. */
.caas .container.main-body.spc-page--wide {
  width: 100%;
  max-width: 1560px;
}

@media (min-width: 1300px) {
  .caas .container.main-body.spc-page--wide {
    width: 100%;
    max-width: 1560px;
  }
}

.spc-shell {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin: 0;
  padding: 0 60px;
  color: #292c30;
}

.spc-shell__sidebar {
  display: flex;
  flex-direction: column;
  flex: 0 0 343px;
  max-width: 343px;
  padding: 40px 0;
}

.spc-nav__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 60px;
  padding: 16px;
  margin: 0;
  background: #fff;
  border: none;
  border-top: 1px solid #bbbcbd;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: #292c30;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.spc-nav__item:last-child {
  border-bottom: 1px solid #bbbcbd;
}

.spc-nav__item:hover {
  background: #f7f5f5;
}

.spc-nav__item.selected {
  background: #f2eeed;
}

.spc-nav__label {
  flex: 1 0 0;
  min-width: 0;
}

.spc-nav__chevron {
  flex-shrink: 0;
  color: #292c30;
}

.spc-shell__main {
  flex: 1 1 0;
  min-width: 0;
  padding: 24px 0;
}

.spc-tabs__content {
  display: none;
}

/* The active tab's content (toggled by the tab JS, replaces inline style.display). */
.spc-tabs__content--active {
  display: block;
}


/* || || SPC OFFERS || || */

@media (min-width: 600px) and (max-width: 991px) {
  #student-pc {
    max-width: initial;
  }
}

/* || OFFERS: heading + product cards || */
#student-pc .spc-offers__heading {
  font-family: "Barlow Semi Condensed", sans-serif;
  font-weight: 600;
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: -0.18px;
  color: #292c30;
  margin: 0 0 24px;
}

.spc-offers__list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.spc-product-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spc-product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #bbbcbd;
  border-radius: 8px;
  overflow: hidden;
}

.spc-product-card__main {
  display: flex;
  align-items: stretch;
  min-height: 240px;
}

.spc-product-card__media {
  position: relative;
  flex: 0 0 380px;
  max-width: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.spc-product-card__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.spc-product-card__sticker {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 64px;
  height: auto;
}

.spc-product-card__info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.spc-product-card__row {
  flex: 1 1 auto;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.spc-product-card__details {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#student-pc .spc-product-card__category {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #292c30;
  margin: 0;
}

#student-pc .spc-product-card__name {
  font-family: "Roboto", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  color: #292c30;
  margin: 0;
}

#student-pc .spc-product-card__intro,
#student-pc .spc-product-card__intro p {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #222;
  margin: 0;
}

.spc-product-card__price {
  flex-shrink: 0;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.spc-product-card__price-label {
  font-family: "Roboto", sans-serif;
  font-size: 11px;
  line-height: 1.5;
  color: #525252;
}

#student-pc .spc-product-card__price-value {
  font-family: "Barlow Semi Condensed", sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.06px;
  color: #222;
  white-space: nowrap;
}

.spc-product-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
}

#student-pc .spc-payment {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  border: 0;
}

#student-pc .spc-payment__option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #292c30;
}

#student-pc .spc-payment__radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

#student-pc .spc-payment__control {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #77797b;
  background: #fff;
  position: relative;
  box-sizing: border-box;
}

#student-pc .spc-payment__label {
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #292c30;
}

#student-pc .spc-payment__label > * {
  display: inline;
  margin: 0;
  padding: 0;
  font: inherit;
  font-weight: 400;
  color: inherit;
}

#student-pc .spc-payment__radio:checked + .spc-payment__control {
  border-color: #99720b;
  background: var(--komplett-yellow);
}

#student-pc .spc-payment__radio:checked + .spc-payment__control::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #292c30;
  transform: translate(-50%, -50%);
}

#student-pc .spc-payment__radio:focus-visible + .spc-payment__control {
  outline: 2px solid #99720b;
  outline-offset: 2px;
}

/* Buttons (navy cart + outline read-more) */
.spc-btn-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  min-width: 0;
  width: auto;
  padding: 0 14px;
  border: none;
  border-radius: 4px;
  background: #1f1949;
  color: #f1f3fa;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.4px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease-in-out;
}

.spc-btn-cart:hover {
  background: #16113a;
  color: #f1f3fa;
}

/* Link-based cart buttons (<a>) — beat the CAAS .caas a blue link color */
#student-pc a.spc-btn-cart,
#student-pc a.spc-btn-cart:hover,
#student-pc a.spc-btn-cart:visited,
#student-pc a.spc-btn-cart:focus {
  color: #f1f3fa;
  text-decoration: none;
}

.spc-btn-cart.added-to-cart {
  background: #2e7d32;
}

.spc-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #1f1a49;
  border-radius: 4px;
  background: transparent;
  color: #5b5d60;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.4px;
  line-height: 1.3;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease-in-out;
}

.spc-btn-outline:hover {
  background: rgba(31, 26, 73, 0.06);
}

.spc-btn-cart--go {
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
}

/* spc-checkmark inside cart button */
.spc-btn-cart .spc-checkmark {
  width: 0;
  height: 18px;
  overflow: hidden;
  transition: width 0.2s ease-in-out;
}

.spc-btn-cart.added-to-cart .spc-checkmark {
  width: 18px;
}

.spc-btn-cart .spc-checkmark__circle,
.spc-btn-cart .spc-checkmark__check {
  stroke: #f1f3fa;
  stroke-width: 3;
}

/* Read-more drawer (specs + description) — lives inside the product card */
.spc-readmore-content {
  border-top: 1px solid #bbbcbd;
  padding: 20px 24px;
  background: #f7f5f5;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #292c30;
  animation: spc-readmore-reveal 0.22s ease-out;
}

.spc-readmore-content[hidden] {
  display: none;
}

.spc-readmore-content ul {
  margin: 0 0 8px;
  padding-left: 1.4em;
}

.spc-readmore-content li {
  margin-bottom: 4px;
}

.spc-readmore-content p {
  margin: 0 0 8px;
  font-size: 16px;
}

.spc-readmore-content > *:last-child {
  margin-bottom: 0;
}

@keyframes spc-readmore-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spc-buybox {
  background-color: var(--background-color);
  border-radius: 6px;
  padding: 20px;
  margin-top: 14px;
}

.spc-product-card .spc-buybox--alternative {
  margin: 0;
  height: auto;
  border: 0;
  border-top: 1px solid #bbbcbd;
  border-radius: 0;
  background: #f7f5f5;
  padding: 16px 24px;
}

.spc-product-card .spc-buybox--alternative[hidden] {
  display: none;
}

.spc-buybox .spc-buybox__title {
  margin-top: 0;
  font-weight: bold;
}

.spc-product-card .spc-buybox__title {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #292c30;
  margin: 0 0 4px;
}

.spc-buybox__title span {
  font-weight: normal;
}

.spc-product-card .spc-buybox--alternative p {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #525252;
}

.spc-buybox__payment-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.spc-product-card .spc-buybox__payment-option {
  justify-content: flex-start;
  margin-top: 10px;
}

.spc-buybox__payment-option .btn-large {
  max-width: 250px;
  min-width: auto;
  width: auto;
}

.spc-buybox__error-message {
  color: var(--error-color);
  font-size: 14px;
  margin-top: 16px;
}

@media screen and (max-width: 599px) {
  .spc-buybox__payment-option .btn-large {
    margin-top: 10px;
  }

  .spc-buybox__payment-option {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* || Button at the end || */
.spc-offers__cart-footer {
  margin-top: 16px;
  text-align: center;
}

/* || MEDIA: PCs page responsive || */
@media screen and (max-width: 991px) {
  .spc-shell {
    flex-direction: column;
    gap: 0;
    padding: 0 20px;
  }

  .spc-shell__sidebar {
    flex-basis: auto;
    max-width: none;
    width: 100%;
    padding: 16px 0 0;
  }

  .spc-shell__main {
    width: 100%;
    padding: 16px 0;
  }
}

@media screen and (max-width: 767px) {
  .spc-product-card__main {
    flex-direction: column;
  }

  .spc-product-card__media {
    flex-basis: auto;
    max-width: none;
    width: 100%;
  }

  .spc-product-card__row {
    flex-direction: column;
  }

  .spc-product-card__price {
    align-items: flex-start;
  }

  .spc-product-card__footer .spc-btn-cart,
  .spc-product-card__footer .spc-btn-outline {
    flex: 1 1 auto;
  }
}

/* PCs-page typography reductions on phones */
@media screen and (max-width: 599px) {
  #student-pc .spc-offers__heading,
  #student-pc .spc-about-tab__heading {
    font-size: 28px;
  }

  #student-pc .spc-accessories__title > h2 {
    font-size: 24px;
  }

  #student-pc .spc-about-tab__body,
  #student-pc .spc-about-tab__body p,
  #student-pc .spc-about-tab__body li {
    font-size: 18px;
  }

  .spc-about-tab {
    gap: 32px;
  }

  .spc-readmore-content {
    padding: 16px 18px;
  }
}


/* || INSURANCE POPOVER (Forsikring) || */
.spc-insurance-popover {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid #77797b;
  border-radius: 4px;
}

.spc-insurance-popover__arrow {
  position: absolute;
  top: -8px;
  left: 40px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid #77797b;
  border-top: 1px solid #77797b;
  transform: rotate(45deg);
}

.spc-insurance-popover__panel {
  position: relative;
  padding: 12px 16px;
}

#student-pc .spc-insurance-popover__title {
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  color: #292c30;
  margin: 0 0 8px;
}

.spc-insurance-popover__intro,
.spc-insurance-popover__intro p {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #292c30;
  margin: 0 0 8px;
}

.spc-insurance-popover__more {
  margin: 8px 0 0;
  font-size: 14px;
}

.spc-insurance-popover__more a {
  color: var(--link-color);
  font-size: 14px;
}

/* Insurance options rendered as chips */
.spc-insurance-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spc-insurance-item {
  display: inline-flex;
  align-items: center;
  height: 32px;
  margin: 0;
  padding: 0 12px;
  background: #f7f5f5;
  border: 1px solid #bbbcbd;
  border-radius: 9999px;
}

.spc-insurance-item__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.spc-insurance-item__label {
  position: relative;
  margin: 0 !important;
  padding-left: 26px;
  font-family: "Roboto", sans-serif;
  font-weight: 500 !important;
  font-size: 14px;
  letter-spacing: 0.4px;
  line-height: 1.3;
  color: #292c30;
  white-space: nowrap;
  cursor: pointer;
}

.spc-insurance-item__label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #5b5d60;
  background: #fff;
  box-sizing: border-box;
}

.spc-insurance-item input[type="radio"]:checked + .spc-insurance-item__label::before {
  border-color: #99720b;
  background: var(--komplett-yellow);
}

.spc-insurance-item input[type="radio"]:checked + .spc-insurance-item__label::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #292c30;
}

.spc-insurance-remove {
  margin-left: 8px;
  border: 0;
  background: inherit;
  color: #5b5d60;
  font-size: 13px;
  cursor: pointer;
}

.spc-insurance-remove:hover {
  text-decoration: underline;
}


/* || || ACCESSORIES || || */

.spc-accessories__container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 16px;
  padding-top: 40px;
  border-top: 1px solid #bbbcbd;
}

.spc-accessories__title {
  padding: 0;
  background: none;
}

#student-pc .spc-accessories__title > h2 {
  font-family: "Barlow Semi Condensed", sans-serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.15px;
  color: #292c30;
  margin: 0;
}

.spc-accessories__top,
.spc-accessories__bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .spc-accessories__top,
  .spc-accessories__bottom {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .spc-accessories__top,
  .spc-accessories__bottom {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 459px) {
  .spc-accessories__top,
  .spc-accessories__bottom {
    grid-template-columns: 1fr;
  }
}

.spc-accessory {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #bbbcbd;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.spc-accessory:hover {
  border-color: #77797b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.spc-accessory > a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  padding: 20px;
  color: #292c30;
}

.spc-accessory > a > img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.spc-accessory > a:hover {
  text-decoration: none;
}

.spc-content-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  padding: 0 16px 16px;
}

.spc-text-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#student-pc .spc-text-content > h2 {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: #292c30;
  margin: 0;
}

#student-pc .spc-text-content > p {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #525252;
  margin: 0;
}

.spc-bottom-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.spc-offer-price {
  font-family: "Barlow Semi Condensed", sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
  color: #292c30;
  white-space: nowrap;
}

#student-pc .spc-accessory__buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  min-width: 0;
  padding: 0 14px;
  border: none;
  border-radius: 4px;
  background: #1f1949;
  color: #f1f3fa;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.4px;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease-in-out;
}

#student-pc .spc-accessory__buy:hover {
  background: #16113a;
  color: #f1f3fa;
}

#student-pc .spc-accessory__buy.added-to-cart {
    background: #2e7d32;
    
    span {
        margin-left:0;
    }
}

.spc-accessory__buy .spc-checkmark {
  width: 0;
  height: 16px;
  overflow: hidden;
  transition: width 0.2s ease-in-out;
}

.spc-accessory__buy.added-to-cart .spc-checkmark {
  width: 16px;
}

.spc-accessory__buy .spc-checkmark__circle,
.spc-accessory__buy .spc-checkmark__check {
  stroke: #f1f3fa;
  stroke-width: 3;
}
