@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

* {
    margin: 0;
    padding: 0;
    font-family: "Quicksand", sans-serif;
  }
  :root {
    --ff: "Quicksand", sans-serif;
    --h1: 700 1.5rem/1.2em var(--ff);
    --h2: 700 1.25rem/1.4em var(--ff);
    --h3: 700 1.125rem/1.4em var(--ff);
    --p: 400 1rem/1.6em var(--ff);
    --small: 400 0.75rem/1.6em var(--ff);
    --transition: 0.2s ease-in-out;
  }
  :root {
    /* bg-colors */
    --primary: oklch(0.9 0.17 100);
    --bg-dark: oklch(0.1 0 264);
    --bg: oklch(0.2 0 264);
    --bg-light: oklch(0.3 0 264);
    /* text-colors */
    --text: oklch(0.96 0 264);
    --text-muted: oklch(0.76 0 264);
    /* shadows */
    --shadow-s: inset 0 1px 2px #ffffff30, /* top highlight */ 0 1px 2px #00000030,
      /* dark shadow */ 0 2px 4px #00000015; /* soft shadow */
    --shadow-m: inset 0 1px 2px #ffffff50, /* top highlight */ 0 2px 4px #00000030,
      /* dark shadow */ 0 4px 8px #00000015; /* soft shadow */
    --shadow-l: inset 0 1px 2px #ffffff70, /* top highlight */ 0 4px 6px #00000030,
      /* dark shadow */ 0 6px 10px #00000015; /* soft shadow */
  }
  body.light {
    /* bg-colors */
    --primary: oklch(0.65 0.15 264);
    --bg-dark: oklch(0.92 0 264);
    --bg: oklch(0.96 0 264);
    --bg-light: oklch(1 0 264);
    /* text-colors */
    --text: oklch(0.15 0 264);
    --text-muted: oklch(0.4 0 264);
  }
  /* Global CSS */
  html {
    scroll-behavior: smooth;
    text-align: center;
  }

  body {
    padding: min(50px, 7%);
    background: var(--bg-dark);
    color: var(--text-muted);
  }
  h1 {
    font: var(--h1);
    color: var(--text);
    margin-bottom: 20px;
    font-size:40px;
  }
  h2 {
    font: var(--h2);
    color: var(--text);
  }
  p {
    font: var(--p);
    color: var(--text-muted);
  }

  .power-icon {
    width: 1.25rem;
    stroke: var(--text-muted);
  }
  .toggle {
    cursor: pointer;
    border: none;
    border-radius: 1rem;
    background: var(--bg);
    padding: 0.24rem 0.5rem 0.12rem 0.5rem;
    margin-left: auto;
    transition: var(--transition);
    position: fixed;
    top: 1rem;
    right: 1rem;
  }
  .toggle:hover {
    background: var(--bg-light);
    transition: var(--transition);
  }
  .toggle:focus {
    outline: none;
  }

  .btn {
    cursor: pointer;
    border: none;
    padding: 0.75em 1.5em;
    border-radius: 0.75rem;
    font: var(--p);
    font-weight: 700;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
  }

  .btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
  }

  .btn-secondary {
    background: var(--bg);
    color: var(--text);
  }

  .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-s);
  }

  .btn:disabled {
    cursor: not-allowed;
    background: var(--bg-dark);
    color: var(--text-muted);
    transform: none;
    box-shadow: none;
  }
  
  .btn-danger {
    background: oklch(0.6 0.2 25); /* A reddish color */
    color: var(--bg-light);
  }

  .link-to-wishlist {
    display: block;
    margin: 1rem 0;
    color: var(--primary);
    text-decoration: none;
  }
  

.card {
    padding: 2em;
    border-radius: 18px !important;
    background-color: var(--bg-light);
    text-align: center;
    transition:  all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    max-height: 397.19px;
    overflow: hidden;
}

.grid-container .card {
    border-radius: 18px !important;
    background-color: var(--bg-light) !important;
}

.grid-container > .card {
    border-radius: 18px !important;
}

/* ! DO NOT TOUCH */

.card-image-wrapper {
    width: 100%;
    height: 100%; /* Set a fixed height for the wrapper - adjust this value as needed */
    border-radius: 1rem;
    overflow: hidden;
    display: flex; /* Use flexbox to center the image vertically if it's smaller */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* The entire image will be visible, letterboxing if necessary */
    border-radius: 1rem;
    display: block;
}

/* ! END */

.card-priority {
    font-size: 1.5rem;
    color: oklch(0.85 0.2 85); /* A nice gold/yellow color */
    margin-bottom: 0.5rem;
    line-height: 1;
}

.card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
    line-height: 1;
}

.card-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    justify-content: center;
    align-items: center;
    background: var(--bg);
    padding: 30px;
    border-radius: 18px;
}

.grid-container .card:hover {
    box-shadow: var(--shadow-m);
    transform: translateY(-0.3rem);
}

/* --- Password Guard Styles --- */
.password-guard {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: oklch(from var(--bg-dark) l a b / 80%);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.password-modal {
  background: var(--bg);
  padding: 2rem;
  border-radius: 18px;
  text-align: center;
  box-shadow: var(--shadow-l);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  width: 90%;
}


/* --- Admin Page Styles --- */
.admin-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.admin-form {
  background: var(--bg);
  padding: 2rem;
  border-radius: 18px;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-form h2 {
  margin-bottom: 0;
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.75em 1em;
  border-radius: 0.75rem;
  border: 1px solid var(--bg-light);
  background: var(--bg-dark);
  color: var(--text);
  font: var(--p);
}

select {
  font-size: 1.1rem;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.admin-item {
  background: var(--bg);
  padding: 1rem;
  border-radius: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-item-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (max-width: 768px) {
    h1 {
        margin-bottom: 20px;
    }
}