:root {
    /* Colors */
    /* Colors */
    --color-primary: #691C32;
    /* Official GobMx Maroon */
    /* Guinda */
    --color-secondary: #D4C19C;
    /* Dorado */
    --color-dark-green: #691C32;
    /* Replaced with Maroon per user request */
    /* Verifica si es necesario, usado en una sección */
    --color-martillo: #691C32;
    --color-online: #691C32;
    --color-sobre: #988256;
    --color-text-main: #212529;
    --color-text-light: #FFFFFF;
    --color-bg-light: #F5F5F5;
    --color-border: #DDDDDD;

    /* Fonts */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Spacing */
    --spacing-container: 15px;
    --width-container: 1140px;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    line-height: 1.5;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Utilities */
.container {
    max-width: var(--width-container);
    margin: 0 auto;
    padding: 0 var(--spacing-container);
    width: 100%;
}

/* Buttons */
.btn-outline {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: block;
    width: 100%;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn-solid {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: block;
    width: 100%;
    font-weight: bold;
}

/* Specific Colors for Buttons */
.bg-martillo {
    background-color: var(--color-martillo);
}

.bg-online {
    background-color: var(--color-online);
}

.bg-sobre {
    background-color: var(--color-sobre);
}

/* Header Gob.mx */
#gob-header {
    background-color: var(--color-primary);
    /* Changed to red/guinda as requested */
    color: #fff;
    padding: 10px 0;
}

#gob-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-gob img {
    height: 40px;
    /* Ajustar según sea necesario */
}

.gob-links a {
    color: #fff;
    margin-left: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.gob-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.search-container {
    display: flex;
    align-items: center;
    position: relative;
}

#search-input {
    width: 0;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    transition: width 0.3s ease, padding 0.3s ease;
    overflow: hidden;
    color: #fff;
    /* White text on blue header */
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
}

.search-container.active #search-input {
    width: 200px;
    padding: 5px 10px;
    border-bottom: 2px solid #fff;
    margin-right: 5px;
}

/* Header Search Placeholder (White) */
#search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

/* General Placeholder (Gray) */
::placeholder {
    color: #999;
    opacity: 1;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 1.1rem;
    padding: 5px;
}


/* Navbar */
#main-nav {
    background-color: var(--color-primary);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Allow wrapping for mobile menu */
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 5px 10px;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.menu-toggle {
    display: none;
    /* Hidden on desktop */
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-primary);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Hero Section */
#hero {
    background-color: #f0f0f0;
    min-height: 400px;
    /* Placeholder height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero img {
    width: 100%;
    display: block;
}

/* Sections */
.intro-text {
    padding: 40px var(--spacing-container);
    text-align: center;
    font-size: 1.1rem;
    color: #555;
    max-width: 900px;
    margin: 0 auto;
}

.auctions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

.auction-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

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

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
}

.color-martillo {
    background-color: var(--color-martillo);
}

.color-online {
    background-color: var(--color-online);
}

.color-sobre {
    background-color: var(--color-sobre);
}

.auction-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    font-size: 1.25rem;
    min-height: 50px;
    /* Align buttons */
}

/* Contact Bar */
.contact-bar {
    background-color: #f9f9f9;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #ddd;
}

.contact-bar p {
    display: inline-block;
    margin: 0 20px;
    color: #666;
    font-size: 0.9rem;
}

/* Footer */
/* Footer */
footer {
    background-color: #691C32;
    /* Official GobMx Maroon */
    /* Official Guinda/Red */
    color: #fff;
    padding: 40px 0;
    font-size: 0.9rem;
    position: relative;
}

.footer-contact-info {
    text-align: center;
    padding: 20px;
    background: #fff;
    color: #333;
    font-size: 0.9rem;
    border-top: 1px solid #ddd;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr 1.5fr;
    /* Matches target layout columns approx */
    gap: 30px;
    margin-bottom: 20px;
}

.footer-col h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #fff;
    text-decoration: none;
}

.footer-col a:hover {
    text-decoration: underline;
}

.footer-pattern {
    background-image: url('img/footer_pattern_red.png');
    background-color: transparent;
    height: 50px;
    /* Standard pleca height */
    margin-top: 0;
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background-color: var(--color-primary);
        padding-bottom: 20px;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-bar p {
        display: block;
        margin: 10px 0;
    }

    /* Hide header links AND search on mobile */
    .gob-links a,
    .search-btn,
    .search-container {
        display: none;
    }

    /* Show mobile-only menu items */
    .mobile-only {
        display: block !important;
        background-color: rgba(255, 255, 255, 0.05);
    }

    /* Mobile Search Style */
    .mobile-search-input {
        width: 90%;
        padding: 10px;
        border-radius: 4px;
        border: none;
        margin: 10px auto;
        display: block;
        font-family: var(--font-body);
    }

    .search-menu-item {
        padding: 5px 0;
    }
}

/* Hide mobile-only items on desktop */
.mobile-only {
    display: none;
}

/* Product Detail Page Styles */

.product-detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image-container {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    /* Aspect ratio fallback or container */
    position: relative;
}

.main-img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.thumbnail-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: opacity 0.2s, border-color 0.2s;
    opacity: 0.7;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
    border-color: var(--color-primary);
}

/* Product Info */
.product-info-box {
    padding: 10px 0;
}

.detail-title {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--color-text-main);
    margin-bottom: 20px;
    line-height: 1.2;
}

.detail-price-section {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.price-label {
    color: #666;
    margin-right: 10px;
}

.price-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

.detail-lot-section {
    margin-bottom: 30px;
    font-size: 1.1rem;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    display: inline-block;
}

.lot-label {
    font-weight: 600;
    color: #333;
}

.lot-value {
    color: #555;
    margin-left: 5px;
}

.action-buttons-detail {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.full-width {
    width: 100%;
    text-align: center;
    padding: 15px;
    font-size: 1.1rem;
}

/* Spec Section */
.spec-section {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.spec-section h3 {
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.car-desc {
    margin-bottom: 25px;
    color: #555;
    line-height: 1.6;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table td {
    padding: 12px 5px;
}

.spec-key {
    font-weight: 600;
    color: #333;
    width: 40%;
}

.spec-val {
    color: #666;
}

/* Responsive Detail */
@media (max-width: 900px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .detail-title {
        font-size: 1.6rem;
    }
}

/* Modal Ficha Técnica */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 8px;
    padding: 40px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.ficha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.ficha-logo img {
    height: 50px;
}

.ficha-title h2 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin: 0;
}

.ficha-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.ficha-img img {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #eee;
}

.ficha-details h3 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
    color: #333;
}

.print-btn-container {
    margin-top: 30px;
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

@media (max-width: 768px) {
    .ficha-body {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 20px;
    }
}

/* Contact Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(98, 17, 50, 0.1);
}

.modal-narrow {
    max-width: 500px;
}

/* Product Grid & Card - Premium Style (Added for Automoviles) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-header {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.product-price {
    font-size: 1.25rem;
    color: var(--color-primary);
    font-weight: 800;
    margin-bottom: 15px;
}

.product-attrs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #777;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
}

.attr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.attr-item i {
    color: var(--color-primary);
    opacity: 0.7;
}

.product-card .btn-outline {
    margin-top: auto;
    text-align: center;
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    padding: 10px;
}

.product-card .btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Lot Badge */
.lot-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(105, 28, 50, 0.9);
    /* Guinda semi-transparent */
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}