/* Modern Gracato Design System */
:root {
  --primary-color: #EA4D8E;
  --primary-hover: #d43a7e;
  --bg-color: #f4f6f9;
  --text-dark: #111827;
  --text-muted: #6b7280;
  --card-bg: #ffffff;
  --success: #10b981;
  --danger: #ef4444;
  --font-main: 'Barlow', sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
}

body {
  background-color: var(--bg-color);
  font-family: var(--font-main);
  color: var(--text-dark);
  margin: 0;
  padding-bottom: 100px;
  line-height: 1.6;
}

/* Background Image Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url('img/dashboard.jpg') no-repeat center center fixed;
  background-size: cover;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

.container-padding {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Premium Cards */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.logo {
  max-width: 180px;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

h4 {
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

h5 {
  font-weight: 600;
  color: var(--text-dark);
}

.badge-custom {
  background-color: #ECFDF5;
  color: var(--success);
  padding: 0.5em 1em;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9em;
}

/* Modern Form Elements */
.form-control {
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s;
  background-color: #f9fafb;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(234, 77, 142, 0.2);
  background-color: #fff;
}

.btn-orange {
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  letter-spacing: 0.025em;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(234, 77, 142, 0.25);
}

.btn-orange:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 8px rgba(234, 77, 142, 0.35);
}

/* Cart Styles */
.carrito-box {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.carrito-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

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

.remove-btn {
  color: #ef4444;
  background: #fef2f2;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #fecaca;
  font-size: 14px;
}

.remove-btn:hover {
  background: #fee2e2;
  transform: scale(1.1);
}

/* Footer */
footer {
  background: rgba(17, 24, 39, 0.95) !important;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 0;
  color: #9ca3af;
}

/* Login Page Specifics */
body.login-page {
  background: url('img/login.jpg') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

body.login-page .card {
  max-width: 450px;
  width: 90%;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  .container-padding { padding-top: 20px; }
  .card { padding: 1.5rem; }
}

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

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Product Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid #e5e7eb;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    transform: translateY(-4px);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #f472b6);
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover::before {
    opacity: 1;
}

.product-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center; /* Vertical alignment */
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.quantity-btn {
    background: #f9fafb;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-muted);
}

.quantity-btn:hover {
    background: #e5e7eb;
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    font-weight: 600;
    color: var(--text-dark);
    /* Remove number arrows */
    -moz-appearance: textfield;
}
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-add {
    background: var(--text-dark);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: background 0.2s;
    /* Ensure height matches quantity control if strict alignment needed */
}

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