/**
 * Product Detail Page Styles - Porównywarka Cen MED-LEK
 * Styles specific to individual product detail pages
 */

/* ==================================================
   PRODUCT HEADER
   ================================================== */
.product-header {
    background: #fff;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: var(--border-radius-card);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.product-top {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

.product-image {
    width: 220px;
    height: 220px;
    background: var(--gray-color);
    border-radius: var(--border-radius-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.product-info {
    flex: 1;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-label {
    color: var(--dark-gray);
    font-weight: 500;
}

.meta-item span:not(.meta-label) {
    color: var(--text-color);
    font-weight: 600;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 15px;
    font-size: 14px;
}

.price-summary {
    background: linear-gradient(135deg, rgba(12, 222, 208, 0.1) 0%, rgba(12, 222, 208, 0.05) 100%);
    border: 2px solid var(--primary-color);
    padding: 20px;
    border-radius: var(--border-radius-card);
    margin-bottom: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding: 25px 0 0;
    border-top: 2px solid var(--gray-color);
}

.stat {
    text-align: center;
    padding: 15px;
    background: var(--gray-color);
    border-radius: var(--border-radius-card);
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(12, 222, 208, 0.2);
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: var(--dark-gray);
    font-weight: 600;
}

/* ==================================================
   MAIN LAYOUT
   ================================================== */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

/* ==================================================
   SIDEBAR
   ================================================== */
.sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-section {
    background: #fff;
    border-radius: var(--border-radius-card);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.alert-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 14px;
    margin-bottom: 12px;
    font-family: var(--font-primary);
    transition: var(--transition);
}

.alert-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ==================================================
   CONTENT CARDS
   ================================================== */
.card {
    background: #fff;
    border-radius: var(--border-radius-card);
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--secondary-color);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-color);
}

/* ==================================================
   TABS
   ================================================== */
.tabs-container {
    width: 100%;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 25px;
    gap: 10px;
}

.tab-button {
    padding: 14px 28px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    font-family: var(--font-primary);
    border-radius: 8px 8px 0 0;
}

.tab-button:hover {
    color: var(--primary-color);
    background: rgba(12, 222, 208, 0.05);
}

.tab-button.active {
    color: var(--primary-color);
    background: rgba(12, 222, 208, 0.1);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==================================================
   PRICE TABLE
   ================================================== */
.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.price-table th {
    background: var(--gray-color);
    padding: 15px;
    text-align: left;
    font-weight: 700;
    color: var(--secondary-color);
    border-bottom: 2px solid #e0e0e0;
    font-size: 13px;
}

.price-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.price-table tbody tr {
    transition: var(--transition);
}

.price-table tbody tr:hover {
    background: rgba(12, 222, 208, 0.05);
}

.shop-name {
    font-weight: 600;
    color: var(--secondary-color);
}

.price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
}

.best-price {
    color: var(--primary-color);
}

.availability {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.available {
    background: #d4f4e2;
    color: #059862;
}

.limited {
    background: #fff4e6;
    color: #e07c00;
}

.btn-buy {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn-buy:hover {
    background: transparent;
    color: var(--primary-color);
}

/* ==================================================
   CHART
   ================================================== */
.chart-container {
    position: relative;
    height: 350px;
    margin: 20px 0;
}

/* ==================================================
   PRICE STATS
   ================================================== */
.price-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: var(--gray-color);
    border-radius: var(--border-radius-card);
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(12, 222, 208, 0.2);
}

.stat-box .stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-box .stat-label {
    font-size: 12px;
    color: var(--dark-gray);
    font-weight: 600;
}

/* ==================================================
   SPECIFICATIONS TABLE
   ================================================== */
.specs-table {
    width: 100%;
    font-size: 14px;
}

.specs-table td {
    padding: 14px;
    border-bottom: 1px solid #e0e0e0;
}

.specs-table td:first-child {
    font-weight: 600;
    color: var(--dark-gray);
    width: 35%;
    background: var(--gray-color);
}

.specs-table td:not(:first-child) {
    color: var(--text-color);
}

/* ==================================================
   COMPOSITION CHART
   ================================================== */
.composition-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.composition-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.composition-label {
    width: 140px;
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-color);
}

.composition-bar {
    flex: 1;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.composition-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #0ab8ad 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-size: 11px;
    font-weight: 700;
}

/* ==================================================
   REVIEWS
   ================================================== */
.reviews-summary-header {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 30px;
    padding: 25px;
    background: var(--gray-color);
    border-radius: var(--border-radius-card);
    margin-bottom: 25px;
}

.overall-rating {
    text-align: center;
}

.rating-big {
    font-size: 52px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 10px;
}

.stars-display {
    font-size: 22px;
    color: #ffc107;
    margin-bottom: 8px;
}

.rating-count {
    font-size: 14px;
    color: var(--dark-gray);
    font-weight: 600;
}

.rating-verified {
    font-size: 12px;
    color: #059862;
    margin-top: 5px;
    font-weight: 600;
}

.rating-distribution {
    flex: 1;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rating-label {
    width: 35px;
    font-size: 13px;
    color: var(--dark-gray);
    font-weight: 600;
}

.rating-bar {
    flex: 1;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #0ab8ad 100%);
    transition: width 0.3s;
}

.reviews-right {
    text-align: center;
}

.btn-add-review {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 20px;
    transition: var(--transition);
    font-family: var(--font-primary);
}

.btn-add-review:hover {
    background: transparent;
    color: var(--primary-color);
}

/* Individual Reviews */
.review-item {
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviewer-name {
    font-weight: 700;
    color: var(--secondary-color);
}

.verified-badge {
    background: #d4f4e2;
    color: #059862;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.review-source {
    color: var(--dark-gray);
    font-size: 13px;
    font-weight: 500;
}

.review-date {
    color: #999;
    font-size: 13px;
    font-weight: 500;
}

.review-rating {
    margin-bottom: 10px;
}

.review-rating .star {
    font-size: 16px;
    color: #ffc107;
}

.review-rating .star.filled {
    color: #ffc107;
}

.review-rating .star.empty {
    color: #ddd;
}

.rating-text {
    margin-left: 10px;
    font-size: 14px;
    color: var(--dark-gray);
    font-weight: 600;
}

.review-content {
    margin-bottom: 15px;
    line-height: 1.7;
    color: var(--text-color);
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-helpful {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--dark-gray);
    font-weight: 500;
}

.helpful-btn {
    padding: 4px 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.helpful-btn:hover {
    background: var(--gray-color);
    border-color: var(--primary-color);
}

.review-tags {
    display: flex;
    gap: 6px;
}

.review-tags .tag {
    padding: 4px 8px;
    background: #f0f7ff;
    color: var(--primary-color);
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

/* ==================================================
   FAQ
   ================================================== */
.faq-accordion {
    margin-top: 20px;
}

.faq-item {
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-card);
    margin-bottom: 15px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    width: 100%;
    padding: 18px 25px;
    background: #fff;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    font-family: var(--font-primary);
}

.faq-question:hover {
    background: rgba(12, 222, 208, 0.05);
}

.faq-question.active {
    background: rgba(12, 222, 208, 0.1);
    color: var(--primary-color);
}

.faq-icon {
    font-size: 24px;
    font-weight: 300;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.faq-question.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #fff;
}

.faq-answer.show {
    padding: 20px 25px;
    max-height: 500px;
}

.faq-answer p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.7;
}

/* ==================================================
   COMPARISON TABLE
   ================================================== */
.comparison-table {
    width: 100%;
    font-size: 14px;
    border-collapse: collapse;
}

.comparison-table th {
    background: var(--gray-color);
    padding: 12px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    color: var(--secondary-color);
}

.comparison-table td {
    padding: 12px;
    border: 1px solid #e0e0e0;
    color: var(--text-color);
}

.comparison-table .highlight {
    background: rgba(12, 222, 208, 0.1);
    font-weight: 700;
}

/* ==================================================
   READ MORE
   ================================================== */
.read-more-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.read-more-content.expanded {
    max-height: 5000px;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-primary);
    margin-top: 15px;
}

.read-more-btn:hover {
    background: transparent;
    color: var(--primary-color);
}

.read-more-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.read-more-btn.expanded svg {
    transform: rotate(180deg);
}

/* ==================================================
   WISHLIST
   ================================================== */
.wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-primary);
}

.wishlist-btn:hover,
.wishlist-btn.active {
    background: #ffe6e6;
    border-color: #ff4444;
    color: #ff4444;
}

.wishlist-btn svg {
    width: 20px;
    height: 20px;
}

.wishlist-btn.active svg {
    fill: #ff4444;
}

/* ==================================================
   NEWSLETTER
   ================================================== */
.newsletter {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0ab8ad 100%);
    padding: 25px;
    border-radius: var(--border-radius-card);
    text-align: center;
    color: white;
}

.newsletter h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.newsletter p {
    font-size: 13px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-primary);
    box-sizing: border-box;
}

.newsletter-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: var(--transition);
    box-sizing: border-box;
}

.newsletter-btn:hover {
    background: #000;
}

/* ==================================================
   CONTENT TYPOGRAPHY
   ================================================== */
.content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-color);
}

.content h2 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.content h3 {
    font-size: 17px;
    font-weight: 700;
    margin-top: 25px;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.content p {
    margin-bottom: 15px;
}

.content strong {
    font-weight: 700;
    color: var(--secondary-color);
}

/* ==================================================
   UTILITIES
   ================================================== */
.icon-svg {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

.mobile-hide {
    display: table-cell;
}

.desktop-only {
    display: table-cell;
}

/* ==================================================
   ANIMATIONS
   ================================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ==================================================
   RESPONSIVE - TABLET
   ================================================== */
@media (max-width: 968px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        order: 2;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .price-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-top {
        flex-direction: column;
    }

    .reviews-summary-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ==================================================
   RESPONSIVE - MOBILE
   ================================================== */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    /* Compact Product Header */
    .product-header {
        padding: 12px;
        margin-bottom: 12px;
    }

    .product-top {
        gap: 12px;
        margin-bottom: 12px;
        flex-direction: column;
        align-items: center;
    }

    .product-image {
        width: 200px;
        height: 200px;
        margin: 0;
        border-radius: 8px;
    }

    .product-info {
        width: 100%;
    }

    h1 {
        font-size: 17px;
        line-height: 1.3;
        margin-bottom: 8px;
        text-align: center;
    }

    .product-meta {
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-size: 13px;
        margin-bottom: 10px;
    }

    .meta-item {
        gap: 4px;
        flex-wrap: wrap;
    }

    .meta-label {
        font-size: 12px;
        min-width: auto;
    }

    .price-summary {
        padding: 10px 12px;
        margin-bottom: 12px;
    }

    .price-main {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .price-range {
        font-size: 11px;
        line-height: 1.3;
    }

    /* Compact Stats */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding-top: 10px;
    }

    .stat {
        padding: 8px 4px;
        border-radius: 6px;
    }

    .stat-value {
        font-size: 14px;
        margin-bottom: 2px;
    }

    .stat-label {
        font-size: 9px;
    }

    /* Compact Cards */
    .card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }

    .card-title {
        font-size: 18px;
        margin-bottom: 18px;
        padding-bottom: 12px;
    }

    /* Compact Tabs */
    .tabs-header {
        gap: 5px;
        margin-bottom: 20px;
    }

    .tab-button {
        flex: 1;
        padding: 12px 8px;
        font-size: 12px;
    }

    /* Compact Price Table */
    .price-table {
        font-size: 12px;
    }

    .price-table th,
    .price-table td {
        padding: 10px 8px;
    }

    .price-value {
        font-size: 14px;
    }

    .shop-name {
        font-size: 13px;
    }

    .mobile-hide {
        display: none !important;
    }

    .desktop-only {
        display: none;
    }

    .btn-buy {
        display: none;
    }

    /* Compact Chart */
    .chart-container {
        height: 250px;
    }

    .price-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 15px;
    }

    .stat-box {
        padding: 15px 10px;
    }

    .stat-box .stat-value {
        font-size: 18px;
    }

    .stat-box .stat-label {
        font-size: 11px;
    }

    /* Compact Sidebar */
    .sidebar-section {
        padding: 20px 15px;
        margin-bottom: 15px;
    }

    .sidebar-title {
        font-size: 15px;
        margin-bottom: 15px;
    }

    /* Compact Specs */
    .specs-table {
        font-size: 13px;
    }

    .specs-table td {
        padding: 10px 8px;
    }

    .specs-table td:first-child {
        width: 40%;
        font-size: 12px;
    }

    /* Compact Reviews */
    .reviews-summary-header {
        padding: 20px 15px;
    }

    .rating-big {
        font-size: 42px;
    }

    .stars-display {
        font-size: 18px;
    }

    .review-item {
        padding: 15px 0;
    }

    .reviewer-name {
        font-size: 14px;
    }

    .review-content {
        font-size: 14px;
        line-height: 1.6;
    }

    .review-helpful {
        font-size: 12px;
    }

    /* Compact FAQ */
    .faq-question {
        padding: 15px 18px;
        font-size: 14px;
    }

    .faq-answer {
        padding: 0 18px;
    }

    .faq-answer.show {
        padding: 15px 18px;
    }

    .faq-answer p {
        font-size: 13px;
    }

    /* Compact Content */
    .content {
        font-size: 14px;
        line-height: 1.7;
    }

    .content h2 {
        font-size: 17px;
        margin-top: 25px;
        margin-bottom: 12px;
    }

    .content h3 {
        font-size: 15px;
        margin-top: 20px;
        margin-bottom: 10px;
    }
}

/* ============================================
   Notifications
   ============================================ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    font-family: var(--font-primary);
    font-weight: 600;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

/* ============================================
   Modal Overlay
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    background: #e2e8f0;
    color: var(--secondary-color);
}

/* Star Rating in Modal */
.star-rating .star {
    cursor: pointer;
    color: #ddd;
    transition: color 0.2s ease;
}

.star-rating .star:hover,
.star-rating .star:hover ~ .star {
    color: #ffc107;
}

/* ============================================
   Animations
   ============================================ */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================================================
   PRICE STATS GRID (History Tab)
   ================================================== */
.price-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.price-stat-box {
    flex: 1 1 200px;
    min-width: 180px;
    background: var(--gray-color);
    border-radius: var(--border-radius-card);
    padding: 16px;
    transition: var(--transition);
}

.price-stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(12, 222, 208, 0.2);
}

.price-stat-box-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.price-stat-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    max-width: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.price-stat-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.price-stat-icon.lowest {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.price-stat-icon.avg {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

.price-stat-icon.trend {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.price-stat-icon.trend.up {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.price-stat-icon.trend.down {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.price-stat-icon.forecast {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0ab8ad 100%);
    color: white;
}

.price-stat-content {
    flex: 1;
}

.price-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0 0 2px 0;
}

.price-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1.2;
    margin: 0;
}

.price-stat-value.trend-up {
    color: #ef4444;
}

.price-stat-value.trend-down {
    color: #10b981;
}

.price-stat-sublabel {
    font-size: 10px;
    color: #999;
    margin: 1px 0 0 0;
}

/* ==================================================
   RATING DISTRIBUTION (Reviews Tab)
   ================================================== */
.reviews-center {
    flex: 1;
    display: flex;
    align-items: center;
}

.rating-distribution {
    width: 100%;
    max-width: 300px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.rating-bar-label {
    width: 40px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating-bar-label .star-icon {
    color: #ffc107;
    font-size: 12px;
}

.rating-bar-track {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #0ab8ad 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-bar-count {
    width: 30px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-gray);
    text-align: right;
}

/* ==================================================
   SIMILAR PRODUCTS (Sidebar)
   ================================================== */
.similar-products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.similar-product-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--gray-color);
    border-radius: var(--border-radius-card);
    text-decoration: none;
    transition: var(--transition);
}

.similar-product-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(12, 222, 208, 0.15);
}

.similar-product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: white;
}

.similar-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.similar-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}

.similar-product-placeholder svg {
    width: 24px;
    height: 24px;
    color: #cbd5e1;
}

.similar-product-info {
    flex: 1;
    min-width: 0;
}

.similar-product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.similar-product-brand {
    font-size: 11px;
    color: var(--dark-gray);
    margin-bottom: 4px;
}

.similar-product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

.similar-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--dark-gray);
    margin-top: 2px;
}

.similar-product-rating .star.filled {
    color: #ffc107;
}

/* ==================================================
   COMPARISON TABLE (Competitor Comparison)
   ================================================== */
.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    font-size: 14px;
    border-collapse: collapse;
}

.comparison-table th {
    background: var(--gray-color);
    padding: 14px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: var(--secondary-color);
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.comparison-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e0e0e0;
    color: var(--text-color);
    vertical-align: middle;
}

.comparison-table tbody tr {
    transition: var(--transition);
}

.comparison-table tbody tr:hover {
    background: rgba(12, 222, 208, 0.03);
}

.comparison-table tbody tr.current-product {
    background: rgba(12, 222, 208, 0.1);
}

.comparison-table tbody tr.current-product:hover {
    background: rgba(12, 222, 208, 0.15);
}

.comparison-product-name {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 13px;
    line-height: 1.3;
}

.comparison-product-brand {
    font-size: 12px;
    color: var(--dark-gray);
    margin-top: 2px;
}

.current-badge {
    display: inline-block;
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.comparison-price {
    font-weight: 700;
    white-space: nowrap;
}

.comparison-price strong {
    color: var(--primary-color);
    font-size: 16px;
}

.price-diff {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}

.price-diff.more {
    color: #ef4444;
}

.price-diff.less {
    color: #10b981;
}

.comparison-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.comparison-rating .star.filled {
    color: #ffc107;
}

.comparison-rating small {
    color: var(--dark-gray);
    font-size: 11px;
}

.no-rating {
    color: #999;
}

.comparison-current-label {
    display: inline-block;
    color: var(--dark-gray);
    font-size: 12px;
    font-weight: 600;
}

.btn-compare-view {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn-compare-view:hover {
    background: transparent;
    color: var(--primary-color);
}

/* ==================================================
   PRODUCT DESCRIPTION CONTENT
   ================================================== */
.product-description-content {
    font-size: 15px;
    line-height: 1.8;
}

.description-intro {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 25px;
}

.description-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 25px 0 12px;
    line-height: 1.4;
}

.description-section-title .stylish {
    font-family: var(--font-secondary);
    font-style: italic;
    color: var(--primary-color);
}

.description-warnings {
    background: #fef3cd;
    border: 1px solid #f6e05e;
    border-radius: var(--border-radius-card);
    padding: 20px;
    margin-top: 25px;
}

.description-warnings h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 10px;
}

.description-warnings h4 svg {
    width: 20px;
    height: 20px;
    color: #d97706;
}

.description-warnings p {
    font-size: 14px;
    color: #92400e;
    line-height: 1.6;
    margin: 0;
}

.read-more-icon {
    width: 16px;
    height: 16px;
}

/* ==================================================
   PRODUCT DETAILS CONTENT (dane ze scrapingu)
   ================================================== */
.product-details-content {
    font-size: 15px;
    line-height: 1.8;
}

.product-details-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 25px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-color);
}

.product-details-content h3:first-child {
    margin-top: 0;
}

.product-details-content p {
    color: var(--text-color);
    margin-bottom: 15px;
}

.product-details-content p:last-child {
    margin-bottom: 0;
}

/* Tabela wartości odżywczych */
.nutritional-table {
    margin: 15px 0 20px;
    width: 100%;
}

.nutritional-table thead td {
    background: var(--gray-color);
    font-weight: 700;
    font-size: 13px;
    color: var(--secondary-color);
}

.nutritional-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.nutritional-table td {
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
}

.rws-note {
    font-size: 12px !important;
    color: var(--text-light) !important;
    font-style: italic;
    margin-top: -10px !important;
}

/* ==================================================
   PRODUCT DESCRIPTION - H2 style (artykuł LLM)
   ================================================== */
.product-description-content h2.description-h2 {
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 30px 0 15px;
    line-height: 1.4;
}

.product-description-content h2.description-h2 .stylish {
    font-family: var(--font-secondary);
    font-style: italic;
    color: var(--primary-color);
}

.product-description-content p {
    margin-bottom: 15px;
}

/* LLM Full HTML Content */
.llm-full-content {
    margin-top: 20px;
}

.llm-full-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 25px 0 12px;
}

.llm-full-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 20px 0 10px;
}

.llm-full-content p {
    margin-bottom: 12px;
    line-height: 1.8;
}

.llm-full-content ul,
.llm-full-content ol {
    margin: 15px 0 15px 25px;
}

.llm-full-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Podsumowanie opisu */
.description-summary {
    background: linear-gradient(135deg, rgba(12, 222, 208, 0.08) 0%, rgba(12, 222, 208, 0.03) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin-top: 25px;
    border-radius: 0 var(--border-radius-card) var(--border-radius-card) 0;
    font-size: 15px;
    line-height: 1.7;
}

/* ==================================================
   RESPONSIVE UPDATES
   ================================================== */
@media (max-width: 968px) {
    .price-stats-grid {
        gap: 12px;
    }

    .price-stat-box {
        flex: 1 1 calc(50% - 6px);
        min-width: 160px;
        padding: 14px;
    }

    .price-stat-box-inner {
        gap: 10px;
    }

    .price-stat-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        max-width: 40px;
    }

    .price-stat-icon svg {
        width: 20px;
        height: 20px;
    }

    .price-stat-value {
        font-size: 16px;
    }

    .reviews-summary-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .reviews-center {
        justify-content: center;
    }

    .rating-distribution {
        max-width: 100%;
    }

    .comparison-table {
        font-size: 13px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 640px) {
    .price-stats-grid {
        gap: 8px;
    }

    .price-stat-box {
        flex: 1 1 calc(50% - 4px);
        min-width: 140px;
        padding: 10px;
    }

    .price-stat-box-inner {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .price-stat-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        max-width: 36px;
        border-radius: 8px;
    }

    .price-stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .price-stat-content {
        flex: 1;
        text-align: left;
    }

    .price-stat-value {
        font-size: 14px;
    }

    .price-stat-label {
        font-size: 10px;
    }

    .price-stat-sublabel {
        font-size: 9px;
    }

    .similar-product-item {
        padding: 10px;
        gap: 10px;
    }

    .similar-product-image {
        width: 50px;
        height: 50px;
    }

    .similar-product-name {
        font-size: 12px;
    }

    .similar-product-price {
        font-size: 13px;
    }

    .comparison-table-wrapper {
        margin: 0 -15px;
        padding: 0 15px;
    }

    .comparison-table {
        font-size: 12px;
    }

    .comparison-table th:nth-child(3),
    .comparison-table td:nth-child(3),
    .comparison-table th:nth-child(5),
    .comparison-table td:nth-child(5) {
        display: none;
    }

    .current-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .description-intro {
        font-size: 14px;
    }

    .description-section-title {
        font-size: 16px;
    }

    .description-warnings {
        padding: 15px;
    }

    .description-warnings h4 {
        font-size: 14px;
    }

    .description-warnings p {
        font-size: 13px;
    }
}

/* ==================================================
   CATEGORY TAGS & ATTRIBUTES
   ================================================== */
.category-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-tag {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(12, 222, 208, 0.1) 0%, rgba(12, 222, 208, 0.05) 100%);
    color: var(--secondary-color);
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(12, 222, 208, 0.3);
    transition: var(--transition);
}

.category-tag:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

.category-tag.primary {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

.category-tag.primary:hover {
    background: #0ab8ad;
    border-color: #0ab8ad;
}

/* Certification Badges */
.certification-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #d4f4e2 0%, #bbf7d0 100%);
    color: #059862;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(5, 152, 98, 0.3);
}

.cert-badge::before {
    content: '✓';
    font-size: 10px;
}

/* Purpose Tags */
.purpose-tags {
    color: var(--text-color);
    font-size: 13px;
}

/* Product Meta responsive adjustments */
@media (max-width: 640px) {
    .category-tags {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 0;
    }

    .category-tag {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 10px;
    }

    .cert-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .certification-badges {
        display: flex;
        flex-wrap: wrap;
        margin-top: 5px;
    }
}
