@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff8c42;
    --primary-dark: #ff7a23;
    --bg-light: #ffffff;
    --bg-dark: #1a1a1a;
    --text-light: #1a1a1a;
    --text-dark: #f5f5f5;
    --border-light: #e5e7eb;
    --border-dark: #333333;
    --card-light: #f9fafb;
    --card-dark: #2d2d2d;
    --success: #10b981;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-light);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 20%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    animation: whiteBounce 4s ease-in-out infinite;
}

@keyframes whiteBounce {
    0% { top: -50%; opacity: 0; }
    25% { top: -40%; opacity: 0.6; }
    50% { top: -20%; opacity: 1; }
    75% { top: 10%; opacity: 0.6; }
    100% { top: 100%; opacity: 0; }
}

body.dark-mode {
    background: var(--bg-dark);
    color: var(--text-dark);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: white;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

body.dark-mode .header {
    background: white;
    border-bottom: 1px solid var(--border-dark);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: 10px;
}

@media (max-width: 768px) {
    .header-content {
        padding: 12px 15px;
    }
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .back-button {
        width: 50px;
        height: 50px;
        font-size: 35px;
        margin-right: 8px;
        
    }
    .back-button .arrow {
    transform: translateY(-4px); /* solo sube la flecha */
}
}

body.dark-mode .back-button {
    background: #ffffff;
    color: #000000;
}

body.dark-mode .back-button:hover {
    background: #cccccc;
}
.logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-text {
    font-size: 28px;
    color: #22c55e;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 20px;
    }
}

.nav {
    display: none;
    gap: 30px;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
}

body.dark-mode .nav-link {
    color: var(--text-dark);
}

.nav-link:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 8px 12px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(20deg);
}

.cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #22c55e;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    position: relative;
}

.cart-btn:hover {
    opacity: 0.9;
    background: #16a34a;
}

.cart-btn svg {
    color: white;
    stroke: white;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: var(--primary);
    font-weight: 900;
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
}

.hero-subtitle {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-light);
    letter-spacing: -0.5px;
    animation: mirrorPulse 3s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(255, 140, 66, 0.6), 0 0 40px rgba(255, 140, 66, 0.3);
}

body.dark-mode .hero-subtitle {
    color: var(--text-dark);
    text-shadow: 0 0 20px rgba(255, 140, 66, 0.8), 0 0 40px rgba(255, 140, 66, 0.5);
}

.hero-description {
    font-size: 1.4rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
    opacity: 0.85;
    font-weight: 500;
    line-height: 1.8;
    animation: mirrorPulse 3.5s ease-in-out infinite 0.2s;
    text-shadow: 0 0 15px rgba(255, 140, 66, 0.5), 0 0 30px rgba(255, 140, 66, 0.2);
}

body.dark-mode .hero-description {
    color: var(--text-dark);
    opacity: 0.9;
    text-shadow: 0 0 15px rgba(255, 140, 66, 0.7), 0 0 30px rgba(255, 140, 66, 0.4);
}

@keyframes mirrorPulse {
    0%, 100% { opacity: 0.85; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.02); }
}

@keyframes greenGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4), inset 0 0 10px rgba(34, 197, 94, 0.2); }
    50% { box-shadow: 0 6px 25px rgba(34, 197, 94, 0.7), inset 0 0 15px rgba(34, 197, 94, 0.4); }
}

@media (max-width: 768px) {
    .hero-subtitle { font-size: 1.6rem; }
    .hero-description { font-size: 1.1rem; }
}

/* Sections */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-light);
}

body.dark-mode .section-title {
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .section-title { font-size: 1.75rem; }
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; gap: 15px; }
}

/* Card */
.card {
    background: var(--card-light);
    border: 2px solid #10b981;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    animation: greenBorderPulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
}

body.dark-mode .card {
    background: var(--card-dark);
    border-color: #10b981;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6), 0 20px 50px rgba(255, 140, 66, 0.15);
}

body.dark-mode .card:hover {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6), 0 20px 50px rgba(255, 140, 66, 0.3);
}

@keyframes greenBorderPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4), 0 0 0 0 rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.2), 0 0 15px rgba(16, 185, 129, 0.4); }
}

.card-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-light);
    text-align: center;
}

body.dark-mode .card-title {
    color: var(--text-dark);
}

.card-presentation {
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.card-description {
    font-size: 14px;
    text-align: justify;
    margin-bottom: 15px;
    flex: 1;
    font-weight: 500;
    line-height: 1.5;
    color: #1a1a1a;
}

body.dark-mode .card-description {
    color: #ffffff;
}

.card-features {
    list-style: none;
    margin-bottom: 15px;
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.card-features li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #6b7280;
}

body.dark-mode .card-features li {
    color: rgba(245, 245, 245, 0.85);
}

.card-features li:before {
    content: "•";
    color: #10b981;
    font-weight: bold;
    font-size: 14px;
}

.card-footer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .card-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.price-section {
    width: 100%;
    text-align: center;
}

.price-label {
    font-size: 11px;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 900;
    text-align: center;
}

body.dark-mode .price-label {
    color: rgba(245, 245, 245, 0.7);
}

.price-value {
    font-size: 24px;
    font-weight: bold;
    color: #000000;
    margin-top: 4px;
    text-align: center;
}

.price-consult {
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
    font-weight: 900;
}

body.dark-mode .price-consult {
    color: rgba(245, 245, 245, 0.6);
}

.add-btn {
    background: #22c55e;
    color: white;
    border: 3px solid #16a34a;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4), inset 0 0 10px rgba(34, 197, 94, 0.2);
    width: 100%;
    transition: all 0.3s ease;
    animation: greenGlow 2s ease-in-out infinite;
}

.add-btn:hover {
    background: #16a34a;
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.8), inset 0 0 15px rgba(34, 197, 94, 0.4);
}

/* Notification */
.notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-200px);
    background: linear-gradient(135deg, var(--primary) 0%, #ff7a23 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 100;
    font-weight: bold;
    white-space: nowrap;
    transition: all 0.3s ease;
    pointer-events: none;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

.modal-overlay.active {
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    background: #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    flex-direction: column;
    border: 3px solid #22c55e;
}

body.dark-mode .modal {
    background: var(--card-dark);
}

.modal.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 3px solid #22c55e;
    background: #22c55e;
}

.modal-header h2 {
    font-size: 28px;
    color: white;
    margin: 0;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.close-btn:hover {
    transform: scale(1.2);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: #f3f4f6;
}

body.dark-mode .modal-body {
    background: #f3f4f6;
}

.empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 16px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--card-light);
    border-radius: 10px;
    margin-bottom: 15px;
    align-items: flex-start;
}

body.dark-mode .cart-item {
    background: rgba(0, 0, 0, 0.2);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 5px;
    font-size: 14px;
}

body.dark-mode .cart-item-name {
    color: var(--text-dark);
}

.cart-item-price {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    width: fit-content;
    font-size: 13px;
}

body.dark-mode .quantity-controls {
    background: var(--bg-dark);
}

.quantity-btn {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    font-weight: bold;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: var(--card-light);
}

body.dark-mode .quantity-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.quantity-display {
    width: 30px;
    text-align: center;
    font-weight: bold;
    color: var(--text-light);
}

body.dark-mode .quantity-display {
    color: var(--text-dark);
}

.remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    padding: 0;
    margin-left: auto;
}

.remove-btn:hover {
    transform: scale(1.2);
}

.modal-footer {
    background: #f3f4f6;
    padding: 25px;
    border-top: 3px solid #22c55e;
}

body.dark-mode .modal-footer {
    background: #f3f4f6;
    border-top-color: #22c55e;
}

.cart-summary {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #6b7280;
}

body.dark-mode .summary-row {
    color: rgba(245, 245, 245, 0.7);
}

.summary-row.total {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
    margin-top: 10px;
}

body.dark-mode .summary-row.total {
    border-top-color: var(--border-dark);
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .payment-methods { grid-template-columns: 1fr; }
}

.payment-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
}

.payment-btn.whatsapp {
    background: var(--success);
    color: white;
}

.payment-btn.whatsapp:hover {
    background: #1eaa51;
    transform: scale(1.05);
}

.payment-btn.qr {
    background: var(--primary);
    color: white;
}

.payment-btn.qr:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* QR Modal */
.qr-title {
    text-align: center;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 20px;
}

body.dark-mode .qr-title {
    color: var(--text-dark);
}

.qr-placeholder {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 2px solid var(--border-light);
    aspect-ratio: 1;
}

.qr-help {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

body.dark-mode .qr-help {
    color: rgba(245, 245, 245, 0.6);
}

/* Confirmation Dialog */
.confirmation-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 60;
}

.confirmation-overlay.active {
    display: block;
}

.confirmation-dialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 70;
    opacity: 0;
    pointer-events: none;
    padding: 30px;
    text-align: center;
}

body.dark-mode .confirmation-dialog {
    background: var(--card-dark);
}

.confirmation-dialog.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.confirmation-dialog h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-light);
    font-weight: 700;
}

body.dark-mode .confirmation-dialog h3 {
    color: var(--text-dark);
}

.confirmation-dialog p {
    color: #6b7280;
    margin-bottom: 25px;
    font-size: 14px;
}

.confirmation-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirmation-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.confirmation-btn.cancel {
    background: #e5e7eb;
    color: var(--text-light);
}

.confirmation-btn.cancel:hover {
    background: #d1d5db;
}

.confirmation-btn.confirm {
    background: #22c55e;
    color: white;
}

.confirmation-btn.confirm:hover {
    background: #16a34a;
}

main {
    position: relative;
    z-index: 2;
}
