/******* Header *******/

.header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--fill-white);
}
.header__logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.header__top-bar {
  display: flex;
  padding: var(--spacing-xs) var(--spacing-m);
  justify-content: flex-end;
  align-items: center;
  width: 100%;
}
.header__top-bar--no-nav {
  border-bottom: 1px solid var(--stroke-light-gray);
}
.header__icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  aspect-ratio: 1;
}
.header__gender-nav,
.header__wardrobe-nav {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  background-color: var(--fill-white);
}
.header__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--stroke-light-gray);
  position: relative;
  width: 100%;

  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
}
.header__btn--border-left {
  border-left: 1px solid var(--stroke-light-gray);
}
.header__btn--selected {
  border-bottom: 3px solid var(--stroke-primary);
}

/******* Main *******/
.main {
  padding-left: var(--spacing-m);
  padding-right: var(--spacing-m);
  padding-bottom: 80px;
}
p {
  margin-bottom: var(--spacing-m);
}

/******* Footer *******/

footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  text-align: center;
  font-size: var(--text-body-small-size);
  z-index: 1000;
}
.footer__tab-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 16px;
  background-color: var(--fill-white);
  border-top: 1px solid var(--stroke-light-gray);
}
.footer__tab-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  flex: 1 1 0;
  text-decoration: none;
  cursor: pointer;
  color: var(--primary);
}
.footer__icon {
  position: relative;
  max-width: 60px;
  width: 24px;
  max-height: 60px;
  height: 24px;
  aspect-ratio: 1;
}
.footer__tab-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  height: 15px;
  text-align: center;
  white-space: nowrap;
}

.footer__tab-bar-item--selected {
  color: var(--secondary);
}

/******* Login Modal *******/

.login-modal {
  display: none; /* skjult som standard. Vises først, når vi tilføjer klassen "open" via JavaScript. */
  position: fixed; /* Fastsiddende position */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent baggrund */
  justify-content: center;
  align-items: center;
  z-index: 2000; /* over header og footer */
}

.login-modal.open {
  display: flex; /* vis modal, når open klasse tilføjes */
}

.login-modal__content {
  font-family: "Roboto", Arial, sans-serif; /* Brug Roboto + backups */
  font-weight: 400; /* Standardvægt for tekst */
  background: var(--fill-white);
  padding: var(--spacing-l);
  border-radius: var(--radius-m);
  width: 90%; /* Fylder 90% af skærmbredden... */
  max-width: 400px; /* ...men maks 400px */
  position: relative; /* For at placere luk-knappen absolut inden for denne boks */
}

.login-modal__close-img {
  position: absolute; /* Fastsiddende position (øverst i hjørnet) */
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  transition: color 0.2s ease; /* glidende farveændring */
}

.login-modal__close-img:hover {
  color: var(--stroke-light-gray); /* farveændring ved hover */
}

.login-modal__input {
  font-family: "Roboto", Arial, sans-serif; /* Brug Roboto + backups */
  font-weight: 400;
  font-size: 1rem; /* 16px, så det matcher body-tekst */
  width: 100%; /* Inputfelter fylder hele bredden af modalboksen */
  padding: var(--spacing-s);
  margin-bottom: var(--spacing-m);
  border: 1px solid var(--stroke-light-gray); /* Lys grå kant */
  border-radius: var(--radius-s);
}

.login-modal__submit {
  font-family: "Roboto", Arial, sans-serif; /* Brug Roboto + backups */
  font-weight: 500; /* lidt mere fremtrædende */
  font-size: 1rem;
  width: 100%; /* Knap fylder hele bredden af modalboksen */
  padding: var(--spacing-s);
  background-color: var(--primary);
  color: var(--text-invers-primary);
  border: none; /* Fjerner standardrammen på knappen */
  border-radius: var(--radius-s);
  cursor: pointer; /* Ændrer cursor til pointer ved hover */
  transition: background-color 0.2s ease, transform 0.1s ease; /* glidende ændring */
}

.login-modal__submit:hover {
  background-color: var(--secondary); /* Taget fra designsystem */
  transition: background-color 0.2s ease;
}

.login-modal__remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--spacing-m);
}

.login-modal__checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.login-modal__label--inline {
  font-family: "Roboto", Arial, sans-serif; /* Samme font som resten */
  font-weight: 400; /* Samme vægt som input og labels */
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
}

.login-modal__forgot-password {
  font-family: "Roboto", Arial, sans-serif; /* Samme font som resten */
  text-align: center;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--black);
  text-decoration: underline; /* Tykkere streg */
  text-underline-offset: 3px; /* Lidt afstand mellem tekst og streg */
  cursor: pointer;
  margin-top: var(--spacing-m);
  transition: color 0.2s ease; /* Glidende farveskift */
}

.login-modal__forgot-password:hover {
  color: var(--stroke-light-gray); /* Ændres til grå ved hover */
}

input:invalid:not(:placeholder-shown) {
  outline: 2px solid var(--error);
  outline-offset: -2px;
}

input:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/******** Wardrobe *******/

#product-wrapper,
.main__product-wrapper {
  margin-top: var(--spacing-s);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  justify-content: center;
  align-self: stretch;
}

.main__product-item {
  display: flex;
  position: relative;
  width: 150px;
  height: 150px;
  aspect-ratio: 1/1;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--stroke-light-gray);
  /* Ensure content doesn't spill outside the square */
  overflow: hidden;
}

.main__product-item img {
  /* Fill the square without distortion */
  width: 100%;
  height: 100%;
  object-fit: contain; /* Use 'cover' if you prefer crop-to-fill */
  object-position: center;
  flex-shrink: 0;
  align-self: center;
}

.main__heart-icon {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 32px;
  fill: none;

  cursor: pointer;
}

.main__heart-icon--liked path {
  stroke: red;
  fill: red;
}

/******** Outfit View *******/

.main__outfit-wrapper {
  display: none;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-m) 0;
  min-height: 70vh;
}

.outfit__dressup-container {
  position: relative;
  width: 300px;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.outfit__avatar-base {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

.outfit__clothing-slot {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

/* Justeret for bedre pasform på avatar */
.outfit__clothing-slot--overdele {
  top: 13%; /* placering relativt til avatarens top */
  left: 50%;
  transform: translateX(-50%);
  width: 210px; /* øg bredden for reel skalering af tøjet */
  height: 210px; /* hold nær kvadrat for ens skalering */
}

/* Finjuster billedets placering i slotten */
.outfit__clothing-slot--overdele .outfit__clothing-image {
  object-position: center top;
  padding-top: 4px;
}

.outfit__clothing-slot--underdele {
  top: 39%;
  left: 51%;
  transform: translateX(-50%);
  width: 380px;
  height: 380px;
}

.outfit__clothing-slot--sko {
  bottom: 1%;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 10px;
}

.outfit__clothing-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.outfit__arrow {
  position: absolute;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 3;
  transition: all 0.2s ease;
  color: var(--primary);
}

.outfit__arrow:hover {
  background-color: var(--primary);
  color: white;
  transform: scale(1.1);
}

.outfit__arrow--left {
  left: -50px;
  top: 50%;
  transform: translateY(-50%);
}

.outfit__arrow--right {
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
}

.outfit__arrow:hover.outfit__arrow--left {
  transform: translateY(-50%) scale(1.1);
}

.outfit__arrow:hover.outfit__arrow--right {
  transform: translateY(-50%) scale(1.1);
}

.outfit__counter {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--fill-white);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: var(--text-body-small-size);
  color: var(--text-primary);
  border: 1px solid var(--stroke-light-gray);
  white-space: nowrap;
  z-index: 3;
}

.outfit__placeholder {
  font-size: var(--text-body-small-size);
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
  padding: 8px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  max-width: 150px;
}

/******* Udforsk *******/
#category-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  overflow-y: auto;
}

.main__category-btn {
  width: 100%;
  height: 80px;
  min-height: 50px;
  padding: 4px 32px;
  text-align: left;
  background-color: var(--primary);
  color: var(--text-invers-primary);
  cursor: pointer;
  border-radius: 6px;
  font-family: Arial-italic, sans-serif;
  font-size: 19px;
}
#subcategory-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  overflow-y: auto;
}
.main__category-btn:hover {
  background-color: var(--secondary);
}
/******** About us *******/

.blue-background {
  background-color: var(--primary);

}

.main-text-content {
  background-color: var(--primary);
  color: var(--text-invers-primary);
  height: 100%;
  padding: 0 16px;
  padding-bottom: 100px;
}

.accordion__list {
  padding-left: 24px;
  list-style-position: inside;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}
p + ul {
  margin-top: 0.7rem;
}
li + li {
  margin-top: 0.7rem;
}

.accordion__content {
  padding-left: 40px;
}

.accordion__content p {
  margin-bottom: 0;
}

.accordion__header i {
  scale: 0.5;
}
.accordion__header {
  cursor: pointer;
}

/* ========================================
   RESPONSIVE DESIGN - TABLET & DESKTOP
   ======================================== */

/* Tablet and up (768px+) */
@media (min-width: 768px) {
  /* Header adjustments */
  .header__logo img {
    max-width: 150px;
  }

  .header__top-bar {
    max-width: 1200px;
    margin: 0 auto;
  }

  /* Footer - hide on desktop or make horizontal */
  .footer__tab-bar {
    max-width: 100%;
    margin: 0 auto;
    padding-left: 64px;
    padding-right: 64px;
    gap: 0;
  }

  .footer__icon {
    width: 32px;
    height: 32px;
  }

  /* Login modal - larger on desktop */
  .login-modal__content {
    max-width: 500px;
    padding: var(--spacing-2xl);
  }

  /* Category buttons - larger on desktop */
  .main__category-btn {
    height: 100px;
    font-size: 22px;
    max-width: 800px;
    margin: 0 auto;
  }

  #category-wrapper,
  #subcategory-wrapper {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Product items - slightly larger */
  .main__product-item {
    width: 200px;
    height: 200px;
  }

  /* Outfit view - scale up for desktop */
  .outfit__dressup-container {
    width: 400px;
    height: 800px;
  }

  .outfit__clothing-slot--overdele {
    width: 250px;
    height: 250px;
  }

  .outfit__clothing-slot--underdele {
    width: 250px;
    height: 250px;
  }

  .outfit__clothing-slot--sko {
    width: 200px;
    height: 160px;
  }
}

/* Desktop and up (1024px+) */
@media (min-width: 1024px) {
  /* Make product grid use more columns */
  .main__product-wrapper,
  #product-wrapper {
    gap: var(--spacing-m);
  }

  .main__product-item {
    width: 250px;
    height: 250px;
  }

  /* About Us content width */
  .main-text-content {
    padding-left: var(--spacing-2xl);
    padding-right: var(--spacing-2xl);
  }

  /* Accordion sections - more spacing */
  .accordion {
    margin-bottom: var(--spacing-l);
  }
}

