/* ==========================================================================
   Qemmah — Shared premium sections
   Section headers, the gold CTA gloss and the glossy product / star-shop
   cards, shared by the home page and the inner pages (product, store,
   listings …). Scoped to .qm-sections: add it to a page wrapper together
   with qm-{locale}, and load this file from the page.
   ========================================================================== */

.qm-sections {
    /* shared tokens (--qm-gold-*, --qm-ease, --qm-gloss-gold …) come from premium.css */
    --qm-card-radius: 18px;
    --qm-shadow-card: 0 1px 0 rgba(255, 255, 255, .9) inset,
                      0 2px 6px -2px rgba(58, 34, 25, .08),
                      0 18px 40px -22px rgba(58, 34, 25, .35);
    --qm-shadow-card-hover: 0 1px 0 rgba(255, 255, 255, .9) inset,
                            0 4px 12px -4px rgba(58, 34, 25, .12),
                            0 30px 60px -28px rgba(107, 62, 46, .55),
                            0 0 0 1px rgba(199, 154, 114, .35);
}

/* --------------------------------------------------------------------------
   1. Sweep shine — .qm-shine and its keyframes live in premium.css;
      here the same sweep is applied to the existing .btn-primary CTAs.
   -------------------------------------------------------------------------- */

.qm-sections .btn-primary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.qm-sections .btn-primary::after {
    content: "";
    position: absolute;
    top: -20%;
    bottom: -20%;
    left: 0;
    width: 45%;
    background: linear-gradient(100deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .15) 30%,
        rgba(255, 255, 255, .75) 50%,
        rgba(255, 255, 255, .15) 70%,
        rgba(255, 255, 255, 0) 100%);
    transform: translateX(-180%) skewX(-22deg);
    animation: qm-sweep 3.8s cubic-bezier(.45, 0, .2, 1) infinite;
    pointer-events: none;
    z-index: 1;
}

.qm-sections .btn-primary:hover::after,
.qm-sections .btn-primary:focus-visible::after {
    animation: qm-sweep-fast .9s cubic-bezier(.45, 0, .2, 1) infinite;
}

/* --------------------------------------------------------------------------
   2. Glossy buttons — .qm-btn, .qm-btn--gold and .qm-btn--glass live in
      premium.css; the existing .btn-primary CTAs get the same gold finish.
   -------------------------------------------------------------------------- */

.qm-sections .btn-primary {
    color: #fff !important;
    background: var(--qm-gloss-gold) !important;
    text-shadow: 0 1px 1px rgba(58, 34, 25, .35);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .65),
        inset 0 -3px 8px rgba(58, 34, 25, .28),
        0 10px 24px -10px rgba(107, 62, 46, .7);
}

.qm-sections .btn-primary:hover {
    filter: brightness(1.06) saturate(1.05);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .75),
        inset 0 -3px 8px rgba(58, 34, 25, .25),
        0 16px 34px -12px rgba(107, 62, 46, .8);
}

/* "Show all" section buttons → glossy pills */
.qm-sections .btn-shortcut.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0 !important;
    border-radius: 999px !important;
    padding: 10px 20px !important;
    font-size: 14px;
    line-height: 1.2;
    transition: transform .35s var(--qm-ease), box-shadow .35s var(--qm-ease), filter .35s;
}

.qm-sections .btn-shortcut.btn-primary:hover { transform: translateY(-2px); }

.qm-sections .btn-primary i {
    margin: 0 !important;
    font-size: 11px;
    transition: transform .35s var(--qm-ease);
}

.qm-sections .btn-primary:hover i { transform: translateX(-4px); }
.qm-sections.qm-en .btn-primary:hover i { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   4. Section headers
   -------------------------------------------------------------------------- */

.qm-sections .qimma_sec { padding-top: 48px; }

.qm-sections .qimma_header { align-items: flex-end; margin-bottom: 8px; }

.qm-sections .qimma_title {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
    padding-bottom: 14px;
    font-size: clamp(22px, 2.3vw, 32px);
    font-weight: 800;
    background: linear-gradient(90deg, #2b1a14 0%, #6b3e2e 45%, #a1785c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qm-sections:not(.qm-en) .qimma_title {
    background-image: linear-gradient(270deg, #2b1a14 0%, #6b3e2e 45%, #a1785c 100%);
}

.qm-sections .qimma_title::after {
    content: "";
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 64px;
    height: 4px;
    border-radius: 4px;
    background: var(--qm-gloss-gold);
    box-shadow: 0 3px 12px rgba(161, 120, 92, .55);
}

.qm-sections .qimma_title::before {
    content: "";
    position: absolute;
    bottom: 1px;
    inset-inline-start: 72px;
    width: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--qm-gold-3);
}

/* --------------------------------------------------------------------------
   5. Glossy cards (products + star shops)
   -------------------------------------------------------------------------- */

/* room for the hover lift inside the carousels */
.qm-sections .owl-carousel .owl-stage-outer { padding: 14px 0 30px; margin: -14px 0 -30px; }

.qm-sections .small_component {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fdfaf7 100%) !important;
    border: 1px solid rgba(161, 120, 92, .14) !important;
    border-radius: var(--qm-card-radius) !important;
    box-shadow: var(--qm-shadow-card) !important;
    transition: transform .5s var(--qm-ease), box-shadow .5s var(--qm-ease);
}

.qm-sections .clickable_div:hover .small_component {
    transform: translateY(-8px);
    box-shadow: var(--qm-shadow-card-hover) !important;
}

.qm-sections .small_component_image {
    position: relative;
    border-radius: var(--qm-card-radius) var(--qm-card-radius) 0 0;
}

.qm-sections .small_component_image img {
    transition: transform .9s var(--qm-ease), opacity .4s;
}

.qm-sections .clickable_div:hover .small_component_image img { transform: scale(1.06); }

/* glass reflection that glides over the photo on hover */
.qm-sections .small_component_image::after,
.qm-sections .rounded-famous::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, .45) 50%, rgba(255, 255, 255, 0) 65%);
    transform: translateX(-120%);
    transition: transform 1s var(--qm-ease);
    pointer-events: none;
}

.qm-sections .clickable_div:hover .small_component_image::after,
.qm-sections .clickable_div:hover .rounded-famous::after { transform: translateX(120%); }

/* static top gloss on the photo */
.qm-sections .thumbnail_holder { position: relative; }
.qm-sections .thumbnail_holder::before {
    content: "";
    position: absolute;
    inset: 0 0 60% 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.qm-sections .small_component_text h2 { font-size: 16px; }
.qm-sections .small_component_text .different_color { font-size: 18px; font-weight: 800; }
.qm-sections .small_component_line { opacity: .25; }

.qm-sections .small_component_fashion_image img {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(199, 154, 114, .55);
}

/* badge chips on the photo */
.qm-sections .tag_exlusive,
.qm-sections .tag_most_sold {
    border-radius: 999px !important;
    padding: 5px 12px !important;
    font-size: 12px;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -6px rgba(0, 0, 0, .45);
}

.qm-sections .tag_exlusive {
    background: linear-gradient(180deg, #8e2a93 0%, #711a75 55%, #561259 100%) !important;
}

/* Qimma stars: designer cards (qm-star-card) */
.qm-sections .qm-star-carousel .owl-stage { display: flex; }
.qm-sections .qm-star-carousel .owl-item { display: flex; }
.qm-sections .qm-star-carousel .owl-item > .item { display: flex; width: 100%; }

.qm-sections .qm-star {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(161, 120, 92, .14);
    border-radius: 18px;
    box-shadow: var(--qm-shadow-card);
    transition: transform .5s var(--qm-ease), box-shadow .5s var(--qm-ease);
}

.qm-sections .qm-star:hover {
    transform: translateY(-6px);
    box-shadow: var(--qm-shadow-card-hover);
}

/* cover band: the logo blurred into a warm wash */
.qm-sections .qm-star__cover {
    position: relative;
    display: block;
    width: 100%;
    height: 78px;
    background-color: #eadbcc;
    background-size: cover;
    background-position: center;
    filter: blur(14px) saturate(1.2);
    transform: scale(1.35);
}

.qm-sections .qm-star__cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(58, 34, 25, .15), rgba(161, 120, 92, .35));
}

/* thin gold edge under the cover (drawn on the card, not the blurred layer) */
.qm-sections .qm-star::before {
    content: "";
    position: absolute;
    top: 78px;
    inset-inline: 0;
    height: 2px;
    z-index: 1;
    background: linear-gradient(90deg, transparent, var(--qm-gold-3), transparent);
}

.qm-sections .qm-star__crown {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 11px;
    color: #fff;
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 50%),
        var(--qm-gloss-gold);
    box-shadow: 0 4px 10px -4px rgba(107, 62, 46, .7);
}

/* round logo avatar with a gold ring, overlapping the cover */
.qm-sections .qm-star__avatar {
    position: relative;
    z-index: 2;
    display: block;
    width: 96px;
    height: 96px;
    margin-top: -48px;
    padding: 3px;
    border-radius: 50%;
    background: conic-gradient(from 210deg, #f6e3c8, #c79a72, #a1785c, #e2c19c, #f6e3c8);
    box-shadow: 0 10px 22px -12px rgba(58, 34, 25, .6);
    transition: transform .5s var(--qm-ease);
}

.qm-sections .qm-star:hover .qm-star__avatar { transform: scale(1.05); }

.qm-sections .qm-star .qm-star__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    background: #fff;
}

.qm-sections .qm-star__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 12px 14px;
}

.qm-sections .qm-star__name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 800;
    color: var(--qm-ink);
}

.qm-sections .qm-star__meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.qm-sections .qm-star img.qm-star__flag { width: 22px; height: auto; }

.qm-sections .qm-star__rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #6b5a52;
    background: #fbf4ec;
    box-shadow: inset 0 0 0 1px rgba(161, 120, 92, .18);
}

.qm-sections .qm-star__rating i { font-size: 10px; color: #f4b400; }

.qm-sections .qm-star__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    padding-top: 10px;
    width: 100%;
    justify-content: center;
    border-top: 1px solid rgba(161, 120, 92, .1);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--qm-gold-4);
    transition: color .25s, gap .3s var(--qm-ease);
}

.qm-sections .qm-star:hover .qm-star__cta { color: var(--qm-brown); gap: 10px; }
.qm-sections .qm-star__cta i { font-size: 11px; }

@media (max-width: 575px) {
    .qm-sections .qm-star__avatar { width: 78px; height: 78px; margin-top: -39px; }
    .qm-sections .qm-star__name { font-size: 13.5px; }
}

/* --------------------------------------------------------------------------
   5b. Product card (qm-product-card) — exclusive / discount / best-selling rows
   -------------------------------------------------------------------------- */

/* equal-height cards across a carousel row */
.qm-sections .qm-product-carousel .owl-stage { display: flex; }
.qm-sections .qm-product-carousel .owl-item { display: flex; }
.qm-sections .qm-product-carousel .owl-item > .item { display: flex; width: 100%; }

.qm-sections .qm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(161, 120, 92, .14);
    border-radius: 16px;
    box-shadow: var(--qm-shadow-card);
    transition: transform .5s var(--qm-ease), box-shadow .5s var(--qm-ease);
}

.qm-sections .qm-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--qm-shadow-card-hover);
}

/* image */
.qm-sections .qm-card__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #f3ece5;
}

.qm-sections .qm-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .9s var(--qm-ease);
}

.qm-sections .qm-card:hover .qm-card__media img { transform: scale(1.06); }

/* missing photo: the brand mark on warm cream instead of a grey "no photo" image */
.qm-sections .qm-card__media.is-empty { background: radial-gradient(circle at 50% 42%, #fdf9f4 0%, #efe3d6 100%); }
.qm-sections .qm-card__media.is-empty img { opacity: 0; }

.qm-sections .qm-card__media.is-empty::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../images/system/favicon-192.png") center 46% / 30% no-repeat;
    opacity: .22;
    filter: grayscale(.2);
}

/* glass reflection gliding over the photo on hover */
.qm-sections .qm-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, .42) 50%, rgba(255, 255, 255, 0) 65%);
    transform: translateX(-120%);
    transition: transform 1s var(--qm-ease);
    pointer-events: none;
}

.qm-sections .qm-card:hover .qm-card__media::after { transform: translateX(120%); }

/* badges (start corner) */
.qm-sections .qm-card__badges {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    pointer-events: none;
}

.qm-sections .qm-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -6px rgba(0, 0, 0, .45);
}

.qm-sections .qm-badge--exclusive { background: linear-gradient(180deg, #8e2a93 0%, #711a75 55%, #561259 100%); }
.qm-sections .qm-badge--best { background: var(--qm-gloss-gold); text-shadow: 0 1px 1px rgba(58, 34, 25, .35); }
.qm-sections .qm-badge--discount { background: linear-gradient(180deg, #ff6b6b 0%, #e63946 55%, #c1121f 100%); direction: ltr; }

/* favourite (end corner) */
.qm-sections .qm-card__love {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 6px 14px -8px rgba(58, 34, 25, .55);
    transition: transform .3s var(--qm-ease);
}

.qm-sections .qm-card__love:hover { transform: scale(1.08); }
.qm-sections .qm-card__love svg { width: 18px; height: 18px; }

/* text */
.qm-sections .qm-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px 10px;
}

.qm-sections .qm-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(2 * 1.45em); /* two lines, so every price sits on the same line */
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--qm-ink);
    text-decoration: none;
    transition: color .25s;
}

.qm-sections .qm-card__title:hover { color: var(--qm-brown); }

.qm-sections .qm-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    min-height: 26px;
}

/* quick add to cart, at the end of the price row */
.qm-sections .qm-card__cart {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-inline-start: auto;
    padding: 0;
    align-self: center;
    border: 0;
    border-radius: 50%;
    color: #3a2219;
    background: var(--qm-gloss-gold);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 16px -10px rgba(58, 34, 25, .7);
    cursor: pointer;
    transition: transform .25s var(--qm-ease), box-shadow .25s;
}
.qm-sections .qm-card__cart i { font-size: 15px; }
.qm-sections .qm-card__cart:hover { transform: translateY(-1px) scale(1.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 12px 20px -10px rgba(58, 34, 25, .75); }
.qm-sections .qm-card__cart.loading { opacity: .6; pointer-events: none; }
.qm-sections .qm-card__cart.is-soldout,
.qm-sections .qm-card__cart:disabled { color: #9c8a7e; background: #f1e9e1; box-shadow: none; cursor: not-allowed; transform: none; }

.qm-sections .qm-price {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    color: #3a2219;
    white-space: nowrap;
}

.qm-sections .qm-price--sale { color: #c1121f; }

.qm-sections .qm-price--old {
    font-size: 12.5px;
    font-weight: 600;
    color: #a89a92;
    text-decoration-thickness: 1px;
}

/* designer row, pinned to the bottom of the card */
.qm-sections .qm-card__shop {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 9px 12px;
    border-top: 1px solid rgba(161, 120, 92, .1);
    background: #fcf9f6;
    color: #6b5a52;
    text-decoration: none;
    font-size: 12px;
    transition: background .25s;
}

.qm-sections .qm-card__shop:hover { background: #f8f0e8; }

/* img. raises specificity above owl's `.owl-carousel .owl-item img { width: 100% }` (English build) */
.qm-sections .qm-card img.qm-card__shop-logo {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba(199, 154, 114, .45);
}

.qm-sections .qm-card__shop-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 700;
    color: #3a2219;
}

.qm-sections .qm-card__rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    font-weight: 700;
    color: #6b5a52;
}

.qm-sections .qm-card__rating i { font-size: 10px; color: #f4b400; }

.qm-sections .qm-card img.qm-card__flag { flex: 0 0 auto; width: 20px; height: auto; }

@media (max-width: 575px) {
    .qm-sections .qm-card__title { font-size: 13px; }
    .qm-sections .qm-price { font-size: 15px; }
    .qm-sections .qm-card__rating { display: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* section headers on tablets / phones: title and "show all" pill share one
   centred line (wrapping neatly when both are long) */
@media (max-width: 991px) {
    .qm-sections .qimma_header {
        display: flex; /* media.css switches it to block on small screens */
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px 16px;
        margin-bottom: 22px;
    }
    .qm-sections .qimma_header .qimma_title { margin-bottom: 0; }
    .qm-sections .qimma_header .btn-shortcut { margin: 0 !important; } /* beats Bootstrap's mb-4 !important */
}

@media (max-width: 575px) {
    .qm-sections .qimma_sec { padding-top: 32px; }
    .qm-sections .btn-shortcut.btn-primary { padding: 7px 12px !important; font-size: 11.5px; }
    .qm-sections .qimma_header .qimma_title { font-size: 21px; padding-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .qm-sections *,
    .qm-sections *::before,
    .qm-sections *::after {
        animation: none !important;
        transition: none !important;
    }
}
