@import url("./Variables.css");

.hidden {
    display: none;
}

/* USP list */
.usp-list {
    background: var(--title-black);
    color: var(--header-white);
    display: flex;
    flex-direction: row;
    font-size: 16px;
    line-height: 2.5em;
    font-family: var(--serif-font);
    font-style: italic;
    justify-content: space-around;
    padding: .625em 0;
}

.usp-list__item {
    display: none;
}

.usp-list__item--mobile {
    display: block;
}

@media (min-width: 768px) {
    .usp-list__item {
        display: block;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 16px;
}

.breadcrumbs__list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5em;
    font-size: .875em;
    padding: 1em;
}

.breadcrumbs__item:not(:last-child)::after {
    content: "/";
    margin-left: .25em;
}

.breadcrumbs__link {
    color: var(--stalands-gray);
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: .2em 0;
}

@media (min-width: 768px) {
    .breadcrumbs__list {
        padding: 1em 0;
    }
}

/* Accordion */
.accordion {
    display: inline-block;
    padding: 1.2em 0;
    line-height: 1.4em;
    width: 100%;
    line-height: 1.5em;
}

.accordion .accordion--secondary {
    padding: .25em 0;
}

.accordion--dark {
    color: var(--title-black);
}

.accordion--light {
    color: var(--header-white);
}

.accordion summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion summary::after {
    transition: transform 150ms ease;
    content: "";
    height: 10px;
    width: 10px;
    transform: rotate(0deg);
    background-repeat: no-repeat;
    background-image: url("/Style/svg/icons/DropdownChevron.svg");
}

.accordion--dark summary {
    border-bottom: 1px solid #000;
}

.accordion--light summary {
    border-bottom: 1px solid #fff;
}

.accordion--secondary summary {
    border-bottom: none;
}

.accordion[open] > summary::after {
    transform: rotate(-180deg);
}


.accordion summary::-webkit-details-marker {
    display: none;
}

/* Stock status */
.stock-status {
    position: relative;
    padding: .1em 0 0 16px;
    font-size: .715em;
    font-weight: 500;
}

.stock-status::before {
    width: 10px;
    height: 10px;
    border-radius: 100%;
    position: absolute;
    content: "";
    left: 0;
    top: 5px;
}

.stock-status--available::before {
    background: var(--positive);
}

.stock-status--available::before {
    background: var(--positive);
}

.stock-status--unavailable::before {
    background: var(--warning);
}

@media (min-width: 768px) {
    .stock-status {
        font-size: 1em;
    }
    .stock-status::before {
        top: 8px;
    }
}

/* Product Card */
.product-card {
    position: relative;
    font-size: 14px;
    padding: .5em 0;
    height: 100%;
    background: var(--white);
}

.product-card:hover {
    outline: 1px solid var(--header-white);
}

.product-card a {
    display: block;
    border-radius: inherit;
}

.product-card__image-container {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.product-card__image {
    border-radius: inherit;
}

.product-card__image--primary,
.product-card__image--secondary {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.product-card__image--secondary {
    display: block;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.product-card:has(.product-card__image--secondary):hover .product-card__image--primary {
    opacity: 0;
}

.product-card:has(.product-card__image--secondary):hover .product-card__image--secondary {
    opacity: 1;
}

.product-card__image-container {
    position: relative;
    max-width: 100%;
}

.product-card__image-container {
    aspect-ratio: 1/1;
    display: grid; 
    place-items: center;
    overflow: hidden;
}

.product-card__image-container img
 {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.product-card__favorite-button {
    background: transparent;
    position: absolute;
    z-index: 1;
    border: none;
    width: 24px;
    top: 10px;
    left: 6px;
    cursor: pointer;
    box-sizing: content-box;
}

.product-card__favorite-button img {
    width: 100%;
}

.product-card__choices {
    position: absolute;
    right: 1em;
    bottom: .5em;
    font-size: .715em;
}

.product-card__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 1em;
}

.product-card__manufacturer {
    color: var(--stalands-gray);
    font-weight: 600;
    line-height: 1.5em;
    /* margin: .2em 0; */
    text-transform: uppercase;
    font-size: .715em;
}

.product-card__title {
    font-size: 1em;
    line-height: 1.2em;
    height: 2.5em;
    /* font-family: var(--sans-font); */
    font-family: var(--serif-font);
    font-weight: 600;
    /* font-weight: 400; */
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card__price-and-stock {
    height: 72px;
    display: grid;
    align-content: space-between;
}

.product-card__price-and-stock.product-card__price-and-stock--out-of-stock {
    height: auto;
}

.product-card__price-container {
    margin-top: .6em;
}

.product-card__price-entries {
    margin-top: .1em;
}

.product-card__price-label {
    font-size: .715em;
    color: var(--stalands-gray);
    margin-right: .2em;
}

.product-card__price-value {
    font-size: 1em;
    color: var(--text-gray);
    font-weight: 700;
}

.product-card__price-value--discounted {
    color: var(--text-red);
}

.product-card__price-value--previous {
    color: var(--stalands-gray);
    text-decoration: line-through;
}

.product-card__stock-container {
    margin-top: 0;
}

.product-card__stock-status {
    margin-top: 1.5em;
}

@media (min-width: 768px) {
    .product-card {
        font-size: 16px;
        padding: 0;
        border-radius: 8px;
    }
    .product-card__title {
        font-size: 1.25em;
    }
    .product-card__manufacturer {
        color: var(--stalands-gray);
        font-weight: 600;
        line-height: 1.5em;
        /* margin: .2em 0; */
        text-transform: uppercase;
        font-size: 1em;
    }
    .product-card__choices {
        font-size: 1em;
    }
    .product-card__price-label {
        font-size: .875em;
    }
    .product-card__price-value {
        font-size: 1.25em;
    }
    .product-card__favorite-button {
        width: 32px;
    }
}


/* Button */
.button {
    font-size: 14px;
    padding: .9em 4em;
    border-radius: 3px;
    font-weight: 600;
}

.button--black {
    background: var(--title-black);
    color: var(--header-white);
}

.button--text {
    color: var(--stalands-gray);
}

.button--light {
    background: var(--sand);
    color: var(--title-black);
}

.button--transparent {
    border: 1px solid var(--stalands-gray);
}

.button--small {
    padding: .9em 1.2em;
}

.button--small img {
    height: 1.125em;
}

.button--disabled {
    background: var(--header-white);
    border: 1px solid var(--gray);
    cursor: not-allowed;
}

.button--black:hover {
    color: var(--header-white);
    filter: brightness(1.2);
}

/* Welcome section in pre footer */
.welcome {
    position: relative;
    width: 100%;
    padding: 1em;
    display: grid;
    place-items: center;
    font-size: 16px;
    min-height: 400px;
    margin-top: 2em;
}

.welcome__image {
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    inset: 0;
}

.welcome__backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    background: rgba(0,0,0,.8)
}

.welcome__content {
    position: relative;
    text-align: center;
    color: #fff;
    max-width: 1100px;
    font-weight: 400;
}

.welcome__content h2 {
    font-size: 2em;
    font-family: var(--serif-font);
}

.welcome--hero .welcome__content h2 {
    font-size: 3.5em;
}

.welcome__button {
    display: block;
    max-width: fit-content;
    margin: 2.5em auto 0;
}

@media (min-width: 768px) {
    .welcome--hero .welcome__content h2 {
        font-size: 5em;
    }
    .welcome--hero .welcome__content p {
        font-size: 1.5em;
    }
    .welcome__content p {
        font-size: 1.25em;
    }
    .welcome__content h2 {
        font-size: 3.5em;
    }
}

/* Newsletter */
.newsletter {
    background: var(--text-gray);
    color: var(--lt-gray);
    font-size: 16px;
}

.newsletter__content {
    padding: 3em 2em;
    font-family: var(--sans-font);
}

.newsletter__content p:not(.error) {
    font-size: 1.25em;
}

.newsletter__title {
    font-family: var(--serif-font);
    font-size: 2.5em;
}

.newsletter__form {
    display: grid;
    gap: 1em;
    margin-top: 2.5em;
}

.newsletter__input {
    background: var(--lt-gray);
    line-height: 2.25em;
    padding: .375em 1.375em;
    width: 100%;
    border: 1px solid var(--gray);
    border-radius: 3px;
}

.newsletter__button {
    width: 100%;
    font-size: .875em;
}

.newsletter__disclaimer {
    margin-top: 2em;
    font-size: .75em;
    text-align: center;
}

@media (min-width: 768px) {
    .newsletter__content {
        max-width: 600px;
        margin: auto;
    }
    .newsletter__form {
        grid-template-columns: 1fr auto;
        width: 100%;
        margin-top: 1.5em;
    }
}

/* Footer */
.footer {
    background: var(--text-gray);
    color: var(--header-white);
    font-family: var(--serif-font);
    font-size: 16px;
    padding: 4em 0;
}

.footer__column-heading {
    font-family: var(--sans-font);
    font-weight: 600;
}

.footer__columns {
    padding: 0 2em 4em;
}

.footer__columns--desktop {
    display: none;
}

.footer__column {
    margin-top: 2em;
    display: grid;
    gap: 1em;
}

.footer a.footer__link {
    color: var(--header-white);
    font-weight: 500;
    font-size: 1em;
}

.footer__icons {
    width: 100%;
}

.footer__icons-container {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    filter: grayscale(1);

}

.footer__icons-main {
    height: 40px;
    background: var(--text-gray);
    top: -30px;
    position: absolute;
}

.footer__icons-main img {
    max-height: 100%;
}

.footer__payment-icons {
    border: 1px solid var(--header-white);
    display: inline-block;
    padding: .8em 1.2em;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2em;
}

.footer__payment-icon {
    height: 45px;
}

.footer__payment-icon img {
    max-height: 100%;
}

.footer__social-icons {
    margin-top: 2em;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5em;
    justify-content: center;
    filter: grayscale(1) invert(1);
}

@media (min-width: 768px) {
    .footer__columns--mobile {
        display: none;
    }
    .footer__columns--desktop {
        display: block;
    }
    .footer__column-heading {
        font-size: 1.25em;
    }
    .footer__columns {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
    }
    .footer__icons-main {
        height: 90px;
        top: -70px;
    }
    .footer__payment-icons {
        gap: 3em;
        padding: 1.3em 2.25em;
    }
    .footer__payment-icon {
        height: 60px;
    }
}

/* Variant dropdown */
.variant-dropdown {
    position: relative;
    font-size: 16px;
}

.variant-dropdown__button {
    cursor: pointer;
    border-radius: 3px;
    border: 1px solid var(--stalands-gray);
    width: 100%;
    text-align: left;
    padding: .6em 1em;
    font-size: .875em;

    display: flex;
    align-items: center;
    gap: .5em;
}

.variant-dropdown__button-image {
    height: 30px;
    width: 30px;
    object-fit: contain;
}

.variant-dropdown__button-text {
    font-weight: 600;
    font-size: 1.0625em;
    color: var(--text-gray);
}

.variant-dropdown__button-icon {
    margin-left: auto;
}

.variant-dropdown__option-image {
    height: 64px;
    width: 64px;
    object-fit: contain;
}

.variant-dropdown__options {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid var(--gray);
    border-radius: 3px;
    padding: .6em 1em;
    font-weight: 600;
    font-size: .875em;
    z-index: 2;
    width: 100%;
    box-shadow: 0px 4px 4px 0px rgba(0,0,0,.25);

    max-height: 35dvh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.variant-dropdown__option {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: .7em;
    color: var(--text-gray);
}

.variant-dropdown__option-content-left {
    display: flex;
    flex-direction: column;
}

.variant-dropdown__option-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: .5em;
}

.variant-dropdown__option-stock-status {
    font-weight: 400;
    font-size: .875em;
    margin-top: .2em;
}

.variant-dropdown__option-stock-status::before {
    top: 5px;
}

.variant-dropdown__options--open {
    display: block;
}

.variant-dropdown__option-price {
    font-size: .75em;
}

/* Option dropdown */
.option-dropdown {
    position: relative;
    font-size: 16px;
}

/* Range slider */
.range-slider {
    width: 100%;
    padding: 1rem 0;
}

.range-slider__inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-slider__input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--stalands-gray);
    border-radius: 4px;
}

.range-slider__track-container {
    position: relative;
    flex: 1;
    height: 4px;
    background: var(--stalands-gray);
    border-radius: 2px;
}

.range-slider__track {
    position: absolute;
    height: 100%;
    background: #000;
    border-radius: 2px;
}

.range-slider__thumb {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.range-slider__thumb:hover,
.range-slider__thumb:focus {
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.1);
}

.range-slider__thumb:focus {
    outline: none;
}

/* Ensure thumbs are above track */
.range-slider__thumb--min {
    z-index: 2;
}

.range-slider__thumb--max {
    z-index: 2;
}


/* Category Sort */
.category-sort {
    position: relative;
    display: inline-block;
    font-size: 16px;
}

.category-sort__button {
    display: flex;
    align-items: center;
    font-size: .875em;
    cursor: pointer;
    border: 1px solid var(--stalands-gray);
    padding: .6em 1em;
    color: var(--text-gray);
    border-radius: 16px;
    font-weight: 500;
    gap: 1.25em;
}

.category-sort__icon-container {
    width: 1.25em;
    height: 1.25em;
    align-content: center;
}

.category-sort__icon-container img {
    width: 100%;
    height: 100%;
}

.category-sort__button img.rotate {
    transform: rotate(180deg);
}

.category-sort__close-chevron {
    width: .6em;
    height: auto;
}

.category-sort__dropdown {
    position: absolute;
    top: calc(100% + 0.5em);
    left: 0;
    width: 100%;
    background: var(--white);
    border-radius: 3px;
    box-shadow: 0 4px 4px 0 rgb(0 0 0 / 0.3);
    z-index: 50;
    outline: none;
}

.category-sort__option {
    padding: 1em;
    cursor: pointer;
    font-size: 0.875em;
}

.category-sort__option:hover,
.category-sort__option--focused {
    background-color: var(--sand);
}

.category-sort__option--focused {
    text-decoration: underline;
}

.category-sort__option--selected {
    background-color: var(--sand);
    font-weight: 600;
}

.category-sort__option:first-child {
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.category-sort__option:last-child {
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
} 

/* Product listing small / Related products */
.related-products {
    font-size: 16px;
    margin-top: 4em;
}

.related-products__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.related-products .page-heading {
    margin: 0 1em;
}

@media (min-width: 768px) {
    .related-products {
        padding: 0;
    }
    .related-products .products-block__list {
        grid-template-columns: repeat(3, 1fr);
        padding: 1em;
    }
}

/* Price Display Component */
.price-display__entries {
    margin-top: .1em;
    white-space: nowrap;
}

.price-display__label {
    font-size: .715em;
    color: var(--stalands-gray);
    margin-right: .2em;
    white-space: nowrap;
}

.price-display__value {
    font-size: 1em;
    color: var(--text-gray);
    font-weight: 700;
    white-space: nowrap;
}

.price-display__value--discounted {
    color: var(--text-red);
}

.price-display__value--previous {
    color: var(--stalands-gray);
    text-decoration: line-through;
    font-weight: 400;
}

@media (min-width: 768px) {
    .price-display__label {
        font-size: .875em;
    }
    .price-display__value {
        font-size: 1.25em;
    }
}