/**
 * PRODUCT DETAIL PAGE STYLES
 * 
 * This file contains all styles for the product detail page.
 * Following best practices by separating concerns and using external CSS.
 */

/* Product Detail Container */
.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* Product Images */
.product-images {
    position: relative;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail.active {
    border-color: #ff6b00;
}

/* Product Information */
.product-info {
    padding: 20px 0;
}

.product-category {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.product-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.product-brand {
    font-size: 16px;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-price {
    font-size: 28px;
    font-weight: 600;
    color: #ff6b00;
    margin-bottom: 20px;
}

/* Product Details */
.product-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.detail-value {
    color: #666;
    text-align: right;
}

.detail-value.in-stock {
    color: #4CAF50;
    font-weight: 600;
}

.detail-value.out-of-stock {
    color: #f44336;
    font-weight: 600;
}

.product-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Product Options */
.product-options {
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 25px;
}

.option-label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-option.selected {
    border-color: #ff6b00;
    transform: scale(1.1);
}

.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-option {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.size-option.selected {
    border-color: #ff6b00;
    background: #ff6b00;
    color: white;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    border-color: #ff6b00;
}

.quantity-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Action Buttons */
.add-to-cart-btn {
    width: 100%;
    padding: 15px;
    background: #ff6b00;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 20px;
}

.add-to-cart-btn:hover {
    background: #e55a00;
}

.buy-now-btn {
    width: 100%;
    padding: 15px;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.buy-now-btn:hover {
    background: #000;
}

/* Related Products */
.related-products {
    margin-top: 60px;
}

.related-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.related-product {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.related-product:hover {
    transform: translateY(-5px);
}

.related-product img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-product-info {
    padding: 15px;
}

.related-product-brand {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.related-product-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.related-product-category {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.related-product-price {
    color: #ff6b00;
    font-weight: 600;
    font-size: 16px;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animations */
.product-detail-container {
    animation: fadeIn 0.6s ease;
}

.main-image {
    transition: opacity 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-title {
        font-size: 24px;
    }

    .product-price {
        font-size: 24px;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .product-detail-container {
        padding: 20px 10px;
    }

    .main-image {
        height: 300px;
    }

    .product-title {
        font-size: 20px;
    }

    .product-price {
        font-size: 20px;
    }
} 