/**
 * Single Product Page Styles - Minecraft Theme
 * Custom layout matching the provided design - works within WooCommerce structure
 */

/* Override WooCommerce default width for product summary */
div.product div.summary,
.woocommerce div.product div.summary,
.woocommerce-page #content div.product div.summary,
.woocommerce-page div.product div.summary {
    float: right;
    width: auto !important; /* Disable default width */
    clear: none;
}

/* Remove card styling from single product #product-xx container */
.woocommerce.single-product #product-27,
.woocommerce.single-product #product-21,
.woocommerce.single-product #product-20,
.woocommerce.single-product div.product {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    backdrop-filter: none !important;
}

/* Remove card styling from summary entry-summary */
.woocommerce.single-product .summary.entry-summary {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    backdrop-filter: none !important;
}

/* Add enhanced card styling to related products section */
.woocommerce.single-product .related.products {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(162, 89, 255, 0.05) 100%) !important;
    border: 2px solid rgba(162, 89, 255, 0.15) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 50px rgba(162, 89, 255, 0.25) !important;
    padding: 2rem !important;
    margin: 2rem !important;
    backdrop-filter: blur(20px) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Add glow effect to related products section */
.woocommerce.single-product .related.products::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, transparent 0%, rgba(162, 89, 255, 0.1) 100%) !important;
    opacity: 0.8 !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

/* Ensure related products content is above the glow */
.woocommerce.single-product .related.products > * {
    position: relative !important;
    z-index: 1 !important;
}

/* Style the related products title */
.woocommerce.single-product .related.products h2 {
    color: var(--text-primary) !important;
    text-align: center !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
    margin-bottom: 2rem !important;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3) !important;
}

/* Single Product Main Container */
.woocommerce.single-product {
    font-family: 'Poppins', sans-serif;
}

.minecraft-single-product-content {
    background: var(--bg-primary);
    padding: 2rem 0;
}

/* Product Hero Section */
.product-hero-section {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(30px);
    border-radius: 25px;
    border: 0;
    margin-bottom: 48px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.product-hero-grid {
    margin: 2rem;
    box-shadow: 0 0 20px 10px rgb(45 95 194) !important;
    border-radius: 20px !important;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

/* Product Image Section */
.product-image-section {
    background: var(--gradient-info);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
}

.product-image-container {
    position: relative;
    z-index: 2;
    max-width: 400px;
    width: 100%;
}

.product-hero-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    transition: transform 0.3s;
}

.product-hero-image:hover {
    transform: scale(1.05);
}

/* Product Details Section */
.product-details-section {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--card-bg);
}

/* Category Badge */
.product-category-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-info);
    color: var(--white);
    padding: 9.6px 19.2px;
    border-radius: 50px;
    font-size: 13.6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    align-self: flex-start;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Product Title */
.product-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 44px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    margin-top: 0;
}

/* Product Meta Badges */
.product-meta-badges {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.meta-badge {
    background: linear-gradient(135deg, #17a2b8, #138396);
    border-color: #17a2b8;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12.8px 19.2px;
    border-radius: 25px;
    font-size: 13.6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #17a2b8;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

/* Short Description */
.product-short-description {
    margin-bottom: 2rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    line-height: 30.24px;
    font-size: 16.8px;
}

.product-short-description p {
    margin-bottom: 19.2px;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 0;
}

/* Pricing Section */
.product-pricing {
    background: rgba(0, 0, 0, 0);
    padding: 32px 0;
    border-radius: 20px;
    margin-bottom: 32px;
    border: 0;
}

.price-display {
    font-size: 40px;
    font-weight: 800;
    color: #3b82f6;
    text-shadow: none;
    margin-bottom: 8px;
    display: block;
}

.price-display .price {
    color: #3b82f6;
}

.price-display .woocommerce-Price-amount {
    color: #3b82f6;
}

/* Quantity Section */
.quantity-section {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    justify-content: center;
}

.quantity-label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 17.6px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.quantity-btn {
    background: transparent;
    border: 0;
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    font-size: 20.8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #3b82f6;
}

.qty-input {
    width: 80px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 17.6px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 0;
    border-bottom: 0;
    background: transparent;
    text-align: center;
    outline: none;
    -moz-appearance: textfield; /* Firefox */
    appearance: textfield; /* Standard property */
}

/* Hide Chrome's default number input controls */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.total-price {
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
    padding: 16px 24px;
    border-radius: 15px;
    color: #ffffff;
    font-weight: 700;
    font-size: 19.2px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Hide original price in total price display, show only current price */
.total-price del,
.total-price .screen-reader-text {
    display: none !important;
}

.total-price ins {
    text-decoration: none !important;
    color: #ffffff !important;
}

/* Add to Cart Button */
.cart-actions {
    display: flex;
    gap: 16px;
}

.minecraft-add-to-cart-btn {
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
    color: #ffffff;
    border: 0;
    padding: 19.2px 40px;
    font-size: 17.6px;
    font-weight: 700;
    border-radius: 15px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12.8px;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
    flex: 1;
    justify-content: center;
    cursor: pointer;
}

.minecraft-add-to-cart-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.6);
    color: #ffffff;
}

.minecraft-add-to-cart-btn::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: left 0.5s;
}

.minecraft-add-to-cart-btn:hover::before {
    left: 100%;
}

/* Product Meta Info */
/* .product-meta-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.product-meta-info .posted_in,
.product-meta-info .tagged_as {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.product-meta-info a {
    color: #3b82f6;
    text-decoration: none;
    transition: 0.3s;
}

.product-meta-info a:hover {
    color: #60a5fa;
    text-decoration: underline;
} */

/* Product Description Section */
.minecraft-product-description-section {
    background: rgba(255, 255, 255, 0.02);
    padding: 4rem 0;
    margin: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.product-description-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 23px;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.product-description-content h2,
.product-description-content h3 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .product-image-section,
    .product-details-section {
        padding: 24px;
    }
    
    .product-title {
        font-size: 28px;
        line-height: 32px;
    }
    
    .quantity-section {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .total-price {
        flex: 1;
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .minecraft-single-product-content {
        padding: 1rem 0;
    }
    
    .product-hero-section {
        margin-bottom: 24px;
        border-radius: 16px;
    }
    
    .product-title {
        font-size: 24px;
        line-height: 28px;
    }
    
    .minecraft-add-to-cart-btn {
        padding: 16px 24px;
        font-size: 16px;
    }
}
