/* 
   Remates Prelco - Landing Page Styles 
   Clean, Corporate, Industrial
*/

:root {
    /* Colors */
    --primary-color: #003366;
    /* Deep Industrial Blue */
    --primary-hover: #002244;
    --accent-color: #E63946;
    /* Alert/Action Red */
    --secondary-bg: #F4F6F8;
    /* Light Gray Blue */
    --text-main: #1A1A1A;
    --text-muted: #666666;
    --border-color: #DDDDDD;
    --white: #FFFFFF;

    /* Status Colors */
    --status-operativo: #28a745;
    --status-desarme: #ffc107;
    --status-chatarra: #dc3545;

    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: var(--font-family);
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
    padding-bottom: 80px;
    /* Space for sticky CTA */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
    font-size: 1rem;
}

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

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

.btn-secondary {
    background-color: var(--secondary-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #e2e6ea;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.lot-actions .btn-outline {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lot-actions .btn-outline:hover {
    background-color: var(--secondary-bg);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-full {
    width: 100%;
    display: block;
}

.btn-block {
    width: 100%;
}

/* Header */
.site-header {
    background: #D0391B;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-img {
    height: 50px;
    width: auto;
    display: block;
}

.nav-link {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--white);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
}

/* Hero */
.hero {
    background: url('https://web3.cl/img/1.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

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

.badge-hero {
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: inline-block;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.detail-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(5px);
}

.detail-item .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.8;
    display: block;
}

.detail-item .value {
    font-weight: 700;
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Summary Section */
.summary-section {
    padding: var(--spacing-md) 0;
    background: var(--white);
    margin-top: -30px;
    /* Overlap effect */
    position: relative;
    z-index: 10;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.summary-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.summary-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-box {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.summary-card p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.highlight-card {
    background: var(--secondary-bg);
    border-color: var(--primary-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Steps Section */
.steps-section {
    padding: var(--spacing-lg) 0;
    background: var(--secondary-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.step-item {
    text-align: center;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
}

.step-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.step-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.center-action {
    text-align: center;
}

/* Documents Section */
.documents-section {
    padding: var(--spacing-lg) 0;
    background: var(--white);
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.doc-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--white);
}

.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.doc-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.doc-text {
    flex: 1;
    font-weight: 500;
    font-size: 1rem;
}

.doc-action {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
}

.primary-doc {
    background: var(--secondary-bg);
    border-color: var(--primary-color);
}

/* Lots Section */
.lots-section {
    padding: var(--spacing-lg) 0;
    background: #f9f9f9;
}

.filters-bar {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-controls select {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
}

.lots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.lot-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.lot-card:hover {
    box-shadow: var(--shadow-md);
}

.lot-image {
    position: relative;
    height: 200px;
    background: #eee;
}

.lot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lot-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.status-operativo {
    background-color: var(--status-operativo);
}

.status-desarme {
    background-color: var(--status-desarme);
    color: #333;
}

.status-chatarra {
    background-color: var(--status-chatarra);
}

.lot-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lot-header {
    margin-bottom: 1rem;
}

.lot-number {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.lot-header h3 {
    font-size: 1.2rem;
    margin-top: 0.25rem;
    line-height: 1.3;
}

.lot-specs {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.lot-specs li {
    margin-bottom: 0.25rem;
}

.lot-price {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.lot-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Trust & FAQ */
.trust-faq-section {
    padding: var(--spacing-lg) 0;
    background: var(--white);
}

.trust-block {
    text-align: center;
    margin-bottom: 4rem;
}

.trust-pills {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.pill {
    background: var(--secondary-bg);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.faq-block {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.5rem 0;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content p {
    padding-bottom: 1.5rem;
    color: var(--text-muted);
}

.accordion-item.active .accordion-content {
    max-height: 200px;
    /* Approximate max height */
}

.accordion-item.active .icon {
    transform: rotate(45deg);
}

/* Contact Section */
.contact-section {
    padding: var(--spacing-lg) 0;
    background: var(--secondary-bg);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
}

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

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    z-index: 900;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sticky-cta.visible {
    transform: translateY(0);
}

.sticky-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-info {
    display: flex;
    flex-direction: column;
}

.sticky-title {
    font-weight: 700;
    font-size: 1rem;
}

.sticky-status {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* Footer */
.site-footer {
    background: #111;
    color: #888;
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-md);
    position: relative;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: #666;
}

/* Modal Internal Styles */
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.modal-gallery img {
    width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.modal-details h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.modal-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.modal-table td:first-child {
    font-weight: 600;
    color: #555;
    width: 40%;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-details {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        width: 100%;
    }

    .filter-controls {
        width: 100%;
        justify-content: space-between;
    }

    .filter-controls select {
        flex: 1;
    }
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 90px;
    /* Above sticky CTA */
    right: 20px;
    background-color: #25D366;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 950;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
}

.whatsapp-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background-color: #20BA56;
}

.whatsapp-float svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 80px;
        right: 15px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Subscription Banner */
.subscription-banner {
    background: linear-gradient(135deg, #D0391B 0%, #A02E15 100%);
    padding: 3rem 0;
    color: var(--white);
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.banner-text h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.banner-text p {
    font-size: 1.1rem;
    opacity: 0.95;
}

.banner-form {
    display: flex;
    gap: 1rem;
    min-width: 350px;
}

.banner-form input[type="email"] {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
}

.banner-form input[type="email"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.banner-form button {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .banner-content {
        flex-direction: column;
        text-align: center;
    }

    .banner-form {
        width: 100%;
        min-width: auto;
        flex-direction: column;
    }

    .banner-text h2 {
        font-size: 1.5rem;
    }
}