:root {
  --primary: #C4A69D;
  --primary-light: #E8D4D8;
  --accent: #D4AF37;
  --dark: #3D3D3D;
  --light: #F9F7F5;
  --border: #E8E0D9;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Roboto, 'Open Sans', sans-serif;
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

header {
  background: white;
  padding: 2rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 1px;
  color: var(--dark);
}

.logo span {
  color: var(--primary);
  font-weight: 600;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav a {
  color: var(--dark);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
  position: relative;
  white-space: nowrap;
}

nav a:hover {
  color: var(--primary);
}

nav a#auth-link {
  margin-left: 0;
  background: var(--primary);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  transition: all 0.3s;
  font-weight: 500;
}

nav a#auth-link:hover {
  background: var(--accent);
  color: var(--dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hero {
  background: linear-gradient(135deg, #F9F7F5 0%, #E8D4D8 100%);
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 4rem;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.hero h1 strong {
  color: var(--primary);
  font-weight: 600;
}

.hero p {
  font-size: 1.2rem;
  color: var(--dark);
  opacity: 0.8;
  margin-bottom: 2rem;
}

.filters {
  max-width: 1200px;
  margin: 3rem auto 2rem;
  padding: 0 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--border);
  background: white;
  color: var(--dark);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(196, 166, 157, 0.15);
  transform: translateY(-4px);
}

.product-image {
  width: 100%;
  height: 280px;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
  cursor: pointer;
}
.product-image:hover img {
  transform: scale(1.02);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.product-info {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 0.8rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.product-name {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
  color: var(--dark);
  line-height: 1.4;
}

.product-description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.2rem;
  flex: 1;
  text-align: justify;
  line-height: 1.5;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s;
  font-weight: 500;
}

.btn-add {
  background: var(--primary);
  color: white;
  margin-left: auto;
}

.btn-add:hover {
  background: var(--accent);
}

.btn-add:active {
  transform: scale(0.98);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #999;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  font-size: 0.95rem;
}

footer p {
  opacity: 0.8;
}

.cart-icon {
  cursor: pointer;
  font-size: 1.5rem;
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.cart-modal {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-size: 1.3rem;
  color: var(--dark);
}

.cart-close {
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--primary);
}

.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

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

.cart-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.cart-item-price {
  color: var(--primary);
  font-weight: 600;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 1.2rem;
  transition: color 0.3s;
  margin-left: 1rem;
}

.cart-item-remove:hover {
  color: var(--accent);
}

.cart-footer {
  padding: 1.5rem;
  border-top: 2px solid var(--border);
  background: var(--light);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.cart-total strong {
  color: var(--primary);
}

.btn-checkout {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-checkout:hover {
  background: var(--accent);
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
  display: none;
}

.cart-overlay.open {
  display: block;
}

.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.image-modal.open {
  display: flex;
}

.image-modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.image-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
}

.image-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.3);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  border-radius: 4px;
  z-index: 10;
  transition: background 0.3s;
}

.image-modal-nav:hover {
  background: rgba(255, 255, 255, 0.5);
}

.image-modal-nav.prev {
  left: -60px;
}

.image-modal-nav.next {
  right: -60px;
}

.image-modal-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.9rem;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
}

.modal-alert {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-alert {
  transform: scale(1);
}

.modal-alert h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.modal-alert p {
  color: var(--dark);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.modal-btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.modal-btn-primary {
  background: var(--primary);
  color: white;
  flex: 1;
  max-width: 150px;
}

.modal-btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196, 166, 157, 0.3);
}

.modal-btn-secondary {
  background: var(--border);
  color: var(--dark);
  flex: 1;
  max-width: 150px;
}

.modal-btn-secondary:hover {
  background: #d0c8c0;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  nav a {
    margin-left: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .product-image {
    height: 200px;
  }

  .filters {
    padding: 0 1rem;
  }

  .modal-alert {
    padding: 1.5rem;
  }
}
