/* Product cards (Views/Shared/_ProductCard.cshtml): tags under the name, favourite bookmark, tag filter chips. */

/* Tags: sizes / colours as one quiet line, separated by thin rules */
.card-1 .card-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    row-gap: 4px;
    min-height: 1.3em;
    opacity: .55;
}

.card-tag + .card-tag::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: .9em;
    margin: 0 max(8px, 12rem);
    vertical-align: -.1em;
    background-color: currentColor;
    opacity: .5;
}

/* Favourite bookmark is a button now; keep the template look */
.card-1 .card-label {
    appearance: none;
    border: 0;
    margin: 0;
    background: none;
    font: inherit;
}

.card-1 .card-label:focus-visible {
    outline: 1px solid var(--c1);
    outline-offset: -6px;
}

.card-1 .card-label.active {
    color: var(--c1);
    opacity: 1;
    transform: none;
}

/* Touch screens have no hover, so the bookmark stays visible */
@media (hover: none) {
    .card-1 .card-label:not(.active) {
        opacity: .4;
        transform: none;
    }
}

@media screen and (max-width: 1023.98px) {
    .card-1 .card-label {
        display: inline-flex;
    }
}

/* Tag filter (toolbar > ETİKETLER) */
.tag-filter {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: max(8px, 10rem);
    margin: max(24px, 40rem) 0 max(30px, 50rem);
    padding: 0 10px 18px 0;
    list-style: none;
    /* Many sizes (Duratiles has hundreds): the list scrolls instead of running off the screen. */
    max-height: min(46vh, 360px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--c3) transparent;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
}

.tag-filter::-webkit-scrollbar {
    width: 4px;
}

.tag-filter::-webkit-scrollbar-thumb {
    background: var(--c3);
    border-radius: 4px;
}

.tag-filter:hover::-webkit-scrollbar-thumb {
    background: var(--c2);
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: max(8px, 10rem) max(14px, 20rem);
    border: var(--sl, 1px) solid var(--c3);
    border-radius: 999px;
    font-size: var(--f-xs);
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1;
    transition: border-color .3s, background-color .3s, color .3s;
}

.tag-chip:hover {
    border-color: var(--c1);
}

.tag-chip.active {
    background-color: var(--c1);
    border-color: var(--c1);
    color: var(--c0);
}

/* Favourites page */
.fav-pool {
    display: none;
}

.fav-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px 24px;
    padding-bottom: max(18px, 26rem);
}

/* Collections: cover of the first four products, name and count; scrolls sideways when there are many */
.fav-cols {
    display: flex;
    gap: max(14px, 22rem);
    overflow-x: auto;
    padding: 4px 2px max(26px, 40rem);
    margin-bottom: max(26px, 36rem);
    border-bottom: var(--sl) solid var(--c3);
    scrollbar-width: thin;
}

.fav-col {
    flex: none;
    width: max(132px, 168rem);
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: var(--c1);
    text-align: left;
    cursor: pointer;
}

.fav-col-cover {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--c3);
    outline: 1px solid transparent;
    outline-offset: 4px;
    transition: outline-color .25s, opacity .25s;
}

.fav-col-cover span {
    background-color: #d6d5d1;
    overflow: hidden;
}

.fav-col-cover.is-single span:first-child {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}

.fav-col-cover.is-single span:not(:first-child) {
    display: none;
}

.fav-col-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .8s ease;
}

.fav-col:hover .fav-col-cover img {
    transform: scale(1.05);
}

.fav-col.is-active .fav-col-cover {
    outline-color: var(--c1);
}

.fav-col:not(.is-active) .fav-col-cover {
    opacity: .85;
}

.fav-col-name {
    display: block;
    margin-top: 12px;
    font-size: var(--f-s);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fav-col.is-active .fav-col-name {
    font-weight: 500;
}

.fav-col-count {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .5;
}

.fav-col-new .fav-col-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px dashed rgba(22, 22, 1, .35);
    opacity: 1;
}

.fav-col-new .fav-col-cover svg {
    fill: none;
    opacity: .6;
    transition: opacity .25s, transform .25s;
}

.fav-col-new:hover .fav-col-cover svg {
    opacity: 1;
    transform: scale(1.06);
}

/* Heading of the list on screen */
.fav-heading {
    display: flex;
    align-items: baseline;
    gap: 16px;
    min-width: 0;
}

.fav-title {
    font-size: var(--f-l);
    line-height: 1.05;
    font-weight: 400;
}

.fav-link {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: var(--f-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c1);
    opacity: .6;
    cursor: pointer;
}

.fav-link:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.fav-link[hidden] {
    display: none;
}

.fav-empty {
    padding: max(30px, 50rem) 0;
    text-align: center;
    font-size: var(--f-s);
    opacity: .7;
}

.fav-empty-icon {
    display: inline-block;
    padding: 0 2px;
    font-size: 1.1em;
}

/* "+" on a card: add the product to collections */
.fav-add-col {
    position: absolute;
    top: max(10px, 14rem);
    right: max(10px, 14rem);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    appearance: none;
    border: 0;
    border-radius: 50%;
    background-color: rgba(229, 229, 226, .92);
    color: var(--c1);
    cursor: pointer;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .25s, transform .25s, background-color .25s;
}

.fav-add-col svg {
    fill: none;
}

.card-1:hover .fav-add-col,
.fav-add-col:focus-visible {
    opacity: 1;
    transform: none;
}

.fav-add-col:hover {
    background-color: var(--c0);
}

@media (hover: none) {
    .fav-add-col {
        opacity: 1;
        transform: none;
    }
}

.card-1 .card-header {
    position: relative;
}

/* Dragging a favourite card onto a collection tile */
.fav-col {
    position: relative;
}

.fav-col-drop {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    aspect-ratio: 1 / 1;
    border: 1px dashed transparent;
    pointer-events: none;
    transition: border-color .2s, background-color .2s;
}

html.fav-dragging .fav-col .fav-col-drop {
    border-color: rgba(22, 22, 1, .35);
}

html.fav-dragging .fav-col.is-active .fav-col-drop {
    border-color: transparent;
}

.fav-col.is-over .fav-col-drop {
    border: 2px solid var(--c1);
    background-color: rgba(229, 229, 226, .45);
}

.fav-col.is-over .fav-col-cover {
    transform: scale(.96);
}

.fav-col-cover {
    transition: outline-color .25s, opacity .25s, transform .2s;
}

.fav-col.is-dropped .fav-col-cover {
    animation: fav-dropped .6s ease;
}

@keyframes fav-dropped {
    40% { transform: scale(1.06); }
}

#favorites-grid .s3-2[draggable="true"] {
    cursor: grab;
}

#favorites-grid .s3-2.is-dragging {
    opacity: .35;
}

.shared-name {
    font-size: var(--f-l);
    line-height: 1.05;
    font-weight: 400;
}

@media screen and (max-width: 767.98px) {
    .fav-heading {
        flex-wrap: wrap;
        gap: 4px 12px;
    }

    .fav-actions {
        flex-wrap: wrap;
        gap: 12px 18px;
    }
}

.fav-count {
    font-size: var(--f-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .55;
}

.fav-clear {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: var(--f-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c1);
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.fav-clear:hover {
    opacity: .6;
}

.fav-actions {
    display: flex;
    align-items: baseline;
    gap: max(18px, 30rem);
}

/* Share button + menu ("Dosya paylaş" / "URL paylaş") */
.fav-share {
    position: relative;
}

.fav-share-toggle {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: inherit;
    font-size: var(--f-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c1);
    cursor: pointer;
}

.fav-share-toggle svg {
    transform: translateY(-1px);
}

.fav-share-toggle:hover span,
.fav-share-toggle[aria-expanded="true"] span {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.fav-share-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    z-index: 20;
    width: max(260px, 300rem);
    padding: 6px 0;
    background-color: var(--c0);
    box-shadow: inset 0 0 0 var(--sl, 1px) var(--c3), 0 14px 34px rgba(22, 22, 1, .12);
    animation: fav-menu .18s ease both;
}

.fav-share-menu[hidden] {
    display: none;
}

@keyframes fav-menu {
    from { opacity: 0; transform: translateY(-6px); }
}

.fav-share-menu button {
    appearance: none;
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: center;
    gap: 14px;
    width: 100%;
    border: 0;
    background: none;
    padding: 12px 18px;
    text-align: left;
    font: inherit;
    color: var(--c1);
    cursor: pointer;
}

.fav-share-menu button + button {
    border-top: var(--sl, 1px) solid var(--c3);
}

.fav-share-menu button:hover,
.fav-share-menu button:focus-visible {
    background-color: rgba(22, 22, 1, .05);
    outline: 0;
}

/* The site sets svg { fill: currentColor }: these are line icons */
.fav-share-toggle svg,
.fav-share-icon {
    fill: none;
}

.fav-share-icon {
    width: 32px;
    height: 32px;
    opacity: .75;
    transition: opacity .25s, transform .25s;
}

.fav-share-menu button:hover .fav-share-icon,
.fav-share-menu button:focus-visible .fav-share-icon {
    opacity: 1;
    transform: translateX(2px);
}

.fav-share-menu b {
    display: block;
    font-weight: 400;
    font-size: var(--f-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.fav-share-menu small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    opacity: .6;
}

/* Shared list page */
.shared-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: max(16px, 22rem);
    padding-bottom: max(24px, 34rem);
}

.shared-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
}

.shared-note {
    font-size: var(--f-s);
    opacity: .75;
}

.shared-add {
    min-width: 220px;
}

.shared-add[disabled] {
    opacity: .7;
    cursor: default;
}

.shared-go {
    font-size: var(--f-s);
}

/* Page numbers under long product lists (Views/Shared/_Pager.cshtml) */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: max(16px, 30rem);
    padding: max(36px, 60rem) 0 max(10px, 20rem);
}

.pager-pages {
    display: flex;
    align-items: baseline;
    gap: max(10px, 18rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.pager-page {
    display: inline-block;
    font-size: var(--f-m);
    line-height: 1;
    opacity: .4;
    transition: opacity .3s;
}

.pager-page:hover {
    opacity: 1;
}

.pager-page.is-current {
    opacity: 1;
    font-family: var(--altfontitalic);
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

.pager-gap {
    opacity: .4;
}

.pager-step {
    font-size: var(--f-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.pager-step.is-disabled {
    opacity: .25;
}

/* Search result line above the product grid */
.search-result {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: max(18px, 26rem) 0;
    font-size: var(--f-s);
}

.shared-section {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: max(30px, 50rem) 0 max(16px, 22rem);
}

/* "Tüm favoriler" grouped by collection */
.fav-group + .fav-group {
    margin-top: max(36px, 56rem);
}

.fav-group-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    padding-bottom: max(14px, 20rem);
}

.fav-group-title {
    font-size: var(--f-m);
    line-height: 1.1;
    font-weight: 400;
}

.fav-group-head .fav-link {
    margin-left: auto;
}

/* An option (size / colour) of a series saved on its own */
.card-variant-mark {
    position: absolute;
    top: max(10px, 14rem);
    left: max(10px, 14rem);
    z-index: 2;
    padding: 5px 9px;
    background-color: rgba(229, 229, 226, .92);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* ---------- "Ürün" look: products shown whole; the ambience picture first, the product on hover ---------- */
.s3-2.is-product .card-image .card-product {
    padding: 8%;
    box-sizing: border-box;
    transition: opacity .5s ease, transform .6s ease;
}

.s3-2.is-product.has-showcase .card-image .card-product {
    opacity: 0;
    transform: scale(.96);
    background-color: var(--c0);
}

.s3-2.is-product .card-image .card-showcase {
    transition: opacity .5s ease, transform 1.2s ease;
}

@media (hover: hover) {
    .s3-2.is-product.has-showcase:hover .card-image .card-product {
        opacity: 1;
        transform: none;
    }

    .s3-2.is-product.has-showcase:hover .card-image .card-showcase {
        transform: scale(1.04);
    }
}
