:root {
  /* Colores Oro1950 - Elegante y Profesional */
  --primary-color: #121212;
  --secondary-color: #D4AF37; /* Dorado elegante */
  --accent-gold: #FFD700; /* Oro brillante */
  --accent-silver: #C0C0C0; /* Plata */
  --success-color: #27ae60;
  --background: #0a0a0a;
  --background-light: #1a1a1a;
  --card-background: #ffffff;
  --text-primary: #121212;
  --text-secondary: #666666;
  --text-light: #ffffff;
  --border-color: #e0e0e0;
  --border-gold: #D4AF37;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 4px 16px rgba(212, 175, 55, 0.2);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
  min-height: 100vh;
}

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

/* Header */
header {
  background: var(--primary-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--secondary-color);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}

.partner-logo {
  max-height: 60px;
  width: auto;
}

#partner-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
}

.cart-button {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-gold) 100%);
  color: var(--primary-color);
  padding: 14px 28px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.3s ease;
  border: 2px solid var(--secondary-color);
  box-shadow: var(--shadow-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-button:hover {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--secondary-color) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
  border-color: var(--accent-gold);
}

/* Main Content */
main {
  padding: 40px 20px;
  min-height: calc(100vh - 200px);
}

/* Loading */
.loading {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--secondary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
  background: #fee;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  max-width: 500px;
  margin: 60px auto;
}

.error-message p {
  margin-bottom: 20px;
  color: var(--accent-color);
  font-size: 18px;
}

/* Catalog */
.catalog h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--primary-color);
  text-align: left;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--secondary-color);
}

/* Product Card */
.product-card {
  background: var(--card-background);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 2px solid transparent;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 0 0 2px var(--secondary-color);
  border-color: var(--secondary-color);
}

.product-image {
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: #ffffff;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.product-info {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--primary-color);
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-description {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.product-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.product-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--secondary-color);
  letter-spacing: -0.5px;
}

.product-stock {
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-add-cart {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
  letter-spacing: 0.3px;
}

.btn-add-cart:hover:not(:disabled) {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-add-cart:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.7;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: var(--card-background);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

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

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: none;
  background: var(--primary-color);
  margin: -24px -24px 24px -24px;
}

.cart-header h3 {
  font-size: 22px;
  color: var(--secondary-color);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.close-button {
  background: transparent;
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--secondary-color);
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.3s ease;
}

.close-button:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: rotate(90deg);
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 12px;
  background: #ffffff;
  transition: all 0.2s ease;
}

.cart-item:hover {
  border-color: var(--secondary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 6px;
  background: white;
  padding: 8px;
  border: 1px solid var(--border-color);
}

.cart-item-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  color: #2c3e50;
  margin-bottom: 6px;
}

.cart-item-price {
  color: var(--secondary-color);
  font-size: 15px;
  font-weight: 600;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.quantity-btn {
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--secondary-color);
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  background: var(--background);
  color: var(--primary-color);
}

.quantity-control span {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.remove-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.remove-btn:hover {
  background: rgba(231, 76, 60, 0.1);
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.cart-footer {
  border-top: 2px solid var(--border-color);
  padding: 20px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.btn-primary {
  background: var(--secondary-color);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #2980b9;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--background);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  overflow-y: auto;
  padding: 20px;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--card-background);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h2 {
  font-size: 24px;
  color: var(--primary-color);
}

/* Form */
form {
  padding: 25px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  background-color: white;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: 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='%232c3e50' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#address-group {
  transition: all 0.3s ease;
}

#address-group.show {
  display: block !important;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Order Summary */
.order-summary {
  background: var(--background);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.order-summary h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.order-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.order-summary-item:last-child {
  border-bottom: none;
}

.order-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid var(--border-color);
  color: var(--primary-color);
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

/* Success Modal */
.modal-success {
  text-align: center;
  padding: 40px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin: 0 auto 20px;
}

.modal-success h2 {
  color: var(--success-color);
  margin-bottom: 15px;
}

.modal-success p {
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.success-note {
  background: var(--background);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 14px;
  border: 1px solid var(--border-color);
}

.success-note p {
  margin-bottom: 8px;
  line-height: 1.6;
}

.success-note p:last-child {
  margin-bottom: 0;
}

/* Footer */
footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 30px 0;
  margin-top: 60px;
}

/* Pestañas */
.tabs-container {
  margin-top: 40px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--border-color);
}

.tab-button {
  background: none;
  border: none;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: -2px;
}

.tab-button:hover {
  color: var(--primary-color);
  background-color: rgba(52, 152, 219, 0.05);
}

.tab-button.active {
  color: var(--secondary-color);
  border-bottom-color: var(--secondary-color);
  background-color: rgba(52, 152, 219, 0.08);
}

.tab-content {
  position: relative;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Grid de productos - 3 columnas en web, 1 en móvil */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Información de IVA */
.iva-info {
  font-size: 11px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.oro-iva {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.plata-iva {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Responsive */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-image {
    height: 240px;
  }

  .product-name {
    font-size: 15px;
    min-height: auto;
  }

  .product-description {
    font-size: 13px;
    -webkit-line-clamp: 3;
  }

  .tabs {
    gap: 0;
  }

  .tab-button {
    padding: 14px 20px;
    font-size: 15px;
    text-align: center;
    flex: 1;
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .modal-content {
    margin: 0;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  #partner-name {
    font-size: 18px;
  }

  header .container {
    padding: 0 16px;
  }

  .header-content {
    gap: 12px;
  }

  .cart-button {
    padding: 10px 16px;
    font-size: 14px;
  }

  main {
    padding: 24px 16px;
  }

  .catalog h2 {
    font-size: 24px;
    margin-bottom: 24px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
}
