@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;800&family=Syne:wght@800&display=swap');

:root {
  --jumbo-yellow: #FFDB00;
  --neon-green: #A5FF00;
  --hot-pink: #FF00FF;
  --bg-dark: #050505;
  --surface-dark: #121212;
  --text-white: #FFFFFF;
  --text-dim: #A0A0A0;
  --border-thick: 3px;
  --neo-shadow: 8px 8px 0px rgba(0, 0, 0, 1);
  --yellow-glow: 0 0 20px rgba(255, 219, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none !important;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-white);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3BaseFilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/baseFilter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  z-index: 9999;
}

.custom-cursor {
  width: 24px;
  height: 24px;
  background: var(--jumbo-yellow);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transition: transform 0.15s ease-out;
  transform: translate(-50%, -50%);
}

.custom-cursor.active {
  transform: translate(-50%, -50%) scale(3);
}

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

.header {
  padding: 3rem 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: var(--border-thick) solid var(--text-white);
  margin-bottom: 4rem;
}

.brand {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  text-transform: uppercase;
  line-height: 0.8;
  position: relative;
}

.brand span {
  display: block;
  color: var(--jumbo-yellow);
  -webkit-text-stroke: 1px var(--text-white);
  letter-spacing: -2px;
}

.nav-actions {
  display: flex;
  gap: 2rem;
}

.btn {
  font-family: 'Syne', sans-serif;
  text-transform: uppercase;
  font-weight: 800;
  padding: 1.2rem 2.5rem;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--bg-dark);
  background: var(--jumbo-yellow);
  border: var(--border-thick) solid var(--bg-dark);
  box-shadow: 6px 6px 0px var(--text-white);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
}

.btn:hover {
  transform: translate(-4px, -4px);
  box-shadow: 10px 10px 0px var(--neon-green);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--text-white);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 3rem;
  padding-bottom: 5rem;
}

.product-card {
  background: var(--surface-dark);
  border: var(--border-thick) solid var(--text-white);
  padding: 2rem;
  position: relative;
  transition: all 0.4s var(--transition-bounce);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 400px;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: var(--jumbo-yellow);
}

.product-card:hover {
  transform: rotate(-1deg) scale(1.02);
  border-color: var(--jumbo-yellow);
  box-shadow: 15px 15px 0px var(--jumbo-yellow);
}

.product-category {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--text-white);
  color: var(--bg-dark);
  padding: 0.3rem 0.8rem;
  align-self: flex-start;
  margin-bottom: 1.5rem;
}

.product-name {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 1rem;
  word-break: break-word;
}

.product-price {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--neon-green);
  margin: 1.5rem 0;
  display: flex;
  align-items: flex-start;
}

.product-price small {
  font-size: 1.5rem;
  margin-right: 0.2rem;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  margin-top: auto;
}

.stock-indicator {
  display: flex;
  flex-direction: column;
}

.stock-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-dim);
}

.stock-value {
  font-size: 1.5rem;
  font-weight: 800;
}

.stock-value.low {
  color: var(--hot-pink);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 1;
  }
}

.card-actions {
  display: flex;
  gap: 1rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  border: 2px solid var(--text-white);
  background: transparent;
  color: var(--text-white);
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
}

.btn-small:hover {
  background: var(--text-white);
  color: var(--bg-dark);
}

.btn-delete-icon {
  background: none;
  border: 2px solid var(--hot-pink);
  color: var(--hot-pink);
  padding: 0.5rem 1rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-delete-icon:hover {
  background: var(--hot-pink);
  color: var(--white);
}

.glass-form {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: var(--border-thick) solid var(--text-white);
  padding: 4rem;
  max-width: 800px;
  margin: 0 auto 5rem;
}

.form-title {
  font-family: 'Syne', sans-serif;
  font-size: 4rem;
  margin-bottom: 3rem;
  text-transform: uppercase;
  -webkit-text-stroke: 1px var(--text-white);
  color: transparent;
}

.form-row-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 600px) {
  .form-row-two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.input-group {
  margin-bottom: 2.5rem;
  position: relative;
}

.input-group label {
  display: block;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  color: var(--jumbo-yellow);
}

.input-group input,
.input-group select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 3px solid var(--text-white);
  padding: 1rem 0;
  font-size: 1.5rem;
  color: var(--text-white);
  outline: none;
  transition: all 0.3s ease;
}

.input-group input:focus {
  border-color: var(--neon-green);
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.flicker-alert {
  background: var(--neon-green);
  color: var(--bg-dark);
  padding: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 3rem;
  border: var(--border-thick) solid var(--bg-dark);
  box-shadow: 10px 10px 0px var(--text-white);
  animation: slideIn 0.5s forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes alertExit {
  0% {
    transform: translateX(0) skewX(0deg);
    filter: blur(0);
  }

  20% {
    transform: translateX(-30px) skewX(-10deg);
    filter: blur(2px);
  }

  100% {
    transform: translateX(150%) skewX(40deg);
    filter: blur(10px);
    opacity: 0;
  }
}

.alert-exit {
  animation: alertExit 0.7s cubic-bezier(0.76, 0, 0.24, 1) forwards;
  pointer-events: none;
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE FIRST
   =================================== */

/* Extra Small Devices (phones, 480px and below) */
@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }

  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
  }

  .brand {
    font-size: 2.5rem;
    text-align: center;
  }

  .brand span {
    font-size: 1.8rem;
    letter-spacing: -1px;
  }

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

  .btn {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
    box-shadow: 4px 4px 0px var(--text-white);
  }

  .btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--neon-green);
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 3rem;
  }

  .product-card {
    padding: 1.5rem;
    min-height: auto;
    border-width: 2px;
  }

  .product-card::before {
    height: 6px;
  }

  .product-card:hover {
    transform: none;
    box-shadow: 8px 8px 0px var(--jumbo-yellow);
  }

  .product-category {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    margin-bottom: 1rem;
  }

  .product-name {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
  }

  .product-price {
    font-size: 2.5rem;
    margin: 1rem 0;
  }

  .product-price small {
    font-size: 1.2rem;
  }

  .product-meta {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    padding-top: 1rem;
  }

  .stock-indicator {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .stock-value {
    font-size: 1.2rem;
  }

  .card-actions {
    justify-content: stretch;
    gap: 0.8rem;
  }

  .btn-small {
    flex: 1;
    text-align: center;
    padding: 0.8rem 0.8rem;
    font-size: 0.75rem;
    /* Min touch target 44px */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .btn-delete-icon {
    flex: 0 0 auto;
    padding: 0.8rem 1rem;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
  }

  .glass-form {
    padding: 1.5rem;
    margin: 0 0 3rem;
    border-width: 2px;
  }

  .form-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .input-group {
    margin-bottom: 1.5rem;
  }

  .input-group label {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .input-group input,
  .input-group select {
    font-size: 1rem;
    padding: 0.8rem 0;
    /* Min touch target */
    min-height: 48px;
  }

  .flicker-alert {
    padding: 1rem;
    font-size: 0.85rem;
    margin-bottom: 2rem;
    box-shadow: 6px 6px 0px var(--text-white);
  }

  /* Custom cursor disabled on mobile */
  .custom-cursor {
    display: none;
  }

  * {
    cursor: auto !important;
  }
}

/* Small Devices (large phones, 481px to 600px) */
@media (min-width: 481px) and (max-width: 600px) {
  .container {
    padding: 1.25rem;
  }

  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 2rem 0;
    margin-bottom: 2.5rem;
  }

  .brand {
    font-size: 3rem;
    text-align: center;
  }

  .nav-actions {
    justify-content: center;
  }

  .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-card {
    min-height: auto;
    padding: 1.75rem;
  }

  .product-card:hover {
    transform: rotate(-0.5deg) scale(1.01);
  }

  .product-name {
    font-size: 1.8rem;
  }

  .product-price {
    font-size: 2.8rem;
  }

  .product-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .glass-form {
    padding: 2rem;
    margin-bottom: 4rem;
  }

  .form-title {
    font-size: 2.5rem;
  }

  .custom-cursor {
    display: none;
  }

  * {
    cursor: auto !important;
  }
}

/* Medium Devices (tablets, 601px to 768px) */
@media (min-width: 601px) and (max-width: 768px) {
  .container {
    padding: 1.5rem;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2.5rem 0;
    margin-bottom: 3rem;
  }

  .brand {
    font-size: 3.5rem;
  }

  .nav-actions {
    width: 100%;
  }

  .btn {
    padding: 1.1rem 2.2rem;
    font-size: 1.1rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .product-card {
    min-height: 350px;
  }

  .product-name {
    font-size: 1.8rem;
  }

  .product-price {
    font-size: 2.8rem;
  }

  .card-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-small,
  .btn-delete-icon {
    width: 100%;
    text-align: center;
    justify-content: center;
    display: flex;
  }

  .glass-form {
    padding: 2.5rem;
  }

  .form-title {
    font-size: 3rem;
  }

  .custom-cursor {
    display: none;
  }

  * {
    cursor: auto !important;
  }
}

/* Large Devices (small laptops, 769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 1.75rem;
  }

  .header {
    padding: 2.5rem 0;
    margin-bottom: 3.5rem;
  }

  .brand {
    font-size: 4rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .product-card {
    min-height: 380px;
  }

  .product-name {
    font-size: 2rem;
  }

  .product-price {
    font-size: 3rem;
  }

  .glass-form {
    padding: 3rem;
    max-width: 700px;
  }

  .form-title {
    font-size: 3.5rem;
  }
}

/* Extra Large Devices (desktops, 1025px to 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .product-card {
    min-height: 400px;
  }
}

/* XXL Devices (large desktops, above 1200px) */
@media (min-width: 1201px) {
  .container {
    max-width: 1400px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
  }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
  .custom-cursor {
    display: none;
  }

  * {
    cursor: auto !important;
  }

  .btn,
  .btn-small,
  .btn-delete-icon {
    min-height: 44px;
  }

  .product-card:hover {
    transform: none;
  }

  .product-card:active {
    transform: scale(0.98);
    border-color: var(--jumbo-yellow);
    box-shadow: 8px 8px 0px var(--jumbo-yellow);
  }

  .btn:hover {
    transform: none;
    box-shadow: 6px 6px 0px var(--text-white);
  }

  .btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--text-white);
  }
}

/* Landscape Mode on Mobile */
@media (max-width: 900px) and (orientation: landscape) {
  .header {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    flex-direction: row;
    align-items: center;
  }

  .brand {
    font-size: 2.5rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-card {
    min-height: auto;
  }

  .glass-form {
    max-width: 90%;
    margin: 0 auto 3rem;
  }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  .product-card,
  .glass-form,
  .btn {
    border-width: 2px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .product-card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }

  .stock-value.low {
    animation: none;
    opacity: 1;
  }
}

/* Print Styles */
@media print {

  body::before,
  .custom-cursor {
    display: none;
  }

  .header {
    border-bottom-color: #000;
  }

  .product-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #000;
  }

  .btn,
  .btn-small,
  .btn-delete-icon,
  .card-actions {
    display: none;
  }
}