/* CSS Custom Properties for easy theming */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --border-radius: 6px;
  --box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  --max-width: 1200px;
}

/* Global Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--light-color);
  background-color: #333333;
}

/* Global Header Styles */
.global-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

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

.header-left {
  display: flex;
  align-items: center;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

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

.store-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
  position: relative;
}

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

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.auth-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-greeting {
  color: white;
  font-weight: 500;
  opacity: 0.9;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: #6495ED;
  color: white;
}

.btn-primary:hover {
  background-color: #004687;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 74, 167, 0.3);
}

.btn-signin {
  background-color: #6495ED;
  color: white;
  margin-top: 1em !important;
  width: 100% !important;
}

.btn-signin:hover {
  background-color: #004687;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 74, 167, 0.3);
}

.btn-signup {
  background-color: #662d91;
  color: white;
  margin-top: 1em;
  width: 100%;
}

.btn-signup:hover {
  background-color: #4B0082;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 74, 167, 0.3);
}

.btn-secondary {
  background-color: #6F00FF;
  color: white;
}

.btn-secondary:hover {
  background-color: #4B0082;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(68, 40, 167, 0.3);
}

.btn-logout {
  background-color: #9e1b32;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-logout:hover {
  background-color: rgba(78, 5, 5, 0.959);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.btn-edit {
  background-color: #662d91;
  color: white;
}

.btn-edit:hover {
  background-color: #452c63;
  transform: translateY(-2px);
}

.btn-delete {
  background-color: #9e1b32;
  color: white;
  margin-top: 1em;
}

.btn-delete:hover {
  background-color: rgba(78, 5, 5, 0.959);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* Product card edit/delete actions */
.product-card .product-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.product-card .product-actions .btn {
  padding: 0.4rem 0.8rem !important;
  font-size: 0.8rem !important;
  width: auto !important;
  margin: 0 !important;
  height: auto !important;
  flex: 1;
}

.btn-cancel {
  background-color: #662d91;
  color: white;
  height: auto;
  width: auto;
  margin-top: 0;
  padding: 0.75rem 2rem;
}

.btn-cancel:hover {
  background-color: #452c63;
  transform: translateY(-2px);
}

/* Notification Styles */
.notification {
  padding: 1rem 2rem;
  margin: 0;
  position: relative;
  animation: slideDown 0.3s ease;
  /* Add auto-hide functionality */
  animation-delay: 5s;
  animation-fill-mode: forwards;
}

.notification.notice {
  background: linear-gradient(90deg, #d4edda, #c3e6cb);
  border-left: 4px solid #28a745;
  color: #155724;
  /* Auto-hide after 5 seconds */
  animation: slideDown 0.3s ease, slideUp 0.3s ease 2s forwards;
}

.notification.alert {
  background: linear-gradient(90deg, #f8d7da, #f1aeb5);
  border-left: 4px solid #dc3545;
  color: #721c24;
  /* Auto-hide after 5 seconds */
  animation: slideDown 0.3s ease, slideUp 0.3s ease 5s forwards;
}

.notification-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.notification-close:hover {
  opacity: 1;
}

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

/* Add slideUp animation for auto-hide */
@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
    max-height: 100px;
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
  }
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 80px);
  text-align: center;
  background-color: #333333;
  color: var(--light-color);
}

/* Back button positioning - override main-content centering */
.main-content > p:first-child {
  text-align: left;
  margin-bottom: 1.5rem;
}

/* Headings */
.main-content h1 {
  margin-bottom: 2rem;
  color: var(--light-color);
  font-size: 2.5rem;
  font-weight: 700;
}

.main-content h2 {
  margin-bottom: 1.5rem;
  color: #a78bfa;
  font-size: 2rem;
  font-weight: 600;
}

/* Legacy nav styles - keeping for compatibility */
nav {
  justify-content: flex-end;
  display: flex;
  font-size: 0.875em;
  gap: 0.5rem;
  max-width: 1024px;
  margin: 0 auto;
  padding: 1rem;
}

nav a {
  display: inline-block;
}

main {
  max-width: 1024px;
  margin: 0 auto;
}

.notice {
  color: green;
}

section.product {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  max-width: 800px;
  margin: 0 auto;
  background: #333333;
  color: var(--light-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  align-items: center;
  text-align: center;
}

section.product img {
  border-radius: 8px;
  max-width: 300px;
  max-height: 300px;
  width: 100%;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

section.product .product-info {
  width: 100%;
  text-align: center;
}

section.product h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--light-color);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

/* Product with no image styling - centered like out of stock but without opacity changes */
section.product.product-no-image {
  flex-direction: column;
  text-align: center;
  max-width: 500px;
  align-items: center;
}

section.product.product-no-image .product-info {
  width: 100%;
  text-align: center;
}

section.product.product-no-image h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--light-color);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

/* Out of stock product styling - modern centered design */
section.product.product-out-of-stock {
  flex-direction: column;
  text-align: center;
  max-width: 500px;
  align-items: center;
}

section.product.product-out-of-stock img {
  max-width: 300px;
  width: 100%;
  height: 300px;
  object-fit: cover;
  flex-basis: auto;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

section.product.product-out-of-stock .product-info {
  width: 100%;
  text-align: center;
}

section.product.product-out-of-stock h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--light-color);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

/* Style the product description when out of stock */
section.product.product-out-of-stock .product-info > p,
section.product.product-out-of-stock .product-info > div:not(.subscriber-form) {
  color: var(--light-color);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  opacity: 0.8;
}

/* Modern subscriber form styling */
.subscriber-form {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  margin-top: 1.5rem;
  width: 100%;
  max-width: 400px;
}

.subscriber-form p:first-child {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--danger-color);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.subscriber-form p:first-child::before {
  content: "⚠️";
  font-size: 1.1rem;
}

.subscriber-form p:last-of-type {
  font-size: 1rem;
  color: var(--dark-color);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.subscriber-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  background: transparent;
  padding: 0;
  box-shadow: none;
  margin: 0;
  text-align: left;
}

.subscriber-form form input[type="email"] {
  margin-top: 0;
  padding: 0.875rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  transition: all 0.2s ease;
}

.subscriber-form form input[type="email"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.subscriber-form form input[type="submit"] {
  margin-top: 0;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.subscriber-form form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Products list styling */
#products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

#products > div {
  background: #333333;
  color: var(--light-color);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  border: 1px solid #4a4a4a;
  display: flex;
  flex-direction: column;
  height: fit-content;
}

#products > div:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Product card styling - remove duplicates and consolidate */
.product-card {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 12px !important;
  background: #333333 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  cursor: pointer !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  margin-bottom: 1em !important;
}

#products a {
  text-decoration: none;
  color: var(--light-color);
  font-weight: 500;
  font-size: 1.1rem;
}

#products a:hover {
  color: #a78bfa;
}

/* Action links and buttons in main content */
.main-content > a {
  display: inline-block;
  margin: 1rem 0;
}

/* Auth forms styling */
.signup-link {
  display: inline-block;
  padding: 8px 16px;
  background-color: #662d91;
  color: white !important;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 10px;
}

.signup-link:hover {
  background-color: #4B0082;
}

.forgot-password-link {
  display: inline-block;
  padding: 8px 16px;
  background-color: #7CB9E8;
  color: white !important;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 10px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.forgot-password-link:hover {
  background-color: #004687;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.signin-link {
  display: inline-block;
  padding: 8px 16px;
  background-color: #6495ED;
  color: white !important;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 10px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.signin-link:hover {
  background-color: #004687;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(100, 149, 237, 0.3);
}

/* Form styling */
form {
  display: inline-block;
  max-width: 500px;
  width: 100%;
  background: #333333;
  color: var(--light-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  text-align: left;
}

form div {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Form button group for submit and cancel buttons */
form .form-button-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

form label {
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--light-color);
  font-size: 0.9rem;
}

form input[type="email"],
form input[type="password"],
form input[type="text"],
form input[type="number"],
form input[type="file"],
form textarea,
form trix-editor {
  width: 100%;
  padding: 8px;
  border: 1px solid #4b5563;
  border-radius: 4px;
  margin-top: 1em;
  font-family: var(--font-family);
  font-size: 0.9rem;
  background-color: var(--light-color);
  color: black;
}

/* Special styling for file inputs */
form input[type="file"] {
  padding: 6px;
  background-color: var(--light-color);
  color: var(--light-color);
}

/* Focus styles for form inputs */
form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="text"]:focus,
form input[type="number"]:focus,
form input[type="file"]:focus,
form textarea:focus,
form trix-editor:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Rich text editor specific styling */
form trix-editor {
  min-height: 120px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px;
}

/* Error styling for form validation */
form .field_with_errors input,
form .field_with_errors textarea,
form .field_with_errors trix-editor {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Form error messages */
form .error-messages {
  background: linear-gradient(90deg, #f8d7da, #f1aeb5);
  border: 1px solid var(--danger-color);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #721c24;
}

form .error-messages h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
}

form .error-messages ul {
  margin: 0;
  padding-left: 1.5rem;
}

form .error-messages li {
  margin-bottom: 0.25rem;
}

/* Default form submit button styles (fallback) */
form input[type="submit"]:not(.btn) {
  background-color: #6495ED;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 1em;
  width: 100%;
}

form input[type="submit"]:not(.btn):hover {
  background-color: #004687;
}

/* Ensure btn classes override form input styles */
input[type="submit"].btn {
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
  margin-top: 0;
  width: 100% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Form button group buttons should not be full width */
form .form-button-group .btn {
  width: 100%;
  margin-top: 0 !important;
  padding: 0.75rem 2rem !important;
  font-size: 1rem !important;
}

/* Product card specific button styling - override form defaults */
.product-card input[type="submit"].btn {
  width: auto !important;
  margin-top: 0 !important;
  padding: 0 1rem !important;
  font-size: 0.85rem !important;
  border-radius: 6px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  height: 2.2rem !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: normal !important;
  vertical-align: baseline !important;
}

.product-card .btn-disabled {
  background-color: #6c757d !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  padding: 0 1rem !important;
  font-size: 0.85rem !important;
  border-radius: 6px !important;
  border: none !important;
  color: white !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  height: 2.2rem !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: normal !important;
  vertical-align: baseline !important;
}

/* Product image styling */
.product-image {
  width: 80%;
  max-width: 200px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 1rem auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
  margin-top: 1em;
}

.product-image:hover {
  transform: scale(1.02);
}

/* Placeholder for products without images */
.product-image-placeholder {
  width: 80%;
  max-width: 200px;
  height: 160px;
  background: linear-gradient(135deg, #4a4a4a 0%, #5a5a5a 100%);
  border: 2px dashed #6a6a6a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  margin-top: 1em;
  color: #bbb;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Update product card to accommodate images */
.product-card {
  border: 1px solid #ddd;
  padding: 1rem;
  margin: 1rem;
  border-radius: 8px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

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

/* Adjust product card content spacing */
.product-card h3 {
  margin: 0.75rem 0 0.5rem 0;
  color: var(--light-color);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.product-card h3 a {
  color: var(--light-color);
  text-decoration: none;
  font-weight: 600;
}

.product-card h3 a:hover {
  color: #a78bfa;
}

.product-card p {
  color: #ccc;
  line-height: 1.4;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.product-card .product-price {
  font-size: 1.25rem;
  font-weight: bold;
  color: #6495ED;
  margin: 0.75rem 0;
}

.product-card .stock-info {
  color: #28a745;
  font-weight: 600;
  margin: 0.5rem 0;
  font-size: 0.85rem;
}

.product-card .out-of-stock {
  color: #dc3545;
  font-weight: 600;
  margin: 0.5rem 0;
  font-size: 0.85rem;
}

/* Cart form styling in product cards */
.product-card form {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  margin-top: auto !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  flex-wrap: nowrap !important;
}

.product-card .quantity-input {
  width: 80px !important;
  padding: 0 !important;
  border: 1px solid #555 !important;
  border-radius: 4px !important;
  font-size: 0.85rem !important;
  text-align: center !important;
  background-color: #fff !important;
  color: black !important;
  flex-shrink: 0 !important;
  height: 2.2rem !important;
  box-sizing: border-box !important;
  line-height: normal !important;
  vertical-align: baseline !important;
}

/* Cart actions overlay to prevent link click when interacting with form */
.cart-actions-overlay {
  position: relative;
  z-index: 2;
}

.cart-actions-overlay form {
  display: inline-block;
  background: transparent;
  padding: 0;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
}

.add-to-cart {
  width: 50% !important;
}

/* Product card link styling */
.product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  border-radius: 8px;
}

.product-card {
  position: relative;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    flex-direction: column;
    gap: 1rem;
    min-width: 220px;
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links-open {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .nav-links .nav-link {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    white-space: nowrap;
  }

  .nav-links .btn {
    width: 100%;
    justify-content: center;
  }

  .user-greeting {
    text-align: center;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
  }

  .main-content {
    padding: 1rem;
  }

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

  .main-content h1 {
    font-size: 2rem;
  }

  .main-content h2 {
    font-size: 1.5rem;
  }

  /* Form responsive adjustments */
  form {
    max-width: 100%;
    padding: 1.5rem;
  }

  form input[type="email"],
  form input[type="password"],
  form input[type="text"],
  form input[type="number"],
  form input[type="file"],
  form textarea,
  form trix-editor {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0.75rem;
  }

  .store-name {
    font-size: 1.1rem;
  }

  .nav-links {
    right: -0.75rem;
    left: -4rem;
    width: 90% !important;
  }

  .notification {
    padding: 0.75rem 1rem;
  }

  .notification-content {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

.cart-link {
  font-weight: bold;
}

.product-card {
  border: 1px solid #ddd;
  padding: 1rem;
  margin: 1rem;
  border-radius: 8px;
}

.product-price {
  font-size: 1.2em;
  font-weight: bold;
  color: #007bff;
  margin: 0.5rem 0;
}

.quantity-input {
  width: 60px;
  margin-right: 0.5rem;
}

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

.cart-container > p:first-child {
  text-align: left;
}

.cart-container h1 {
  text-align: center;
}

.cart-item {
  border: 1px solid #ddd;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 8px;
}

.cart-total {
  text-align: right;
  font-size: 1.5em;
  margin: 2rem 0;
}

.cart-actions {
  text-align: center;
  margin-top: 2rem;
}


.stock-info {
  color: #28a745;
  font-weight: bold;
  margin: 0.5rem 0;
}

.out-of-stock {
  color: #dc3545;
  font-weight: bold;
  margin: 0.5rem 0;
}

.btn-disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.product-card {
  border: 1px solid #ddd;
  padding: 1rem;
  margin: 1rem;
  border-radius: 8px;
}

.product-price {
  font-size: 1.2em;
  font-weight: bold;
  color: #007bff;
  margin: 0.5rem 0;
}

.new-product-btn {
  display: inline-block;
  margin-bottom: 2rem;
  padding: 0.75rem 1.5rem;
  background-color: #1E90FF;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.3s ease;
}

.new-product-btn:hover {
  background-color: #00008B;
  text-decoration: none;
  color: white;
}

.new-product-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 99, 167, 0.25);
}

/* Add some spacing around the products grid */
#products {
  margin-top: 1rem;
}


trix-toolbar {
  display: none;
} 



.btn-danger {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.btn-danger:hover {
  background-color: #c82333;
  color: white;
  text-decoration: none;
}

.btn-danger:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

/* Small button variant */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}

/* Success/Checkout button styling */
.btn-success {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bold;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.btn-success:hover {
  background-color: #218838;
  color: white;
  text-decoration: none;
}

.btn-success:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

/* Cart item button spacing */
.cart-item form {
  display: inline-block;
  margin-right: 0.5rem;
}

.cart-item .btn-danger {
  margin-left: 0.5rem;
}

/* Cart actions button spacing */
.cart-actions .btn {
  margin: 0 0.5rem;
}

/* Make buttons responsive on mobile */
@media (max-width: 768px) {
  .cart-actions {
    text-align: center;
  }
  
  .cart-actions .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
  }
  
  .cart-item form,
  .cart-item .btn-danger {
    display: block;
    margin: 0.5rem 0;
    width: 100%;
  }
}

/* Product show page styling */
.product-info .product-price {
  font-size: 2rem;
  font-weight: bold;
  color: #007bff !important;
  margin: 1rem 0;
}

.add-to-cart-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: #333333;
  border-radius: 8px;
  
}

.add-to-cart-section .quantity-input {
  width: 80px;
  margin-right: 1rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.add-to-cart-section .btn {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
}