/**
 * Product Cards Component
 *
 * Styles for product detail pages, product cards, and related products.
 * Uses CSS variables from colors-variables.css for theming.
 */

/* ========================================
   Product Detail Page
   ======================================== */

.product-detail {
    padding: 80px 0 60px;
}

/* ========================================
   Product Image Main
   ======================================== */

.product-image-main {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 60px;
    text-align: center;
    color: #fff;
    position: relative;
}

.product-image-main i {
    font-size: 8rem;
    opacity: 0.8;
}

.product-image-main .material-label {
    margin-top: 20px;
    font-size: 1.2rem;
    opacity: 0.9;
}

.product-badge-custom {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.9rem;
    padding: 8px 12px;
}

/* ========================================
   Product Title & Info
   ======================================== */

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}

.product-badge {
    background: var(--primary-color);
    color: #fff;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.product-price-contact {
    font-size: 1.2rem;
}

/* ========================================
   Product Description & Specs
   ======================================== */

.product-description h3,
.product-specifications h3,
.pricing-tiers h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

.product-description p {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

.product-specifications table th {
    width: 35%;
    background: var(--background-color);
    font-weight: 600;
}

/* ========================================
   Pricing Tiers Table
   ======================================== */

.pricing-tiers table thead {
    background: var(--primary-color);
    color: #fff;
}

.pricing-tier-qty {
    font-weight: 600;
}

.pricing-tier-price {
    color: var(--primary-color);
    font-weight: 600;
}

.pricing-tier-total {
    color: #666;
}

/* ========================================
   Product Actions
   ======================================== */

.product-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.product-actions .btn-lg {
    padding: 15px 40px;
}

/* ========================================
   Product Info Cards
   ======================================== */

.product-info-cards .info-card {
    background: #ffffff;
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #d0d5dd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.product-info-cards .info-card i {
    display: block;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.product-info-cards .info-card-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--text-title-color);
}

.product-info-cards .info-card-text {
    font-size: 0.85rem;
    color: #666;
}

/* ========================================
   Related Products Section
   ======================================== */

.related-products {
    padding: 60px 0;
    background: #ffffff;
    border-top: 1px solid var(--border-color-light, #e5e5e5);
    margin-top: 40px;
}

.related-products h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-title-color);
    margin-bottom: 10px;
}

.related-products .section-subtitle {
    color: #666;
    margin-bottom: 10px;
}

/* ========================================
   Pricing Area Table
   ======================================== */

.pricing-area table {
    width: 100%;
    margin: 20px 0;
}

.pricing-area table td,
.pricing-area table th {
    padding: 12px;
    text-align: center;
}

@media (max-width: 768px) {
    .pricing-area table {
        font-size: 0.85rem;
    }

    .pricing-area table td,
    .pricing-area table th {
        padding: 8px 4px;
    }
}

/* ========================================
   Loading Spinner
   ======================================== */

.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Start Designing Button Animation
   ======================================== */

.btn.disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

#startDesigningBtn:not(.disabled) {
    animation: product-pulse-glow 2s ease-in-out infinite;
}

@keyframes product-pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(52, 152, 219, 0.5);
    }
}
