/* Основные стили */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #7f8c8d;
    --accent-color: #bdc3c7;
    --metal-dark: #34495e;
    --metal-light: #95a5a6;
    --metal-accent: #ecf0f1;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

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

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    background-color: #f5f7fa;
    line-height: 1.6;
}

h1, h2, h3, h4, h5 {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
}

/* Шапка */
.header {
    background: linear-gradient(to right, var(--metal-dark), var(--primary-color));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    margin-right: 10px;
    color: var(--accent-color);
}

.navbar-nav .nav-link {
    color: var(--metal-accent) !important;
    font-weight: 500;
    margin: 0 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.navbar-nav .nav-link i {
    margin-right: 5px;
}

.cart-icon {
    margin-left: 20px;
}

.cart-icon a {
    color: white;
    font-size: 1.5rem;
    position: relative;
    display: inline-block;
}

.cart-icon span {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Главный баннер */
.hero {
    background: linear-gradient(135deg, var(--metal-dark) 0%, #2c3e50 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero .lead {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero .btn {
    padding: 12px 30px;
    font-weight: 600;
    margin-right: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.hero .btn-primary {
    background-color: var(--metal-light);
    border-color: var(--metal-light);
}

.hero .btn-primary:hover {
    background-color: var(--metal-accent);
    border-color: var(--metal-accent);
    color: var(--metal-dark);
}

.hero .btn-outline-light:hover {
    background-color: white;
    color: var(--metal-dark);
}

.hero-image {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metal-background {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #7f8c8d 25%, transparent 25%), 
                linear-gradient(-45deg, #7f8c8d 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #7f8c8d 75%), 
                linear-gradient(-45deg, transparent 75%, #7f8c8d 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.metal-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 2%, transparent 20%),
                radial-gradient(circle at 70% 70%, rgba(255,255,255,0.05) 2%, transparent 20%);
}

/* Секции */
.section-title {
    text-align: center;
    margin-bottom: 15px;
    color: var(--metal-dark);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--metal-light);
}

.section-subtitle {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* Карточки товаров - СУПЕР КОМПАКТНЫЕ */
.product-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    min-height: 320px; /* Уменьшено с 380px */
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.product-image {
    height: 120px; /* Уменьшено с 120px */
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-bottom: 1px solid #e0e0e0;
}

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

.product-info {
    padding: 5px; /* Уменьшено с 10px */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 0.85rem; /* Уменьшено с 0.9rem */
    margin-bottom: 3px; /* Уменьшено с 5px */
    color: var(--metal-dark);
    line-height: 1.2;
    min-height: 1em; /* Уменьшено с 1.8em */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-specs {
    margin-bottom: 3px; /* Уменьшено с 5px */
    font-size: 0.7rem; /* Уменьшено с 0.75rem */
    color: #666;
    min-height: 1em; /* Уменьшено с 1.2em */
}

.product-description {
    color: #777;
    margin-bottom: 5px; /* Уменьшено с 8px */
    flex-grow: 1;
    font-size: 0.75rem; /* Уменьшено с 0.8rem */
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 20px; /* Уменьшено с 40px */
}

/* ПРОСТРАНСТВО ЦЕНЫ УДАЛЕНО - теперь плотно прилегает */
.product-price {
    font-size: 0.75rem; /* Уменьшено с 1rem */
    font-weight: 700;
    color: var(--metal-dark);
    margin-bottom: 0px; /* Уменьшено с 3px */
    padding-top: 0; /* Удалена граница и отступ сверху */
    border-top: none; /* Удалена разделительная линия */
}

/* КНОПКИ - еще компактнее */
.product-actions {
    display: flex;
    gap: 4px; /* Уменьшено с 5px */
    margin-top: auto;
    padding-top: 6px; /* Уменьшено с 10px */
    border-top: 1px solid #e0e0e0;
}

.btn-add-to-cart {
    background-color: var(--metal-light);
    border-color: var(--metal-light);
    color: white;
    flex-grow: 1;
    font-size: 0.75rem; /* Уменьшено с 0.8rem */
    padding: 3px 6px; /* Уменьшено с 4px 8px */
    border-radius: 2px; /* Уменьшено с 3px */
    height: 28px; /* Фиксированная высота для выравнивания */
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-to-cart:hover {
    background-color: var(--metal-dark);
    border-color: var(--metal-dark);
}

.btn-details {
    background-color: transparent;
    border-color: var(--metal-light);
    color: var(--metal-light);
    font-size: 0.75rem; /* Уменьшено с 0.8rem */
    padding: 3px 6px; /* Уменьшено с 4px 8px */
    border-radius: 2px; /* Уменьшено с 3px */
    height: 28px; /* Фиксированная высота для выравнивания */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px; /* Минимальная ширина для красоты */
}

.btn-details:hover {
    background-color: var(--metal-light);
    color: white;
}

/* Для мобильных устройств - ультра компактные */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 8px;
        border-radius: 3px;
        min-height: 280px; /* Уменьшено с 320px */
    }
    
    .product-image {
        height: 80px; /* Уменьшено с 90px */
        padding: 4px; /* Уменьшено с 5px */
    }
    
    .product-info {
        padding: 6px; /* Уменьшено с 8px */
    }
    
    .product-title {
        font-size: 0.8rem; /* Уменьшено с 0.85rem */
        min-height: 1.6em; /* Уменьшено с 2em */
    }
    
    .product-description {
        font-size: 0.7rem; /* Уменьшено с 0.75rem */
        -webkit-line-clamp: 1; /* Только 1 строка */
        margin-bottom: 3px; /* Уменьшено с 5px */
        min-height: 20px; /* Уменьшено с 30px */
    }
    
    .product-specs {
        font-size: 0.65rem; /* Уменьшено с 0.7rem */
        margin-bottom: 2px; /* Уменьшено с 3px */
    }
    
    .product-price {
        font-size: 0.85rem; /* Уменьшено с 0.9rem */
        margin-bottom: 4px; /* Уменьшено с 5px */
    }
    
    .product-actions {
        padding-top: 5px; /* Уменьшено с 8px */
    }
    
    .btn-add-to-cart,
    .btn-details {
        font-size: 0.7rem; /* Уменьшено с 0.75rem */
        padding: 2px 4px; /* Уменьшено с 3px 6px */
        height: 24px; /* Уменьшено с 28px */
    }
    
    .btn-details {
        min-width: 45px; /* Уменьшено с 50px */
    }
}

@media (max-width: 576px) {
    .product-card {
        min-height: 250px; /* Уменьшено с 280px */
    }
    
    .product-image {
        height: 70px; /* Уменьшено с 80px */
    }
    
    .product-info {
        padding: 5px; /* Уменьшено с 6px */
    }
    
    .product-title {
        font-size: 0.75rem; /* Уменьшено с 0.8rem */
        min-height: 1.5em; /* Уменьшено с 1.8em */
    }
    
    .product-description {
        display: none; /* Полностью скрываем описание */
        min-height: 0;
        margin-bottom: 0;
    }
    
    .product-price {
        font-size: 0.8rem; /* Уменьшено с 0.85rem */
        margin-top: auto;
        margin-bottom: 6px; /* Уменьшено с 8px */
    }
    
    .product-actions {
        padding-top: 4px; /* Уменьшено с 6px */
        gap: 3px; /* Уменьшено с 3px */
    }
    
    .btn-add-to-cart,
    .btn-details {
        font-size: 0.65rem; /* Уменьшено с 0.7rem */
        padding: 2px 3px; /* Уменьшено с 2px 4px */
        height: 22px; /* Уменьшено с 24px */
    }
    
    .btn-details {
        min-width: 40px; /* Уменьшено с 45px */
    }
}

/* Особые стили для 3 карточек в ряд на мобильных */
@media (max-width: 576px) {
    .col-4 .product-card {
        margin-bottom: 6px; /* Уменьшено с 8px */
        min-height: 220px; /* Уменьшено с 250px */
    }
    
    .col-4 .product-title {
        font-size: 0.65rem; /* Уменьшено с 0.75rem */
        min-height: 1.4em; /* Уменьшено с 1.6em */
    }
    
    .col-4 .product-price {
        font-size: 0.6rem; /* Уменьшено с 0.8rem */
    }
}
/* Преимущества */
.advantages {
    background-color: #f8f9fa;
}

.advantage-card {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: transform 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-5px);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--metal-light), var(--metal-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.advantage-card h3 {
    margin-bottom: 15px;
    color: var(--metal-dark);
}

/* Корзина */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background-color: white;
    z-index: 1002;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    background-color: var(--metal-dark);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.cart-body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.empty-cart-message {
    text-align: center;
    color: var(--secondary-color);
    padding: 40px 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

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

.cart-item-image {
    width: 60px;
    height: 60px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--metal-dark);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
}

.quantity-value {
    width: 40px;
    text-align: center;
    font-weight: 600;
}

.cart-item-remove {
    color: var(--danger-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 10px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background-color: #f8f9fa;
}

.cart-total {
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: right;
}

.btn-checkout {
    width: 100%;
    padding: 12px;
    font-weight: 600;
}

/* Футер */
.footer {
    background-color: var(--metal-dark);
    color: var(--metal-accent);
    padding: 60px 0 20px;
}

.footer h5 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.contact-list i {
    margin-right: 10px;
    width: 20px;
}

.footer-menu {
    list-style: none;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: var(--metal-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 70px 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 15px;
    }
}






/* Стили для сетки 3x3 в hero разделе */
.photo-grid-3x3 .photo-overlay span {
    color: white !important; /* Белый цвет текста */
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.3px;
}

/* Ссылки без подчеркивания и стандартных стилей */
.photo-grid-3x3 a.photo-link {
    display: block;
    text-decoration: none !important;
    color: transparent !important;
    border: none !important;
    background: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* Все состояния ссылок - без подчеркивания */
.photo-grid-3x3 a.photo-link:link,
.photo-grid-3x3 a.photo-link:visited,
.photo-grid-3x3 a.photo-link:hover,
.photo-grid-3x3 a.photo-link:active,
.photo-grid-3x3 a.photo-link:focus {
    text-decoration: none !important;
    color: transparent !important;
    border: none !important;
    background: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Убираем стандартные стили Bootstrap для ссылок */
.photo-grid-3x3 a {
    text-decoration: none !important;
}

.photo-grid-3x3 a:hover {
    text-decoration: none !important;
}

/* Специфичные стили для текста в оверлее */
.photo-grid-3x3 .photo-item .photo-overlay span {
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
    -moz-text-decoration: none !important;
    text-decoration-line: none !important;
}

/* Убираем любые эффекты подчеркивания при hover */
.photo-grid-3x3 .photo-link:hover .photo-overlay span,
.photo-grid-3x3 .photo-link:focus .photo-overlay span,
.photo-grid-3x3 .photo-link:active .photo-overlay span {
    text-decoration: none !important;
    color: white !important;
}

/* Дополнительная защита от наследования стилей */
.photo-grid-3x3 * {
    text-decoration: none !important;
}

.photo-grid-3x3 span {
    text-decoration: none !important;
}

/* Улучшенный оверлей с белым текстом */
.photo-grid-3x3 .photo-overlay {
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(0, 0, 0, 0.5) 50%, 
        transparent 100%);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.photo-grid-3x3 .photo-item:hover .photo-overlay {
    opacity: 1;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.9) 0%, 
        rgba(0, 0, 0, 0.6) 50%, 
        transparent 100%);
}

/* Размеры для сетки 3x3 */
.photo-grid-3x3 {
    margin-left: 20px;
}

.photo-grid-3x3 .photo-item {
    height: 130px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.photo-grid-3x3 .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-grid-3x3 .photo-item:hover img {
    transform: scale(1.05);
}

/* Адаптивность */
@media (max-width: 992px) {
    .photo-grid-3x3 {
        margin-left: 0;
        margin-top: 30px;
    }
    
    .photo-grid-3x3 .photo-item {
        height: 100px;
    }
}

@media (max-width: 768px) {
    .photo-grid-3x3 .photo-item {
        height: 90px;
    }
    
    .photo-grid-3x3 .photo-overlay span {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .photo-grid-3x3 .photo-item {
        height: 80px;
    }
    
    .photo-grid-3x3 .photo-overlay span {
        font-size: 0.7rem;
    }
}