/* ==================== ENHANCED PRODUCT PAGE DESIGN ==================== */

/* Product Hero Section */
.product-hero {
    position: relative;
    width: 100%;
    height: 600px;
    margin-top: 80px;
    overflow: hidden;
    border-radius: 0 0 32px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.product-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10,10,31,0.3) 0%, rgba(10,10,31,0.6) 100%);
    z-index: 1;
}

.product-hero-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

.product-hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

/* Hide product images from UI (image now in hero section) */
.product-image,
.product-detail-image {
    display: none !important;
}

/* Ensure canvas remains above background but below UI */
#galaxyCanvas {
    z-index: 0;
}

/* Make .app (site UI) sit above the canvas */
.app { 
    position: relative; 
    z-index: 1; 
}

/* ==================== PRODUCTS LISTING PAGE ==================== */
.products-header {
    padding: 140px 20px 80px;
    text-align: center;
    background: linear-gradient(180deg, rgba(15, 15, 42, 0.95) 0%, rgba(10, 10, 31, 0.85) 100%);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.products-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(3, 131, 135, 0.15);
    border: 1px solid var(--accent);
    border-radius: 20px;
    color: var(--accent-light);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.products-header h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 900;
    margin: 16px 0 20px;
    background: linear-gradient(135deg, #05b5ba 0%, #038387 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.products-header p {
    font-size: 1.2rem;
    color: rgba(184, 184, 209, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Products Grid Section */
.products-section {
    padding: 80px 20px 120px;
    background: linear-gradient(180deg, rgba(10, 10, 31, 0.5) 0%, rgba(10, 10, 31, 0.7) 100%);
}

.products-container {
    max-width: 1400px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

/* Enhanced Product Card */
.product-card {
    background: rgba(15, 15, 42, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 16px 48px rgba(3, 131, 135, 0.3), 0 0 0 1px var(--accent);
}

.product-content {
    padding: 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.product-description {
    font-size: 1rem;
    color: rgba(184, 184, 209, 0.9);
    line-height: 1.7;
    margin-bottom: 24px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.product-price {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.price-original {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.7;
}

.price-egp {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--accent-light);
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(5, 181, 186, 0.3);
}

.price-currency {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.btn-view {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(3, 131, 135, 0.3);
    white-space: nowrap;
}

.btn-view:hover {
    transform: translateX(6px);
    box-shadow: 0 6px 24px rgba(3, 131, 135, 0.5);
}

/* ==================== PRODUCT DETAIL PAGE (ENHANCED) ==================== */
.product-detail {
    max-width: 1400px;
    margin: 120px auto 60px;
    padding: 0 20px;
}

.product-detail-loading {
    text-align: center;
    padding: 120px 20px;
    background: rgba(15, 15, 42, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.loader {
    width: 56px;
    height: 56px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.product-detail-container {
    background: rgba(15, 15, 42, 0.85);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

.product-detail-info {
    padding: 60px;
}

.product-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: rgba(3, 131, 135, 0.15);
    border: 1px solid var(--accent);
    border-radius: 24px;
    color: var(--accent-light);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 28px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-detail-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -1px;
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.1);
}

.product-detail-description {
    font-size: 1.125rem;
    color: rgba(184, 184, 209, 0.95);
    line-height: 1.9;
    margin-bottom: 40px;
}

.product-detail-pricing {
    background: linear-gradient(135deg, rgba(3, 131, 135, 0.08), rgba(5, 181, 186, 0.05));
    border: 2px solid var(--accent);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.product-detail-pricing::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(5, 181, 186, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.product-detail-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.product-detail-price-row:last-child {
    margin-bottom: 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.product-detail-price-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.product-detail-price-original {
    font-size: 1.25rem;
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.7;
}

.product-detail-price-egp {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-light);
    letter-spacing: -1px;
    text-shadow: 0 4px 16px rgba(5, 181, 186, 0.4);
}

.product-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 40px;
    background: linear-gradient(135deg, #25D366 0%, #20bc5a 100%);
    color: white;
    border-radius: 16px;
    font-size: 1.25rem;
    font-weight: 800;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-whatsapp::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-whatsapp:hover::before {
    width: 300px;
    height: 300px;
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(37, 211, 102, 0.6);
}

.btn-whatsapp i {
    font-size: 1.75rem;
    position: relative;
    z-index: 1;
}

.btn-whatsapp span {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateX(-4px);
}

.product-detail-meta {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.product-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1rem;
    color: var(--text-secondary);
    padding: 16px;
    background: rgba(3, 131, 135, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.product-detail-meta-item:hover {
    background: rgba(3, 131, 135, 0.1);
    transform: translateY(-2px);
}

.product-detail-meta-item i {
    color: var(--accent);
    font-size: 1.4rem;
}

/* Product Full Description */
.product-full-description {
    padding: 80px 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(3, 131, 135, 0.02) 0%, rgba(3, 131, 135, 0.05) 100%);
}

.product-features-section h2,
.product-why-choose h2,
.product-cta-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    letter-spacing: -0.5px;
}

.product-features-section h2 i,
.product-why-choose h2 i {
    color: var(--accent);
    font-size: 1.75rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-bottom: 80px;
}

.feature-item {
    background: rgba(15, 15, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 32px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(3, 131, 135, 0.2);
}

.feature-icon {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, rgba(3, 131, 135, 0.2), rgba(5, 181, 186, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 2px solid rgba(3, 131, 135, 0.3);
}

.feature-icon i {
    font-size: 1.75rem;
    color: var(--accent-light);
}

.feature-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-item p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.product-why-choose {
    margin-bottom: 80px;
}

.product-why-choose ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 16px;
}

.product-why-choose ul li {
    font-size: 1.125rem;
    color: var(--text-secondary);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(15, 15, 42, 0.5);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.product-why-choose ul li:hover {
    background: rgba(15, 15, 42, 0.7);
    border-color: var(--accent);
    transform: translateX(6px);
}

.product-why-choose ul li i {
    color: var(--accent-light);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.product-cta-section {
    background: linear-gradient(135deg, rgba(3, 131, 135, 0.15), rgba(5, 181, 186, 0.08));
    border: 3px solid var(--accent);
    border-radius: 24px;
    padding: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.product-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(5, 181, 186, 0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.product-cta-section h2 {
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.product-cta-section p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.btn-large {
    padding: 22px 56px !important;
    font-size: 1.4rem !important;
    border-radius: 18px !important;
    position: relative;
    z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .products-header {
        padding: 120px 20px 60px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .product-hero {
        height: 400px;
        margin-top: 60px;
        border-radius: 0 0 20px 20px;
    }
    
    .product-detail {
        margin-top: 32px;
    }
    
    .product-detail-info {
        padding: 32px 24px;
    }
    
    .product-detail-title {
        font-size: 1.75rem;
    }
    
    .btn-whatsapp {
        padding: 16px 28px;
        font-size: 1.05rem;
    }
    
    .product-full-description {
        padding: 60px 24px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-cta-section {
        padding: 40px 24px;
    }
    
    .btn-large {
        padding: 18px 36px !important;
        font-size: 1.15rem !important;
    }
    
    .product-detail-meta {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer {
    background: rgba(15, 15, 42, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 48px 20px;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-socials a {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(3, 131, 135, 0.4);
}
