/* ========================================
   PRODUCT DETAILS PAGE - FULL FUNCTIONALITY
   ======================================== */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.product-details-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 20px 0;
}

/* ========================================
   BREADCRUMB NAVIGATION
   ======================================== */
.breadcrumb-nav {
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
    border-radius: 10px 10px 0 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0 20px;
    margin: 0;
    font-size: 14px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 5px;
}

.breadcrumb-item a:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.breadcrumb-item a i {
    font-size: 12px;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 600;
    padding: 5px 10px;
}

.breadcrumb-separator {
    margin: 0 5px;
    color: #6c757d;
    font-size: 12px;
}

/* ========================================
   PRODUCT MAIN CONTENT
   ======================================== */
.product-main-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

/* ========================================
   PRODUCT GALLERY SECTION
   ======================================== */
.product-gallery {
    padding: 30px;
    background: #fafafa;
    border-left: 1px solid #e0e0e0;
}

.gallery-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #007bff;
}

.gallery-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-title::before {
    content: "🖼️";
    font-size: 24px;
}

/* Main Image Wrapper */
.main-image-wrapper {
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
}

.main-image {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    cursor: zoom-in;
}

.main-image:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.no-image-placeholder:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.placeholder-content {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.placeholder-content i {
    font-size: 64px;
    margin-bottom: 15px;
    opacity: 0.6;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.placeholder-content p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.thumbnail-btn {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    aspect-ratio: 1;
    position: relative;
}

.thumbnail-btn:hover,
.thumbnail-btn:focus {
    border-color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    outline: none;
}

.thumbnail-btn.active {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    transform: scale(1.05);
}

.thumbnail-btn.active::after {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 5px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.thumbnail-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.thumbnail-btn:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* ========================================
   PRODUCT INFORMATION SECTION
   ======================================== */
.product-information {
    padding: 30px;
}

/* Product Header */
.product-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.product-title {
    font-size: 32px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 20px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.product-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease backwards;
}

.meta-item:nth-child(2) {
    animation-delay: 0.1s;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.meta-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.meta-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
}

/* ========================================
   PRODUCT PRICING
   ======================================== */
.product-pricing {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f0 100%);
    border: 1px solid #ffe0e0;
    border-radius: 12px;
    animation: fadeInUp 0.5s ease 0.2s backwards;
}

.pricing-header {
    margin-bottom: 20px;
}

.pricing-title {
    font-size: 18px;
    font-weight: 700;
    color: #dc3545;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-title::before {
    content: "💰";
    font-size: 20px;
}

.pricing-content {
    position: relative;
}

.price-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.price-info.discount-available {
    position: relative;
}

.original-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ffe0e0;
    transition: all 0.3s ease;
}

.original-price:hover {
    padding-left: 10px;
    background: rgba(220, 53, 69, 0.05);
    border-radius: 5px;
}

.discounted-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.discounted-price:hover {
    padding-left: 10px;
    background: rgba(220, 53, 69, 0.05);
    border-radius: 5px;
}

.price-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.price-value {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.price-value.old-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 14px;
    opacity: 0.8;
}

.price-value.current-price {
    color: #dc3545;
    font-size: 24px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

.discount-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    animation: pulse 2s infinite;
    z-index: 1;
}

/* ========================================
   SECTION STYLES
   ======================================== */
.product-manufacturer,
.product-description,
.product-specifications,
.product-dates,
.product-packaging,
.product-availability,
.product-actions {
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease backwards;
}

.product-manufacturer { animation-delay: 0.3s; }
.product-description { animation-delay: 0.4s; }
.product-specifications { animation-delay: 0.5s; }
.product-dates { animation-delay: 0.6s; }
.product-packaging { animation-delay: 0.7s; }
.product-availability { animation-delay: 0.8s; }
.product-actions { animation-delay: 0.9s; }

.product-manufacturer:hover,
.product-description:hover,
.product-specifications:hover,
.product-dates:hover,
.product-packaging:hover,
.product-availability:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Manufacturer Info */
.manufacturer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: #495057;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.manufacturer-info:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateX(5px);
}

.manufacturer-info i {
    color: #007bff;
    font-size: 20px;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Description */
.description-content {
    color: #495057;
}

.short-description {
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 16px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.short-description:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateX(5px);
}

.full-description {
    margin-top: 15px;
}

.description-toggle {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #007bff;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.description-toggle::before {
    content: "📖";
    font-size: 16px;
}

.description-toggle:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.description-toggle:active {
    transform: translateY(0);
}

.full-description-content {
    margin-top: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
    color: #495057;
    line-height: 1.8;
    font-size: 15px;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 1000px; }
}

.full-description-content.show {
    display: block;
}

/* Lists */
.specifications-list,
.dates-list,
.packaging-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spec-item,
.date-item,
.pack-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.spec-item::before,
.date-item::before,
.pack-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #007bff;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.spec-item:hover::before,
.date-item:hover::before,
.pack-item:hover::before {
    transform: scaleY(1);
}

.spec-item:hover,
.date-item:hover,
.pack-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.spec-label,
.date-label,
.pack-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spec-value,
.date-value,
.pack-value {
    color: #6c757d;
    font-weight: 500;
    font-size: 14px;
    background: white;
    padding: 4px 12px;
    border-radius: 15px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.spec-item:hover .spec-value,
.date-item:hover .date-value,
.pack-item:hover .pack-value {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Availability Status */
.availability-status {
    padding: 15px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-indicator::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.status-indicator:hover::before {
    left: 100%;
}

.status-indicator.in-stock {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #b8daff;
}

.status-indicator.out-of-stock {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-indicator.in-stock:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.status-indicator.out-of-stock:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.status-text {
    font-size: 16px;
    font-weight: 700;
}

.quantity-info {
    font-size: 13px;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.5);
    padding: 4px 10px;
    border-radius: 12px;
}

/* ========================================
   PRODUCT ACTIONS
   ======================================== */
.product-actions {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
}

.btn-add-to-cart {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-add-to-cart::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 ease;
}

.btn-add-to-cart:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.btn-add-to-cart:hover:not(:disabled)::before {
    left: 100%;
}

.btn-add-to-cart:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-add-to-cart:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-add-to-cart.success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-add-to-cart.error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================================
   NOTIFICATIONS
   ======================================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.notification.error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.notification i {
    font-size: 18px;
}

/* ========================================
   CART COUNTER ANIMATION
   ======================================== */
.cart-counter {
    position: relative;
}

.cart-counter.pulse {
    animation: cartPulse 0.5s ease;
}

@keyframes cartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.cart-counter.pulse::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(40, 167, 69, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 0.5s ease;
}

@keyframes ripple {
    from { width: 0; height: 0; opacity: 1; }
    to { width: 200%; height: 200%; opacity: 0; }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 992px) {
    .product-gallery {
        border-left: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .main-image {
        height: 350px;
    }
    
    .no-image-placeholder {
        height: 350px;
    }
    
    .product-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .product-details-container {
        padding: 15px 0;
    }
    
    .breadcrumb-nav {
        padding: 15px 0;
    }
    
    .breadcrumb {
        font-size: 13px;
        flex-wrap: wrap;
    }
    
    .product-main-content {
        border-radius: 10px;
    }
    
    .product-gallery,
    .product-information {
        padding: 20px;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .product-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .main-image {
        height: 300px;
    }
    
    .no-image-placeholder {
        height: 300px;
    }
    
    .thumbnail-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .price-value.current-price {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .product-manufacturer,
    .product-description,
    .product-specifications,
    .product-dates,
    .product-packaging,
    .product-availability,
    .product-actions {
        padding: 20px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .product-gallery,
    .product-information {
        padding: 15px;
    }
    
    .product-title {
        font-size: 20px;
    }
    
    .main-image {
        height: 250px;
    }
    
    .no-image-placeholder {
        height: 250px;
    }
    
    .thumbnail-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .thumbnail-btn {
        aspect-ratio: 1;
    }
    
    .gallery-title,
    .pricing-title,
    .section-title {
        font-size: 16px;
    }
    
    .product-actions {
        padding: 20px 15px;
    }
    
    .btn-add-to-cart {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* ========================================
   ACCESSIBILITY & INTERACTIONS
   ======================================== */
.thumbnail-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.btn-add-to-cart:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.description-toggle:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .main-image:hover img {
        transform: none;
    }
    
    .thumbnail-btn:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-details-container {
        background: white;
    }
    
    .product-gallery {
        background: white;
        border: 2px solid black;
    }
    
    .main-image {
        border: 2px solid black;
    }
    
    .thumbnail-btn {
        border: 2px solid black;
    }
    
    .btn-add-to-cart {
        border: 2px solid black;
    }
}

/* Print styles */
@media print {
    .product-details-container {
        background: white;
    }
    
    .product-actions {
        display: none;
    }
    
    .thumbnail-gallery {
        display: none;
    }
    
    .notification {
        display: none;
    }
}
