/* ViewItem Page Specific Styles */

.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-color);
}

/* Product Header Section */
.product-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--white);
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
    padding: 15px;
    box-sizing: border-box;
}

.main-image:hover {
    transform: scale(1.05);
}

.no-image {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--text-color);
    font-size: 1.2rem;
    border-radius: 8px;
}

.thumbnail-gallery {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
    padding: 5px;
    box-sizing: border-box;
    background: var(--white);
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Product Info Section */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.brand-category {
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

.brand {
    font-weight: 600;
}

.separator {
    margin: 0 0.5rem;
}

.category {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin: 0;
}

.rating-overview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--lighter-gray);
    border-radius: 8px;
}

.stars {
    color: #f39c12;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.rating-value {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.review-count {
    color: var(--text-color);
    opacity: 0.7;
}

.price-range {
    font-size: 2rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.product-description {
    line-height: 1.8;
    color: var(--text-color);
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.detail-item:last-child {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Specifications Section */
.specifications-section {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.specifications-section h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.spec-name {
    font-weight: 600;
    color: var(--primary-color);
}

.spec-value {
    color: var(--text-color);
    font-weight: 500;
}

.spec-unit {
    color: var(--text-color);
    opacity: 0.7;
    margin-left: 0.3rem;
}

/* Reviews Section */
.reviews-section {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.reviews-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0;
}

.rating-breakdown {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: var(--lighter-gray);
    border-radius: 8px;
}

.rating-breakdown h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.rating-label {
    min-width: 80px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.progress-bar {
    flex: 1;
    background: var(--light-gray);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--secondary-color);
    transition: width 0.5s ease;
}

.rating-count {
    min-width: 30px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.no-reviews {
    text-align: center;
    padding: 3rem;
    color: var(--text-color);
    opacity: 0.7;
}

.review-item {
    padding: 2rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.review-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reviewer-name {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.skill-level {
    font-size: 0.8rem;
    color: var(--white);
    background: var(--secondary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    display: inline-block;
    width: fit-content;
}

.review-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.review-stars {
    color: #f39c12;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.review-date {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

.review-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.review-text {
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.pros, .cons {
    padding: 1.5rem;
    border-radius: 8px;
}

.pros {
    background: rgba(39, 174, 96, 0.1);
    border-left: 4px solid #27ae60;
}

.cons {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #e74c3c;
}

.pros h5, .cons h5 {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.pros h5 {
    color: #27ae60;
}

.cons h5 {
    color: #e74c3c;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recommendation {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.recommendation.recommended {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.recommendation.not-recommended {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.helpfulness {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.helpful-btn {
    background: var(--light-gray);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.helpful-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.helpful-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-header {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
    }
    
    .review-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .review-meta {
        align-items: flex-start;
    }
    
    .review-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .reviews-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95vw;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    .rating-overview {
        flex-wrap: wrap;
    }
    
    .spec-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Animation for smooth loading */
.product-header,
.specifications-section,
.reviews-section {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-image {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
