/* Estilos generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Times New Roman', Times, serif;
}

body {
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
}

/* Nuevo estilo de header más compacto */
header {
  background-color: #f0efe0;
  color: #333;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 5%; /* Reducido de 15px a 8px */
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px; /* Reducido de 50px a 40px */
}

.search-bar {
  flex-grow: 1;
  max-width: 500px;
  margin: 0 20px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 6px 12px; /* Reducido de 10px 15px a 6px 12px */
  border-radius: 20px;
  border: none;
  background-color: #b5c25a;
  color: #333;
  font-size: 0.9rem; /* Reducido de 1rem a 0.9rem */
}

.search-bar input::placeholder {
  color: #555;
}

.search-bar i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 15px; /* Reducido de 20px a 15px */
}

.user-icon, .cart-icon {
  font-size: 1.2rem; /* Reducido de 1.5rem a 1.2rem */
  color: #b5c25a;
  cursor: pointer;
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px; /* Reducido de -10px a -8px */
  right: -8px; /* Reducido de -10px a -8px */
  background-color: #e74c3c;
  color: white;
  border-radius: 50%;
  width: 16px; /* Reducido de 20px a 16px */
  height: 16px; /* Reducido de 20px a 16px */
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.7rem; /* Reducido de 0.8rem a 0.7rem */
}

/* Nuevo estilo de navegación más compacto */
.main-nav {
  background-color: #b5c25a;
  padding: 8px 0; /* Reducido de 15px a 8px */
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 30px; /* Reducido de 40px a 30px */
  max-width: 1200px;
  margin: 0 auto;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem; /* Reducido de 1.1rem a 0.95rem */
  transition: color 0.3s;
  padding: 4px 8px; /* Reducido de 5px 10px a 4px 8px */
}

.nav-links a:hover {
  color: #f0efe0;
}

/* Resto de estilos */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.category-title {
  margin-bottom: 2rem;
  text-align: center;
  color: #2c3e50;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.product-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 1rem;
}

.product-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.product-price {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.add-to-cart {
  background-color: #b5c25a;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s;
}

.add-to-cart:hover {
  background-color: #9aaa3a;
}

/* Estilos del carrito */
.cart-modal {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background-color: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease-in-out;
  z-index: 1000;
  overflow-y: auto;
}

.cart-modal.active {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: #b5c25a;
  color: white;
}

.close-cart {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-items {
  padding: 1rem;
}

.cart-item {
  display: flex;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 1rem;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.cart-item-price {
  color: #2c3e50;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

.quantity-btn {
  background-color: #eee;
  border: none;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  cursor: pointer;
}

.quantity-value {
  margin: 0 0.5rem;
}

.remove-item {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.5rem;
}

.cart-total {
  padding: 1rem;
  border-top: 1px solid #eee;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}

.checkout-btn {
  background-color: #b5c25a;
  color: white;
  border: none;
  padding: 1rem;
  width: calc(100% - 2rem);
  margin: 0 1rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.checkout-btn:hover {
  background-color: #9aaa3a;
}

.empty-cart-message {
  text-align: center;
  padding: 2rem;
  color: #7f8c8d;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.overlay.active {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .cart-modal {
    width: 100%;
    right: -100%;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .top-header {
    flex-direction: column;
    gap: 10px; /* Reducido de 15px a 10px */
  }
  
  .search-bar {
    max-width: 100%;
    margin: 8px 0; /* Reducido de 10px a 8px */
  }
  
  .nav-links {
    flex-wrap: wrap;
    gap: 8px; /* Reducido de 10px a 8px */
  }
}

/*Pie de pagina*/
footer {
  background-color: #e7e5d8;
  color: #333;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #adba5e;
}

.footer-logo span {
  color: #adba5e;
}

.footer-logo p {
  color: #333;
  font-size: 14px;
  opacity: 0.8;
}

.footer-links h3,
.footer-contact h3,
.footer-social h3 {
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  color: #333;
}

.footer-links h3::after,
.footer-contact h3::after,
.footer-social h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: #adba5e;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  color: #333;
  transition: color 0.3s ease;
}

.footer-links ul li a:hover {
  color: #64aac3;
}

.footer-contact p {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #333;
}

.footer-contact i {
  color: #adba5e;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #adba5e;
  border-radius: 50%;
  transition: all 0.3s ease;
  color: #e7e5d8;
}

.social-icons a:hover {
  background-color: #64aac3;
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 14px;
  color: #333;
}




/*PERFIL*/




.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}



.user-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.user-profile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #64aac2;
}

.user-profile .username {
  font-weight: 500;
}

.user-menu {
  position: absolute;
  top: 50px;
  right: 0;
  background: white;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  width: 200px;
  z-index: 100;
  display: none;
}

.user-profile:hover .user-menu {
  display: block;
}

.user-menu a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.3s;
}

.user-menu a:hover {
  background-color: #f5f5f5;
}

.user-menu .logout {
  border-top: 1px solid #ddd;
  color: #64aac2;
}

.user-icon i, .cart-icon i {
  font-size: 20px;
  color: #333;
  cursor: pointer;
}



.profile-container {
  max-width: 800px;
  margin: 50px auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #ddd;
}

.profile-pic {
  position: relative;
  width: 150px;
  height: 150px;
}

.profile-pic img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #64aac2;
}

.change-pic {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #64aac2;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.profile-info h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #333;
}

.profile-info p {
  color: #777;
  margin-bottom: 5px;
}

.profile-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.profile-section {
  margin-bottom: 30px;
}

.profile-section h2 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

.btn {
  background-color: #64aac2;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #8a9548;
}

.error-message {
  color: #e74c3c;
  margin-bottom: 15px;
}

.success-message {
  color: #27ae60;
  margin-bottom: 15px;
}

.upload-form {
  display: none;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .profile-header {
      flex-direction: column;
      text-align: center;
  }
  
  .profile-content {
      grid-template-columns: 1fr;
  }
}
