/* Category Cards Styles */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.category-icon {
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

/* Base Styles */
:root {
    --primary: #003B6F;
    --secondary: #E67E22;
    --background: #F5F7FA;
    --text: #2C3E50;
    --accent: #34495E;
    --white: #FFFFFF;
    --light-grey: #ECF0F1;
    --dark-grey: #7F8C8D;
    --base-spacing: 16px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 4px;
}

body {
    font-family: 'Open Sans', 'Roboto', sans-serif;
    color: var(--text);
    background-color: var(--background);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--base-spacing);
}

.section {
    padding: calc(var(--base-spacing) * 4) 0;
}

.section-title {
    margin-bottom: calc(var(--base-spacing) * 2);
    position: relative;
    padding-bottom: var(--base-spacing);
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--secondary);
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

a {
    color: var(--primary);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary);
    text-decoration: none;
}

.btn {
    border-radius: var(--radius);
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: #00294f;
    border-color: #00294f;
    box-shadow: 0 4px 8px rgba(0, 59, 111, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #d17019;
    border-color: #d17019;
    box-shadow: 0 4px 8px rgba(230, 126, 34, 0.3);
    transform: translateY(-2px);
}

/* Brand logo and text styles */
.brand-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 2rem;
    letter-spacing: -0.02em;
}

/* Logo sizes for different breakpoints */
.navbar-logo {
    height: 100px;
}

.footer-logo {
    height: 80px;
    width: 80px;
    object-fit: contain;
}

.footer-logo-container {
    background-color: white;
    border-radius: 50%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-logo-container {
    background-color: white;
    border-radius: 50%;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    margin: 20px auto;
}

.hero-logo {
    width: 220px;
    height: 220px;
    object-fit: contain;
}

/* Navbar adjustments for larger logo */
.navbar {
    padding: 1.5rem 0;
}

/* Tablet styles */
@media (max-width: 768px) and (min-width: 576px) {
    .brand-text {
        font-size: 1.5rem;
    }
    .navbar-logo {
        height: 70px;
    }
    .footer-logo {
        height: 60px;
        width: 60px;
    }
    .footer-logo-container {
        width: 80px;
        height: 80px;
        padding: 8px;
    }
    .hero-logo-container {
        width: 220px;
        height: 220px;
        padding: 30px;
        margin: 15px auto;
    }
    .hero-logo {
        width: 160px;
        height: 160px;
    }
    .navbar {
        padding: 1.2rem 0;
    }
}

/* Mobile styles */
@media (max-width: 575px) {
    .brand-text {
        font-size: 1.2rem;
    }
    .navbar-logo {
        height: 50px;
    }
    .footer-logo {
        height: 45px;
        width: 45px;
    }
    .footer-logo-container {
        width: 65px;
        height: 65px;
        padding: 6px;
    }
    .hero-logo-container {
        width: 180px;
        height: 180px;
        padding: 25px;
        margin: 10px auto;
    }
    .hero-logo {
        width: 130px;
        height: 130px;
    }
    .navbar {
        padding: 1rem 0;
    }
}

/* Social Links Styles */
.social-links {
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-link:hover {
    background-color: var(--secondary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.social-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 59, 111, 0.3);
}

/* Contact Information Styles */
.contact-info {
    padding: 0.5rem 0;
}

.contact-info h5 {
    color: var(--primary);
    font-weight: 600;
}

/* Nuevos estilos para los botones de navegación principales */
.nav-button {
    padding: 15px 25px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 5px;
    text-align: center;
    margin: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    text-decoration: none;
    width: 100%;
}

.nav-button i {
    margin-right: 10px;
}

.nav-button.primary {
    background-color: var(--primary);
    color: white;
    border: none;
}

.nav-button.primary:hover {
    background-color: #00294f;
    box-shadow: 0 4px 12px rgba(0, 59, 111, 0.3);
    transform: translateY(-3px);
}

.nav-button.secondary {
    background-color: var(--secondary);
    color: white;
    border: none;
}

.nav-button.secondary:hover {
    background-color: #d17019;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
    transform: translateY(-3px);
}

.nav-button.tertiary {
    background-color: #34495e;
    color: white;
    border: none;
}

.nav-button.tertiary:hover {
    background-color: #2c3e50;
    box-shadow: 0 4px 12px rgba(52, 73, 94, 0.3);
    transform: translateY(-3px);
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: calc(var(--base-spacing) / 2) var(--base-spacing);
}

.navbar-brand img {
    max-height: 50px;
}

.nav-link {
    font-weight: 600;
    color: var(--text);
    margin: 0 var(--base-spacing);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 59, 111, 0.8), rgba(0, 59, 111, 0.8)), url('/static/images/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: calc(var(--base-spacing) * 2);
    color: var(--white);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: calc(var(--base-spacing) * 2);
}

/* Card Styles */
.card {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    height: 100%;
}

/* Override card height for request quote sidebar to prevent overlap */
.request-quote-sidebar .card {
    height: auto !important;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    height: 200px;
    object-fit: cover;
}

.service-card {
    text-align: center;
    padding: var(--base-spacing);
    margin-bottom: calc(var(--base-spacing) * 2);
}

.service-card i {
    color: var(--secondary);
    font-size: 3rem;
    margin-bottom: var(--base-spacing);
}

.product-card .card-body {
    padding: calc(var(--base-spacing) * 1.5);
}

.product-card .card-title {
    font-weight: 700;
    font-size: 1.25rem;
}

.product-card .product-category {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--base-spacing);
    display: block;
}





/* Contact Section */
.contact-info i {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-right: var(--base-spacing);
}

.contact-form .form-control {
    border-radius: var(--radius);
    padding: 12px 15px;
    margin-bottom: var(--base-spacing);
}

.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 59, 111, 0.25);
}

.contact-form label {
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: var(--accent);
    color: var(--white);
    padding: calc(var(--base-spacing) * 3) 0;
}

.footer a {
    color: var(--light-grey);
}

.footer a:hover {
    color: var(--secondary);
}

.footer-title {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: calc(var(--base-spacing) * 1.5);
}

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

.footer-links li {
    margin-bottom: calc(var(--base-spacing) / 2);
}

.footer-bottom {
    background-color: darken(var(--accent), 5%);
    padding: var(--base-spacing) 0;
    margin-top: calc(var(--base-spacing) * 3);
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--secondary);
    color: var(--white);
}

/* Product Detail Page */
.product-detail-img {
    max-height: 400px;
    object-fit: contain;
}

.product-specs {
    margin-top: calc(var(--base-spacing) * 2);
}

.specs-table th {
    width: 30%;
    background-color: var(--light-grey);
}

/* Marketplace Product Page */
.thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail.active {
    border-color: var(--primary);
}

.specifications {
    font-size: 0.95rem;
    color: var(--text);
}

.shipping-info {
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-top: calc(var(--base-spacing) * 1.5);
}

.shipping-info i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-tabs .nav-link {
    color: var(--text);
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    margin-right: 5px;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    background-color: var(--white);
    border-bottom: 3px solid var(--primary);
}

.nav-tabs .nav-link:hover:not(.active) {
    border-bottom: 3px solid var(--light-grey);
}

.tab-content {
    border-radius: 0 0 var(--radius) var(--radius);
}

.badge {
    padding: 6px 10px;
    font-weight: 500;
    border-radius: var(--radius);
}

/* Compatibility Table */
.table-hover tbody tr:hover {
    background-color: rgba(0, 59, 111, 0.05);
}

/* Review Section */
.review {
    padding-bottom: calc(var(--base-spacing) * 1.5);
    border-bottom: 1px solid var(--light-grey);
}

.review:last-child {
    border-bottom: none;
}

/* Additional Card Classes */
.category-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.2rem;
    line-height: 1.4;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.benefit-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.product-detail-title {
    font-size: 2rem;
    line-height: 1.3;
}

.detail-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--white);
        padding: var(--base-spacing);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }
    
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-brand img {
        max-height: 40px;
    }
    
    .nav-link {
        margin: 0.5rem 0;
        padding: 0.5rem 0.75rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    /* Fix content overlapping with header */
    .brand-header {
        padding-top: 6rem;
        margin-top: 0;
    }
    
    .brand-header h1, .brand-header p {
        max-width: 100%;
        overflow-wrap: break-word;
    }
}

@media (max-width: 767.98px) {
    .section {
        padding: calc(var(--base-spacing) * 2) 0;
    }
    
    .hero {
        height: 70vh;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .card-title, h4 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.95rem;
    }
    
    .category-title, .product-title, .benefit-title {
        font-size: 1.1rem;
    }
    
    .product-detail-title {
        font-size: 1.8rem;
    }
    
    .detail-section-title {
        font-size: 1.1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* Additional mobile improvements */
    .brand-header {
        padding-top: 5rem;
    }
    
    .brand-header h1 {
        font-size: 1.8rem;
        word-wrap: break-word;
    }
    
    /* Footer improvements for mobile */
    .footer {
        padding: 2rem 0;
    }
    
    .footer-title {
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .footer-links li {
        margin-bottom: 0.75rem;
    }
    
    /* Ensure buttons have enough touch area */
    .nav-button, .btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .hero {
        height: 60vh;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-img-top {
        height: 160px;
    }
    
    .product-title {
        min-height: auto;
        max-height: 2.8rem;
    }
    
    .thumbnail {
        margin-bottom: 0.5rem;
        border: 1px solid #dee2e6;
    }
    
    .thumbnail.active {
        border-color: var(--primary);
    }
    
    .specifications ul li {
        margin-bottom: 0.5rem;
    }
    
    .badge {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .product-detail-title {
        font-size: 1.5rem;
    }
    
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        border-bottom: 1px solid #dee2e6;
    }
    
    .nav-tabs .nav-link {
        padding: 6px 10px;
        font-size: 0.85rem;
        margin-bottom: -1px;
        border: 1px solid transparent;
        border-top-left-radius: 0.25rem;
        border-top-right-radius: 0.25rem;
    }
    
    .nav-tabs .nav-link.active {
        color: var(--primary);
        background-color: #fff;
        border-color: #dee2e6 #dee2e6 #fff;
    }
    
    .tab-content {
        padding: 15px !important;
        background-color: #fff;
    }
    
    .table th, .table td {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .table-responsive {
        border: none;
    }
    
    /* Specific product detail page improvements */
    #main-product-image {
        max-height: 300px;
        object-fit: contain;
        width: 100%;
    }
    
    .product-thumbnails .col-3 {
        padding: 0 4px;
    }
    
    .product-thumbnails img {
        height: 60px;
        object-fit: cover;
        cursor: pointer;
    }
    
    .detail-section-title {
        margin-top: 1rem;
    }
    
    /* Enhanced mobile responsiveness */
    .navbar {
        padding: 0.5rem;
    }
    
    .navbar-brand img {
        max-height: 35px;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Fix header overlap issue */
    .brand-header {
        padding-top: 4.5rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .brand-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    .brand-header p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    /* Better footer layout on mobile */
    .footer-links {
        margin-bottom: 1.5rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .social-icons {
        margin-bottom: 1.5rem;
        display: flex;
        justify-content: center;
    }
    
    /* Fixing contact form on mobile */
    .form-control, .form-select {
        font-size: 16px; /* Prevents iOS zoom on focus */
        height: 46px;
    }
    
    textarea.form-control {
        height: auto;
        min-height: 100px;
    }
}

/* Product Detail Page - all screen sizes */
.product-image-container {
    position: relative;
    overflow: hidden;
}

.product-thumbnails .thumbnail {
    cursor: pointer;
    border: 2px solid #f8f9fa;
    transition: border-color 0.2s ease;
}

.product-thumbnails .thumbnail.active {
    border-color: var(--primary);
}

.specifications ul {
    padding-left: 1.2rem;
}

.specifications ul li {
    margin-bottom: 0.5rem;
}

/* Tab Styling for Product Detail */
.product-tabs-container {
    overflow-x: auto;
}

.product-detail-tabs {
    flex-wrap: nowrap;
    white-space: nowrap;
    border-bottom: 1px solid #dee2e6;
    min-width: 500px; /* Ensure tabs don't get too squished */
}

.product-detail-tabs .nav-item {
    margin-bottom: -1px;
}

.product-detail-tabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    font-weight: 500;
    color: #495057;
    padding: 0.5rem 1rem;
}

.product-detail-tabs .nav-link.active {
    color: var(--primary);
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

.product-detail-tabs .nav-link:hover:not(.active) {
    border-color: #e9ecef #e9ecef #dee2e6;
    background-color: #f8f9fa;
}

@media (max-width: 767.98px) {
    .product-detail-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Improve search form for mobile */
    .form-select, .form-control {
        height: 45px;
        font-size: 0.95rem;
    }
    
    .form-label {
        font-weight: 500;
        margin-bottom: 0.5rem;
    }
}
