/**
 * Mehta Pansari 3D Animated Design - Main Stylesheet
 * Ultra High Definition 3D Effects with WebGL Integration
 */

:root {
    --mp-primary-green: #2D5A3D;
    --mp-gold: #D4A574;
    --mp-beige: #E8DCC8;
    --mp-cream: #F5F1E8;
    --mp-dark: #1a3a2a;
    --mp-light: #faf8f3;
    
    /* 3D Effects */
    --mp-depth-1: 0 10px 30px rgba(45, 90, 61, 0.1);
    --mp-depth-2: 0 20px 60px rgba(45, 90, 61, 0.15);
    --mp-depth-3: 0 40px 80px rgba(45, 90, 61, 0.2);
    
    /* Glass Effect */
    --mp-glass-bg: rgba(255, 255, 255, 0.7);
    --mp-glass-border: rgba(255, 255, 255, 0.2);
}

/* ===== Global Styles ===== */
body.mehta-pansari-3d-enabled {
    background: linear-gradient(135deg, #F5F1E8 0%, #faf8f3 50%, #E8DCC8 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* ===== 3D Product Wrapper ===== */
.mehta-3d-product-wrapper {
    perspective: 1200px;
    transform-style: preserve-3d;
}

.mehta-3d-product-wrapper .product {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.mehta-3d-product-wrapper .product:hover {
    transform: rotateX(5deg) rotateY(-5deg) translateZ(20px);
}

/* ===== 3D Image Container ===== */
.mehta-3d-image-container {
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--mp-depth-3);
}

.mehta-3d-image-container img {
    display: block;
    width: 100%;
    height: auto;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.320, 1);
}

.mehta-3d-image-container:hover img {
    transform: scale(1.05) translateZ(10px);
}

/* ===== Glass Morphism Effect ===== */
.mehta-glass-effect {
    background: var(--mp-glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--mp-glass-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--mp-depth-2);
}

.mehta-glass-effect-strong {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===== Product Card 3D Effects ===== */
.woocommerce ul.products li.product {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--mp-depth-1);
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--mp-depth-3);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.woocommerce ul.products li.product:hover .woocommerce-loop-product__title {
    transform: translateZ(20px);
}

/* ===== Price 3D Effect ===== */
.woocommerce ul.products li.product .price {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--mp-gold);
    text-shadow: 0 2px 10px rgba(212, 165, 116, 0.3);
    transform-style: preserve-3d;
    transition: all 0.4s ease;
}

.woocommerce ul.products li.product:hover .price {
    transform: scale(1.1) translateZ(15px);
    text-shadow: 0 4px 20px rgba(212, 165, 116, 0.5);
}

/* ===== Button 3D Effects ===== */
.woocommerce button.button,
.woocommerce .button {
    perspective: 1000px;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--mp-primary-green), var(--mp-dark));
    color: white;
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    box-shadow: var(--mp-depth-2);
}

.woocommerce button.button:hover,
.woocommerce .button:hover {
    transform: translateY(-3px) translateZ(10px);
    box-shadow: var(--mp-depth-3);
    background: linear-gradient(135deg, var(--mp-dark), var(--mp-primary-green));
}

.woocommerce button.button:active,
.woocommerce .button:active {
    transform: translateY(0) translateZ(0);
}

/* ===== Add to Cart Button Animation ===== */
.woocommerce .single_add_to_cart_button {
    background: linear-gradient(135deg, var(--mp-primary-green), var(--mp-dark)) !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 15px 40px !important;
    font-size: 1.1em !important;
    font-weight: 700 !important;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1) !important;
    box-shadow: var(--mp-depth-2) !important;
    position: relative;
    overflow: hidden;
}

.woocommerce .single_add_to_cart_button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--mp-depth-3) !important;
}

.woocommerce .single_add_to_cart_button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.woocommerce .single_add_to_cart_button:hover::before {
    left: 100%;
}

/* ===== Parallax Container ===== */
.mehta-3d-parallax-container {
    position: relative;
    z-index: 1;
}

.mehta-3d-parallax-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(212, 165, 116, 0.05), transparent);
    pointer-events: none;
    z-index: -1;
}

/* ===== Floating Elements ===== */
.mehta-floating {
    animation: mehta-float 6s ease-in-out infinite;
}

@keyframes mehta-float {
    0%, 100% {
        transform: translateY(0px) translateZ(0);
    }
    50% {
        transform: translateY(-20px) translateZ(10px);
    }
}

/* ===== Glow Effect ===== */
.mehta-glow {
    position: relative;
}

.mehta-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(212, 165, 116, 0.3), transparent);
    border-radius: inherit;
    pointer-events: none;
    animation: mehta-glow-pulse 3s ease-in-out infinite;
}

@keyframes mehta-glow-pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* ===== Shimmer Effect ===== */
.mehta-shimmer {
    position: relative;
    overflow: hidden;
}

.mehta-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: mehta-shimmer 3s infinite;
}

@keyframes mehta-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ===== Depth Layers ===== */
.mehta-depth-layer {
    position: relative;
    z-index: 1;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.mehta-depth-layer-1 {
    z-index: 1;
}

.mehta-depth-layer-2 {
    z-index: 2;
}

.mehta-depth-layer-3 {
    z-index: 3;
}

/* ===== Cinematic Lighting ===== */
.mehta-cinematic-light {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(212, 165, 116, 0.05));
}

.mehta-cinematic-light::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.1), transparent);
    animation: mehta-light-move 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes mehta-light-move {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-20px, -20px);
    }
}

/* ===== Smooth Transitions ===== */
* {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .mehta-3d-product-wrapper .product:hover {
        transform: rotateX(2deg) rotateY(-2deg) translateZ(10px);
    }
    
    .woocommerce ul.products li.product:hover {
        transform: translateY(-5px) rotateX(2deg);
    }
    
    .mehta-glass-effect {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .mehta-3d-product-wrapper .product:hover {
        transform: none;
    }
    
    .woocommerce ul.products li.product:hover {
        transform: translateY(-3px);
    }
}

/* ===== WooCommerce Specific ===== */
.woocommerce .product-images {
    perspective: 1000px;
}

.woocommerce .product-images img {
    border-radius: 15px;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.woocommerce .product-images:hover img {
    transform: scale(1.05);
}

.woocommerce .product-short-description {
    color: var(--mp-primary-green);
    font-size: 1.1em;
    line-height: 1.6;
}

.woocommerce .product-meta {
    border-top: 2px solid var(--mp-beige);
    border-bottom: 2px solid var(--mp-beige);
    padding: 20px 0;
    margin: 20px 0;
}

/* ===== Rating Stars ===== */
.woocommerce .star-rating {
    color: var(--mp-gold);
    font-size: 1.2em;
}

.woocommerce .star-rating span {
    color: var(--mp-gold);
}

/* ===== Cart Page ===== */
.woocommerce-cart table.cart {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--mp-depth-2);
}

.woocommerce-cart table.cart th {
    background: linear-gradient(135deg, var(--mp-primary-green), var(--mp-dark));
    color: white;
    padding: 15px;
}

.woocommerce-cart table.cart td {
    padding: 15px;
    border-bottom: 1px solid var(--mp-beige);
}

/* ===== Checkout Page ===== */
.woocommerce-checkout .woocommerce-checkout-review-order {
    background: var(--mp-glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--mp-depth-2);
}

/* ===== WebGL Canvas ===== */
#mehta-3d-webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}
