/* ================================================================
   Dual Product Showcase — showcase.css
   Luxury dual-image layout inspired by the original design.
   ================================================================ */

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes dps-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%       { transform: translateY(-15px) rotate(2deg); }
}

@keyframes dps-ping {
    0%   { transform: scale(1);   opacity: 1; }
    75%, 100% { transform: scale(2); opacity: 0; }
}

/* ── Wrapper ────────────────────────────────────────────────── */
.dps-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 420px;
    /* height driven by the tallest card */
    min-height: 340px;
    margin: 0 auto;
    padding-bottom: 24px; /* room for shadow */
    direction: rtl;
}

/* ── Cards (shared) ─────────────────────────────────────────── */
.dps-card {
    position: absolute;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    /* smooth hover lift */
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.dps-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.dps-card:hover {
    transform: translateY(-6px) scale(1.02) !important;
    box-shadow: 0 24px 50px rgba(212, 175, 55, 0.35) !important;
    z-index: 20;
}

/* focus ring for accessibility */
.dps-card:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 4px;
}

/* ── Card 1 — background / top-right ───────────────────────── */
.dps-card--back {
    top: 0;
    right: 16px;
    width: 65%;
    aspect-ratio: 3 / 4;
    box-shadow: 0 25px 50px rgba(0,0,0,.5);
    border: 1px solid rgba(212, 175, 55, 0.20);
    z-index: 5;
    /* float animation: speed pulled from --dps-speed custom prop */
    animation: dps-float var(--dps-speed, 6s) ease-in-out infinite;
}

/* ── Card 2 — foreground / bottom-left ─────────────────────── */
.dps-card--front {
    bottom: 16px;
    left: 16px;
    width: 55%;
    aspect-ratio: 3 / 4;
    box-shadow: 0 25px 50px rgba(0,0,0,.6);
    border: 1px solid rgba(212, 175, 55, 0.30);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10;
    /* float animation with opposite phase; delay set inline via PHP */
    animation-name: dps-float;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

/* ── Overlays ───────────────────────────────────────────────── */
.dps-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5,5,5,.40), transparent);
    pointer-events: none;
}

.dps-overlay--deep {
    background: linear-gradient(to top, rgba(5,5,5,.60) 0%, transparent 55%, transparent 100%);
}

/* ── Label bar (card 2 bottom) ──────────────────────────────── */
.dps-label-bar {
    position: absolute;
    bottom: 10px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.dps-label-text {
    font-size: 10px;
    color: #D4AF37;
    font-weight: 600;
    letter-spacing: .08em;
    font-family: 'Amiri', 'Cairo', serif;
    text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* ── Ping dot ───────────────────────────────────────────────── */
.dps-ping {
    display: block;
    width: 7px;
    height: 7px;
    background: #D4AF37;
    border-radius: 50%;
    animation: dps-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ── Ground shadow ──────────────────────────────────────────── */
.dps-shadow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 16px;
    background: rgba(212, 175, 55, 0.15);
    filter: blur(16px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

/* ── Placeholder (no image) ─────────────────────────────────── */
.dps-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: rgba(212, 175, 55, 0.5);
    font-size: 12px;
    font-family: 'Cairo', sans-serif;
}

/* ── Notice (no products set) ───────────────────────────────── */
.dps-notice {
    color: #D4AF37;
    font-family: 'Cairo', sans-serif;
    text-align: center;
    padding: 16px;
    border: 1px dashed rgba(212, 175, 55, 0.4);
    border-radius: 8px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .dps-wrapper {
        max-width: 320px;
        min-height: 260px;
    }
}

/* ── Reduced-motion respect ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .dps-card--back,
    .dps-card--front {
        animation: none !important;
    }
    .dps-ping {
        animation: none !important;
    }
}
