/* style.css – Modern & Premium Design for PlataformaVALOR */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --primary-color: #434923;
  --primary-dark: #2d3118;
  --accent-color: #2e7d32; /* Green */
  --accent-hover: #1b5e20;
  --secondary-color: #212529; /* Black */
  --text-light: #f8f9fa;
  --text-dark: #212529;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --color-verde: #2e7d32;
  --color-rojo: #d32f2f;
  --color-amarillo: #fbc02d;
}

* {
  margin: 0; padding: 0; box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--primary-color);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Parallax Hero ---- */
.hero {
  position: relative;
  height: 80vh;
  min-height: 600px;
  background: url('img/hero_modern_waste.png') center/cover no-repeat fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  top:0; left:0; right:0; bottom:0;
  background: linear-gradient(135deg, rgba(67, 73, 35, 0.85) 0%, rgba(33, 37, 41, 0.7) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  padding: 2rem;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -1px;
}

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

/* ---- Buttons ---- */
.btn {
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--accent-color);
  border: none;
  color: white;
  box-shadow: 0 4px 14px 0 rgba(46, 125, 50, 0.39);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.23);
}

.btn-dark {
  background-color: var(--secondary-color);
  border: none;
  color: white;
}

.btn-dark:hover {
  background-color: #000;
  transform: translateY(-2px);
}

.btn-outline-light {
  border: 2px solid white;
}

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

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

.btn-outline-accent:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

.btn-check:checked + .btn-outline-accent {
  background-color: var(--accent-color) !important;
  color: white !important;
  border-color: var(--accent-color) !important;
  transform: none !important;
  box-shadow: var(--shadow-sm);
}

.btn-check:checked + .btn-outline-accent .text-warning {
  color: #ffeb3b !important;
}

/* ---- Layout & Sections ---- */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* ---- Glassmorphism Container (Now White for Form) ---- */
.glass-panel {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  color: var(--text-dark); /* Dark text for readability */
}

/* ---- Form Controls for White Background ---- */
.form-floating > .form-control {
  background: transparent;
  border: 1px solid #ced4da;
  color: var(--text-dark);
}

.form-floating > .form-control:focus {
  background: #fff;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.1);
  color: var(--text-dark);
}

.form-floating > label {
  color: #6c757d;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--accent-color);
}

.form-select, .form-control {
  background-color: #ffffff;
  border: 1px solid #ced4da;
  color: var(--text-dark) !important;
}

.form-select:focus, .form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.1);
}

/* ---- Bag Row ---- */
.bag-row {
  margin-bottom: 1rem;
  padding: 1rem;
  border-left: 4px solid var(--accent-color);
  background: #f8f9fa;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-dark);
}

/* ---- Modal & Cards ---- */
.modal-content {
  background-color: var(--primary-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: white;
}

.modal-header { border-bottom: 1px solid var(--glass-border); }
.modal-footer { border-top: 1px solid var(--glass-border); }

.product-card-modal {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  height: 100%;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.product-card-modal:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.1);
  border-color: var(--accent-color);
}

.product-img-thumb {
  width: 100%;
  height: 120px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 1rem;
}

/* ---- Footer & Contact ---- */
.footer {
  background: var(--primary-dark);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.social-link {
  color: white;
  margin: 0 10px;
  font-size: 1.5rem;
  transition: color 0.3s;
}

.social-link:hover {
  color: var(--accent-color);
}

/* ---- Utility ---- */
.hidden { display: none; }
.text-accent { color: var(--accent-color); }
.text-success-alt { color: #81c784; }

/* ---- Quantity Controls ---- */
.qty-control {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  border: 1px solid #ced4da;
  overflow: hidden;
  width: fit-content;
}

.qty-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  color: var(--text-dark);
  transition: background 0.2s;
}

.qty-btn:hover { background: rgba(0,0,0,0.05); }

.qty-input {
  width: 50px;
  text-align: center;
  border: none;
  background: none;
  font-weight: 600;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---- Color Selection ---- */
.color-picker-item {
  cursor: pointer;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-align: center;
}

.color-picker-item.active {
  border-color: var(--accent-color);
  background: rgba(46, 125, 50, 0.05);
}

.color-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin: 0 auto 5px;
  border: 1px solid rgba(0,0,0,0.1);
  object-fit: cover;
  display: block;
}

.badge-tag {
  background: var(--color-verde);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 8px;
}

/* ---- WhatsApp Variations ---- */
.wa-card {
  transition: transform 0.3s;
  text-decoration: none !important;
}
.wa-card:hover { transform: translateY(-3px); }

/* ---- Form Enhancements ---- */
.form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.form-check-label a {
  color: var(--accent-color);
  font-weight: 600;
}

#priceDetail {
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.5px;
}

.condition-picker .form-check {
  padding-left: 1.75rem;
  margin-bottom: 0;
}

.condition-picker .form-check-input {
  margin-left: -1.75rem;
}

.text-warning {
  color: #ffc107 !important;
}

#orderSummaryContainer {
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: var(--text-dark);
}

#orderItemsSummary .d-flex {
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

#orderItemsSummary .d-flex:last-child {
  border-bottom: none;
}

#grandTotalDisplay {
  color: var(--accent-color);
}

@media (max-width: 768px) {
  .hero { height: 60vh; }
  .section { padding: 40px 0; }
  .glass-panel { padding: 1.5rem; }
}

/* ---- WhatsApp Floating Button ---- */
.btn-whatsapp-float {
  position: fixed;
  bottom: 50px; /* Aligned bottom-most */
  right: 30px;
  width: 70px;
  height: 70px;
  background-color: #25d366;
  color: #fff !important;
  border-radius: 50%;
  text-align: center;
  font-size: 36px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.btn-whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  color: #fff !important;
  background-color: #128c7e;
}

/* ---- Chat Floating Button ---- */
.btn-chat-float {
  position: fixed;
  bottom: 135px; /* Stacked above WhatsApp button (50px + 70px + 15px gap) */
  right: 30px;
  width: 70px;
  height: 70px;
  background-color: var(--accent-color);
  color: #fff !important;
  border: none;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, background-color 0.3s;
  cursor: pointer;
}

.btn-chat-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.55);
  background-color: var(--accent-hover);
}

.chat-status-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 14px;
  height: 14px;
  background-color: #25d366;
  border: 2px solid #fff;
  border-radius: 50%;
  z-index: 1;
}

.chat-pulse-ring {
  border: 3px solid rgba(46, 125, 50, 0.35);
  border-radius: 50%;
  height: 100%;
  width: 100%;
  position: absolute;
  left: 0;
  top: 0;
  animation: chat-pulsate 2s infinite ease-out;
  opacity: 0;
  pointer-events: none;
}

@keyframes chat-pulsate {
  0% { transform: scale(0.6, 0.6); opacity: 0.0; }
  50% { opacity: 1.0; }
  100% { transform: scale(1.2, 1.2); opacity: 0.0; }
}

/* ---- Order Floating Button ---- */
.btn-order-float {
  position: fixed;
  bottom: 220px; /* Stacked above Chat button (135px + 70px + 15px gap) */
  right: 30px;
  height: 56px;
  padding: 0 26px;
  background-color: var(--secondary-color);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.btn-order-float:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  color: #fff !important;
  background-color: #000;
}

/* ---- Floating Chat Container (Glassmorphic Box) ---- */
.chat-widget-box {
  position: fixed;
  bottom: 220px; /* Stacked horizontally or vertically. Let's make it float above the Chat Button */
  right: 30px;
  width: 380px;
  height: 520px;
  background: rgba(33, 37, 41, 0.96);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0);
}

.chat-widget-box.hidden {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  pointer-events: none;
}

/* Chat Header */
.chat-widget-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, rgba(33, 37, 41, 0.95) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-avatar-container {
  position: relative;
  width: 40px;
  height: 40px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #fff;
  padding: 2px;
  object-fit: contain;
}

.chat-avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #25d366;
  border: 1.5px solid var(--primary-dark);
  border-radius: 50%;
}

.chat-bot-name {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  line-height: 1.2;
}

.chat-bot-status {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.btn-chat-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
  transition: color 0.2s, transform 0.2s;
}

.btn-chat-close:hover {
  color: #fff;
  transform: scale(1.1);
}

/* Chat Messages */
.chat-widget-messages {
  flex-grow: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.chat-widget-messages::-webkit-scrollbar {
  width: 5px;
}

.chat-widget-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
}

/* Bubbles */
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
  animation: chat-bubble-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes chat-bubble-in {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-msg-bot {
  background: rgba(255, 255, 255, 0.08);
  color: #f8f9fa;
  border-radius: 14px 14px 14px 0;
  border-left: 3px solid var(--accent-color);
  align-self: flex-start;
}

.chat-msg-bot a {
  color: #81c784;
  text-decoration: underline;
  font-weight: 600;
}

.chat-msg-bot a:hover {
  color: #a5d6a7;
}

.chat-msg-bot p {
  margin-bottom: 0.5rem;
}

.chat-msg-bot p:last-child {
  margin-bottom: 0;
}

.chat-msg-bot ul, .chat-msg-bot ol {
  padding-left: 1.2rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.chat-msg-bot li {
  margin-bottom: 4px;
}

.chat-msg-user {
  background: var(--accent-color);
  color: #ffffff;
  border-radius: 14px 14px 0 14px;
  align-self: flex-end;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.chat-widget-time {
  font-size: 0.65rem;
  opacity: 0.6;
  margin-top: 4px;
  text-align: right;
  display: block;
}

.chat-msg-user .chat-widget-time {
  color: rgba(255, 255, 255, 0.8);
}

/* Quick Reply Chips */
.chat-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 4px;
  align-self: flex-start;
  width: 100%;
  animation: chat-bubble-in 0.3s ease;
}

.chat-chip {
  background: rgba(46, 125, 50, 0.15);
  border: 1px solid rgba(46, 125, 50, 0.4);
  color: #81c784;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-chip:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
  transform: translateY(-1px);
}

/* Typing Indicator */
.chat-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px 14px 14px 0;
  align-self: flex-start;
  width: 60px;
  margin-bottom: 8px;
}

.chat-typing-dot {
  width: 6px;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: chat-typing-bounce 1.4s infinite ease-in-out both;
}

.chat-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.chat-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes chat-typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Input Area */
.chat-widget-input-area {
  padding: 1rem;
  background: rgba(21, 23, 26, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-widget-input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 8px 16px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.chat-widget-input:focus {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.08);
}

.btn-chat-send {
  background: var(--accent-color);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.btn-chat-send:hover {
  background-color: var(--accent-hover);
  transform: scale(1.05);
}

@media (max-width: 576px) {
  .btn-whatsapp-float {
    bottom: 35px;
    right: 20px;
    width: 58px;
    height: 58px;
    font-size: 30px;
  }
  .btn-chat-float {
    bottom: 105px; /* Stacked middle */
    right: 20px;
    width: 58px;
    height: 58px;
    font-size: 26px;
  }
  .btn-order-float {
    bottom: 175px; /* Stacked top */
    right: 20px;
    height: 48px;
    padding: 0 18px;
    font-size: 14px;
    border-radius: 24px;
  }
  .chat-widget-box {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    z-index: 100000;
  }
  .chat-widget-box.hidden {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* ---- Status Modal Overrides ---- */
#statusModal .modal-content {
  background-color: #ffffff !important;
  color: var(--text-dark) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: var(--shadow-lg) !important;
}

#statusModal .btn-close {
  filter: none !important;
}
