/* Products Layout Variables */
:root {
    --sidebar-width: 300px;
    --sidebar-bg: #f8f9fa;
    --sidebar-border: #e2e8f0;
    --sidebar-active-bg: var(--color-accent-orange);
    --sidebar-active-text: #ffffff;
    --sidebar-hover-bg: var(--color-bg-dark);
}

/* Page Layout */
.products-page-container {
    display: flex;
    min-height: calc(100vh - 800px);
    background-color: var(--color-metal-silver);
    color: var(--color-graphite);
    position: relative;
    z-index: 10;
}

/* Sidebar */
.products-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    padding: 2rem 0;
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    z-index: 20;
    box-shadow: 5px 0 15px rgba(0,0,0,0.05);
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-bg-dark);
    padding: 0 2rem;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.brand-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brand-menu li {
    margin: 0;
}

.brand-menu a {
    display: flex;
    align-items: center;
    padding: 1.2rem 2rem;
    color: var(--color-graphite);
    text-decoration: none;
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 1rem;
    border-left: 4px solid transparent;
    transition: var(--transition-fast);
}

.brand-menu a i {
    margin-right: 1rem;
    color: var(--color-accent-blue);
    font-size: 1.4rem;
    transition: var(--transition-fast);
}

.brand-menu a:hover {
    background-color: var(--sidebar-hover-bg);
    color: #ffffff;
}

.brand-menu a:hover i {
    color: #ffffff;
}

.brand-menu a.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-left-color: var(--color-bg-dark);
}

.brand-menu a.active i {
    color: var(--sidebar-active-text);
}

/* Main Content Area */
.products-content {
    flex: 1;
    padding: 3rem 4rem;
    background-color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.brand-section {
    display: none;
    animation: slideInLeft 0.5s ease-out forwards;
}

.brand-section.active {
    display: block;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Brand Header */
.brand-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--sidebar-border);
}

.brand-header-text {
    flex: 1;
    max-width: 650px;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-bg-dark);
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    font-family: var(--font-subheading);
    font-size: 1.25rem;
    color: var(--color-accent-blue);
    margin-bottom: 1rem;
    font-weight: 700;
}

.brand-desc {
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.7;
    text-align: justify;
}

.brand-hero-image {
    width: 100%;
    max-width: 450px;
    height: auto;
    object-fit: contain;
    mix-blend-mode: darken;
}

.brand-logo-large {
    width: 200px;
    height: auto;
    object-fit: contain;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.prod-card {
    background: #ffffff;
    border: 1px solid rgba(31, 62, 140, 0.8);
    box-shadow: 0 0 15px rgba(31, 62, 140, 0.4), 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.prod-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    border-color: rgba(31, 62, 140, 0.2);
}

.prod-img-wrapper {
    height: 200px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
}

.prod-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

#brand-macea .prod-img-wrapper,
#brand-tecnogrease .prod-img-wrapper {
    padding: 0;
}

#brand-macea .prod-img,
#brand-tecnogrease .prod-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prod-card:hover .prod-img {
    transform: scale(1.05);
}

.prod-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.prod-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--color-accent-blue);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.prod-name {
    font-family: var(--font-subheading);
    font-size: 1.2rem;
    color: var(--color-bg-dark);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.prod-desc {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 1rem;
    flex: 1;
}

.prod-ideal {
    font-size: 0.85rem;
    color: var(--color-accent-blue);
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.5;
}

.prod-ideal strong {
    color: var(--color-bg-dark);
}

.prod-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-bg-dark);
    color: var(--color-bg-dark);
}

.btn-outline:hover {
    background: var(--color-bg-dark);
    color: #ffffff;
}

/* Brand Differentials */
.brand-diffs-container {
    background: var(--color-metal-silver);
    padding: 3rem;
    border-radius: 12px;
    margin-bottom: 4rem;
}

.brand-diffs-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-bg-dark);
    margin-bottom: 2rem;
}

.diffs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.diff-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.diff-card i {
    font-size: 2rem;
    color: var(--color-accent-orange);
}

.diff-card h5 {
    font-family: var(--font-subheading);
    font-size: 1.1rem;
    color: var(--color-bg-dark);
    margin-bottom: 0.5rem;
}

.diff-card p {
    font-size: 0.9rem;
    color: #4a5568;
}

/* THB Institutional Differences */
.thb-institutional {
    background-color: transparent;
    padding: 6rem 0;
    color: #ffffff;
}

.inst-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.inst-card {
    background: rgba(255,255,255,0.05);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border: 1px solid rgba(31, 62, 140, 1);
    box-shadow: 0 0 20px rgba(31, 62, 140, 0.8), inset 0 0 15px rgba(31, 62, 140, 0.4);
    transition: var(--transition-fast);
}

.inst-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-5px);
    border-color: rgba(31, 62, 140, 0.8);
}

.inst-card i {
    font-size: 2.5rem;
    color: var(--color-accent-orange);
    margin-bottom: 1.5rem;
    display: block;
}

.inst-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.inst-card p {
    color: var(--color-metal-light);
    font-size: 0.95rem;
}

/* Segments */
.segments-section {
    background: #ffffff;
    padding: 6rem 0;
}

.segments-section .section-title {
    color: var(--color-bg-dark);
}

.seg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.seg-card {
    background: var(--color-metal-silver);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(31, 62, 140, 0.8);
    box-shadow: 0 0 15px rgba(31, 62, 140, 0.4), 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition-fast);
}

.seg-card:hover {
    border-color: var(--color-accent-blue);
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.seg-card i {
    font-size: 2.5rem;
    color: var(--color-bg-dark);
    margin-bottom: 1rem;
}

.seg-card span {
    display: block;
    font-family: var(--font-subheading);
    font-weight: 600;
    color: var(--color-graphite);
}

/* Contact Form Section */
.contact-form-section {
    background: transparent;
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-text h2 {
    font-size: clamp(3rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

.contact-text p {
    font-size: 1.15rem;
    color: var(--color-metal-light);
    margin-bottom: 2rem;
}

.contact-form {
    background: rgba(255,255,255,0.03);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid rgba(31, 62, 140, 1);
    box-shadow: 0 0 20px rgba(31, 62, 140, 0.8), inset 0 0 15px rgba(31, 62, 140, 0.4);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent-blue);
    background: rgba(0,0,0,0.4);
}

.form-control::placeholder {
    color: rgba(255,255,255,0.5);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select.form-control option {
    background: var(--color-bg-dark);
    color: #ffffff;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    width: 100%;
    margin-top: 1rem;
}

/* Responsive Products Page */
@media (max-width: 1024px) {
    .products-page-container {
        flex-direction: column;
    }
    
    .products-sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 1rem 0;
        border-right: none;
        border-bottom: 1px solid var(--sidebar-border);
    }
    
    .brand-menu {
        display: flex;
        flex-direction: column;
        padding-bottom: 0.5rem;
    }
    
    .brand-menu a {
        border-left: 4px solid transparent;
        border-bottom: none;
        padding: 1rem 1.5rem;
    }
    
    .brand-menu a.active {
        border-left-color: var(--color-bg-dark);
        border-bottom-color: transparent;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .products-content {
        padding: 2rem 1.5rem;
    }
    
    .brand-header {
        flex-direction: column;
        text-align: center;
    }
    
    .brand-logo-large {
        margin-left: 0;
        margin-top: 2rem;
    }
    
    .brand-title {
        font-size: 3rem;
    }
}
