/* ========================================
   IMPERMEABILIZA.MX - MODERN STYLESHEET
   Responsive, Fluid, Mobile-First Design
   ======================================== */

:root {
    --primary-blue: #007BFF;
    --primary-dark: #0056b3;
    --primary-light: #4da3ff;
    --secondary: #6C757D;
    --success: #28A745;
    --danger: #DC3545;
    --warning: #FFC107;
    --info: #17A2B8;
    --white: #FFFFFF;
    --light: #F8F9FA;
    --dark: #343A40;
    --gray-100: #F8F9FA;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.2);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--light);
    font-size: 16px;
    overflow-x: hidden;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--white);
    letter-spacing: -0.5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .logo:hover {
        transform: scale(1.05);
    }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

    .nav-menu a {
        color: var(--white);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.95rem;
        transition: var(--transition);
        position: relative;
        padding: 0.5rem 0;
    }

        .nav-menu a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--white);
            transition: width 0.3s ease;
        }

        .nav-menu a:hover::after {
            width: 100%;
        }

        .nav-menu a:hover {
            transform: translateY(-2px);
        }

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(0,123,255,0.95) 0%, rgba(0,86,179,0.95) 100%), url('https://images.pexels.com/photos/1669754/pexels-photo-1669754.jpeg?auto=compress&cs=tinysrgb&w=1920');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 100%);
    }

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

    .hero-content h1 {
        font-size: clamp(2rem, 5vw, 3.5rem);
        margin-bottom: 1.5rem;
        font-weight: 800;
        text-shadow: 0 4px 12px rgba(0,0,0,0.3);
        line-height: 1.2;
    }

    .hero-content p {
        font-size: clamp(1.1rem, 3vw, 1.5rem);
        margin-bottom: 2rem;
        font-weight: 300;
        text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.container-fluid {
    width: 100%;
    padding: 2rem 1.5rem;
}

/* Section Titles */
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.5;
    white-space: nowrap;
}

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
    }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0,123,255,0.4);
    }

.btn-secondary {
    background: var(--gray-600);
    color: var(--white);
}

    .btn-secondary:hover:not(:disabled) {
        background: var(--gray-700);
        transform: translateY(-2px);
    }

.btn-success {
    background: var(--success);
    color: var(--white);
}

    .btn-success:hover:not(:disabled) {
        background: #218838;
        transform: translateY(-2px);
    }

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

    .btn-outline-primary:hover {
        background: var(--primary-blue);
        color: var(--white);
    }

.btn-large {
    padding: 1.125rem 3rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 600;
        color: var(--gray-800);
        font-size: 0.95rem;
    }

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: var(--white);
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    }

    .form-control::placeholder {
        color: var(--gray-500);
    }

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23343a40' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    appearance: none;
    padding-right: 3rem;
}

.form-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

    .form-error.show {
        display: block;
    }

.form-control.invalid {
    border-color: var(--danger);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }

.card-header {
    padding: 1.5rem;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

    .product-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-xl);
    }

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: var(--gray-800);
    line-height: 1.4;
}

.product-description {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0.5rem 0;
    flex: 1;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--success);
    margin: 1rem 0;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Cart */
.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.cart-items {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    align-items: center;
}

    .cart-item:last-child {
        border-bottom: none;
    }

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.cart-item-brand {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--gray-300);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

    .quantity-btn:hover {
        border-color: var(--primary-blue);
        color: var(--primary-blue);
    }

.quantity-input {
    width: 60px;
    text-align: center;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    padding: 0.5rem;
    font-weight: 600;
}

.cart-summary {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

    .summary-row:last-child {
        border-bottom: none;
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--gray-800);
        padding-top: 1.5rem;
        margin-top: 1rem;
        border-top: 2px solid var(--gray-300);
    }

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

thead {
    background: var(--gray-100);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr:hover {
    background: var(--gray-100);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index:g 9999;
}

    .loading-overlay .loading-spinner {
        width: 60px;
        height: 60px;
        border-width: 4px;
    }

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #25D366, #1ebe57);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

    .whatsapp-float:hover {
        transform: scale(1.1);
        box-shadow: 0 8px 24px rgba(37,211,102,0.5);
    }

/* Footer */
.site-footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

    .footer-content p {
        margin: 0.5rem 0;
        color: var(--gray-400);
    }

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary-blue);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-muted {
    color: var(--gray-600);
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 0.75rem 0;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        display: none;
    }

        .nav-menu.active {
            display: flex;
        }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 1.5rem;
        top: 1rem;
    }

    .hero-section {
        padding: 3rem 0;
        background-attachment: scroll;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .cart-summary {
        position: static;
    }

    .btn {
        padding: 0.75rem 1.5rem;
    }

    .btn-large {
        padding: 1rem 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }

    .product-info {
        padding: 1rem;
    }

    .cart-items {
        padding: 1rem;
    }

    .cart-item {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .whatsapp-float,
    .site-footer {
        display: none;
    }

    .container {
        max-width: 100%;
    }
}
