/* =============================================
   PortalDinamico - Estilos Públicos
   Colores: Verde (#2d5016) + Dorado (#c8a84e)
   ============================================= */

/* === RESET Y BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, sans-serif; color: #333; line-height: 1.6; background: #fff; }
a { text-decoration: none; color: inherit; transition: color 0.3s; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === BOTONES === */
.btn { display: inline-block; padding: 12px 28px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; border: none; transition: all 0.3s; text-align: center; }
.btn-primary { background: #2d5016; color: #fff; }
.btn-primary:hover { background: #3d6b1e; transform: translateY(-2px); }
.btn-secondary { background: #c8a84e; color: #fff; }
.btn-secondary:hover { background: #b8963e; }
.btn-outline { background: transparent; border: 2px solid #2d5016; color: #2d5016; }
.btn-outline:hover { background: #2d5016; color: #fff; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; }

/* === ALERTAS === */
.alert { padding: 12px 20px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* === BADGES === */
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; color: #fff; }
.badge-success { background: #28a745; }
.badge-warning { background: #ffc107; color: #333; }
.badge-danger { background: #dc3545; }
.badge-info { background: #17a2b8; }
.badge-primary { background: #2d5016; }
.badge-secondary { background: #6c757d; }

/* === NAVBAR === */
.navbar { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 1000; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.navbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: #2d5016; }
.navbar-logo { height: 40px; width: auto; }
.navbar-menu { display: flex; gap: 8px; }
.navbar-menu a { padding: 8px 16px; border-radius: 6px; font-weight: 500; font-size: 14px; color: #555; }
.navbar-menu a:hover, .navbar-menu a.active { color: #2d5016; background: #f0f7e6; }
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.btn-icon { background: none; border: none; font-size: 20px; cursor: pointer; position: relative; padding: 8px; }
.cart-badge { position: absolute; top: 0; right: 0; background: #c8a84e; color: #fff; font-size: 11px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.navbar-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.navbar-toggle span { display: block; width: 24px; height: 2px; background: #333; margin: 5px 0; transition: 0.3s; }

/* === HERO === */
.hero { background: linear-gradient(135deg, #2d5016 0%, #4a7c28 100%); color: #fff; padding: 100px 0 80px; text-align: center; position: relative; overflow: hidden; }
.hero h1 { font-size: 48px; font-weight: 700; margin-bottom: 16px; }
.hero p { font-size: 18px; opacity: 0.9; max-width: 600px; margin: 0 auto 30px; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero .btn-primary { background: #c8a84e; }
.hero .btn-primary:hover { background: #b8963e; }
.hero .btn-outline { border-color: #fff; color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,0.15); }

/* === SECCIONES === */
.section { padding: 80px 0; }
.section-alt { background: #f8f9fa; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 36px; color: #2d5016; margin-bottom: 12px; }
.section-title p { color: #666; font-size: 16px; max-width: 600px; margin: 0 auto; }

/* === PAGE HEADER === */
.page-header { background: linear-gradient(135deg, #2d5016 0%, #4a7c28 100%); color: #fff; padding: 60px 0; text-align: center; }
.page-header h1 { font-size: 36px; margin-bottom: 10px; }
.page-header p { opacity: 0.9; font-size: 16px; }

/* === FEATURES === */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.feature-card { background: #fff; border-radius: 12px; padding: 30px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.06); transition: transform 0.3s; }
.feature-card:hover { transform: translateY(-5px); }
.feature-icon { font-size: 48px; margin-bottom: 16px; }
.feature-card h3 { color: #2d5016; margin-bottom: 10px; font-size: 20px; }
.feature-card p { color: #666; font-size: 14px; }

/* === ABOUT PREVIEW === */
.about-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-preview h2 { font-size: 36px; color: #2d5016; margin-bottom: 20px; }
.about-preview p { color: #555; margin-bottom: 16px; line-height: 1.8; }
.about-preview img { border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

/* === CATEGORÍAS === */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.category-card { background: #fff; border-radius: 12px; padding: 30px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.06); transition: transform 0.3s; cursor: pointer; }
.category-card:hover { transform: translateY(-5px); }
.category-icon { font-size: 48px; margin-bottom: 12px; }
.category-card h3 { color: #2d5016; font-size: 18px; }

/* === PRODUCTOS === */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.product-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.06); transition: transform 0.3s; }
.product-card:hover { transform: translateY(-5px); }
.product-emoji-box { height: 200px; display: flex; align-items: center; justify-content: center; }
.product-emoji { font-size: 72px; }
.product-card img.product-img { width: 100%; height: 200px; object-fit: cover; }
.product-info { padding: 20px; }
.product-info h3 { font-size: 16px; color: #333; margin-bottom: 6px; }
.product-info .product-desc { font-size: 13px; color: #888; margin-bottom: 10px; }
.product-price { display: flex; align-items: center; justify-content: space-between; }
.product-price .price { font-size: 18px; font-weight: 700; color: #2d5016; }
.product-price .unit { font-size: 13px; color: #999; }
.product-card .btn { width: 100%; margin-top: 12px; }

/* === FILTROS === */
.filters-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; align-items: center; }
.filters-bar input[type="text"] { flex: 1; min-width: 200px; padding: 10px 16px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; }
.filters-bar input:focus { border-color: #2d5016; outline: none; }
.filter-btn { padding: 8px 20px; border-radius: 20px; border: 2px solid #e0e0e0; background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.3s; }
.filter-btn:hover, .filter-btn.active { background: #2d5016; color: #fff; border-color: #2d5016; }

/* === TESTIMONIOS === */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.testimonial-card { background: #fff; border-radius: 12px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); }
.testimonial-stars { color: #c8a84e; font-size: 18px; margin-bottom: 12px; }
.testimonial-text { color: #555; font-style: italic; margin-bottom: 20px; line-height: 1.7; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 48px; height: 48px; border-radius: 50%; background: #2d5016; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.testimonial-name { font-weight: 600; color: #333; }
.testimonial-company { font-size: 13px; color: #888; }

/* === SERVICIOS === */
.service-block { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 60px; }
.service-block.reverse { direction: rtl; }
.service-block.reverse > * { direction: ltr; }
.service-icon-big { font-size: 80px; text-align: center; padding: 40px; background: #f0f7e6; border-radius: 16px; }
.service-block h3 { font-size: 28px; color: #2d5016; margin-bottom: 16px; }
.service-block p { color: #555; margin-bottom: 16px; }
.service-features { list-style: none; }
.service-features li { padding: 6px 0; color: #555; }
.service-features li::before { content: '✅ '; }

/* === BENEFICIOS === */
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.benefit-card { text-align: center; padding: 30px; background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); }
.benefit-card .benefit-icon { font-size: 40px; margin-bottom: 12px; }
.benefit-card h3 { color: #2d5016; margin-bottom: 8px; }
.benefit-card p { color: #666; font-size: 14px; }

/* === CTA === */
.cta-section { background: linear-gradient(135deg, #2d5016 0%, #4a7c28 100%); color: #fff; padding: 60px 0; text-align: center; }
.cta-section h2 { font-size: 32px; margin-bottom: 16px; }
.cta-section p { opacity: 0.9; margin-bottom: 24px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-section .btn { background: #c8a84e; color: #fff; }
.cta-section .btn:hover { background: #b8963e; }

/* === VALORES === */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.value-card { text-align: center; padding: 30px; background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); }
.value-card .value-icon { font-size: 48px; margin-bottom: 12px; }
.value-card h3 { color: #2d5016; margin-bottom: 8px; }

/* === STATS === */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.stat-item .stat-number { font-size: 42px; font-weight: 700; color: #c8a84e; }
.stat-item .stat-label { color: #555; font-size: 14px; }

/* === BLOG === */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 30px; }
.blog-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.06); transition: transform 0.3s; }
.blog-card:hover { transform: translateY(-5px); }
.blog-card-img { height: 200px; display: flex; align-items: center; justify-content: center; font-size: 64px; }
.blog-card-body { padding: 24px; }
.blog-meta { display: flex; gap: 12px; margin-bottom: 10px; font-size: 13px; color: #888; }
.blog-tag { padding: 2px 10px; border-radius: 12px; font-size: 12px; color: #fff; }
.blog-card h3 { font-size: 18px; color: #333; margin-bottom: 8px; }
.blog-card p { color: #666; font-size: 14px; margin-bottom: 12px; }
.blog-card .read-more { color: #2d5016; font-weight: 600; font-size: 14px; }

/* === CONTACTO === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; color: #333; font-size: 14px; }
.form-control { width: 100%; padding: 12px 16px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; font-family: inherit; transition: border-color 0.3s; }
.form-control:focus { border-color: #2d5016; outline: none; }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: none; background: #fff 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='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center; }
.contact-info h3 { color: #2d5016; margin-bottom: 16px; font-size: 20px; }
.contact-info-item { display: flex; gap: 12px; margin-bottom: 16px; color: #555; }
.contact-info-item strong { color: #333; }
.contact-map { border-radius: 12px; overflow: hidden; margin-top: 20px; }
.contact-map iframe { width: 100%; height: 300px; border: none; }

/* === AUTH === */
.auth-tabs { display: flex; margin-bottom: 24px; border-bottom: 2px solid #e0e0e0; }
.auth-tab { flex: 1; text-align: center; padding: 12px; font-weight: 600; color: #888; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.auth-tab.active { color: #2d5016; border-bottom-color: #2d5016; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-link { color: #2d5016; font-weight: 500; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: #888; }

/* === PERFIL === */
.profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 30px; padding: 40px 0; }
.profile-sidebar { background: #fff; border-radius: 12px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); height: fit-content; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: #2d5016; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; margin: 0 auto 16px; }
.profile-name { text-align: center; font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.profile-email { text-align: center; color: #888; font-size: 13px; margin-bottom: 20px; }
.profile-nav a { display: block; padding: 10px 16px; border-radius: 8px; color: #555; font-size: 14px; margin-bottom: 4px; }
.profile-nav a:hover, .profile-nav a.active { background: #f0f7e6; color: #2d5016; }
.profile-content { background: #fff; border-radius: 12px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); }

/* === CHECKOUT === */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 30px; padding: 40px 0; }
.checkout-steps { display: flex; gap: 20px; margin-bottom: 30px; }
.checkout-step { flex: 1; text-align: center; padding: 12px; border-radius: 8px; background: #f0f0f0; color: #888; font-weight: 500; font-size: 14px; }
.checkout-step.active { background: #2d5016; color: #fff; }
.order-summary { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); height: fit-content; position: sticky; top: 90px; }
.order-summary h3 { margin-bottom: 20px; color: #2d5016; }
.summary-item { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px solid #f0f0f0; }
.summary-total { display: flex; justify-content: space-between; padding: 16px 0 0; font-size: 18px; font-weight: 700; color: #2d5016; }
.payment-options { margin: 20px 0; }
.payment-option { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 2px solid #e0e0e0; border-radius: 8px; margin-bottom: 8px; cursor: pointer; }
.payment-option:hover, .payment-option.selected { border-color: #2d5016; }
.payment-option input[type="radio"] { accent-color: #2d5016; }

/* === POLÍTICAS === */
.policies-layout { display: grid; grid-template-columns: 250px 1fr; gap: 30px; padding: 40px 0; }
.policies-nav { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); height: fit-content; position: sticky; top: 90px; }
.policies-nav a { display: block; padding: 10px 16px; border-radius: 8px; color: #555; font-size: 14px; margin-bottom: 4px; }
.policies-nav a:hover, .policies-nav a.active { background: #f0f7e6; color: #2d5016; }
.policy-content { background: #fff; border-radius: 12px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); }
.policy-content h3 { color: #2d5016; margin: 24px 0 12px; }
.policy-content p { color: #555; margin-bottom: 12px; line-height: 1.7; }

/* === NEWSLETTER === */
.newsletter-form { display: flex; gap: 12px; max-width: 500px; margin: 0 auto; }
.newsletter-form input { flex: 1; padding: 12px 16px; border: 2px solid rgba(255,255,255,0.3); border-radius: 8px; background: rgba(255,255,255,0.1); color: #fff; font-size: 14px; }
.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }

/* === CONFIRMACIÓN === */
.confirmation-card { text-align: center; max-width: 600px; margin: 40px auto; background: #fff; border-radius: 16px; padding: 50px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.confirmation-icon { font-size: 64px; margin-bottom: 20px; }
.confirmation-card h2 { color: #2d5016; margin-bottom: 12px; }
.order-number { font-size: 24px; font-weight: 700; color: #c8a84e; margin: 16px 0; }

/* === DETALLE PRODUCTO === */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 40px 0; }
.product-detail-img { border-radius: 16px; overflow: hidden; }
.product-detail-img .product-emoji-box { height: 400px; border-radius: 16px; }
.product-detail-info h1 { font-size: 32px; color: #333; margin-bottom: 12px; }
.product-detail-info .price-big { font-size: 28px; font-weight: 700; color: #2d5016; margin-bottom: 20px; }
.product-detail-info .product-meta { margin-bottom: 20px; }
.product-meta-item { display: flex; gap: 8px; padding: 6px 0; color: #555; font-size: 14px; }
.product-meta-item strong { color: #333; min-width: 120px; }
.quantity-selector { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.quantity-selector button { width: 40px; height: 40px; border: 2px solid #e0e0e0; border-radius: 8px; background: #fff; font-size: 18px; cursor: pointer; }
.quantity-selector input { width: 60px; text-align: center; border: 2px solid #e0e0e0; border-radius: 8px; padding: 8px; font-size: 16px; }

/* === BREADCRUMB === */
.breadcrumb { padding: 16px 0; font-size: 14px; color: #888; }
.breadcrumb a { color: #2d5016; }
.breadcrumb span { margin: 0 8px; }

/* === CART MODAL === */
.cart-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; display: none; }
.cart-overlay.open { display: block; }
.cart-modal { position: fixed; top: 0; right: -400px; width: 400px; height: 100%; background: #fff; z-index: 2001; transition: right 0.3s; display: flex; flex-direction: column; box-shadow: -5px 0 20px rgba(0,0,0,0.1); }
.cart-modal.open { right: 0; }
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #eee; }
.cart-header h3 { font-size: 18px; color: #2d5016; }
.cart-close { background: none; border: none; font-size: 28px; cursor: pointer; color: #888; }
.cart-body { flex: 1; overflow-y: auto; padding: 20px; }
.cart-empty-msg { text-align: center; color: #888; padding: 40px 0; }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.cart-item-img { width: 60px; height: 60px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 14px; }
.cart-item-price { color: #2d5016; font-weight: 600; font-size: 14px; }
.cart-item-qty { font-size: 13px; color: #888; }
.cart-item-remove { background: none; border: none; color: #dc3545; cursor: pointer; font-size: 18px; }
.cart-footer { padding: 20px; border-top: 1px solid #eee; }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 18px; }
.cart-footer .btn { margin-bottom: 8px; }

/* === WHATSAPP FLOAT === */
.whatsapp-float { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: #25d366; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; box-shadow: 0 4px 15px rgba(37,211,102,0.4); z-index: 999; transition: transform 0.3s; }
.whatsapp-float:hover { transform: scale(1.1); }

/* === FOOTER === */
.footer { background: #1a1a2e; color: #ccc; padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #c8a84e; margin-bottom: 16px; font-size: 16px; }
.footer-col p { font-size: 14px; line-height: 1.7; }
.footer-col ul li { margin-bottom: 8px; font-size: 14px; }
.footer-col a { color: #ccc; transition: color 0.3s; }
.footer-col a:hover { color: #c8a84e; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a { padding: 6px 12px; background: rgba(255,255,255,0.1); border-radius: 6px; font-size: 13px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; color: #888; }

/* === INFO BOX === */
.info-box { background: #fff3cd; border: 1px solid #ffc107; border-radius: 12px; padding: 24px; margin: 30px 0; }
.info-box h3 { color: #856404; margin-bottom: 8px; }
.info-box p { color: #856404; font-size: 14px; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .navbar-menu { display: none; position: absolute; top: 70px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .navbar-menu.open { display: flex; }
    .navbar-toggle { display: block; }
    .hero h1 { font-size: 32px; }
    .about-preview, .service-block, .contact-grid, .product-detail { grid-template-columns: 1fr; }
    .service-block.reverse { direction: ltr; }
    .profile-layout, .checkout-layout, .policies-layout { grid-template-columns: 1fr; }
    .cart-modal { width: 100%; right: -100%; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .blog-grid { grid-template-columns: 1fr; }
}
