/**
 * Плитка24 - Основные стили публичного сайта
 *
 * Этот файл содержит все CSS стили для публичной части сайта:
 * - Общие стили (типографика, цвета, layout)
 * - Шапка и навигация
 * - Каталог товаров
 * - Карточки товаров
 * - Корзина и оформление заказа
 * - Новости и статические страницы
 * - Адаптивный дизайн для мобильных устройств
 */
:root {
    --primary-color: #0d47a1;
    --secondary-color: #f57c00;
    --light-color: #f9f9f9;
    --dark-text: #333;
    --header-bg: #ffffff;
    --footer-bg: #333333;
    --top-bar-bg: #f5f5f5;
    --top-bar-text: #666666;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-color);
    color: var(--dark-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrapper {
    flex: 1 0 auto;
}

.main-content {
    min-height: calc(100vh - 200px);
}

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

/* Top bar styling */
.top-bar {
    background-color: var(--top-bar-bg);
    color: var(--top-bar-text);
    font-size: 0.8rem;
    border-bottom: 1px solid #e0e0e0;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Header styling */
.site-header {
    background-color: var(--header-bg);
    color: var(--dark-text);
    border-bottom: 1px solid #eaeaea;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem 0;
}
.logo {
    margin: 0;
    font-size: 1.6rem;
    font-weight: bold;
}
.logo a {
    color: var(--primary-color);
    text-decoration: none;
}
.logo-search {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.search-form {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: none;
    outline: none;
    min-width: 200px;
}

.search-btn {
    background: var(--primary-color);
    border: none;
    padding: 0.5rem 0.75rem;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    border-radius: 0 4px 4px 0;
    height: 2.2rem;
    min-width: 2.5rem;
}

.search-btn:hover {
    background: #0a3d91;
}

/* Header actions container */
.header-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Main navigation (Каталог, Корзина, etc.) */
.main-nav .main-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}
.main-nav .main-nav-list li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
.main-nav .main-nav-list li a:hover {
    background-color: rgba(13, 71, 161, 0.1);
}

/* Authentication block styling */
.auth-block {
    border-left: 1px solid #e0e0e0;
    padding-left: 2rem;
    min-width: 200px;
}

/* Authentication links for non-authenticated users */
.auth-links {
    display: flex;
    gap: 0.5rem;
}
.btn-login, .btn-register {
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.btn-login {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background-color: transparent;
}
.btn-login:hover {
    background-color: var(--primary-color);
    color: white;
}
.btn-register {
    background-color: var(--secondary-color);
    color: white;
    border: 1px solid var(--secondary-color);
}
.btn-register:hover {
    background-color: #e56a00;
    border-color: #e56a00;
}

/* User menu for authenticated users */
.user-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.greeting {
    font-size: 0.9rem;
    color: var(--dark-text);
    font-weight: normal;
}
.user-actions {
    display: flex;
    gap: 0.5rem;
}
.btn-user, .btn-admin, .btn-logout {
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.2s ease;
}
.btn-user {
    background-color: var(--primary-color);
    color: white;
}
.btn-user:hover {
    background-color: #062c74;
}
.btn-admin {
    background-color: #417690;
    color: white;
}
.btn-admin:hover {
    background-color: #205067;
}
.btn-logout {
    color: #666;
    border: 1px solid #ddd;
    background-color: transparent;
}
.btn-logout:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* Category navigation bar */
.category-nav {
    background-color: var(--primary-color);
    border-bottom: 4px solid var(--secondary-color);
}
.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
.category-list li a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}
.category-list li a:hover {
    background-color: rgba(255,255,255,0.15);
    border-radius: 3px;
}

/* Footer styling */
.site-footer {
    background-color: var(--footer-bg);
    color: #fff;
    padding: 1rem 0;
    flex-shrink: 0;
    margin-top: auto;
    text-align: center;
}
.site-footer p {
    margin: 0;
}
.site-footer a {
    color: #fff;
    text-decoration: none;
}

/* Remove default nav-list styling here since it's now part of user-nav and category-list */

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding: 0 0.5rem;
}
.product-card {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* Mobile first: 2 columns */
    width: calc(50% - 0.5rem);
    flex: 0 0 calc(50% - 0.5rem);
    max-width: calc(50% - 0.5rem);
}

/* Medium screens (tablets): 3 columns */
@media (min-width: 768px) {
    .product-card {
        width: calc(33.333% - 0.67rem);
        flex: 0 0 calc(33.333% - 0.67rem);
        max-width: calc(33.333% - 0.67rem);
    }
}

/* Large screens (desktops): 4 columns */
@media (min-width: 1200px) {
    .product-card {
        width: calc(25% - 0.75rem);
        flex: 0 0 calc(25% - 0.75rem);
        max-width: calc(25% - 0.75rem);
    }
}

.product-card img {
    max-width: 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background-color: #f8f8f8;
}
.product-name {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}
.product-price {
    font-weight: bold;
    margin: auto 0 0.5rem 0;
}
.product-card > div[id^="cart-btn-"] {
    margin-top: 0.5rem;
}
.product-stock {
    font-size: 0.9rem;
    color: #666;
}

/* Hero section for tile categories */
.tile-hero {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.tile-hero h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    color: var(--primary-color);
}
.tile-hero p {
    margin: 0 auto;
    max-width: 600px;
    color: #555;
    font-size: 1rem;
}

/* Grid for tile categories */
.kind-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.kind-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.kind-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--primary-color);
}
.kind-card p {
    margin: 0 0 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}
.kind-card .btn {
    align-self: center;
}

/* Guide section on tile page */
.tile-guide {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}
.tile-guide .guide-text {
    flex: 1 1 300px;
    min-width: 250px;
}
.tile-guide .guide-text h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}
.tile-guide .guide-text p {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: #555;
}
.tile-guide .guide-image {
    flex: 1 1 300px;
    min-width: 250px;
    text-align: center;
}
.tile-guide .guide-image img {
    max-width: 100%;
    border-radius: 4px;
}

/* Collections page */
.collections-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}
.collections-hero-image {
    flex: 1 1 300px;
    min-width: 250px;
    text-align: center;
}
.collections-hero-image img {
    max-width: 100%;
    border-radius: 4px;
}
.collections-hero-text {
    flex: 1 1 300px;
    min-width: 250px;
}
.collections-hero-text h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    color: var(--primary-color);
}
.collections-hero-text p {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
}

/* Grid layout for collection cards */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.collection-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.collection-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--primary-color);
}
.collection-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}
.collection-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.collection-card-link:hover .collection-card {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Make entire kind-card clickable without default underline */
.kind-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.kind-card-link .kind-card:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Attribute lists on tile page */
.attribute-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
    columns: 2; /* display in two columns for better use of space */
}
.attribute-list li {
    margin-bottom: 0.3rem;
}
.attribute-list li a {
    color: var(--primary-color);
    text-decoration: none;
}
.attribute-list li a:hover {
    text-decoration: underline;
}

/* Button styling */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease-in-out;
}
.btn:hover {
    background-color: #062c74; /* darker shade for hover */
}

/* Primary button styling with higher specificity */
.btn.btn-primary, button.btn.btn-primary {
    background-color: var(--secondary-color) !important; /* Orange color like the site */
    color: #fff !important;
    border: none !important;
}
.btn.btn-primary:hover, button.btn.btn-primary:hover {
    background-color: #e56a00 !important; /* Darker orange on hover */
}

/* Secondary button styling with higher specificity */
.btn.btn-secondary, a.btn.btn-secondary {
    background-color: #dc3545 !important; /* Red color for cancel buttons */
    color: #fff !important;
}
.btn.btn-secondary:hover, a.btn.btn-secondary:hover {
    background-color: #c82333 !important; /* Darker red on hover */
}

/* Hero section */
.hero {
    position: relative;
    width: 100%;
    height: 350px;
    margin-bottom: 2rem;
    overflow: hidden;
}
.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Slightly lighter overlay so the underlying image remains visible */
    background-color: rgba(0,0,0,0.35);
    color: #fff;
    text-align: center;
    padding: 1rem;
}
.hero-overlay h2 {
    font-size: 2rem;
    margin: 0.5rem 0;
}
.hero-overlay p {
    font-size: 1.1rem;
    margin: 0.5rem 0 1rem;
    max-width: 600px;
}
.hero-btn {
    padding: 0.6rem 1.2rem;
    background-color: var(--secondary-color);
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease-in-out;
}

/* Layout for catalog page: left filters and right products */
.catalog-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.catalog-layout .filters {
    flex: 0 0 250px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 1rem;
    border-radius: 4px;
}
.catalog-layout .filters h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--primary-color);
}
.catalog-layout .catalog-content {
    flex: 1;
    min-width: 0;
}
/* Align filter elements vertically in the sidebar */
.filters .filter-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.filters input[type="text"],
.filters select,
.filters .btn {
    width: 100%;
    box-sizing: border-box;
}

/* Lists for categories and collections */
.kind-list,
.collections-list {
    list-style: none;
    padding-left: 0;
}
.kind-list li,
.collections-list li {
    margin-bottom: 0.5rem;
}
.kind-list li a,
.collections-list li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}
.kind-list li a:hover,
.collections-list li a:hover {
    text-decoration: underline;
}
.hero-btn:hover {
    background-color: #c75a00; /* darker secondary */
}

/* Enhanced Filter form styling */
.filter-form {
    margin-bottom: 1rem;
}

/* Override conflicting styles - ensure vertical layout in sidebar */
.filters .filter-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: stretch !important;
}

.filter-form input[type="text"],
.filter-form select {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
    width: 100%;
    box-sizing: border-box;
}

.filter-form input[type="text"]:focus,
.filter-form select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.1);
}

.filter-form .btn {
    padding: 0.7rem 1.2rem;
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
    margin-left: 0;
}

.filter-form .btn:hover {
    background-color: #e5940a;
}

/* Filter labels for better UX */
.filter-group {
    margin-bottom: 0.75rem;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.3rem;
}

/* Ensure all filter inputs have consistent width */
.filter-group input[type="text"],
.filter-group select {
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

/* Advanced filters styling */
.advanced-filters {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem;
    margin: 0.5rem 0;
    background-color: #f8f9fa;
}

.advanced-filters summary {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.advanced-filters[open] summary {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

/* Responsive design for filters */
@media (max-width: 768px) {
    /* Hide hero banner on mobile */
    .hero {
        display: none;
    }

    .catalog-layout {
        flex-direction: column;
    }

    .catalog-layout .filters {
        flex: none;
        margin-bottom: 1rem;
    }

    .filters .filter-row {
        gap: 0.5rem !important;
    }

    .filter-group {
        margin-bottom: 0.5rem;
    }
}

/* Filter count indicator */
.filter-count {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: normal;
    margin-left: 0.5rem;
}

/* Results summary styling */
.results-summary {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.results-count {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Active filters styling */
.active-filters {
    margin-top: 0.75rem;
}

.active-filters-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    margin-right: 0.5rem;
}

.filter-tag {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 0.2rem 0.3rem 0.2rem 0;
    position: relative;
}

.filter-tag .remove-filter {
    color: #fff;
    text-decoration: none;
    margin-left: 0.3rem;
    font-weight: bold;
}

.filter-tag .remove-filter:hover {
    color: #ffdddd;
}

.clear-all-filters {
    display: inline-block;
    background-color: #6c757d;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    margin-left: 0.5rem;
}

.clear-all-filters:hover {
    background-color: #545b62;
    color: #fff;
}

/* Pagination styling */
.pagination {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}
.pagination a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}
.pagination a:hover {
    text-decoration: underline;
}
.pagination span {
    font-weight: bold;
}

table.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
table.cart-table th, table.cart-table td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
}
table.cart-table th {
    background-color: #f0f0f0;
}

.order-form > * {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
}
.order-form label {
    font-weight: bold;
    margin-top: 0.5rem;
}
.order-form input, .order-form textarea {
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.product-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}
.product-detail-image img {
    max-width: 400px;
    max-height: 600px;
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
}
.product-detail-info {
    flex: 1;
    min-width: 250px;
}

/* Collections page carousel */

/* Hero at the top of the collections page */
.collections-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    margin: 1rem 0 2rem 0;
}
.collections-hero-image {
    flex: 1 1 300px;
    min-width: 250px;
}
.collections-hero-image img {
    width: 100%;
    border-radius: 4px;
    max-height: 250px;
    height: auto;
    object-fit: cover;
}
.collections-hero-text {
    flex: 2 1 400px;
    min-width: 250px;
}
.collections-hero-text h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}
.collections-hero-text p {
    margin-top: 0;
    color: #555;
    font-size: 1rem;
    line-height: 1.4;
}

/* Individual collection rows */
.collection-row {
    margin-bottom: 2.5rem;
}
.collection-row h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: var(--primary-color);
}

/* Horizontally scrolling product list */
.collection-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
}
.collection-carousel::-webkit-scrollbar {
    height: 8px;
}
.collection-carousel::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}
.collection-carousel::-webkit-scrollbar-track {
    background-color: #f1f1f1;
    border-radius: 4px;
}
.collection-carousel .product-card {
    min-width: 200px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}
.collection-carousel .product-card img {
    height: 140px;
    object-fit: cover;
}
.collection-carousel .product-card .btn {
    margin-top: 0.5rem;
}

/* Grid layout for collections page */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* Enhance collection row appearance */
.collection-row {
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
}

/* Collection list preview styling */
.collections-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.collection-preview {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.collection-preview li {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.5rem;
    box-sizing: border-box;
    text-align: left;
}
.collection-preview li a img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}
.preview-name {
    display: block;
    margin: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--dark-text);
    min-height: 2.4em;
    overflow: hidden;
}
.preview-price {
    display: block;
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--dark-text);
}
.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
}
.view-all:hover {
    text-decoration: underline;
}

/* Responsive header styles */

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo-search {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-form input {
        min-width: 150px;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .main-nav .main-nav-list {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .auth-block {
        border-left: none;
        border-top: 1px solid #e0e0e0;
        padding-left: 0;
        padding-top: 1rem;
        text-align: center;
    }
    
    .auth-links {
        justify-content: center;
    }
    
    .user-menu {
        align-items: center;
        text-align: center;
    }
    
    .user-actions {
        justify-content: center;
    }
}

/* Related brand news - Same style as detail page */
.related-brand-news {
    max-width: 1000px;
    margin: 3rem auto 0;
    padding: 2rem 1rem;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.related-brand-news h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.related-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-brand-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-brand-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
}

.related-brand-card h3 a:hover {
    text-decoration: underline;
}

.related-brand-name {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    display: block;
}

.related-brand-summary {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.5rem 0;
}

.related-brand-date {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.related-brand-date time {
    color: #999;
    font-size: 0.8rem;
    font-style: italic;
}

/* Mobile responsive for brand news */
@media (max-width: 768px) {
    .related-brand-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .related-brand-news {
        padding: 1.5rem 0.5rem;
    }
}

/* News page styles */
.news-section {
    margin: 2rem 0;
}

.news-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 8px;
}

.news-hero h1 {
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.news-hero p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.no-news {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-news h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Pagination styles */
.pagination {
    margin-top: 3rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.pagination a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
}

.page-info {
    color: #666;
    font-weight: 500;
}

/* Mobile responsive for news page */
@media (max-width: 768px) {
    .news-hero h1 {
        font-size: 2rem;
    }

    .news-hero p {
        font-size: 1rem;
    }

    .pagination {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* News detail page styles */
.news-detail {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.news-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #666;
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
}

.breadcrumb-current {
    color: #666;
}

.news-detail-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-detail-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.news-detail-content {
    margin-bottom: 3rem;
}

.news-detail-image {
    text-align: center;
    margin-bottom: 2rem;
}

.news-detail-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.news-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--dark-text);
}

.news-text p {
    margin-bottom: 1.5rem;
}

.news-text h2, .news-text h3, .news-text h4 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.related-brand-news {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.related-brand-news h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Mobile responsive for news detail */
@media (max-width: 768px) {
    .news-detail {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    .news-detail-title {
        font-size: 1.5rem;
    }

    .news-text {
        font-size: 1rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }
}

/* Tablets - limit product image height */
@media (max-width: 768px) {
    .product-detail-image img {
        max-height: 500px;
    }
}

@media (max-width: 590px) {
    .product-detail-image {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        padding: 1rem 0 !important;
    }

    .product-detail-image img,
    .product-detail-image .product-image-clickable,
    .product-detail-image .product-image {
        max-width: 100% !important;
        max-height: 400px !important;
        height: auto !important;
        object-fit: contain !important;
        margin: 1rem auto !important;
        display: block !important;
    }

    .product-detail-image .placeholder-svg {
        margin: 1rem auto !important;
        display: block !important;
        text-align: center !important;
    }

    .thumbnail-gallery {
        width: 100% !important;
        justify-content: center !important;
    }

    .product-detail {
        gap: 0rem;
    }
}

/* Filter availability color indication */
.filter-option-default {
    color: #000000 !important; /* Black for default state (no filters active) */
}

.filter-option-available {
    color: #ff6b35 !important; /* Orange for available options */
}

.filter-option-unavailable {
    display: none !important; /* Hide unavailable options (0 results) */
}

/* Cache refresh */
