/* 
* TudiBom - Styles principais
* Estilos para o site responsivo de pedidos de marmitas
*/

/* ===== VARIÁVEIS ===== */
:root {
  --primary-color: #E76F51;
  --primary-dark: #D65A3A;
  --secondary-color: #2A9D8F;
  --secondary-dark: #21867A;
  --accent-color: #F4D19B;
  --background-color: #FFF6E5;
  --text-color: #4A4A4A;
  --white: #FFFFFF;
  --light-gray: #f5f5f5;
  --gray: #e0e0e0;
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --transition: all 0.3s ease;
}

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
}

/* ===== HEADER ===== */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  flex-wrap: wrap;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  max-width: 60px;
  margin-right: 10px;
}

.site-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Menu hamburguer para mobile */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 200;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary-color);
  transition: var(--transition);
}

/* ===== NAVIGATION ===== */
nav {
  display: flex;
  align-items: center;
}

nav ul {
  display: flex;
  gap: 20px;
}

nav a {
  color: var(--text-color);
  font-weight: 500;
  padding: 5px 10px;
  position: relative;
}

nav a:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

nav a:hover:after,
nav a.active:after {
  width: 100%;
}

nav a.active {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: 20px;
}

.social-icon {
  width: 24px;
  height: 24px;
  transition: var(--transition);
}

.social-icon:hover {
  transform: scale(1.2);
}

/* ===== HERO SECTION ===== */
.hero {
  background-color: var(--accent-color);
  padding: 60px 0;
  text-align: center;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
  color: var(--text-color);
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-badge {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.hero-badge:hover {
  transform: translateY(-3px);
}

/* ===== PRODUCTS ===== */
.category {
  padding: 40px 0;
}

.category-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 30px;
  text-align: center;
  position: relative;
}

.category-title:after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 10px auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.product-card {
  background-color: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.product-img {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.product-info {
  padding: 20px;
  flex: 1;
}

.product-name {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.product-desc {
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 15px;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.add-to-cart {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px;
  width: 100%;
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
}

.add-to-cart:hover {
  background-color: var(--primary-dark);
}

/* Estilos para o carrossel de imagens dos kits */
.product-image-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}

.slider-container {
  display: flex;
  transition: transform 0.3s ease;
  width: 100%;
  height: 220px;
  position: relative;
}

.slider-container .product-img {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
  transition: opacity 0.3s ease;
}

.slider-container .product-img.active {
  opacity: 1;
  z-index: 1;
}

.slider-controls {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  z-index: 2;
}

.prev-slide, .next-slide {
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.prev-slide:hover, .next-slide:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.slider-dots {
  display: flex;
  gap: 5px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.2s;
}

.dot.active {
  background-color: var(--primary-color);
}

/* ===== ABOUT SECTION ===== */
.about {
  padding: 80px 0;
  background-color: var(--accent-color);
  position: relative;
}

.about .container {
  max-width: 900px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.2rem;
  color: var(--text-color);
  margin-bottom: 30px;
  text-align: center;
  position: relative;
}

.section-title:after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 10px auto;
}

.about-content {
  padding: 30px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-icons {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-bottom: 40px;
  gap: 20px;
}

.about-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease;
}

.about-icon:hover {
  transform: translateY(-5px);
}

.about-icon i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  background-color: rgba(231, 111, 81, 0.1);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-icon span {
  font-weight: 600;
  color: var(--text-color);
}

.about p {
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-color);
}

.about strong {
  color: var(--primary-color);
  font-weight: 700;
}

.about:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
  background-size: cover;
  background-position: center;
  opacity: 0.1;
}

/* ===== CONTACT SECTION ===== */
.contact {
  padding: 70px 0;
  background-color: var(--light-gray);
}

.contact .container {
  max-width: 800px;
}

.contact p {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: var(--white);
  padding: 20px 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 200px;
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.contact-item i {
  color: var(--primary-color);
  font-size: 1.5rem;
  background-color: rgba(231, 111, 81, 0.1);
  padding: 15px;
  border-radius: 50%;
}

.contact-item span,
.contact-item a {
  font-weight: 500;
  font-size: 1.1rem;
}

.contact-item a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--primary-color);
}

.contact-message {
  text-align: center;
  margin-top: 50px;
}

/* ===== MODALS ===== */
/* Modal para Imagem Expandida */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.image-modal.active {
  visibility: visible;
  opacity: 1;
}

.image-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

.expanded-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.close-image-modal {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  z-index: 2001;
  transition: color 0.3s ease;
}

.close-image-modal:hover {
  color: var(--primary-color);
}

.image-navigation {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  color: var(--text-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
  z-index: 2001;
}

.nav-btn:hover {
  background: var(--white);
  color: var(--primary-color);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.image-counter {
  color: var(--white);
  margin-top: 15px;
  font-size: 1rem;
}

/* Modal para Descrição */
.description-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1500;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.description-modal.active {
  visibility: visible;
  opacity: 1;
}

.description-modal-content {
  background: var(--white);
  border-radius: var(--radius);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.description-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--gray);
}

.description-modal-header h3 {
  color: var(--text-color);
  font-size: 1.3rem;
  margin: 0;
}

.close-description-modal {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-description-modal:hover {
  color: var(--primary-color);
}

.description-modal-body {
  padding: 25px;
}

.description-modal-body p {
  line-height: 1.8;
  color: var(--text-color);
  white-space: pre-line;
  margin: 0;
}

/* Texto truncado para descrições */
.product-desc-truncated {
  cursor: pointer;
  transition: color 0.3s ease;
}

.product-desc-truncated:hover {
  color: var(--primary-color);
}

.read-more-btn {
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 5px;
}

.read-more-btn:hover {
  color: var(--primary-dark);
}

/* Cursor pointer para imagens clicáveis */
.product-img {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.product-img:hover {
  transform: scale(1.02);
}

/* ===== CART ===== */
.cart-icon {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--secondary-color);
  color: var(--white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 90;
  transition: var(--transition);
}

.cart-icon:hover {
  background-color: var(--secondary-dark);
  transform: scale(1.1);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: bold;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.cart-modal.active {
  visibility: visible;
  opacity: 1;
}

.cart-content {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray);
}

.cart-header h2 {
  font-size: 1.5rem;
  color: var(--text-color);
}

.close-cart {
  background: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-items {
  margin-bottom: 30px;
}

.cart-item {
  display: flex;
  flex-direction: column;
  padding: 15px 0;
  border-bottom: 1px solid var(--gray);
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 500;
  margin-bottom: 5px;
}

.cart-item-price {
  color: var(--primary-color);
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  margin: 0 15px;
}

.cart-item-quantity button {
  width: 30px;
  height: 30px;
  background-color: var(--gray);
  color: var(--text-color);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-quantity input {
  width: 40px;
  text-align: center;
  border: 1px solid var(--gray);
  margin: 0 5px;
  height: 30px;
}

.cart-item-observation {
  margin-top: 10px;
  width: 100%;
}

.observation-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray);
  border-radius: 5px;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  background-color: var(--white);
  transition: border-color 0.3s ease;
}

.observation-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.observation-input::placeholder {
  color: #999;
  font-style: italic;
}

.remove-item {
  background-color: #ff5252;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-summary {
  padding-top: 20px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-weight: bold;
  font-size: 1.2rem;
}

.checkout-btn {
  background-color: #25D366;
  color: white;
  padding: 15px;
  border-radius: var(--radius);
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.checkout-btn:hover {
  background-color: #20BD5A;
}

.empty-cart-message {
  text-align: center;
  padding: 20px;
  font-size: 1.1rem;
  color: var(--text-color);
}

/* ===== NOTIFICATION ===== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--secondary-color);
  color: white;
  padding: 15px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1000;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(150%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification i {
  font-size: 1.2rem;
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--text-color);
  color: var(--white);
  padding: 40px 0 20px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.footer-col h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
}

.footer-col h3:after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-col p {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 15px;
}

.footer-contact i {
  color: var(--primary-color);
  margin-top: 5px;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.footer-social a {
  background-color: rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer-social a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

/* ===== MEDIA QUERIES ===== */
@media screen and (max-width: 992px) {
  .site-title {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    padding: 80px 20px 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 150;
  }
  
  nav.active {
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
    width: 100%;
  }
  
  nav ul li {
    margin: 10px 0;
  }
  
  .social-links {
    margin: 20px 0 0;
    width: 100%;
    justify-content: center;
  }
  
  .header-container {
    padding: 10px 20px;
  }
  
  .hero {
    padding: 40px 0;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .category-title {
    font-size: 1.8rem;
  }
  
  .products-grid {
    gap: 20px;
  }
  
  .cart-icon {
    width: 50px;
    height: 50px;
  }

  .cart-item-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cart-item-quantity {
    margin: 0;
    align-self: flex-start;
  }

  .remove-item {
    align-self: flex-start;
    margin-top: 5px;
  }

  .observation-input {
    font-size: 0.9rem;
    min-height: 50px;
  }
}

@media screen and (max-width: 576px) {
  .logo {
    max-width: 45px;
  }
  
  .site-title {
    font-size: 1.3rem;
  }
  
  .hero h2 {
    font-size: 1.8rem;
  }
  
  .cart-content {
    padding: 20px;
  }
  
  .cart-item {
    flex-wrap: wrap;
  }
  
  .cart-item-quantity {
    margin: 10px 0;
  }
  
  .cart-icon {
    bottom: 20px;
    right: 20px;
  }
  
  .notification {
    width: 90%;
    right: 5%;
    font-size: 0.9rem;
    padding: 12px 15px;
  }
}
