.catalog-grid {
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 40px;
}

.product-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e9ecef;
  display: flex;
  min-height: 280px;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.product-image-container {
  flex: 0 0 300px;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  visibility: visible;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-content {
  flex: 1;
  display: flex;
  padding: 25px;
  gap: 25px;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-header {
  margin-bottom: 15px;
}

.product-id {
  display: inline-block;
  background: #e9ecef;
  color: #6c757d;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.product-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1.3;
}

.product-title:hover {
  text-decoration: underline;
}

.product-description {
  color: #6c757d;
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 1.3rem;
  flex-grow: 1;
}

.product-format {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.format-container {
  flex: 1 1 70%;
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 2px;
}

.stock-container {
  flex: 1 1 20%;
}

.format-label {
  font-weight: 600;
  color: #495057;
  min-width: 60px;
}

.format-value {
  color: #28a745;
  font-weight: 600;
  margin-right: 0.5rem;
}

.stock-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  margin-left: auto;
}

.in-stock {
  background: #d4edda;
  color: #155724;
}

.low-stock {
  background: #fff3cd;
  color: #856404;
}

.bajo-pedido {
  background: #fff3cd;
  color: #856404;
}

.product-price {
  font-size: 2rem;
  font-weight: 700;
  color: #e74c3c;
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.product-price-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #6c757d;
}

.price-unit,
.escandallo-unit {
  font-size: 1rem;
  color: #6c757d;
  margin-left: 8px;
  font-weight: 400;
}

.product-escandallo-value {
  font-size: 1.3rem;
  color: #2c3e50;
}

.escandallo-unit {
  margin-left: 0;
}

.product-actions {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 0;
}

.product-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.control-group {
  display: flex;
  flex-direction: column;
}

.control-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.quantity-input {
  text-align: center;
  font-weight: 600;
  height: 100%;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.quantity-btn {
  background: #f8f9fa;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-weight: 600;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: 1.5rem;
  touch-action: manipulation;
}

.quantity-btn:hover {
  background: #e9ecef;
  color: #495057;
}

.quantity-btn:active {
  background: #dee2e6;
}

.minus-btn {
  border-right: 1px solid #e9ecef;
}

.plus-btn {
  border-left: 1px solid #e9ecef;
}

.quantity-controls .quantity-input {
  border: none;
  border-radius: 0;
  flex: 1;
  min-width: 60px;
}

.quantity-controls .quantity-input:focus {
  box-shadow: none;
  border-color: transparent;
}

.format-select {
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1.2rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: white;
}

.format-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.add-to-cart-btn {
  padding: 15px 20px;
  background: linear-gradient(135deg, #93bd00 0%, #679000 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 15px;
}

.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #93bd00 0%, #679000 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(147, 189, 0, 0.3);
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .product-actions {
    flex: 0 0 250px;
  }

  .product-image-container {
    flex: 0 0 250px;
  }
}

@media (max-width: 900px) {
  .product-card {
    flex-direction: column;
    min-height: auto;
  }

  .product-image-container {
    flex: none;
    height: 250px;
    aspect-ratio: 16 / 9;
  }

  .product-image {
    object-fit: cover;
  }

  .product-content {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }

  .product-actions {
    flex: none;
  }
}

@media (min-width: 769px) {
  .product-image {
    object-fit: contain;
  }
}

@media (max-width: 768px) {
  .sidemenu-nav {
    display: none !important;
  }

  .container {
    padding: 15px;
  }

  .header h1 {
    font-size: 2.5rem;
  }

  .product-card {
    flex-direction: column;
    min-height: auto;
  }

  .product-image-container {
    flex: none;
    height: 200px;
  }

  .product-image {
    object-fit: cover;
  }

  .product-content {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }

  .product-actions {
    flex: none;
  }

  .product-title {
    font-size: 1.5rem;
  }

  .product-price {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .product-content {
    padding: 15px;
    gap: 15px;
  }

  .product-controls {
    gap: 12px;
  }

  .add-to-cart-btn {
    padding: 12px 15px;
    font-size: 1.2rem;
  }
}

/* Loading placeholder for images */
.product-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
    linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 1.1rem;
  font-weight: 500;
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
}

.sidemenu-item.has-children > .sidemenu-sublist {
  display: none;
}
.sidemenu-item.has-children.open > .sidemenu-sublist {
  display: block;
}

/* --- SIDEMENU ACCORDION --- */
.sidemenu-sublist {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
  display: block;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.sidemenu-item.open > .sidemenu-sublist {
  max-height: 3000px;
  opacity: 1;
}
.dropdown-arrow {
  transition: transform 0.3s;
  display: inline-block;
  margin-left: 8px;
}
.sidemenu-item.open .dropdown-arrow {
  transform: rotate(180deg);
}
.sidemenu-link[aria-expanded="true"] {
  font-weight: bold;
}
/* --- FIN SIDEMENU ACCORDION --- */
