/* Adds a two-image hover crossfade + a quiet "Shop Now" quick action to the
   homepage "Statement Jewellery" / "most loved" (featured_collection) product
   tiles. Card layout, typography, price and equal-height rules for this exact
   section already live in assets/css/homepage-redesign.css under its
   .uj-cat-grid block — this file only adds what didn't exist there yet, and
   stays scoped to .uj-statement-card so it never touches other card types
   (e.g. the mood_grid "gifting" cards) that share the same base
   .card-wrapper / .card--standard markup.

   Selectors below that override a homepage-redesign.css rule repeat the same
   number of class steps as the original (e.g. ".uj-statement-card .card__content
   .price .price-item--regular" mirrors ".uj-cat-grid .card__content .price
   .price-item--regular") so specificity ties and this file — loaded later,
   inline inside the section — wins on source order alone. */

/* Ivory bordered panel: the photo sits inset within it rather than running
   edge-to-edge, echoing a framed keepsake card. */
.uj-statement-card {
    position: relative;
    background: linear-gradient(180deg, #fffbf2 0%, #faf6ef 100%);
    border: 1px solid rgba(184, 134, 11, 0.22);
    border-radius: 20px;
    padding: .9rem .9rem 1.7rem;
    box-shadow: 0 10px 26px -18px rgba(43, 36, 29, .3);
    transition: box-shadow .45s cubic-bezier(.22, 1, .36, 1), border-color .45s ease;
}

.uj-statement-card:hover {
    border-color: rgba(184, 134, 11, 0.45);
    box-shadow:
        0 26px 44px -22px rgba(43, 36, 29, .4),
        0 14px 30px -18px rgba(184, 134, 11, .28);
}

/* Thin gold hairline that widens in from the centre on hover — a quiet
   "unveiling" cue instead of a static decoration. */
.uj-statement-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 44%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a227, transparent);
    transform: translateX(-50%) scaleX(0);
    transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}

.uj-statement-card:hover::before { transform: translateX(-50%) scaleX(1); }

.uj-statement-card .card__inner { border-radius: 12px; }

.uj-statement-card .card__content { padding-top: 1.3rem; text-align: center; }

.uj-statement-card__flourish {
    display: inline-flex;
    vertical-align: -3px;
    margin-left: .4rem;
    color: #b8860b;
}

.uj-statement-card__flourish svg { width: 15px; height: 15px; }

.uj-statement-card__caption {
    margin: .3rem 0 0;
    font-size: 1rem;
    font-variant: small-caps;
    font-weight: 600;
    letter-spacing: .04em;
    color: #2b241d;
}

.uj-statement-card__tagline {
    margin: .35rem 0 0;
    font-size: .78rem;
    font-style: italic;
    color: rgba(43, 36, 29, .6);
}

/* Slim gold divider ahead of the price, standing in for the framed card's
   "closing line" — same restrained gold as the flourish, so the eye reads
   name -> tagline -> price as one deliberate sequence rather than a stack. */
.uj-statement-card .card-information {
    position: relative;
    margin-top: .9rem !important;
    padding-top: .8rem;
}

.uj-statement-card .card-information::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    width: 30px;
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(184, 134, 11, .55), transparent);
}

.uj-statement-card .card__content .price .price-item--regular {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: #2b241d;
}

.uj-statement-card__media { position: relative; overflow: hidden; }

/* Fine corner marks that frame the photo like a loupe mark on a gem —
   hidden at rest, drawn in on hover so the card feels inspected rather than
   just enlarged. */
.uj-statement-card__media::before,
.uj-statement-card__media::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    opacity: 0;
    z-index: 1;
    transition: opacity .4s ease, transform .4s ease;
    pointer-events: none;
}

.uj-statement-card__media::before {
    top: 10px;
    left: 10px;
    border-top: 1.5px solid rgba(255, 255, 255, .85);
    border-left: 1.5px solid rgba(255, 255, 255, .85);
    transform: translate(6px, 6px);
}

.uj-statement-card__media::after {
    bottom: 10px;
    right: 10px;
    border-bottom: 1.5px solid rgba(255, 255, 255, .85);
    border-right: 1.5px solid rgba(255, 255, 255, .85);
    transform: translate(-6px, -6px);
}

.uj-statement-card:hover .uj-statement-card__media::before,
.uj-statement-card:hover .uj-statement-card__media::after {
    opacity: 1;
    transform: translate(0, 0);
}

.uj-statement-card__media-link {
    display: block;
    position: relative;
    height: 100%;
}

/* Soft diagonal sheen sweeping across the photo on hover, echoing light
   catching a polished piece. It's a real span (not a pseudo-element) so it
   sits between .media and the "Shop Now" pill in source order, painting
   above the photo but below the pill without needing a z-index fight. */
.uj-statement-card__media-sheen {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .32) 50%, transparent 58%);
    transform: translateX(-130%);
    transition: transform .9s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
}

.uj-statement-card:hover .uj-statement-card__media-sheen { transform: translateX(130%); }

.uj-statement-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uj-statement-card__img--alt {
    opacity: 0;
    transition: opacity .6s cubic-bezier(.22, 1, .36, 1);
}

/* Only fade the primary image out when it's immediately followed by a hover
   image sibling — otherwise (no image2 uploaded yet) hovering would fade
   the only photo to nothing. */
.uj-statement-card:hover .uj-statement-card__img--main:has(+ .uj-statement-card__img--alt) { opacity: 0; }
.uj-statement-card:hover .uj-statement-card__img--alt { opacity: 1; }

.uj-statement-card__shop {
    position: absolute;
    left: 50%;
    bottom: 1.1rem;
    transform: translate(-50%, 10px);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, .96);
    color: #2b241d;
    border: 1px solid rgba(184, 134, 11, .4);
    padding: .55rem 1.1rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    opacity: 0;
    box-shadow: 0 8px 18px -8px rgba(43, 36, 29, .4);
    transition: opacity .3s ease, transform .3s ease, background .25s ease, color .2s ease, border-color .25s ease;
    white-space: nowrap;
    z-index: 2;
}

.uj-statement-card__shop svg { width: 13px; height: 13px; }

.uj-statement-card:hover .uj-statement-card__shop {
    opacity: 1;
    transform: translate(-50%, 0);
}

.uj-statement-card__media-link:hover .uj-statement-card__shop {
    background: linear-gradient(135deg, #c9a227, #8a6508);
    color: #fff;
    border-color: #8a6508;
}

/* ==========================================================================
   Responsive Layout for Statement Jewellery Section
   ========================================================================== */

/* Make this section manage its own grid at every width so the theme's
   default flex/grid math does not leak through on phones and tablets. */
.uj-cat-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 1.4rem !important;
    column-gap: 1.2rem !important;
}

.uj-cat-grid .grid__item {
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
}

/* Mobile phones and small tablets: one card per row keeps the tile
   readable and prevents the image/content from feeling squeezed. */
@media screen and (max-width: 749px) {
    .uj-cat-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        row-gap: 1.25rem !important;
        column-gap: 1.25rem !important;
    }

    .uj-statement-card {
        padding: 0.6rem 0.6rem 1.2rem;
        border-radius: 14px;
    }

    .uj-statement-card .card__content {
        padding-top: 0.9rem;
    }

    .uj-statement-card__caption {
        font-size: 0.85rem;
    }

    .uj-statement-card__tagline {
        font-size: 0.7rem;
    }

    .uj-statement-card .card__content .price .price-item--regular {
        font-size: 0.9rem;
    }

    .uj-statement-card__shop {
        padding: 0.45rem 0.9rem;
        font-size: 0.65rem;
        bottom: 0.8rem;
    }

    .uj-statement-card__media::before,
    .uj-statement-card__media::after {
        width: 14px;
        height: 14px;
    }

    .uj-statement-card__media::before {
        top: 6px;
        left: 6px;
    }

    .uj-statement-card__media::after {
        bottom: 6px;
        right: 6px;
    }

    .uj-statement-card__flourish svg {
        width: 12px;
        height: 12px;
    }
}

/* Wider phones and small tablets can afford a touch more breathing room. */
@media screen and (min-width: 481px) and (max-width: 749px) {
    .uj-statement-card {
        padding: 0.7rem 0.7rem 1.3rem;
        border-radius: 16px;
    }

    .uj-statement-card .card__content {
        padding-top: 1rem;
    }

    .uj-statement-card__caption {
        font-size: 0.9rem;
    }

    .uj-statement-card__tagline {
        font-size: 0.72rem;
    }

    .uj-statement-card .card__content .price .price-item--regular {
        font-size: 0.95rem;
    }

    .uj-statement-card__shop {
        padding: 0.5rem 1rem;
        font-size: 0.68rem;
    }
}

/* Tablets and iPad portrait: two columns keeps the cards balanced and
   leaves enough breathing room for the heading plus spacing. */
@media screen and (min-width: 750px) and (max-width: 1024px) {
    .uj-cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        row-gap: 1.6rem !important;
        column-gap: 1.6rem !important;
    }

    .uj-statement-card {
        padding: 0.8rem 0.8rem 1.5rem;
        border-radius: 18px;
    }

    .uj-statement-card .card__content {
        padding-top: 1.1rem;
    }

    .uj-statement-card__caption {
        font-size: 0.95rem;
    }

    .uj-statement-card .card__content .price .price-item--regular {
        font-size: 1rem;
    }

    .uj-statement-card__shop {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
    }
}

/* Large tablets / smaller desktop widths: three columns preserves the
   intended denser merchandising grid without crowding the cards. */
@media screen and (min-width: 1025px) and (max-width: 1200px) {
    .uj-cat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        row-gap: 1.8rem !important;
        column-gap: 1.8rem !important;
    }

    .uj-statement-card {
        padding: 0.85rem 0.85rem 1.6rem;
    }
}

/* Desktop remains four-across, matching the existing homepage design. */
@media screen and (min-width: 1200px) {
    .uj-cat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        row-gap: 3.2rem !important;
        column-gap: 2rem !important;
    }

    .uj-statement-card {
        padding: 0.9rem 0.9rem 1.7rem;
    }
}

/* iPad portrait sizes in particular need the extra width of two columns
   because the browser UI reduces the usable horizontal space. */
@media screen and (min-width: 768px) and (max-width: 1024px) and (min-height: 1024px) {
    .uj-cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        row-gap: 1.6rem !important;
        column-gap: 1.6rem !important;
    }
}

/* Most Loved carousel responsive adjustments */
@media screen and (max-width: 480px) {
    .uj-ml-carousel {
        padding: 0 0.25rem;
    }

    .uj-ml-slide {
        min-width: 140px;
        max-width: 160px;
    }

    .uj-ml-arrow {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    .uj-ml-arrow svg {
        width: 12px;
        height: 12px;
    }
}

@media screen and (min-width: 481px) and (max-width: 749px) {
    .uj-ml-slide {
        min-width: 200px;
        max-width: 240px;
    }

    .uj-ml-arrow {
        width: 36px;
        height: 36px;
    }

    .uj-ml-arrow svg {
        width: 16px;
        height: 16px;
    }
}

@media screen and (min-width: 750px) and (max-width: 1024px) {
    .uj-ml-slide {
        min-width: 220px;
        max-width: 280px;
    }
}

/* Bestseller slider responsive adjustments */
@media screen and (max-width: 480px) {
    .uj-bs-slider {
        padding: 0 0.5rem;
    }

    .uj-bs-slide {
        min-width: 140px;
        max-width: 160px;
    }
}

@media screen and (min-width: 481px) and (max-width: 749px) {
    .uj-bs-slide {
        min-width: 180px;
        max-width: 220px;
    }
}

@media screen and (min-width: 750px) and (max-width: 1024px) {
    .uj-bs-slide {
        min-width: 200px;
        max-width: 260px;
    }
}

/* ==========================================================================
   Section Heading Responsive Styles
   ========================================================================== */

/* Mobile phones (320px - 480px) */
@media screen and (max-width: 480px) {
    .uj-cat-heading .title {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    .uj-cat-heading .collection__description p {
        font-size: 1.2rem !important;
    }

    .uj-cat-heading {
        margin-bottom: 2rem !important;
    }
}

/* Small tablets / Large phones (481px - 749px) */
@media screen and (min-width: 481px) and (max-width: 749px) {
    .uj-cat-heading .title {
        font-size: 2.4rem !important;
    }

    .uj-cat-heading .collection__description p {
        font-size: 1.4rem !important;
    }

    .uj-cat-heading {
        margin-bottom: 2.5rem !important;
    }
}

/* Tablets / iPad (750px - 1024px) */
@media screen and (min-width: 750px) and (max-width: 1024px) {
    .uj-cat-heading .title {
        font-size: 2.8rem !important;
    }

    .uj-cat-heading {
        margin-bottom: 3rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .uj-statement-card::before,
    .uj-statement-card__img--alt,
    .uj-statement-card__media::before,
    .uj-statement-card__media::after,
    .uj-statement-card__media-sheen,
    .uj-statement-card__shop { transition: none; }
}
