/* Premium 3D Product Cards - Modern Glassmorphic Design 2026 */

/* ====================================
   MODERN 3D CARD CONTAINER
   ==================================== */

.product-card-3d {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 0;
    margin-bottom: 60px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.product-card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(48, 144, 199, 0.05) 0%, 
        transparent 50%,
        rgba(0, 242, 255, 0.03) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.product-card-3d:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 60px rgba(48, 144, 199, 0.15),
        0 0 40px rgba(0, 242, 255, 0.1),
        0 0 0 1px rgba(0, 242, 255, 0.2) inset;
}

/* Gradient border effect */
.product-card-3d::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 32px;
    padding: 2px;
    background: linear-gradient(135deg, 
        rgba(0, 242, 255, 0.5) 0%, 
        transparent 30%,
        transparent 70%,
        rgba(48, 144, 199, 0.5) 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-card-3d:hover::after {
    opacity: 1;
}

/* ====================================
   3D VISUAL CONTAINER - ENHANCED
   ==================================== */

.card-3d-visual {
    position: relative;
    background: radial-gradient(ellipse at center, 
        rgba(48, 144, 199, 0.08) 0%, 
        rgba(255, 255, 255, 0.02) 40%,
        transparent 70%
    );
    padding: 40px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    perspective: 1200px;
    perspective-origin: center center;
    overflow: visible;
}

.card-3d-visual::before {
    content: '';
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.2) 0%, transparent 70%);
    filter: blur(15px);
    z-index: 0;
    transition: all 0.5s ease;
}

.card-3d-visual:hover::before {
    width: 70%;
    height: 25px;
    background: radial-gradient(ellipse, rgba(48, 144, 199, 0.3) 0%, transparent 70%);
}

.card-3d-visual.dragging {
    cursor: grabbing;
}

/* Ambient light effect */
.card-3d-visual::after {
    content: '';
    position: absolute;
    top: -20%;
    left: 20%;
    width: 60%;
    height: 40%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

/* ====================================
   3D IMAGE WRAPPER - ENHANCED
   ==================================== */

.image-3d-wrapper {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
    z-index: 2;
}

/* 3D Depth layers behind image */
.image-3d-wrapper::before {
    content: '';
    position: absolute;
    inset: 5%;
    background: inherit;
    filter: blur(8px) brightness(0.7);
    transform: translateZ(-30px) scale(0.95);
    opacity: 0.4;
    z-index: -1;
}

.image-3d-wrapper::after {
    content: '';
    position: absolute;
    inset: 10%;
    background: inherit;
    filter: blur(15px) brightness(0.5);
    transform: translateZ(-60px) scale(0.9);
    opacity: 0.25;
    z-index: -2;
}

.product-3d-img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    filter: 
        drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15))
        drop-shadow(0 30px 60px rgba(0, 0, 0, 0.1))
        drop-shadow(0 5px 10px rgba(48, 144, 199, 0.1));
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    backface-visibility: hidden;
    transform-style: preserve-3d;
    /* 3D pop effect */
    transform: translateZ(20px);
}

/* Hover 3D effect */
.card-3d-visual:hover .product-3d-img {
    filter: 
        drop-shadow(0 15px 30px rgba(0, 0, 0, 0.25))
        drop-shadow(0 40px 80px rgba(48, 144, 199, 0.25))
        drop-shadow(0 8px 15px rgba(0, 242, 255, 0.2))
        contrast(1.05)
        brightness(1.02);
    transform: translateZ(50px) scale(1.08);
}

/* Metallic shine effect overlay */
.image-3d-wrapper .product-3d-img {
    position: relative;
}

/* 3D depth indicator borders */
.card-3d-visual::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    border: 1px dashed rgba(48, 144, 199, 0.15);
    border-radius: 20px;
    pointer-events: none;
    transition: all 0.5s ease;
    opacity: 0;
}

.card-3d-visual:hover::after {
    opacity: 1;
    width: 90%;
    height: 90%;
    border-color: rgba(0, 242, 255, 0.3);
}

/* Disable CSS animation when JS is controlling */
.card-3d-visual .image-3d-wrapper[style] {
    animation: none !important;
}

/* Fallback animation when no interaction */
.card-3d-visual:not(:hover) .image-3d-wrapper:not([style]) {
    animation: gentle-bob 4s ease-in-out infinite;
}

@keyframes gentle-bob {
    0%, 100% { transform: perspective(1200px) translateY(0) rotateX(0) rotateY(0) translateZ(30px); }
    25% { transform: perspective(1200px) translateY(-3px) rotateX(1deg) rotateY(-1deg) translateZ(30px); }
    50% { transform: perspective(1200px) translateY(-5px) rotateX(0) rotateY(1deg) translateZ(35px); }
    75% { transform: perspective(1200px) translateY(-3px) rotateX(-1deg) rotateY(0) translateZ(30px); }
}

/* 3D Label indicator */
.card-3d-visual .view-controls::before {
    content: '3D VIEW';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}

/* ====================================
   FLOATING SPEC TAGS
   ==================================== */

.floating-specs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-tag {
    position: absolute;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 18px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 8px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 242, 255, 0.2);
    transform: translateZ(50px);
    opacity: 0;
    animation: tag-fade-in 0.6s ease forwards;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.floating-tag:hover {
    transform: translateZ(60px) scale(1.05);
    background: var(--vp-primary);
    box-shadow: 
        0 15px 40px rgba(48, 144, 199, 0.3),
        0 0 20px rgba(0, 242, 255, 0.3);
}

.floating-tag::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--vp-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--vp-accent);
}

.floating-tag.tag-top-left {
    top: 5%;
    left: 0;
    animation-delay: 0.2s;
}

.floating-tag.tag-top-right {
    top: 10%;
    right: 0;
    animation-delay: 0.4s;
}

.floating-tag.tag-bottom-left {
    bottom: 20%;
    left: 5%;
    animation-delay: 0.6s;
}

.floating-tag.tag-bottom-right {
    bottom: 10%;
    right: 5%;
    animation-delay: 0.8s;
}

@keyframes tag-fade-in {
    from {
        opacity: 0;
        transform: translateZ(30px) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateZ(50px) translateY(0);
    }
}

/* ====================================
   3D VIEW CONTROLS
   ==================================== */

.view-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-3d-visual:hover .view-controls {
    opacity: 1;
}

.view-controls button {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-controls button:hover {
    background: var(--vp-primary);
    transform: scale(1.1);
}

.view-controls button:active {
    transform: scale(0.95);
}

/* ====================================
   MODERN CONTENT SECTION
   ==================================== */

.card-content-modern {
    position: relative;
    padding: 40px 50px 50px;
    z-index: 1;
}

.content-header-modern {
    margin-bottom: 30px;
}

.category-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--vp-primary), var(--vp-accent));
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(48, 144, 199, 0.3);
}

.category-badge-modern::before {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.title-modern {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--vp-text);
    margin-bottom: 8px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.subtitle-modern {
    font-size: 1rem;
    color: var(--vp-primary);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.description-modern {
    font-size: 1.1rem;
    color: var(--vp-text-muted);
    line-height: 1.7;
    margin-bottom: 35px;
    max-width: 600px;
}

/* ====================================
   MODERN SPECS GRID
   ==================================== */

.specs-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.spec-item-modern {
    position: relative;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

/* Gradient border for spec items */
.spec-item-modern::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, 
        rgba(48, 144, 199, 0.3) 0%, 
        rgba(0, 242, 255, 0.1) 50%,
        rgba(48, 144, 199, 0.3) 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: all 0.4s ease;
}

.spec-item-modern:hover::before {
    background: linear-gradient(135deg, 
        var(--vp-accent) 0%, 
        var(--vp-primary) 100%
    );
}

.spec-item-modern:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 40px rgba(48, 144, 199, 0.15);
}

/* Wide spec item for first item */
.spec-item-modern.spec-wide {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .spec-item-modern.spec-wide {
        grid-column: span 1;
    }
}

.spec-icon-modern {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--vp-primary), var(--vp-accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 1rem;
    color: white;
    box-shadow: 0 4px 15px rgba(48, 144, 199, 0.3);
}

.spec-label-modern {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--vp-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.spec-value-modern {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--vp-text);
    line-height: 1.4;
}

/* ====================================
   MODERN ACTION BUTTONS
   ==================================== */

.action-row-modern {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-whatsapp-modern {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.btn-whatsapp-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-whatsapp-modern:hover::before {
    left: 100%;
}

.btn-whatsapp-modern:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.4);
    color: white;
}

.btn-whatsapp-modern i {
    font-size: 1.2rem;
}

.btn-catalog-modern {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: transparent;
    color: var(--vp-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-radius: 14px;
    border: 2px solid var(--vp-border);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-catalog-modern:hover {
    border-color: var(--vp-primary);
    color: var(--vp-primary);
    background: rgba(48, 144, 199, 0.05);
    transform: translateY(-3px);
}

/* ====================================
   3D ROTATE INDICATOR
   ==================================== */

.rotate-hint {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.rotate-hint i {
    animation: rotate-hint-icon 2s ease-in-out infinite;
}

@keyframes rotate-hint-icon {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

.card-3d-visual:hover .rotate-hint {
    opacity: 0;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

@media (max-width: 992px) {
    .product-card-3d {
        border-radius: 24px;
        margin-bottom: 40px;
    }
    
    .card-3d-visual {
        padding: 30px;
        min-height: 300px;
        perspective: none;
        cursor: default;
    }
    
    /* Disable 3D transforms on small screens */
    .card-3d-visual::before,
    .card-3d-visual::after {
        display: none;
    }
    
    .image-3d-wrapper {
        transform: none !important;
        animation: none !important;
    }
    
    .image-3d-wrapper::before,
    .image-3d-wrapper::after {
        display: none;
    }
    
    .product-3d-img {
        max-height: 280px;
        transform: none !important;
        filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
    }
    
    .card-3d-visual:hover .product-3d-img {
        transform: none !important;
        filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
    }
    
    .card-content-modern {
        padding: 30px;
    }
    
    .title-modern {
        font-size: 2rem;
    }
    
    .floating-tag {
        display: none;
    }
    
    /* Hide 3D controls on small screens */
    .view-controls {
        display: none !important;
    }
    
    .depth-shadow-layer,
    .depth-reflection-layer,
    .glow-layer {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .card-3d-visual {
        padding: 20px;
        min-height: 250px;
    }
    
    .product-3d-img {
        max-height: 220px;
    }
    
    .card-content-modern {
        padding: 25px 20px;
    }
    
    .title-modern {
        font-size: 1.6rem;
    }
    
    .specs-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .action-row-modern {
        flex-direction: column;
    }
    
    .btn-whatsapp-modern,
    .btn-catalog-modern {
        width: 100%;
        justify-content: center;
    }
}

/* ====================================
   DARK MODE SUPPORT
   ==================================== */

[data-theme="dark"] .product-card-3d {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.8) 0%, 
        rgba(15, 23, 42, 0.9) 100%
    );
    border-color: rgba(0, 242, 255, 0.1);
}

[data-theme="dark"] .card-3d-visual {
    background: radial-gradient(ellipse at center, 
        rgba(48, 144, 199, 0.1) 0%, 
        rgba(15, 23, 42, 0.5) 50%,
        transparent 100%
    );
}

[data-theme="dark"] .spec-item-modern {
    background: rgba(30, 41, 59, 0.6);
}

[data-theme="dark"] .spec-item-modern:hover {
    background: rgba(30, 41, 59, 0.9);
}

[data-theme="dark"] .title-modern {
    color: white;
}

[data-theme="dark"] .spec-value-modern {
    color: rgba(255, 255, 255, 0.9);
}
