/* Single Product Page Styles */

.product-page-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Product Gallery Section */
.product-gallery-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-main-image {
    position: relative;
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
}

.no-image-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-image-placeholder p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.no-related-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

.product-discount-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #ff4757;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2;
}

.product-thumbnails {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-item.active {
    border-color: #007bff;
    transform: scale(1.05);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Information Section */
.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-breadcrumb {
    font-size: 0.9rem;
    color: #666;
}

.product-breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.product-breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
}

.product-brand {
    font-size: 0.9rem;
    color: #007bff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.2;
}

.product-model {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

/* Product Pricing */
.product-pricing {
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #27ae60;
}

.original-price {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
}

.savings-amount {
    background: #e8f5e8;
    color: #27ae60;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Product Description */
.product-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

/* Product Purchase Section */
.product-purchase-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-selector label {
    font-weight: 600;
    color: #2c3e50;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #e9ecef;
}

.quantity-btn:active {
    transform: scale(0.95);
}

#product-quantity {
    width: 50px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    background: white;
}

/* Enhanced Button Styles - Smaller and Better Proportions */
.purchase-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.add-to-cart-btn.primary-action {
    flex: 1;
    min-width: 180px;
    height: 42px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.add-to-cart-btn.primary-action:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 123, 255, 0.4);
}

.add-to-cart-btn.primary-action:active {
    transform: translateY(0);
}

.add-to-cart-btn.primary-action:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.buy-now-btn.secondary-action {
    flex: 1;
    min-width: 180px;
    height: 42px;
    background: white;
    color: #007bff;
    border: 2px solid #007bff;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.buy-now-btn.secondary-action:hover {
    background: #f8f9ff;
    color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 123, 255, 0.3);
}

.buy-now-btn.secondary-action:active {
    transform: translateY(0);
}

.buy-now-btn.secondary-action:disabled {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.buy-now-btn.secondary-action.success-state {
    background: #f8fff9 !important;
    color: #28a745 !important;
    border-color: #28a745 !important;
    transform: scale(1.05);
}

.btn-icon {
    font-size: 1rem;
}

/* Product Specifications */
.product-specifications {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.specifications-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.specifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.spec-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.spec-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.spec-value {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.spec-value.in-stock {
    color: #28a745;
    font-weight: 600;
}

.spec-value.out-of-stock {
    color: #dc3545;
    font-weight: 600;
}

/* Related Products Section */
.related-products-section {
    margin-top: 4rem;
    padding: 3rem 0;
    background: #f8f9fa;
}

.related-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.related-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.related-product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.05);
}

.related-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.related-product-info {
    padding: 1.5rem;
}

.related-product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.related-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-product-title a:hover {
    color: #007bff;
}

.related-product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 1rem;
}

.related-product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.add-to-cart-btn.compact {
    width: 100%;
    height: 36px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart-btn.compact.success-state {
    background: #28a745 !important;
    transform: scale(1.05);
}

.add-to-cart-btn.compact .btn-icon {
    font-size: 1rem;
}


.add-to-cart-btn.compact:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Success State */
.success-state {
    background: #28a745 !important;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-page-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin: 1rem auto;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .product-main-image {
        height: 400px;
    }
    
    .main-product-image {
        height: 100%;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    .purchase-actions {
        flex-direction: column;
    }
    
    .add-to-cart-btn.primary-action,
    .buy-now-btn.secondary-action {
        width: 100%;
        min-width: auto;
        height: 48px;
        font-size: 1rem;
        font-weight: 600;
        padding: 0 1.25rem;
    }
    
    .specifications-grid {
        grid-template-columns: 1fr;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .related-product-actions {
        gap: 0.5rem;
    }
    
}

@media (max-width: 480px) {
    .product-page-container {
        padding: 0 0.5rem;
    }
    
    .product-main-image {
        height: 300px;
    }
    
    .main-product-image {
        height: 100%;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-specifications {
        padding: 1rem;
    }
    
    .specifications-title {
        font-size: 1.2rem;
    }
    
    .add-to-cart-btn.primary-action,
    .buy-now-btn.secondary-action {
        height: 50px;
        font-size: 1rem;
        font-weight: 700;
        padding: 0 1.5rem;
        min-height: 50px;
        touch-action: manipulation;
    }
    
    .buy-now-btn.secondary-action {
        background: white;
        color: #007bff;
        border: 2px solid #007bff;
        box-shadow: 0 3px 10px rgba(0, 123, 255, 0.2);
    }
    
    .buy-now-btn.secondary-action:hover {
        background: #f8f9ff;
        color: #0056b3;
        border-color: #0056b3;
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    }
}
