/* Product Page Modern Styles */

/* --- Hero Section --- */
.product-hero {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

@media (min-width: 768px) {
    .product-hero {
        grid-template-columns: 350px 1fr;
    }
}

/* Hero Image */
.hero-image-wrapper {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.hero-image {
    max-height: 350px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.05);
}

/* Hero Details */
.hero-details {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-main);
}

.rating-summary .star-icon {
    color: var(--accent-color);
}

.price-overview {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    background: var(--primary-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.price-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.price-value-large {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.store-count-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Key Features Grid in Hero */
.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-md);
    margin-top: auto;
}

.mini-feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.mini-feature i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.mini-feature-text {
    font-size: 0.85rem;
    line-height: 1.2;
}

.mini-feature-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.mini-feature-value {
    font-weight: 600;
    color: var(--text-main);
}

/* --- Sticky Tabs --- */
.sticky-nav-wrapper {
    position: sticky;
    top: 70px;
    /* Adjust based on header height */
    z-index: 90;
    background: var(--bg-body);
    /* Creates a mask behind tabs */
    padding-bottom: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.nav-tabs {
    display: flex;
    background: var(--bg-card);
    padding: var(--spacing-xs);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.nav-tabs::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.nav-tab-link {
    flex: 1;
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: var(--transition-base);
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-tab-link:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

.nav-tab-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

/* --- Sections --- */
.content-section {
    scroll-margin-top: 140px;
    /* For sticky header + tabs */
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--bg-body);
    padding-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.section-title i {
    color: var(--primary-color);
}

/* --- Rice List Styles (Enhanced) --- */
.price-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.price-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.price-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.store-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 250px;
    /* Growing flex basis */
    margin-right: 15px;
}

.store-logo-img {
    width: 60px;
    height: 35px;
    object-fit: contain;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 2px;
}

.store-placeholder {
    width: 60px;
    height: 35px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    border-radius: 4px;
    font-size: 1.2rem;
}

.store-name-text {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
}

.price-details {
    color: #555;
    font-size: 0.95rem;
    flex: 2 1 300px;
    padding: 0 15px;
    border-left: 1px solid #eee;
    /* Vertical separator for desktop */
    margin: 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-details i {
    color: var(--primary-color);
}

.price-action {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1 1 200px;
    justify-content: flex-end;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ff6b6b;
}

/* Button Enhancements */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-outline:hover {
    background-color: var(--primary-light);
}


/* --- Mobile Price List Adjustments --- */
@media (max-width: 768px) {
    .price-item {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }

    .store-info {
        margin-right: 0;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f0f0f0;
    }

    .price-details {
        border-left: none;
        border-bottom: 1px solid #eee;
        /* Horizontal separator for mobile */
        margin: 0 0 12px 0;
        padding: 0 0 12px 0;
    }

    .price-action {
        justify-content: space-between;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .price-action {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        text-align: center;
    }
}


/* --- Specs Table --- */
.specs-category-group {
    margin-bottom: var(--spacing-xl);
}

.specs-category-title {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

@media (min-width: 600px) {
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.spec-item {
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.spec-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.spec-value {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
}

/* --- Reviews --- */
.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .reviews-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.review-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.reviewer-name {
    font-weight: 700;
    color: var(--text-main);
}

.review-stars {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.review-body {
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
}

/* --- Media Gallery --- */
.media-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.media-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    cursor: pointer;
}

.media-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.media-card:hover img {
    transform: scale(1.1);
}

.video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Breadcrumbs (Updated) --- */
.breadcrumbs {
    padding: 12px 15px;
    margin-bottom: var(--spacing-md);
    font-size: 14px;
    color: #6c757d;
    background: #f8f9fa;
    /* Light Gray Background */
    border: 1px solid #e9ecef;
    /* Subtle Border */
    border-radius: 4px;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    /* Slash Separator */
    margin-left: 8px;
    color: #adb5bd;
    font-size: 12px;
}

.breadcrumbs a {
    color: #0d6efd;
    /* Blue Link */
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.breadcrumbs .current {
    color: #6c757d;
    font-weight: 400;
}

/* --- Store Contact Modal --- */
.store-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.store-modal.active {
    opacity: 1;
    visibility: visible;
}

.store-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.store-modal-content {
    position: relative;
    background: var(--bg-card);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 10001;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.store-modal.active .store-modal-content {
    transform: translateY(0);
}

.store-modal-header {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.store-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.1rem;
}

.store-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.store-modal-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

.store-modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.store-contact-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    /* border-left removed */
}

.store-contact-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 2px;
}