/* ============================================================
   IX-SHOP — sección de tienda WooCommerce en index.php
   ============================================================
   Diseño coherente con `ix-rep-carousel` (reportes recientes) y
   `lf-` (módulo lost & found). Misma paleta naranja/rosa + glass
   morphism + motion dramático 2000ms+.
   ============================================================ */

/* Sección FULL-WIDTH (sin max-width ni border-radius) — coherente con el resto
   de bloques del index que ocupan todo el ancho del viewport. */
.ix-shop {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 96px 24px 96px;
    margin: 0;
    width: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(234,88,12,0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236,72,153,0.06) 0%, transparent 50%),
        #fafafa;
    border-top: 1px solid rgba(0,0,0,0.04);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

/* ----- AURORA ambient (24-32s drift) ----- */
.ix-shop-aurora {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.40;
}
.ix-shop-aurora-band {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: multiply;
}
.ix-shop-aurora-1 {
    width: 50%; height: 70%;
    top: -10%; left: -8%;
    background: conic-gradient(from 30deg, #ea580c, #ec4899, #ea580c);
    animation: ix-shop-aurora-1 26000ms cubic-bezier(.45,.05,.55,.95) infinite alternate;
}
.ix-shop-aurora-2 {
    width: 45%; height: 60%;
    bottom: -5%; right: -5%;
    background: conic-gradient(from 200deg, #f59e0b, #ec4899, #f59e0b);
    animation: ix-shop-aurora-2 30000ms cubic-bezier(.45,.05,.55,.95) infinite alternate;
}
@keyframes ix-shop-aurora-1 {
    0%   { transform: translate(0,0) rotate(0deg); }
    100% { transform: translate(40px,50px) rotate(20deg); }
}
@keyframes ix-shop-aurora-2 {
    0%   { transform: translate(0,0) rotate(0deg); }
    100% { transform: translate(-40px,30px) rotate(-15deg); }
}

/* ----- SPARKLES flotantes ----- */
.ix-shop-sparkles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.ix-shop-sparkle {
    position: absolute;
    opacity: 0;
    animation: ix-shop-sparkle-life 4800ms cubic-bezier(.22,1,.36,1) infinite;
}
.ix-shop-sparkle-1 { top: 10%; right: 12%; width: 22px; height: 22px; color: #f59e0b; animation-delay: 800ms; }
.ix-shop-sparkle-2 { top: 50%; left: 8%;  width: 18px; height: 18px; color: #ec4899; animation-delay: 2400ms; }
.ix-shop-sparkle-3 { bottom: 18%; right: 18%; width: 26px; height: 26px; color: #ea580c; animation-delay: 3600ms; }
@keyframes ix-shop-sparkle-life {
    0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
    25%      { opacity: 1; transform: scale(1.2) rotate(90deg); }
    50%      { opacity: 0.8; transform: scale(1) rotate(180deg); }
    75%      { opacity: 0.4; transform: scale(0.8) rotate(270deg); }
}

/* ----- HEAD (eyebrow + title + sub) ----- */
.ix-shop-head {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 760px;
    margin: 0 auto 64px;
    animation: ix-shop-head-rise 2400ms cubic-bezier(.22,1,.36,1) both;
}
@keyframes ix-shop-head-rise {
    from { opacity: 0; transform: translateY(32px); filter: blur(8px); }
    to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

.ix-shop-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.75);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    color: #6e6e73;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ix-shop-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ea580c;
    box-shadow: 0 0 0 3px rgba(234,88,12,0.20);
    animation: ix-shop-dot-pulse 2200ms cubic-bezier(.22,1,.36,1) infinite;
}
@keyframes ix-shop-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(234,88,12,0.20); }
    50%      { box-shadow: 0 0 0 10px rgba(234,88,12,0); }
}

.ix-shop-title {
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.10;
    color: #1d1d1f;
    margin: 0 0 20px;
}
.ix-shop-title-grad {
    background: linear-gradient(135deg, #ea580c 0%, #ec4899 60%, #f59e0b 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: ix-shop-grad-flow 8000ms ease-in-out infinite;
}
@keyframes ix-shop-grad-flow {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.ix-shop-sub {
    font-size: clamp(15px, 1.5vw, 17px);
    color: #6e6e73;
    line-height: 1.55;
    max-width: 580px;
    margin: 0 auto;
}
.ix-shop-sub strong { color: #1d1d1f; font-weight: 600; }

/* ----- GRID editorial — single column, cards full-impact ----- */
.ix-shop-grid-wrap {
    position: relative;
    z-index: 5;
    max-width: 1100px;
    margin: 0 auto;
    perspective: 1400px;          /* enable 3D space para tilt hover */
}
.ix-shop-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.ix-shop-empty {
    text-align: center;
    padding: 80px 20px;
}

/* ----- CARD EDITORIAL — foto 50% + body 50%, cinematic ----- */
.ix-shop-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;   /* foto + body, 50/50 */
    align-items: stretch;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 32px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    min-height: 360px;
    box-shadow:
        0 1px 3px -1px rgba(0,0,0,0.05),
        0 12px 28px -10px rgba(0,0,0,0.08),
        0 32px 64px -20px rgba(0,0,0,0.10);
    transform-style: preserve-3d;
    transition:
        transform 720ms cubic-bezier(.22,1,.36,1),
        box-shadow 720ms cubic-bezier(.22,1,.36,1),
        border-color 720ms cubic-bezier(.22,1,.36,1);
    opacity: 0;
    animation: ix-shop-card-reveal 1400ms cubic-bezier(.22,1,.36,1) both;
    isolation: isolate;
}
/* Hover 3D tilt — Apple Product Page-style perspective lift */
.ix-shop-card:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(-1.5deg);
    box-shadow:
        0 1px 3px -1px rgba(0,0,0,0.05),
        0 20px 40px -12px rgba(0,0,0,0.15),
        0 48px 96px -24px rgba(234,88,12,0.20);
    border-color: rgba(234,88,12,0.25);
}

/* Alterna orientación: cards pares con foto a la derecha (más editorial) */
.ix-shop-card:nth-child(even) {
    grid-template-columns: 1fr 1fr;
}
.ix-shop-card:nth-child(even) .ix-shop-card-media {
    order: 2;                     /* foto a la derecha */
}
.ix-shop-card:nth-child(even):hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(1.5deg);  /* tilt opuesto */
}
/* Stagger reveal — cada card aparece 220ms después que la anterior */
.ix-shop-card:nth-child(1) { animation-delay: 200ms; }
.ix-shop-card:nth-child(2) { animation-delay: 420ms; }
.ix-shop-card:nth-child(3) { animation-delay: 640ms; }
.ix-shop-card:nth-child(4) { animation-delay: 860ms; }
.ix-shop-card:nth-child(n+5) { animation-delay: 1000ms; }

/* Reveal CINEMATOGRÁFICO — blur + slide + scale 1400ms */
@keyframes ix-shop-card-reveal {
    0%   { opacity: 0; transform: translateY(48px) scale(0.94); filter: blur(12px); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: translateY(0) scale(1);       filter: blur(0); }
}

.ix-shop-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 12px 28px -8px rgba(0,0,0,0.15),
        0 32px 64px -16px rgba(234,88,12,0.12);
    border-color: rgba(234,88,12,0.25);
}

/* Card MEDIA — foto con KEN-BURNS drift ambient (motion continuo) */
.ix-shop-card-media {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fafafa, #f1f1f4);
    min-height: 360px;            /* matches card height para coherencia */
}
.ix-shop-card-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    /* KEN-BURNS — drift continuo de 16 segundos (cinematográfico) */
    animation: ix-shop-kenburns 16000ms cubic-bezier(.45,.05,.55,.95) infinite alternate;
    transform-origin: center center;
    transition: filter 720ms cubic-bezier(.22,1,.36,1);
}
@keyframes ix-shop-kenburns {
    0%   { transform: scale(1.02) translate(0, 0); }
    100% { transform: scale(1.10) translate(-2%, 1.5%); }
}
.ix-shop-card:hover .ix-shop-card-media img {
    filter: brightness(1.05) saturate(1.10);
    animation-duration: 8000ms;   /* acelera ken-burns al hover */
}

/* Overlay sutil sobre la foto (gradient para depth) */
.ix-shop-card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(0,0,0,0.08));
    pointer-events: none;
    transition: opacity 720ms cubic-bezier(.22,1,.36,1);
}
.ix-shop-card:hover .ix-shop-card-media::after {
    opacity: 0.5;
}
.ix-shop-card-noimg {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ea580c;
}
.ix-shop-card-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.04));
    pointer-events: none;
}

/* Sale badge */
.ix-shop-card-sale {
    position: absolute;
    top: 12px; left: 12px;
    z-index: 4;
    padding: 5px 11px;
    background: linear-gradient(135deg, #dc2626, #ec4899);
    color: #fff;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.10em;
    box-shadow: 0 6px 14px -4px rgba(220,38,38,0.45);
    text-shadow: 0 1px 1px rgba(0,0,0,0.20);
    animation: ix-shop-sale-pulse 2400ms cubic-bezier(.22,1,.36,1) infinite;
}
@keyframes ix-shop-sale-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

/* Card BODY — editorial typography, generous padding */
.ix-shop-card-body {
    padding: 56px 56px 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Eyebrow pre-title (small uppercase label) */
.ix-shop-card-body::before {
    content: 'Producto · SOS Mascotas';
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ea580c;
    margin-bottom: 4px;
    opacity: 0.85;
}

.ix-shop-card-title {
    font-size: clamp(22px, 2.4vw, 32px);   /* DRAMATIC título */
    font-weight: 800;
    line-height: 1.10;
    color: #1d1d1f;
    margin: 0;
    letter-spacing: -0.030em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 480ms cubic-bezier(.22,1,.36,1);
}
.ix-shop-card:hover .ix-shop-card-title {
    background: linear-gradient(135deg, #ea580c 0%, #ec4899 60%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Price block — más dramático, mejor jerarquía */
.ix-shop-card-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.ix-shop-card-orig {
    font-size: 16px;
    color: #6e6e73;
    text-decoration: line-through;
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}
.ix-shop-card-now {
    font-size: clamp(28px, 3vw, 38px);     /* MUY dramático */
    font-weight: 800;
    color: #ea580c;
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* CTA — pill button con gradient elevation */
.ix-shop-card-cta {
    margin-top: 24px;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px 14px 26px;
    background: linear-gradient(135deg, #ea580c 0%, #ec4899 100%);
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.005em;
    box-shadow:
        0 8px 18px -6px rgba(234,88,12,0.45),
        inset 0 0 0 1px rgba(255,255,255,0.20);
    transition:
        transform 480ms cubic-bezier(.34,1.56,.64,1),
        box-shadow 480ms cubic-bezier(.22,1,.36,1),
        padding 480ms cubic-bezier(.22,1,.36,1);
}
.ix-shop-card-cta svg {
    transition: transform 480ms cubic-bezier(.34,1.56,.64,1);
}
.ix-shop-card:hover .ix-shop-card-cta {
    transform: translateY(-2px) scale(1.02);
    padding-right: 30px;
    box-shadow:
        0 14px 28px -8px rgba(234,88,12,0.55),
        inset 0 0 0 1px rgba(255,255,255,0.30);
}
.ix-shop-card:hover .ix-shop-card-cta svg {
    transform: translateX(6px);
}

/* Fallback img rota */
.ix-shop-card-media.is-img-fallback {
    background:
        linear-gradient(135deg, rgba(234,88,12,0.10), rgba(236,72,153,0.10)),
        #fafafa;
}
.ix-shop-card-media.is-img-fallback::after {
    content: '';
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23ea580c' opacity='0.30'><path d='M6 2 L3 8 v50 a4 4 0 0 0 4 4 h50 a4 4 0 0 0 4 -4 V8 l-3 -6 z'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50px;
}

/* ----- FOOT — "Ver toda la tienda" CTA ----- */
.ix-shop-foot {
    position: relative;
    z-index: 5;
    text-align: center;
    margin-top: 56px;
}
.ix-shop-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #ea580c 0%, #ec4899 100%);
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: -0.005em;
    box-shadow:
        0 12px 24px -6px rgba(234,88,12,0.45),
        inset 0 0 0 1px rgba(255,255,255,0.20);
    transition:
        transform 320ms cubic-bezier(.34,1.56,.64,1),
        box-shadow 320ms cubic-bezier(.22,1,.36,1);
}
.ix-shop-cta:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 20px 40px -8px rgba(234,88,12,0.55),
        inset 0 0 0 1px rgba(255,255,255,0.30);
}
.ix-shop-cta svg:last-child {
    transition: transform 320ms cubic-bezier(.34,1.56,.64,1);
}
.ix-shop-cta:hover svg:last-child {
    transform: translateX(5px);
}

/* ----- Nav link "Tienda" styling especial ----- */
.main-nav .nav-shop {
    color: #ea580c !important;
    font-weight: 600 !important;
    position: relative;
}
.main-nav .nav-shop::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 50%;
    width: 0; height: 2px;
    background: linear-gradient(90deg, #ea580c, #ec4899);
    transform: translateX(-50%);
    transition: width 320ms cubic-bezier(.22,1,.36,1);
}
.main-nav .nav-shop:hover::after {
    width: 80%;
}

/* ----- RESPONSIVE — degradación mobile a vertical stack ----- */
@media (max-width: 880px) {
    /* Tablet/Mobile: vertical stack (foto arriba, body abajo) */
    .ix-shop-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .ix-shop-card:nth-child(even) {
        grid-template-columns: 1fr;
    }
    .ix-shop-card:nth-child(even) .ix-shop-card-media {
        order: 0;                 /* reset: foto arriba siempre */
    }
    .ix-shop-card-media {
        aspect-ratio: 16 / 9;     /* widescreen photo top */
        min-height: auto;
    }
    .ix-shop-card-body { padding: 32px 28px; }
    .ix-shop-card:hover {
        transform: translateY(-6px);  /* sin 3D tilt en mobile */
    }
    .ix-shop-card:nth-child(even):hover {
        transform: translateY(-6px);
    }
}
@media (max-width: 768px) {
    .ix-shop { padding: 64px 18px; }
    .ix-shop-head { margin-bottom: 40px; }
    .ix-shop-title { font-size: clamp(26px, 7vw, 36px); }
    .ix-shop-card { border-radius: 24px; }
    .ix-shop-card-body { padding: 24px 22px; gap: 12px; }
    .ix-shop-card-body::before { font-size: 10px; }
    .ix-shop-card-title { font-size: 20px; -webkit-line-clamp: 2; }
    .ix-shop-card-now { font-size: 26px; }
    .ix-shop-card-cta { padding: 12px 20px; font-size: 13px; margin-top: 16px; }
    .ix-shop-grid { gap: 24px; }
}
@media (max-width: 480px) {
    .ix-shop-card-body { padding: 20px 18px; }
    .ix-shop-card-title { font-size: 18px; }
    .ix-shop-card-now { font-size: 22px; }
}

/* ----- REDUCED MOTION ----- */
@media (prefers-reduced-motion: reduce) {
    .ix-shop-aurora-band,
    .ix-shop-sparkle,
    .ix-shop-dot,
    .ix-shop-title-grad,
    .ix-shop-card,
    .ix-shop-card-sale,
    .ix-shop-card-media img {
        animation: none !important;
    }
    .ix-shop-card           { opacity: 1; transform: none; filter: none; }
    .ix-shop-head           { opacity: 1; transform: none; filter: none; animation: none; }
    .ix-shop-card-media img { transform: none; }
    .ix-shop-card:hover,
    .ix-shop-card:nth-child(even):hover {
        transform: translateY(-4px); /* solo lift sutil, sin 3D tilt */
    }
    .ix-shop-card,
    .ix-shop-cta,
    .ix-shop-card-media img,
    .ix-shop-card-media::after,
    .ix-shop-card-cta,
    .ix-shop-card-title {
        transition: none !important;
    }
}
