@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800;900&display=swap');

:root {
    --up-glass: rgba(255, 255, 255, 0.8);
    --up-glass-border: rgba(255, 255, 255, 0.3);
    --up-shadow-premium: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 20px 25px -5px rgba(0, 0, 0, 0.03);
    --up-shadow-elevated: 0 20px 40px -10px rgba(0, 0, 0, 0.06);
    --up-accent: #0f172a;
    --up-accent-light: #475569;
    --up-price: #e11d48; /* Color característico del Home */
    --up-success: #10b981; /* Verde de WhatsApp/Éxito */
}

/* ══════════════════════════════════════════
   PREMIUM RESTRICTIONS SYMBOLS
   ══════════════════════════════════════════ */
.premium-locked {
    position: relative !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(0.4);
    transition: all 0.3s ease;
}

.crown-lock {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    width: 24px !important;
    height: 24px !important;
    background: linear-gradient(135deg, #FFD700, #B8860B);
    color: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    box-shadow: 0 4px 10px rgba(184, 134, 11, 0.4) !important;
    z-index: 50 !important;
    border: 1.5px solid #fff !important;
    animation: crown-float 2s ease-in-out infinite;
}

@keyframes crown-float {
    0%, 100% { transform: translateY(0) rotate(5deg); }
    50% { transform: translateY(-3px) rotate(-5deg); }
}

/* Page Wrapper con degradado dinámico */
.pd-premium-page {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
    color: var(--up-accent);
    letter-spacing: -0.01em;
}

/* Breadcrumb refinado */
.pd-premium-page .pd-breadcrumb {
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pd-premium-page .pd-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.pd-premium-page .pd-breadcrumb a:hover {
    color: var(--up-accent);
}

/* Título refinado (Coqueto) */
.pd-premium-title {
    font-size: clamp(1.15rem, 2.5vw, 1.6rem); /* Un poco más pequeño y "coqueto" */
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--up-accent);
}

.pd-premium-clave {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
}

.pd-premium-clave span {
    color: var(--up-price);
    background: rgba(225, 29, 72, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Unificación Hero Header */
.pd-hero-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

/* Layout de dos columnas compacto */
.pd-premium-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.pd-image-section {
    flex: 1 1 650px;
    display: flex;
    gap: 1.5rem;
}

/* Thumbnails en tira vertical */
.pd-thumb-strip {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 60px;
    flex-shrink: 0;
}

.pd-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 2px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    object-fit: contain;
}

.pd-thumb.active {
    border-color: var(--up-price);
    box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.1);
}

.pd-main-img-card {
    flex-grow: 1;
    background: #ffffff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--up-shadow-premium);
    border: 1px solid #f1f5f9;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pd-info-section {
    flex: 0 0 400px;
    position: sticky;
    top: 2rem;
}

@media (max-width: 991px) {
    .pd-image-section { flex-direction: column-reverse; }
    .pd-thumb-strip { flex-direction: row; width: 100%; overflow-x: auto; padding-bottom: 5px; }
    .pd-info-section { flex: 1 1 100%; position: static; }
}

.pd-main-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

/* Contenedor Izquierdo Detalle */
.pd-left-details {
    margin-top: 2rem;
}

@media (max-width: 991px) {
    .pd-left-details { display: none; }
}
@media (min-width: 992px) {
    .pd-mobile-details { display: none; }
}

.pd-btn-delete-thumb {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Precios Ultra Premium */
.pd-premium-price-area {
    margin-bottom: 2rem;
}

.pd-price-current {
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--up-accent);
    line-height: 1.1;
}

.pd-price-discounted {
    background: linear-gradient(90deg, #e11d48 0%, #fb7185 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pd-price-old {
    font-size: 1.25rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.pd-price-badge {
    background: var(--up-accent);
    color: #fff;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Badge de Stock Refinado */
.pd-badge-stock {
    background: #e6f7f1 !important;
    color: #10b981 !important;
    border: 1px solid #c1eadd !important;
    padding: 8px 16px !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Buy Box - Minimalista y Glassmorphism */
.pd-buybox {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    box-shadow: var(--up-shadow-premium) !important;
}

.pd-qty-group {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    height: 48px;
    padding: 4px;
    display: flex;
    align-items: center;
    width: fit-content;
}

.pd-qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f8fafc;
    color: var(--up-accent);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pd-qty-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.pd-qty-input {
    width: 60px;
    border: none;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    background: transparent;
    outline: none;
}

.btn-cart {
    background: var(--up-accent) !important;
    color: white !important;
    border-radius: 100px !important;
    padding: 1.25rem 2.5rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.btn-cart:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3) !important;
}

.btn-wa {
    background: transparent !important;
    color: var(--up-success) !important;
    border: 2px solid var(--up-success) !important;
    border-radius: 100px !important;
    padding: 0.85rem 1.5rem !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    transition: all 0.3s !important;
}

.btn-wa:hover {
    background: var(--up-success) !important;
    color: white !important;
}

/* Badges de Confianza */
.pd-trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
}

.trust-item {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.trust-item i {
    font-size: 1.5rem;
    color: var(--up-accent);
    display: block;
    margin-bottom: 8px;
    opacity: 0.8;
}

/* Specs Grid Premium */
.pd-specs-grid {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.pd-specs-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.pd-specs-row:last-child {
    border-bottom: none;
}

.pd-specs-row:hover {
    background: rgba(255, 255, 255, 0.6);
}

.pd-specs-label {
    padding: 1.25rem 1.5rem;
    color: #64748b;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pd-specs-value {
    padding: 1.25rem 1.5rem;
    color: var(--up-accent);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Descripción y Especs */
.pd-detail-card {
    background: white !important;
    border-radius: 24px !important;
    border: 1px solid #f1f5f9 !important;
    padding: 2.5rem !important;
}

/* Modales Ultra Premium - Arreglo definitivo de Visibilidad */
.custom-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1050; /* Menor que SweetAlert (1060+) */
}

.custom-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1051;
    width: 95%;
    max-width: 550px;
    border-radius: 28px !important;
    border: 1px solid rgba(255,255,255,0.6) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    box-shadow: 0 40px 100px -20px rgba(15, 23, 42, 0.25) !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.custom-modal.modal-lg { max-width: 850px; }
.custom-modal.modal-xl { max-width: 1140px; }

.custom-modal-header {
    border: none !important;
    padding: 2rem 2.5rem 1rem !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-modal-body {
    padding: 1rem 2.5rem 1.5rem;
    overflow-y: auto;
}

.custom-modal-footer {
    border: none !important;
    background: transparent !important;
    padding: 1.5rem 2.5rem 2.5rem !important;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Mejoras en Inputs del Modal */
.custom-modal .form-control, 
.custom-modal .form-select {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.custom-modal .form-control:focus {
    border-color: var(--up-price);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.1);
}

.custom-modal label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
}

/* Card de Oferta en Modal */
.pd-offer-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}

.pd-offer-head {
    padding: 1.25rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pd-offer-body {
    padding: 1.5rem;
}

.pd-offer-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--up-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.pd-offer-pill {
    background: #fee2e2;
    color: #ef4444;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 100px;
    text-transform: uppercase;
}

.pd-offer-check {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Precio Oferta Modal Animado */
.pd-modal-precio-oferta {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(90deg, #e11d48, #fb7185, #e11d48);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

.modal-xl .pd-premium-price-area {
    background: #fff;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.modal-xl .form-label {
    font-weight: 700;
    color: var(--up-accent);
    font-size: 0.8rem;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* --- Lightbox --- */
.pd-lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important; /* Valor extremo para ganar a todo */
    cursor: zoom-out;
    padding: 2rem;
}

.pd-lightbox img {
    max-width: 92% !important;
    max-height: 92% !important;
    object-fit: contain !important;
    border-radius: 16px !important;
    box-shadow: 0 50px 100px rgba(0,0,0,0.8) !important;
    cursor: default;
    background: white;
    border: 1px solid rgba(255,255,255,0.1);
}

.pd-lightbox-close {
    position: absolute !important;
    top: 30px !important;
    right: 30px !important;
    background: white !important;
    color: #0f172a !important;
    border: none !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.8rem !important;
    cursor: pointer !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    z-index: 10000 !important;
}

.pd-lightbox-close:hover {
    transform: rotate(90deg) scale(1.15) !important;
    background: #f8fafc !important;
}

/* ══════════════════════════════════════════
   INLINE EXTRAS EDITOR (Owner)
   ══════════════════════════════════════════ */
.pd-info-section--owner {
    position: static !important;
}

.pd-inline-extras-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--up-shadow-premium);
}

.pd-inline-extras-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.pd-inline-extras-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--up-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.pd-inline-extras-body {
    padding: 1.5rem;
}

.pd-inline-extras-body .form-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.pd-inline-textarea {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0.75rem 1rem !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
    resize: vertical;
}

.pd-inline-textarea:focus {
    border-color: var(--up-price) !important;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08) !important;
}

@media (max-width: 991px) {
    .pd-inline-extras-body {
        padding: 1rem;
    }

    .pd-inline-textarea {
        font-size: 0.8rem !important;
    }
}
/* Rating Chip en Hero */
.pd-rating-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #d97706;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    width: fit-content;
}

.pd-rating-chip i {
    color: #f59e0b;
}

.pd-rating-chip:hover {
    background: rgba(245, 158, 11, 0.12);
    transform: translateY(-1px);
}
