/* Time Access Solution - Product Review System Styles */

:root {
    --primary-color: #0F1B2D;
    --primary-light: #102A43;
    --secondary-color: #11C76F;
    --accent-color: #FF7A45;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #F5F7FA;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Post Detail Styles */
.post-detail {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin: 2rem 0;
    overflow: hidden;
}

.breadcrumb {
    padding: 1rem 2rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
}

.breadcrumb span {
    color: var(--text-light);
    margin: 0 0.5rem;
}

.post-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-header h1 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item i {
    color: var(--secondary-color);
}

/* Product Info */
.product-info {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.product-info h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.detail-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.detail-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
}

/* Rating Stars */
.rating-stars {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #fbbf24;
    font-size: 1.1rem;
}

.rating-text {
    font-weight: 600;
    color: var(--text-dark);
}

/* Image Gallery */
.post-images {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-images h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.modal-caption {
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 1.1rem;
}

.modal-counter {
    color: white;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-prev {
    left: -60px;
}

.modal-next {
    right: -60px;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Content */
.post-content {
    padding: 2rem;
}

.post-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.content-html {
    line-height: 1.8;
    font-size: 1.1rem;
}

.content-html p {
    margin-bottom: 1rem;
}

.content-html h3 {
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
}

.content-html ul, .content-html ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-html li {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .post-header {
        padding: 1.5rem;
    }
    
    .post-header h1 {
        font-size: 1.5rem;
    }
    
    .product-info {
        padding: 1.5rem;
    }
    
    .product-details {
        grid-template-columns: 1fr;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .modal-nav {
        display: none;
    }
    
    .post-content {
        padding: 1.5rem;
    }
}
