/* Product Page Specific Styles */

/* Information Alert */
.info-alert {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(44, 123, 229, 0.08), rgba(0, 212, 170, 0.08));
    border: 1px solid rgba(44, 123, 229, 0.2);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(44, 123, 229, 0.1);
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.info-alert-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-alert-icon {
    color: var(--primary-color);
    margin-top: 2px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-alert-body {
    flex: 1;
}

.info-alert-text {
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* Responsive для информационного блока */
@media (max-width: 768px) {
    .info-alert {
        margin-bottom: 1.25rem;
        padding: 0.875rem;
    }
    
    .info-alert-content {
        gap: 0.75rem;
    }

    .info-alert-text {
        font-size: 0.95rem;
    }
    
    .info-alert-icon {
        font-size: 1.1rem;
    }
}

/* Main Content */
.main-content {
    padding: 40px 0;
    flex: 1;
}

/* Product Header Inline */
.product-header-inline {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
}

.product-info {
    /* Стили для информации о продукте */
}

.title-availability-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.product-title {
    font-size: 1.49625rem;
    font-weight: bold;
    color: var(--dark-text);
    margin-bottom: 0;
    line-height: 1.3;
    flex: 1;
}

.product-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.availability-section {
    margin-top: 0;
    flex-shrink: 0;
}

.availability-badge {
    display: inline-flex;
    align-items: center;
    padding: 3.6px 7.2px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.81rem;
}

.availability-badge.in-stock {
    background: rgba(0, 201, 167, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 201, 167, 0.3);
}

.availability-badge.out-of-stock {
    background: rgba(230, 55, 87, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(230, 55, 87, 0.3);
}

.availability-badge i {
    margin-right: 6px;
}

/* Product Summary */
.product-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(44, 123, 229, 0.08), rgba(0, 212, 170, 0.08));
    box-shadow: 0 2px 10px rgba(44, 123, 229, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(44, 123, 229, 0.2);
}

.product-summary span {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-text);
}

.product-summary .price-range {
    color: #00d4aa;
    font-weight: 600;
}

.product-summary .pharmacy-count {
    color: var(--primary-color);
}

.product-summary .last-update {
    color: #6c757d;
    font-size: 0.9rem;
}

.product-summary i {
    color: inherit;
}

/* Search Section - Product page overrides */
.search-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.search-title {
    font-size: 1.5rem;
}

.search-subtitle {
    font-size: 1rem;
}

/* Products Table */
.products-table-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    contain: layout style paint;
}

.table-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-text);
    margin-bottom: 20px;
}

.products-table {
    margin: 0;
}

.products-table th {
    border-top: none;
    border-bottom: 2px solid #e9ecef;
    font-weight: bold;
    color: var(--dark-text);
    padding: 15px 10px;
    font-size: 0.95rem;
    vertical-align: middle;
    text-align: left;
}

.products-table td {
    border-top: 1px solid #e9ecef;
    padding: 15px 10px;
    vertical-align: middle;
    text-align: left;
    font-size: 0.95rem;
}

.products-table tbody tr:hover {
    background-color: rgba(44, 123, 229, 0.05);
}

.pharmacy-phone {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.pharmacy-phone:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.products-table .price-cell {
    font-size: 0.95rem;
    font-weight: bold;
    color: #00d4aa !important;
    min-width: 120px;
    width: auto;
    vertical-align: middle;
}

/* Стили для множественных цен */
.price-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 100px;
}

.price-item {
    display: flex;
    align-items: center;
    font-weight: bold;
    padding: 2px 0;
    border-radius: 4px;
}

.price-item.main-price {
    font-size: 1rem;
    color: #00d4aa;
    font-weight: 700;
}

.price-item.additional-price {
    font-size: 0.85rem;
    color: #4de0c2;
    font-weight: 500;
}

/* Эффект при наведении на всю ячейку */
.products-table tbody tr:hover .price-item.additional-price {
    color: #00d4aa;
}

/* Разделитель между ценами */
.price-item.additional-price:before {
    content: '';
    display: block;
    width: 10px;
    height: 1px;
    background: #dee2e6;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Альтернативный стиль - с маленькими метками */
.price-item.additional-price.with-label {
    position: relative;
}

.price-item.additional-price.with-label:after {
    content: attr(data-label);
    font-size: 0.7rem;
    color: #adb5bd;
    margin-left: 6px;
    font-weight: 400;
}

.address-cell {
    font-weight: 500;
    color: var(--dark-text) !important;
    white-space: nowrap;
}

/* Responsive Design - Product page specific */
@media (max-width: 768px) {
    .product-title {
        font-size: 1.5rem;
    }

    .title-availability-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .product-summary {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .product-summary span {
        font-size: 0.9rem;
    }

    .search-section {
        padding: 30px 0 30px 0;
    }

    .products-table-section {
        padding: 20px 15px;
        overflow-x: auto;
    }

    .products-table {
        font-size: 0.9rem;
        min-width: 600px;
    }

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

    .products-table .price-cell {
        font-size: 1rem;
        min-width: 100px;
    }

    .price-item.main-price {
        font-size: 1.1rem;
    }

    .price-item.additional-price {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .search-section {
        padding: 20px;
    }

    .product-header-inline {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .products-table-section {
        padding: 15px 10px;
    }

    .products-table {
        font-size: 0.8rem;
        min-width: 500px;
    }

    .products-table th,
    .products-table td {
        padding: 8px 6px;
    }

    .products-table .price-cell {
        font-size: 0.95rem;
        min-width: 90px;
    }

    .price-item.main-price {
        font-size: 1.05rem;
    }

    .price-item.additional-price {
        font-size: 0.9rem;
    }

    .price-container {
        gap: 2px;
    }

    .products-table td:nth-child(2) {
        white-space: nowrap;
        min-width: 110px;
    }

}
