/**
 * Enhanced Product View Styles
 * Modern, clean design for product detail pages
 */

/* ============================================
   PRODUCT HEADER SECTION
   ============================================ */

.product-header-section {
    animation: fadeInDown 0.5s ease;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.product-meta {
    padding: 0.75rem 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
}

.meta-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #2c3e50;
}

.special-badge {
    font-size: 0.9rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.custom-price-badge {
    font-size: 0.9rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.custom-price-icon {
    color: #198754;
    animation: sparkle 1.5s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.favourite-action .pulse-on-hover:hover {
    animation: heartbeat 1s;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.2); }
    20%, 40% { transform: scale(1.1); }
}

/* ============================================
   PRODUCT GALLERY
   ============================================ */

.product-gallery-card {
    transition: all 0.3s ease;
}

.main-product-image-wrapper {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 2rem;
    text-align: center;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-link {
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.product-main-image {
    max-height: 450px;
    width: auto;
    max-width: 100%;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.product-image-link:hover .product-main-image {
    transform: scale(1.05);
}

.image-zoom-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(13, 110, 253, 0.9);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-image-link:hover .image-zoom-badge {
    opacity: 1;
}

/* Thumbnails */
.product-thumbnails-wrapper {
    background: #f8f9fa;
}

.product-thumbnail {
    display: inline-block;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.product-thumbnail.active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.2);
}

.product-thumbnail:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
}

.thumbnail-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
}

/* ============================================
   PRICING SECTION
   ============================================ */

.pricing-card {
    border-top: 4px solid #0d6efd !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.price-display-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
}

.list-price-display {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price-currency {
    font-size: 1.75rem;
    font-weight: 700;
    color: #198754;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #198754;
    line-height: 1;
}

.customer-pricing-info .badge {
    font-size: 0.95rem;
    animation: fadeIn 0.5s ease;
}

/* ============================================
   ADD TO CART SECTION
   ============================================ */

.add-to-cart-section {
    animation: fadeInUp 0.5s ease;
}

.add-to-cart-section .card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.quantity-input-wrapper label,
.quantity-cart-wrapper label {
    color: #6c757d;
    font-weight: 600;
}

.quantity-cart-wrapper .form-control-lg {
    font-size: 1.25rem;
    height: calc(3.5rem + 2px);
}

.btn.addtocart {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn.addtocart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn.addtocart:hover::before {
    width: 300px;
    height: 300px;
}

.btn.addtocart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.product-actions .btn {
    transition: all 0.3s ease;
}

.product-actions .btn:hover {
    transform: translateY(-2px);
}

/* ============================================
   PRODUCT DETAILS CARD
   ============================================ */

.product-details-card,
.documents-card {
    animation: fadeInUp 0.6s ease;
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-specifications {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #495057;
}

.product-specifications ul {
    list-style: none;
    padding-left: 0;
}

.product-specifications ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.product-specifications ul li:last-child {
    border-bottom: none;
}

.product-specifications ul li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #198754;
    margin-right: 0.75rem;
}

/* ============================================
   DOCUMENTS SECTION
   ============================================ */

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.document-download-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.document-download-btn:hover {
    border-color: #0d6efd;
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.document-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.document-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.document-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.document-type {
    font-size: 0.8rem;
    color: #6c757d;
}

.download-icon {
    flex-shrink: 0;
    color: #0d6efd;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.document-download-btn:hover .download-icon {
    transform: translateY(3px);
}

/* ============================================
   RELATED PRODUCTS
   ============================================ */

.product-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef !important;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.product-card .bg-light {
    background-color: #f8f9fa !important;
    transition: background-color 0.3s ease;
}

.product-card:hover .bg-light {
    background-color: #e9ecef !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 991.98px) {
    .product-title {
        font-size: 1.5rem;
    }

    .price-amount {
        font-size: 2rem;
    }

    .main-product-image-wrapper {
        min-height: 350px;
        padding: 2rem 1rem;
    }

    .product-main-image {
        max-height: 350px;
    }

    .sticky-top {
        position: static !important;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .product-title {
        font-size: 1.25rem;
    }

    .product-meta {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    .price-display-section {
        padding: 1rem;
    }

    .price-amount {
        font-size: 1.75rem;
    }

    .thumbnail-image {
        width: 60px;
        height: 60px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .product-actions,
    .add-to-cart-section,
    .favourite-action,
    .image-zoom-badge {
        display: none !important;
    }

    .product-header-section,
    .product-gallery-card,
    .pricing-card {
        box-shadow: none !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.btn:focus,
.product-thumbnail:focus,
.document-download-btn:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-thumbnail.active {
        border-width: 4px;
    }

    .document-download-btn {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
