/* ==========================================================================
   Mundo Steam — Shop Archive (/tienda/) styles
   --------------------------------------------------------------------------
   Extracted from the Elementor "Tienda Top" library template (id 236695)
   so the banner + product grid render natively without Elementor assets.
   Loaded conditionally on `is_shop()` from inc/enqueue.php.
   ========================================================================== */


/* ==========================================================================
   Banner header — "Nuestra Tienda"
   ========================================================================== */
.ms-shop {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 30px;
}

.ms-shop__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-bottom: 28px;
}

.ms-shop__line {
    flex: 1;
    max-width: 250px;
    height: 1px;
    position: relative;
}

.ms-shop__line--left {
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.5));
}

.ms-shop__line--right {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.5), transparent);
}

.ms-shop__line::after {
    content: '';
    position: absolute;
    top: -1px;
    width: 50px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    filter: blur(1px);
    animation: shopLineShimmer 3s ease-in-out infinite;
}

.ms-shop__line--left::after  { right: 0; }
.ms-shop__line--right::after { left: 0; animation-name: shopLineShimmerRight; }

@keyframes shopLineShimmer {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50%      { opacity: 1;   transform: translateX(-25px); }
}

@keyframes shopLineShimmerRight {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50%      { opacity: 1;   transform: translateX(25px); }
}

.ms-shop__center {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 32px;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(34, 211, 238, 0.05));
    border: 1px solid rgba(14, 165, 233, 0.25);
    box-shadow:
        0 0 40px rgba(14, 165, 233, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* 25/09/2026: Safari 17 o menos (iPhone incluido) solo entiende el prefijado */
}

.ms-shop__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: shopIconFloat 3s ease-in-out infinite;
}

@keyframes shopIconFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

.ms-shop__title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}


/* ==========================================================================
   Platform pills (currently unused — HTML pasted by user did not include
   the platform buttons; rules retained for when they're added back)
   ========================================================================== */
.ms-shop__platforms {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ms-shop__platform {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ms-shop__platform img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: grayscale(100%) brightness(1.8);
}

.ms-shop__star {
    width: 20px !important;
    height: 20px !important;
    transition: all 0.3s ease;
}

.ms-shop__star polygon {
    transition: fill 0.3s ease;
}

.ms-shop__platform:hover {
    transform: translateY(-3px);
    color: #fff;
}

.ms-shop__platform--steam:hover {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.15), rgba(30, 136, 229, 0.08));
    border-color: rgba(30, 136, 229, 0.4);
    box-shadow: 0 8px 25px rgba(30, 136, 229, 0.2);
}
.ms-shop__platform--steam:hover img { filter: grayscale(0%) brightness(1); opacity: 1; }

.ms-shop__platform--ps:hover {
    background: linear-gradient(135deg, rgba(0, 112, 209, 0.15), rgba(0, 112, 209, 0.08));
    border-color: rgba(0, 112, 209, 0.4);
    box-shadow: 0 8px 25px rgba(0, 112, 209, 0.2);
}
.ms-shop__platform--ps:hover img { filter: grayscale(0%) brightness(1); opacity: 1; }

.ms-shop__platform--ms:hover {
    background: linear-gradient(135deg, rgba(0, 164, 239, 0.15), rgba(0, 164, 239, 0.08));
    border-color: rgba(0, 164, 239, 0.4);
    box-shadow: 0 8px 25px rgba(0, 164, 239, 0.2);
}
.ms-shop__platform--ms:hover img { filter: grayscale(0%) brightness(1); opacity: 1; }

.ms-shop__platform--subs:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.08));
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.2);
}
.ms-shop__platform--subs:hover .ms-shop__star polygon { fill: #fbbf24; }

.ms-shop__platform--xbox:hover {
    background: linear-gradient(135deg, rgba(16, 124, 16, 0.15), rgba(157, 255, 0, 0.08));
    border-color: rgba(157, 255, 0, 0.4);
    box-shadow: 0 8px 25px rgba(16, 124, 16, 0.2);
}
.ms-shop__platform--xbox:hover img {
    filter: brightness(0) saturate(100%) invert(67%) sepia(89%) saturate(436%) hue-rotate(44deg) brightness(105%) contrast(104%);
    opacity: 1;
}


/* ==========================================================================
   Product grid (shop archive only)
   ========================================================================== */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.woocommerce ul.products li.product {
    position: relative !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    padding: 14px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
}

.woocommerce ul.products li.product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.05), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 18px;
    z-index: 0;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(14, 165, 233, 0.2) !important;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.35),
        0 0 40px rgba(14, 165, 233, 0.1) !important;
}

.woocommerce ul.products li.product:hover::before {
    opacity: 1;
}

.woocommerce ul.products li.product a img {
    position: relative;
    z-index: 1;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.woocommerce ul.products li.product:hover a img {
    transform: scale(1.04) !important;
}

.woocommerce ul.products li.product .onsale {
    position: absolute !important;
    top: 22px !important;
    left: 22px !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4) !important;
    z-index: 3 !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    position: relative;
    z-index: 1;
    color: #f8fafc !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin: 14px 0 8px !important;
    text-align: left !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.woocommerce ul.products li.product .price {
    position: relative;
    z-index: 1;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
    text-align: left !important;
}

.woocommerce ul.products li.product .price del {
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: line-through !important;
    background: none !important;
    -webkit-text-fill-color: #64748b !important;
}

.woocommerce ul.products li.product .price ins,
.woocommerce ul.products li.product .price > .woocommerce-Price-amount {
    background: linear-gradient(135deg, #0ea5e9, #22d3ee) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.add_to_cart_button {
    position: relative;
    z-index: 1;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 12px 18px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3) !important;
    text-decoration: none !important;
}

.woocommerce ul.products li.product .button:hover {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.45) !important;
}

.woocommerce ul.products li.product a.added_to_cart {
    position: relative;
    z-index: 1;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 12px 18px !important;
    margin-top: 8px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.1)) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #34d399 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}


/* ==========================================================================
   Result count + ordering dropdown
   ========================================================================== */
.woocommerce .woocommerce-result-count {
    color: #94a3b8 !important;
    font-size: 14px !important;
}

.woocommerce .woocommerce-ordering select {
    padding: 12px 40px 12px 16px !important;
    border-radius: 10px !important;
    background-color: rgba(255, 255, 255, 0.04) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.woocommerce .woocommerce-ordering select:hover  { border-color: rgba(14, 165, 233, 0.3) !important; }
.woocommerce .woocommerce-ordering select:focus  {
    outline: none !important;
    border-color: rgba(14, 165, 233, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1) !important;
}

.woocommerce .woocommerce-ordering select option {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    padding: 12px !important;
}


/* ==========================================================================
   Pagination
   ========================================================================== */
.woocommerce nav.woocommerce-pagination ul {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 40px !important;
}

.woocommerce nav.woocommerce-pagination ul li { margin: 0 !important; }

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 42px !important;
    height: 42px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: rgba(14, 165, 233, 0.1) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
    color: #e2e8f0 !important;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35) !important;
}


/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .ms-shop__line { max-width: 100px; }
}

@media (max-width: 768px) {
    .ms-shop          { padding: 30px 16px 24px; }
    .ms-shop__header  { gap: 16px; margin-bottom: 24px; }
    .ms-shop__line    { max-width: 50px; }
    .ms-shop__center  { padding: 12px 24px; gap: 10px; }
    .ms-shop__icon svg { width: 22px; height: 22px; }
    .ms-shop__title   { font-size: 17px; }
    .ms-shop__platforms { gap: 8px; }
    .ms-shop__platform  { padding: 10px 16px; font-size: 13px; gap: 8px; }
    .ms-shop__platform img,
    .ms-shop__star      { width: 18px !important; height: 18px !important; }

    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
    .woocommerce ul.products li.product { padding: 10px !important; }
    .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 13px !important; }
    .woocommerce ul.products li.product .price ins,
    .woocommerce ul.products li.product .price > .woocommerce-Price-amount { font-size: 16px !important; }
    .woocommerce ul.products li.product .button { padding: 10px 14px !important; font-size: 12px !important; }
}

@media (max-width: 600px) {
    .ms-shop__line          { display: none; }
    .ms-shop__platform span { display: none; }
    .ms-shop__platform      { padding: 12px; border-radius: 12px; }
}


/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .ms-shop__line::after,
    .ms-shop__icon,
    .ms-shop__platform,
    .woocommerce ul.products li.product,
    .woocommerce ul.products li.product a img,
    .woocommerce ul.products li.product .button {
        animation: none !important;
        transition: none !important;
    }

    .ms-shop__platform:hover,
    .woocommerce ul.products li.product:hover {
        transform: none !important;
    }
}
