@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #F9853C; /* Orange from stroyshans */
    --secondary-color: #003d7c; /* Blue from stroyshans / success */
    --text-color: #333333;
    --text-light: #777777;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --border-color: #e5e5e5;
    
    --container-max-width: 1500px;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* Header basic styles */
header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-top-block {
    background: #f1f1f1;
    font-size: 13px;
    padding: 8px 0;
}

.header-top-block__wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top-menu {
    list-style: none;
    display: flex;
    gap: 10px 20px;
    flex-wrap: wrap;
}

.header-top-menu a {
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition);
}

.header-top-menu a:hover {
    color: var(--primary-color);
}

.header-middle-block {
    padding: 20px 0;
}

.header-middle-block__wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-middle-block__logo img {
    max-width: 200px;
}

.header-middle-block__flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
}

.header-middle-block__text {
    max-width: 250px;
    font-size: 14px;
    color: var(--text-light);
}

.header-middle-block__phone a {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.header-middle-block__info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
}

.header-middle-block__info-item:hover {
    color: var(--primary-color);
}

/* Section */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    color: var(--secondary-color);
}

/* Brand Tabs */
.brand-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.brand-tab-btn {
    padding: 15px 50px;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-light);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.brand-tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.brand-tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-white);
    box-shadow: 0 5px 15px rgba(249, 133, 60, 0.3);
}

/* Tabs */
.tabs-container {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 40px;
    margin-bottom: 40px;
}

.tabs-header {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs-header::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 15px 30px;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    background: #e8e8e8;
}

.tab-btn.active {
    background: var(--bg-white);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(249, 133, 60, 0.1);
}

/* Tab Content */
.tab-content {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.tab-content-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.tab-content-desc {
    color: var(--text-light);
    font-size: 16px;
    max-width: 600px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.product-category {
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.product-images {
    position: relative;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.product-images img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.product-images img.hidden {
    display: none;
}

.product-stvorki {
    display: flex;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.stvorka-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
}

.stvorka-btn.active {
    background: var(--bg-white);
    color: var(--secondary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    min-height: 50px;
}

/* Attributes */
.attributes {
    flex-grow: 1;
    margin-bottom: 25px;
}

.attr-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.attr-dots {
    display: flex;
    gap: 4px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
}

.dot.full {
    background: var(--primary-color);
}

.dot.part {
    background: linear-gradient(to right, var(--primary-color) 50%, var(--border-color) 50%);
}

/* Prices */
.product-prices {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.price-left .price-label {
    font-size: 12px;
    color: var(--text-light);
}

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

.price-right {
    text-align: right;
}

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

.btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: #e67630;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 133, 60, 0.3);
}

/* Adaptive Mobile */
@media (max-width: 992px) {
    .header-top-block__wrapper, .header-middle-block__flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .header-middle-block__wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .tabs-container {
        padding: 20px;
    }
    .tab-content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .product-prices {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .price-right {
        text-align: left;
    }
    
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-features {
        justify-content: center;
    }
}

/* Rehau Profiles block */
.rehau-container {
    max-width: 1670px;
}
.rehau-tabs-container {
    padding: 0;
    background: transparent;
    box-shadow: none;
}
.rehau-tabs-header {
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
}

.profile-layout-left {
    background-color: var(--bg-light);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.profile-layout-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.profile-layout-right {
    background-color: var(--bg-light);
    border-radius: 10px;
    padding: 70px 90px 55px 75px;
}

.profile-layout-group {
    display: grid;
    justify-content: space-between;
    gap: 20px 30px;
    grid-template-columns: minmax(auto, 495px) minmax(auto, 390px);
    align-items: start;
}

.profile-name {
    font-size: clamp(32px, 2vw + 15px, 65px);
    font-weight: 700;
    line-height: 1;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.profile-desc {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 40px;
}

.profile-price {
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    color: var(--secondary-color);
}

.profile-layout-list {
    display: grid;
    gap: 45px 30px;
    grid-template-columns: repeat(2, 1fr);
}

.profile-feature {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-feature-icon {
    flex-shrink: 0;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.profile-feature span {
    font-size: 16px;
    line-height: 1.4;
    color: var(--text-color);
}

.profile-layout-bottom {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.profile-layout-wrap {
    display: flex;
    flex-grow: 1;
    gap: 10px 20px;
    justify-content: space-between;
    max-width: 755px;
}

.profile-layout-wrap .attr-row {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.profile-layout-wrap .attr-dots {
    display: flex;
    gap: 10px;
}

.profile-layout-wrap .dot {
    flex-shrink: 0;
    height: 17px;
    width: 17px;
    border-radius: 50%;
    background-color: var(--border-color);
}

.profile-layout-wrap .dot.full {
    background-color: var(--primary-color);
}

.profile-layout-wrap span {
    font-size: 14px;
    color: var(--text-light);
}

.profile-layout-action {
    display: flex;
    gap: 10px;
}

.rehau-btn {
    padding: 15px 40px;
    font-size: 16px;
    white-space: nowrap;
}

/* Adaptive for Rehau block */
@media (max-width: 1200px) {
    .profile-layout {
        grid-template-columns: 1fr 2.6fr;
    }
    .profile-layout-group {
        grid-template-columns: 1.2fr 1fr;
    }
}

@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-layout-right {
        padding: 30px;
    }
    .profile-layout-img {
        margin: 0 auto;
        max-width: 370px;
    }
    .profile-layout-bottom {
        padding-top: 35px;
    }
    .profile-layout-wrap {
        flex-wrap: wrap;
    }
    .profile-layout-action {
        width: 100%;
        margin-left: 0;
        margin-top: 20px;
        flex-direction: column;
        gap: 10px;
    }
    .rehau-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .profile-layout-group {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    .profile-layout-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .profile-price {
        font-size: 26px;
        padding-top: 10px;
    }
}

/* Global responsiveness improvements */
.info-flex-card {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    background: #fdfdfd;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid #eee;
}

@media (max-width: 768px) {
    .header-top-block__wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    .header-top-menu {
        justify-content: center;
        width: 100%;
        gap: 8px 15px;
    }
    .header-top-block__address {
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }
    .info-flex-card {
        padding: 20px;
        gap: 20px;
    }
}

/* Additional mobile-first improvements for StroyOkna main page */
@media (max-width: 768px) {
    .rehau-tabs-header {
        gap: 10px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .brand-tabs {
        gap: 10px;
        flex-wrap: wrap;
        width: 100%;
    }
    .brand-tab-btn {
        padding: 10px 20px;
        font-size: 15px;
        flex: 1;
        text-align: center;
    }
    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    .tabs-container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .product-card {
        padding: 15px;
    }
    .product-stvorki {
        flex-direction: column;
        gap: 5px;
        background: transparent;
        padding: 0;
    }
    .stvorka-btn {
        background: var(--bg-light);
        border: 1px solid var(--border-color);
        padding: 10px;
        width: 100%;
        text-align: center;
    }
    .stvorka-btn.active {
        background: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
    }
}

