/* ============================================
   Comercial LV - Main Stylesheet
   ============================================ */

/* === CSS Variables === */
:root {
    --primary: #1a5276;
    --primary-dark: #0e3451;
    --primary-light: #2980b9;
    --accent: #e67e22;
    --accent-hover: #d35400;
    --success: #27ae60;
    --danger: #c0392b;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --text: #333333;
    --text-light: #666666;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 5px 25px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
    --header-height: 80px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* === Top Bar === */
.top-bar {
    background: var(--gray-900);
    color: var(--white);
    font-size: 0.85rem;
    padding: 8px 0;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.top-contact { display: flex; gap: 20px; flex-wrap: wrap; }
.top-contact span { display: flex; align-items: center; gap: 6px; }
.top-contact i { color: var(--accent); font-size: 0.9rem; }
.top-social { display: flex; gap: 12px; }
.top-social a {
    color: var(--white);
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    font-size: 0.85rem;
    transition: var(--transition);
}
.top-social a:hover { background: var(--accent); color: var(--white); }
.top-social .whatsapp-link:hover { background: #25d366; }

/* === Header === */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}
.logo h1 {
    font-size: 1.6rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}
.logo img { max-height: 55px; }
.main-nav ul { display: flex; gap: 5px; }
.main-nav a {
    display: block;
    padding: 10px 18px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
    background: rgba(26,82,118,0.06);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.menu-toggle span {
    display: block;
    width: 25px; height: 2.5px;
    background: var(--gray-800);
    border-radius: 2px;
    transition: var(--transition);
}

/* === Hero / Slider === */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}
.hero-content {
    max-width: 600px;
    padding: 60px 0;
    position: relative;
    z-index: 1;
}
.hero h2 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.7;
}
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}
.btn-primary {
    background: var(--accent);
    color: var(--white);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--white); transform: translateY(-2px); }
.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    margin-left: 12px;
}
.btn-outline:hover { background: var(--white); color: var(--primary); }
.btn-sm { padding: 8px 20px; font-size: 0.875rem; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #a93226; color: white; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #219a52; color: white; }

/* Slider Dots */
.slider-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}
.slider-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}
.slider-dot.active { background: var(--accent); transform: scale(1.3); }

/* === Section Styles === */
.section {
    padding: 80px 0;
}
.section-gray { background: var(--light-bg); }
.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}
.section-header h2::after {
    content: '';
    display: block;
    width: 60px; height: 3px;
    background: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}
.section-header p {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* === Features / Cards === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.feature-card {
    background: var(--white);
    padding: 35px 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.feature-icon {
    width: 70px; height: 70px;
    background: rgba(26,82,118,0.08);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--primary);
}
.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--gray-800);
}
.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* === Products Grid === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.product-image {
    height: 250px;
    background: var(--gray-100);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.product-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.product-card:hover .product-image img { transform: scale(1.05); }
.product-image .no-image {
    font-size: 4rem;
    color: var(--gray-400);
}
.product-body { padding: 20px; }
.product-body h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--gray-800); }
.product-body p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-body .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}
.product-body .btn { margin-top: 10px; }

/* Product Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--gray-300);
    background: var(--white);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    color: var(--gray-700);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* === About Page === */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--gray-100);
    min-height: 350px;
    display: flex; align-items: center; justify-content: center;
}
.about-image img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.about-image .no-image {
    font-size: 6rem;
    color: var(--gray-400);
}
.about-text h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}
.about-text p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Mission / Vision */
.mv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.mv-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
}
.mv-card h3 { color: var(--primary); margin-bottom: 12px; }
.mv-card p { color: var(--text-light); }

/* === Contact Page === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
}
.contact-info h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}
.contact-info > p {
    color: var(--text-light);
    margin-bottom: 30px;
}
.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}
.contact-item .icon {
    width: 50px; height: 50px;
    background: rgba(26,82,118,0.08);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    color: var(--primary);
}
.contact-item h4 { font-size: 1rem; margin-bottom: 4px; color: var(--gray-800); }
.contact-item p { color: var(--text-light); font-size: 0.9rem; }

.contact-form-wrap {
    background: var(--white);
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.contact-form-wrap h3 { margin-bottom: 25px; font-size: 1.3rem; color: var(--gray-800); }
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,82,118,0.1);
}
textarea.form-control { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* Success / Error Messages */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* === Map === */
.map-section {
    height: 400px;
    background: var(--gray-200);
}
.map-section iframe {
    width: 100%; height: 100%;
    border: none;
}

/* === Breadcrumb === */
.breadcrumb {
    background: var(--light-bg);
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-200);
}
.breadcrumb ul { display: flex; gap: 8px; align-items: center; }
.breadcrumb a { color: var(--gray-600); font-size: 0.9rem; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .current { color: var(--primary); font-weight: 500; }
.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: var(--gray-500);
}

/* === Page Header === */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}
.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.page-header p { opacity: 0.85; font-size: 1.05rem; }

/* === Services === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.service-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 35px 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    text-align: center;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.service-card .service-icon {
    width: 80px; height: 80px;
    background: rgba(230,126,34,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--accent);
}

/* === Stats === */
.stats-section {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}
.stat-item .stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent);
}
.stat-item .stat-label {
    font-size: 1rem;
    opacity: 0.85;
    margin-top: 5px;
}

/* === Clients / Partners === */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
}
.client-item {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}
.client-item:hover { transform: scale(1.05); }
.client-item i {
    font-size: 2.5rem;
    color: var(--gray-400);
}

/* === Footer === */
.site-footer {
    background: var(--gray-900);
    color: #ccc;
    padding-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}
.footer-col h3 {
    color: var(--white);
    font-size: 1.15rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 35px; height: 2px;
    background: var(--accent);
}
.footer-col p { font-size: 0.9rem; line-height: 1.7; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #ccc; font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--accent); padding-left: 5px; }
.footer-contact li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 0.9rem;
}
.footer-contact i { color: var(--accent); margin-top: 3px; }
.footer-social { display: flex; gap: 10px; margin-top: 15px; }
.footer-social a {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    transition: var(--transition);
}
.footer-social a:hover { background: var(--accent); }
.footer-schedule li { font-size: 0.9rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 60px; height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    z-index: 999;
    transition: var(--transition);
}
.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
    box-shadow: 0 6px 20px rgba(37,211,102,0.5);
}

/* === Admin Panel Styles === */
.admin-body { background: var(--light-bg); }
.admin-wrapper { display: flex; min-height: 100vh; }

/* Admin Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--gray-900);
    color: var(--white);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
}
.admin-sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-sidebar-header h2 {
    font-size: 1.3rem;
    color: var(--white);
}
.admin-sidebar-header p { font-size: 0.8rem; opacity: 0.6; margin-top: 4px; }
.admin-nav { padding: 15px 0; }
.admin-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 20px;
    color: #aaa;
    font-size: 0.9rem;
    transition: var(--transition);
}
.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,0.05);
    color: var(--white);
    border-left: 3px solid var(--accent);
}
.admin-nav a i { width: 20px; text-align: center; }

/* Admin Main */
.admin-main {
    margin-left: 260px;
    flex: 1;
    padding: 30px;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}
.admin-header h1 { font-size: 1.6rem; color: var(--gray-800); }

/* Admin Cards */
.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.admin-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 20px;
}
.admin-card-icon {
    width: 55px; height: 55px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}
.admin-card-icon.blue { background: var(--primary); }
.admin-card-icon.green { background: var(--success); }
.admin-card-icon.orange { background: var(--accent); }
.admin-card-icon.red { background: var(--danger); }
.admin-card-info h3 { font-size: 1.8rem; font-weight: 700; }
.admin-card-info p { font-size: 0.85rem; color: var(--text-light); }

/* Admin Table */
.admin-table-wrap {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th {
    background: var(--light-bg);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}
.admin-table tr:hover td { background: var(--gray-100); }
.admin-table .actions { display: flex; gap: 8px; }
.admin-table .actions a, .admin-table .actions button {
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
}
.btn-edit { background: var(--primary-light); color: white; }
.btn-edit:hover { background: var(--primary); color: white; }

/* Admin Forms */
.admin-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 800px;
}
.admin-form .form-group { margin-bottom: 20px; }
.admin-form .form-group label { font-weight: 600; }
.admin-form textarea.form-control { min-height: 200px; }

/* Admin Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 420px;
}
.login-box h1 {
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-size: 1.5rem;
}
.login-box .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 0.9rem;
}
.login-box .btn { width: 100%; }

/* Dashboard Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}
.quick-action {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    color: var(--gray-700);
}
.quick-action:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    color: var(--primary);
}
.quick-action i { font-size: 1.8rem; margin-bottom: 10px; display: block; }
.quick-action span { font-size: 0.9rem; font-weight: 500; }

/* === Responsive === */
@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .hero h2 { font-size: 2rem; }
    .hero { min-height: 400px; }
}

@media (max-width: 768px) {
    .top-bar-inner { justify-content: center; }
    .menu-toggle { display: flex; }
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0; right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .main-nav.open { max-height: 400px; }
    .main-nav ul { flex-direction: column; padding: 10px 0; }
    .main-nav a { padding: 12px 20px; }

    .hero h2 { font-size: 1.7rem; }
    .hero p { font-size: 1rem; }
    .btn-outline { margin-left: 0; margin-top: 10px; }
    .section { padding: 50px 0; }
    .form-row { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 1.6rem; }

    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-main { margin-left: 0; }
}

@media (max-width: 480px) {
    .hero h2 { font-size: 1.4rem; }
    .hero { min-height: 350px; padding: 40px 0; }
    .features-grid, .products-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* === Shopping Cart === */
.cart-nav-item { margin-left: 10px; }
.cart-link { position: relative; padding: 10px 15px !important; }
.cart-link i { font-size: 1.1rem; }
.cart-count {
    position: absolute;
    top: 0; right: 2px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    min-width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.cart-link:hover .cart-count { background: var(--accent-hover); }

/* Cart Page */
.cart-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cart-table th { background: var(--primary); color: white; padding: 14px 16px; text-align: left; font-weight: 600; }
.cart-table td { padding: 14px 16px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.cart-table .item-image { width: 70px; height: 70px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-100); }
.cart-table .item-name { font-weight: 600; color: var(--gray-800); }
.cart-table .item-price { color: var(--accent); font-weight: 600; }
.cart-qty { width: 60px; padding: 6px; text-align: center; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 0.9rem; }
.btn-remove { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1.1rem; padding: 6px 10px; transition: var(--transition); }
.btn-remove:hover { color: #a93226; transform: scale(1.2); }
.cart-empty { text-align: center; padding: 80px 20px; }
.cart-empty i { font-size: 5rem; color: var(--gray-400); display: block; margin-bottom: 20px; }
.cart-empty h2 { color: var(--gray-600); margin-bottom: 10px; }
.cart-summary { background: var(--white); padding: 25px 30px; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 20px; }
.cart-summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--gray-200); font-size: 0.95rem; }
.cart-summary-total { display: flex; justify-content: space-between; padding: 15px 0 5px; font-size: 1.3rem; font-weight: 700; color: var(--primary-dark); }
.cart-actions { display: flex; gap: 15px; margin-top: 25px; flex-wrap: wrap; }

/* Add to Cart Button */
.btn-cart { background: var(--success); color: white; border: none; padding: 10px 22px; border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: 0.9rem; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.btn-cart:hover { background: #219a52; color: white; transform: translateY(-2px); }
.btn-cart.added { background: var(--accent); animation: pulse 0.4s ease; }

@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* Cart Toast */
.cart-toast {
    position: fixed;
    top: 90px; right: 20px;
    background: var(--success);
    color: white;
    padding: 15px 25px;
    border-radius: var(--radius);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex; align-items: center; gap: 10px;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}
.cart-toast.show { transform: translateX(0); }

/* Checkout Form */
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.checkout-form-wrap { background: var(--white); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.checkout-form-wrap h3 { margin-bottom: 20px; font-size: 1.2rem; color: var(--gray-800); }
.checkout-form-wrap .form-group { margin-bottom: 16px; }
.checkout-form-wrap label { display: block; font-weight: 500; margin-bottom: 5px; color: var(--gray-700); font-size: 0.9rem; }
.checkout-form-wrap .required::after { content: ' *'; color: var(--danger); }
.checkout-summary { background: var(--light-bg); padding: 25px; border-radius: var(--radius); }
.checkout-summary h3 { margin-bottom: 15px; font-size: 1.2rem; color: var(--gray-800); }
.checkout-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--gray-300); font-size: 0.9rem; }
.checkout-item .item-info { display: flex; align-items: center; gap: 12px; }
.checkout-item img { width: 50px; height: 50px; border-radius: var(--radius-sm); object-fit: cover; }
.checkout-total { display: flex; justify-content: space-between; padding: 15px 0 5px; font-size: 1.2rem; font-weight: 700; color: var(--primary-dark); }

/* PDF Invoice Styles */
.invoice-wrap { max-width: 800px; margin: 40px auto; padding: 40px; background: white; box-shadow: var(--shadow); border-radius: var(--radius); }
.invoice-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 2px solid var(--primary); }
.invoice-header h2 { font-size: 1.6rem; color: var(--primary); }
.invoice-info { text-align: right; font-size: 0.9rem; color: var(--text-light); }
.invoice-info strong { color: var(--text); font-size: 1.1rem; }
.invoice-section { margin-bottom: 30px; }
.invoice-section h3 { font-size: 1.05rem; color: var(--primary-dark); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--gray-200); }
.invoice-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.invoice-table th { background: var(--primary); color: white; padding: 10px 14px; text-align: left; font-size: 0.85rem; }
.invoice-table td { padding: 10px 14px; border-bottom: 1px solid var(--gray-200); font-size: 0.9rem; }
.invoice-total { text-align: right; font-size: 1.3rem; font-weight: 700; color: var(--primary-dark); margin-top: 15px; }
.invoice-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--gray-200); text-align: center; font-size: 0.85rem; color: var(--text-light); }

@media (max-width: 768px) {
    .checkout-grid { grid-template-columns: 1fr; }
    .cart-table { font-size: 0.8rem; }
    .cart-table .item-image { width: 45px; height: 45px; }
    .cart-actions { flex-direction: column; }
    .cart-actions .btn { width: 100%; text-align: center; }
}

/* ============================================
   Cart & Checkout Styles
   ============================================ */

/* Cart Icon */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.cart-icon {
    position: relative;
    font-size: 1.3rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
}
.cart-icon:hover { color: var(--primary); }
.cart-count {
    position: absolute;
    top: 0; right: 0;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Cart Dropdown */
.cart-dropdown {
    position: fixed;
    top: calc(var(--header-height) + 35px);
    right: 30px;
    width: 350px;
    max-width: 90vw;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 1001;
    overflow: hidden;
}
.cart-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--primary);
    color: white;
}
.cart-dropdown-header h4 { font-size: 0.95rem; margin: 0; }
.cart-dropdown-header button {
    background: none; border: none;
    color: white; font-size: 1.3rem; cursor: pointer;
}
.cart-dropdown-header button:hover { opacity: 0.8; }

/* Cart Page Items */
.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}
.cart-item-image {
    width: 80px; height: 80px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cart-item-image img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.cart-item-image i { font-size: 2rem; color: var(--gray-400); }
.cart-item-info {
    flex: 1;
    min-width: 150px;
}
.cart-item-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--gray-800);
}
.cart-item-info small {
    color: var(--primary-light);
    font-size: 0.8rem;
}
.cart-item-price {
    color: var(--accent);
    font-weight: 600;
    margin-top: 4px;
    font-size: 0.95rem;
}
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 5px;
}
.cart-item-qty input {
    width: 50px;
    text-align: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 6px;
    font-size: 0.9rem;
}
.qty-btn {
    width: 30px; height: 30px;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.qty-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.cart-item-subtotal {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1rem;
    min-width: 80px;
    text-align: right;
}
.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    transition: var(--transition);
}
.cart-item-remove:hover { transform: scale(1.2); }

/* Add to Cart Button Animation */
.add-to-cart.added {
    background: var(--success) !important;
    color: white !important;
    pointer-events: none;
}
.add-to-cart.added::after {
    content: ' ✓ Agregado';
}

/* Toast Notification */
.cart-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 0.9rem;
    z-index: 9999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: opacity 0.3s ease;
    display: flex; align-items: center; gap: 8px;
}
.cart-toast-success { border-left: 3px solid var(--success); }
.cart-toast-error { border-left: 3px solid var(--danger); }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.modal-box {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
}
.modal-lg { max-width: 650px; }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--light-bg);
    border-radius: var(--radius) var(--radius) 0 0;
}
.modal-header h3 { font-size: 1.15rem; color: var(--gray-800); margin: 0; }
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0 5px;
    line-height: 1;
}
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 22px; }

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Responsive Cart */
@media (max-width: 768px) {
    .cart-dropdown {
        right: 10px;
        width: 300px;
    }
    .cart-item {
        flex-wrap: wrap;
    }
    .cart-item-image {
        width: 60px; height: 60px;
    }
    .cart-item-info { min-width: 120px; }
    .cart-item-subtotal { min-width: auto; }
}
/* Mobile nav cart link */
.nav-cart-mobile { display: none; }
@media (max-width: 768px) {
    .nav-cart-mobile { display: block; }
    .nav-cart-mobile a { display: flex !important; align-items: center; gap: 8px; }
}
/* Language Switch */
.lang-switch {
    color: var(--white) !important;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    text-decoration: none;
    transition: var(--transition);
}
.lang-switch:hover {
    background: var(--accent);
    color: white !important;
}
/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}
.product-detail-image img {
    width: 100%;
    border-radius: var(--radius);
}
.product-detail-image #mainImage {
    max-height: 450px;
    object-fit: contain;
    background: var(--gray-100);
}
.product-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.product-thumbs img:hover {
    border-color: var(--primary) !important;
}
.product-category-badge {
    display: inline-block;
    background: rgba(26,82,118,0.1);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 10px;
}
.product-detail-info h1 {
    font-size: 1.8rem;
    color: var(--gray-800);
    margin: 10px 0;
}
.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin: 15px 0;
}
.product-detail-desc {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}
.product-detail-features {
    background: var(--light-bg);
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.product-detail-features h4 {
    color: var(--primary);
    margin-bottom: 8px;
}
@media (max-width: 768px) {
    .product-detail { grid-template-columns: 1fr; }
}

/* Search Bar */
.search-bar-wrap {
    max-width: 600px;
    margin: 0 auto 30px;
    display: flex;
    gap: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 30px;
    overflow: hidden;
}
.search-bar-wrap input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--gray-200);
    border-right: none;
    font-size: 1rem;
    border-radius: 30px 0 0 30px;
    outline: none;
    font-family: inherit;
}
.search-bar-wrap input:focus { border-color: var(--primary); }
.search-bar-wrap button {
    padding: 14px 25px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 0 30px 30px 0;
    transition: var(--transition);
}
.search-bar-wrap button:hover { background: var(--primary-dark); }
.search-no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}
/* ============================================
   COMPREHENSIVE MOBILE ADAPTATION
   ============================================ */

/* Tablet: 768px - 992px */
@media (max-width: 992px) {
    .container { padding: 0 16px; }
    .hero h2 { font-size: 2rem; }
    .hero { min-height: 400px; }
    .hero-content { padding: 40px 0; }
    .about-grid { grid-template-columns: 1fr; gap: 30px; }
    .contact-grid { grid-template-columns: 1fr; gap: 30px; }
    .product-detail { grid-template-columns: 1fr; gap: 30px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .page-header { padding: 40px 0; }
    .page-header h1 { font-size: 2rem; }
    .section { padding: 50px 0; }
    .section-header h2 { font-size: 1.7rem; }
    .modal-box { max-width: 90vw; }
    .modal-lg { max-width: 92vw; }
    .admin-cards { grid-template-columns: repeat(2, 1fr); }
}

/* Phone: up to 768px */
@media (max-width: 768px) {
    /* Base */
    html { font-size: 15px; }
    .container { padding: 0 12px; }

    /* Top bar */
    .top-bar { font-size: 0.75rem; padding: 6px 0; }
    .top-bar-inner { flex-direction: column; gap: 6px; text-align: center; }
    .top-contact { gap: 12px; justify-content: center; }
    .top-social { justify-content: center; }

    /* Header */
    .site-header { height: 60px; }
    .header-inner { height: 60px; }
    .logo h1 { font-size: 1.2rem; }
    .logo img { max-height: 40px; }
    .menu-toggle { display: flex; }
    .main-nav {
        position: fixed;
        top: 60px; left: 0; right: 0;
        background: white;
        box-shadow: 0 8px 30px rgba(0,0,0,0.15);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
        z-index: 999;
    }
    .main-nav.open { max-height: 450px; overflow-y: auto; }
    .main-nav ul { flex-direction: column; padding: 8px 0; }
    .main-nav a { padding: 13px 20px; font-size: 0.95rem; border-bottom: 1px solid #f0f0f0; border-radius: 0; }
    .main-nav a:hover, .main-nav a.active { background: rgba(26,82,118,0.05); }
    .nav-cart-mobile { display: block; }
    .cart-icon { font-size: 1.1rem; padding: 6px; }
    .cart-dropdown { top: 60px; right: 8px; width: 300px; max-width: 95vw; }

    /* Hero */
    .hero { min-height: 320px; text-align: center; }
    .hero-content { max-width: 100%; padding: 30px 0; }
    .hero h2 { font-size: 1.5rem; }
    .hero p { font-size: 0.9rem; margin-bottom: 20px; }
    .btn { padding: 11px 22px; font-size: 0.9rem; }
    .btn-outline { margin-left: 8px; }
    .slider-dots { margin-top: 15px; }

    /* Sections */
    .section { padding: 35px 0; }
    .section-gray { padding: 35px 0; }
    .section-header { margin-bottom: 30px; }
    .section-header h2 { font-size: 1.4rem; }
    .section-header h2::after { width: 40px; height: 2px; margin-top: 8px; }
    .section-header p { font-size: 0.9rem; }

    /* Features */
    .features-grid { grid-template-columns: 1fr; gap: 15px; }
    .feature-card { padding: 25px 20px; }
    .feature-icon { width: 55px; height: 55px; font-size: 1.4rem; margin-bottom: 15px; }
    .feature-card h3 { font-size: 1.05rem; }

    /* Products */
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card { border-radius: 6px; }
    .product-image { height: 150px; }
    .product-body { padding: 12px; }
    .product-body h3 { font-size: 0.9rem; }
    .product-body h3 a { color: var(--gray-800); }
    .product-body p { display: none; }
    .product-body .price { font-size: 1rem; }
    .product-body .btn { width: 100%; padding: 8px; font-size: 0.8rem; }

    /* Filters */
    .filters { gap: 6px; margin-bottom: 25px; }
    .filter-btn { padding: 6px 14px; font-size: 0.8rem; }

    /* Search */
    .search-bar-wrap { max-width: 100%; margin-bottom: 20px; border-radius: 25px; }
    .search-bar-wrap input { padding: 11px 15px; font-size: 0.9rem; border-radius: 25px 0 0 25px; }
    .search-bar-wrap button { padding: 11px 18px; font-size: 0.9rem; border-radius: 0 25px 25px 0; }

    /* Product Detail */
    .product-detail { gap: 20px; }
    .product-detail-image #mainImage { max-height: 300px; }
    .product-detail-info h1 { font-size: 1.4rem; }
    .product-detail-price { font-size: 1.5rem; }
    .product-detail-desc { font-size: 0.9rem; }
    .product-thumbs img { width: 50px; height: 50px; }

    /* Services */
    .services-grid { grid-template-columns: 1fr; gap: 15px; }
    .service-card { padding: 25px 20px; }
    .service-card .service-icon { width: 60px; height: 60px; font-size: 1.5rem; margin-bottom: 15px; }

    /* About */
    .about-image { min-height: 220px; }
    .about-text h2 { font-size: 1.4rem; }
    .mv-grid { grid-template-columns: 1fr; gap: 15px; }
    .mv-card { padding: 20px; }

    /* Contact */
    .contact-form-wrap { padding: 20px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-group { margin-bottom: 14px; }
    .form-control { padding: 10px 12px; font-size: 0.9rem; }
    .contact-item .icon { width: 40px; height: 40px; font-size: 1rem; }

    /* Cart */
    .cart-item { flex-wrap: wrap; gap: 10px; padding: 12px; }
    .cart-item-image { width: 60px; height: 60px; }
    .cart-item-info { min-width: 120px; flex: 2; }
    .cart-item-info h4 { font-size: 0.85rem; }
    .cart-item-qty input { width: 40px; padding: 4px; }
    .qty-btn { width: 26px; height: 26px; }
    .cart-item-subtotal { min-width: auto; font-size: 0.9rem; }

    /* Stats */
    .stats-section { padding: 35px 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .stat-item .stat-number { font-size: 2rem; }
    .stat-item .stat-label { font-size: 0.85rem; }

    /* CTA */
    .cta-section h2 { font-size: 1.4rem !important; }

    /* Footer */
    .site-footer { padding-top: 35px; }
    .footer-grid { grid-template-columns: 1fr; gap: 25px; padding-bottom: 25px; }
    .footer-col h3 { font-size: 1rem; margin-bottom: 12px; }
    .footer-col p, .footer-col li { font-size: 0.85rem; }
    .footer-bottom { padding: 15px 0; font-size: 0.8rem; }

    /* Breadcrumb */
    .breadcrumb { padding: 10px 0; }
    .breadcrumb a, .breadcrumb .current { font-size: 0.8rem; }

    /* Page Header */
    .page-header { padding: 35px 0; }
    .page-header h1 { font-size: 1.5rem; }
    .page-header p { font-size: 0.85rem; }

    /* WhatsApp Float */
    .whatsapp-float { width: 48px; height: 48px; bottom: 20px; right: 15px; font-size: 1.4rem; }

    /* Cart toast */
    .cart-toast { bottom: 20px; padding: 10px 20px; font-size: 0.8rem; }

    /* Modals */
    .modal-overlay { padding: 10px; align-items: flex-end; }
    .modal-box { max-width: 100%; max-height: 85vh; border-radius: 16px 16px 0 0; }
    .modal-lg { max-width: 100%; border-radius: 16px 16px 0 0; }
    .modal-header { padding: 14px 18px; }
    .modal-header h3 { font-size: 1rem; }
    .modal-body { padding: 16px; }
    @keyframes modalIn {
        from { opacity: 0; transform: translateY(100%); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Admin Panel */
    .admin-sidebar {
        transform: translateX(-100%);
        width: 260px;
        position: fixed;
        z-index: 1000;
        transition: transform 0.3s ease;
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; padding: 15px; }
    .admin-header { margin-bottom: 20px; flex-direction: column; align-items: flex-start; }
    .admin-header h1 { font-size: 1.3rem; }
    .admin-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .admin-card { padding: 15px; gap: 12px; }
    .admin-card-icon { width: 40px; height: 40px; font-size: 1.1rem; border-radius: 8px; }
    .admin-card-info h3 { font-size: 1.3rem; }
    .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin-table { min-width: 600px; font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 8px 10px; }
    .admin-form { padding: 20px; }
    .admin-form .form-row { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .quick-action { padding: 15px; }
    .quick-action i { font-size: 1.4rem; }
    .quick-action span { font-size: 0.8rem; }

    /* Login */
    .login-box { padding: 25px 20px; margin: 15px; max-width: 100%; }
    .login-box h1 { font-size: 1.3rem; }

    /* Toast notification */
    .cart-toast { left: 5%; right: 5%; transform: none; text-align: center; }
}

/* Small Phone: up to 480px */
@media (max-width: 480px) {
    html { font-size: 14px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-image { height: 130px; }
    .product-body h3 { font-size: 0.8rem; }
    .product-body .price { font-size: 0.9rem; }
    .product-body .btn { padding: 7px 10px; font-size: 0.75rem; }
    .product-body .add-to-cart::after { font-size: 0.7rem; }

    .hero h2 { font-size: 1.3rem; }
    .hero p { font-size: 0.85rem; }
    .hero-content { padding: 20px 0; }
    .hero { min-height: 280px; }

    .btn { padding: 10px 18px; font-size: 0.85rem; }
    .btn-outline { margin-left: 4px; }
    .btn-sm { padding: 6px 14px; font-size: 0.78rem; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .stat-item .stat-number { font-size: 1.6rem; }

    .section { padding: 28px 0; }
    .section-header { margin-bottom: 22px; }
    .section-header h2 { font-size: 1.25rem; }

    /* Cart items on tiny screens */
    .cart-item { padding: 10px; gap: 8px; }
    .cart-item-image { width: 50px; height: 50px; }
    .cart-item-qty input { width: 36px; font-size: 0.8rem; }
    .qty-btn { width: 24px; height: 24px; font-size: 0.85rem; }

    /* Admin */
    .admin-cards { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr 1fr; }
    .admin-sidebar { width: 240px; }
}
/* Sold Out */
.sold-out-badge {
    display: block;
    background: #e74c3c;
    color: white;
    text-align: center;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 2px;
}
.sold-out-large {
    background: #e74c3c;
    color: white;
    text-align: center;
    padding: 18px 50px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 4px;
    display: inline-block;
}
.product-card.sold-out { opacity: 0.7; }
.product-card.sold-out .product-image { position: relative; }
.product-card.sold-out .product-image::after {
    content: "AGOTADO";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(231,76,60,0.9);
    color: white;
    padding: 12px 30px;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 3px;
    border-radius: 6px;
}
/* Compact product card layout */
.product-body { padding: 12px 14px; }
.product-body h3 { font-size: 0.95rem; margin-bottom: 6px; line-height: 1.3; }
.product-body h3 a { color: var(--gray-800); text-decoration: none; }
.product-body h3 a:hover { color: var(--primary); }
.card-qty-row { margin-top: 10px; }
/* === Product Row Format (Barcode / Name / Box / Unit) === */
.product-row-barcode {
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 2px;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.product-row-box {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 3px;
    font-weight: 600;
}
.product-row-unit {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
}

/* Product detail page */
.product-detail-barcode {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 4px;
    font-weight: 500;
}
.product-detail-model {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 10px;
}
.product-detail-box {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 8px;
    font-weight: 600;
    padding: 10px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    display: inline-block;
}
.product-detail-unit-price {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 15px;
}

/* === Print Styles === */
@media print {
    @page { size: A4; margin: 8mm; }
    
    /* Hide all unnecessary elements */
    .admin-sidebar, .admin-sidebar-header, .admin-nav, .admin-header .btn,
    .top-bar, .site-header, .site-footer, .whatsapp-float, .btn-danger,
    .btn-outline, .btn-primary:not(.print-keep), .btn-sm, .actions,
    button, nav, .alert, hr, .sidebar-overlay, .quick-actions,
    .breadcrumb, .menu-toggle, .cart-icon, .cart-dropdown,
    a[href]:not(.print-keep)::after, .admin-header button,
    .admin-header h1 + button, .admin-header .btn-primary { display: none !important; }
    
    /* Reset layout */
    .admin-wrapper { display: block !important; min-height: auto !important; height: auto !important; }
    .admin-main { 
        margin-left: 0 !important; 
        padding: 0 !important; 
        width: 100% !important; 
        max-width: 100% !important; 
    }
    .admin-body { background: white !important; }
    
    /* Compact form and table */
    .admin-form { 
        box-shadow: none !important; 
        border: 1px solid #ccc !important; 
        padding: 8px 12px !important; 
        margin: 0 0 10px 0 !important; 
        page-break-inside: avoid;
    }
    .admin-table-wrap { overflow: visible !important; page-break-inside: auto; }
    .admin-table { font-size: 9px; width: 100% !important; page-break-inside: auto; }
    .admin-table th, .admin-table td { padding: 3px 5px !important; }
    .admin-table th { background: #ddd !important; color: #000 !important; }
    .admin-table tr { page-break-inside: avoid; }
    
    /* Typography */
    body { font-size: 10px; color: #000; background: white; margin: 0; padding: 0; }
    h1 { font-size: 14px; margin: 0 0 6px 0 !important; }
    h2 { font-size: 12px; margin: 0 0 5px 0 !important; }
    .admin-header { margin-bottom: 8px !important; }
    
    /* Force colors */
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    
    /* Avoid orphaned content */
    p, div, h3, h4 { orphans: 2; widows: 2; }
}
