/**
 * Product Detail Page Styles
 * StarPro Vision - Product Detail Responsive Design
 */

/* Product Detail Page Container */
.product-detail-page {
    background: #fff;
    padding: 40px 0;
    margin: 20px 0;
}

.product-detail-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #28a745;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #218838;
}

.breadcrumb span {
    color: #ccc;
}

/* Product Detail Grid Layout */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

/* Product Images Section */
.product-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-images .main-image {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-images .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-images .main-image:hover img {
    transform: scale(1.05);
}

.product-images .main-image .image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    color: #ccc;
    font-size: 60px;
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    z-index: 10;
}

/* Image Thumbnails */
.product-images .image-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.product-images .image-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.product-images .image-thumbnails img:hover,
.product-images .image-thumbnails img.active {
    border-color: #28a745;
    transform: scale(1.05);
}

/* Product Info Section */
.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.product-name {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    margin: 0;
}

/* Product Meta Information */
.product-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666;
}

.product-rating i {
    color: #ffc107;
    font-size: 16px;
}

.product-rating i.far {
    color: #ddd;
}

.product-sku {
    font-size: 14px;
    color: #666;
}

.product-sku strong {
    color: #333;
    font-weight: 600;
}

.product-stock {
    font-size: 14px;
    font-weight: 600;
}

.product-stock .in-stock {
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-stock .out-of-stock {
    color: #dc3545;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Price Section */
.product-price-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px;
    background: #f0fdf4;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.price-original {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.price-sale {
    font-size: 36px;
    font-weight: 700;
    color: #dc3545;
}

.price-current {
    font-size: 36px;
    font-weight: 700;
    color: #28a745;
}

.price-save {
    font-size: 14px;
    color: #28a745;
    font-weight: 600;
    background: rgba(40, 167, 69, 0.1);
    padding: 4px 12px;
    border-radius: 6px;
}

/* Product Description */
.product-description {
    font-size: 15px;
    line-height: 1.8;
    color: #666;
}

.product-description p {
    margin: 0;
}

/* Product Variations */
.product-variations {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.product-variations h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.variations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.variation-option {
    display: flex;
    align-items: center;
    gap: 12px;
}

.variation-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #28a745;
}

.variation-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    margin: 0;
    flex: 1;
}

.variation-price {
    font-size: 12px;
    color: #28a745;
    font-weight: 600;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Product Actions */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-selector label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.quantity-input {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.quantity-input button {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-input button:hover {
    background: #28a745;
    color: white;
}

.quantity-input input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.quantity-input input:focus {
    outline: none;
    background: #f8f9fa;
}

/* Add to Cart Button */
.btn-lg {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-lg.btn-primary {
    background: #28a745;
    color: white;
    border: none;
}

.btn-lg.btn-primary:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* Outline Button */
.btn-outline-primary {
    background: transparent;
    color: #28a745;
    border: 2px solid #28a745;
    padding: 13px 38px;
    font-weight: 600;
    font-size: 16px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #28a745;
    color: white;
}

/* Out of Stock Message */
.out-of-stock-message {
    padding: 30px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
    color: #721c24;
}

.out-of-stock-message i {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.out-of-stock-message p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Product Features */
.product-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.product-features .feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.product-features .feature i {
    font-size: 24px;
    color: #28a745;
}

.product-features .feature span {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Product Tabs */
.product-tabs {
    margin: 60px 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    background: #f8f9fa;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.tab-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.tab-btn.active {
    color: #28a745;
    background: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #28a745;
}

.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

/* Specifications Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.specs-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.specs-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
}

.specs-table td {
    padding: 12px 15px;
    color: #666;
}

.specs-table tr:last-child {
    border-bottom: none;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.review-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.review-header strong {
    font-size: 15px;
    color: #333;
    min-width: 150px;
}

.review-rating {
    display: flex;
    gap: 4px;
}

.review-rating i {
    color: #ffc107;
    font-size: 14px;
}

.review-rating i.far {
    color: #ddd;
}

.review-date {
    font-size: 13px;
    color: #999;
}

.review-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.review-item p {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Write Review Section */
.write-review-section {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 30px;
}

.write-review-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.required {
    color: #dc3545;
}

.form-control {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.star-rating-input i {
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.star-rating-input i:hover,
.star-rating-input i.fas {
    color: #ffc107;
    transform: scale(1.2);
}

.rating-text {
    margin-left: 10px;
    font-weight: 600;
    color: #28a745;
    font-size: 14px;
}

/* Login to Review */
.login-to-review {
    padding: 30px;
    background: #f0fdf4;
    border: 2px solid #28a745;
    border-radius: 8px;
    text-align: center;
}

.login-to-review p {
    font-size: 16px;
    color: #28a745;
    margin: 0;
}

.login-to-review a {
    color: #28a745;
    font-weight: 600;
    text-decoration: underline;
}

.login-to-review a:hover {
    color: #218838;
}

/* Related Products */
.related-products {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.related-products h2 {
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
}

/* Responsive Design */

/* Tablets and Medium Screens (768px to 1024px) */
@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .product-features {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .product-detail-page {
        padding: 20px 0;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .product-name {
        font-size: 24px;
    }
    
    .product-price-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .price-sale,
    .price-current {
        font-size: 28px;
    }
    
    .product-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-features .feature {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }
    
    .product-features .feature i {
        flex-shrink: 0;
        margin-top: 2px;
    }
    
    .breadcrumb {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 calc(33.333% - 7px);
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .tab-pane h3 {
        font-size: 20px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .write-review-section {
        padding: 20px;
    }
}

/* Small Phones (480px and below) */
@media (max-width: 480px) {
    .product-detail-page {
        padding: 15px 0;
        margin: 10px 0;
    }
    
    .product-detail-page .container {
        padding: 0 15px;
    }
    
    .product-name {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .product-meta {
        padding: 15px;
        gap: 10px;
    }
    
    .product-price-section {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        gap: 10px;
    }
    
    .price-sales,
    .price-current {
        font-size: 24px;
    }
    
    .product-image {
        border-radius: 8px;
    }
    
    .product-images .image-thumbnails {
        gap: 8px;
    }
    
    .product-images .image-thumbnails img {
        width: 60px;
        height: 60px;
    }
    
    .product-variations {
        padding: 15px;
    }
    
    .product-actions {
        gap: 12px;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .btn-outline-primary {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .quantity-selector label {
        min-width: auto;
    }
    
    .quantity-input {
        width: 100%;
    }
    
    .quantity-input button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .quantity-input input {
        height: 35px;
    }
    
    .product-features {
        gap: 12px;
        padding: 15px;
    }
    
    .tab-buttons {
        flex-direction: column;
        border-bottom: none;
    }
    
    .tab-btn {
        padding: 12px 15px;
        border-bottom: 1px solid #e0e0e0;
        flex: 1;
    }
    
    .tab-btn.active::after {
        display: none;
    }
    
    .tab-btn.active {
        background: #f0fdf4;
        border-left: 4px solid #28a745;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .tab-pane h3 {
        font-size: 18px;
    }
    
    .specs-table {
        font-size: 13px;
    }
    
    .specs-table th,
    .specs-table td {
        padding: 10px;
    }
    
    .reviews-list {
        gap: 15px;
    }
    
    .review-item {
        padding: 15px;
        border-left-width: 3px;
    }
    
    .review-header strong {
        min-width: auto;
    }
    
    .review-rating i {
        font-size: 12px;
    }
    
    .review-date {
        flex-basis: 100%;
    }
    
    .review-title {
        font-size: 14px;
    }
    
    .review-item p {
        font-size: 13px;
    }
    
    .write-review-section {
        padding: 15px;
    }
    
    .form-control {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .star-rating-input i {
        font-size: 24px;
    }
    
    .rating-text {
        font-size: 12px;
    }
    
    .out-of-stock-message {
        padding: 20px;
    }
    
    .out-of-stock-message i {
        font-size: 32px;
        margin-bottom: 10px;
    }
}
