/* ================================================================
   Anime Queens Store — styles.css
   ================================================================
   Colour palette:
     --bg-primary:   #121212
     --bg-secondary: #1f1f1f
     --bg-tertiary:  #2a2a2a
     --accent-pink:  #ff79c6
     --accent-green: #50fa7b
     --accent-red:   #ff5555
     --text-primary: #eee
     --text-muted:   #999
   ================================================================ */

/* ───── Reset ───────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #121212;
  color: #eee;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
}

/* ───── Header ──────────────────────────────────────────────── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #1f1f1f;
  border-bottom: 2px solid #333;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  font-size: 1.8rem;
  color: #ff79c6;
  letter-spacing: 0.5px;
}

.cart-icon {
  cursor: pointer;
  font-size: 1.5rem;
  position: relative;
  padding: 0.25rem;
  transition: transform 0.2s ease;
}

.cart-icon:hover {
  transform: scale(1.1);
}

.cart-icon span {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #ff79c6;
  color: #121212;
  font-weight: bold;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 50%;
  pointer-events: none;
}

/* ───── Hero ────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5rem 2rem;
  background: #1a1a1a url("images/hero.jpg") no-repeat center / cover;
}

.hero h2 {
  font-size: 2.8rem;
  color: #ff79c6;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.15rem;
  color: #ccc;
  max-width: 700px;
  margin-bottom: 2rem;
}

.hero .btn {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 8px;
  background: #50fa7b;
  color: #121212;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.hero .btn:hover {
  background: #8cff9a;
}

/* ───── Product Grid ────────────────────────────────────────── */
.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  padding: 2.5rem 2rem;
}

.product-card {
  background: #1f1f1f;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 121, 198, 0.1);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
}

.product-card h3 {
  margin: 0.8rem 0 0.2rem;
  font-size: 1.05rem;
}

.product-series {
  display: block;
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.product-price {
  font-weight: bold;
  color: #50fa7b;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* Shared button base */
.btn {
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-add-cart {
  background: #ff79c6;
  color: #121212;
}

.btn-add-cart:hover {
  background: #ff92d0;
  transform: scale(1.04);
}

.btn-add-cart:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.btn-added {
  background: #50fa7b !important;
  color: #121212 !important;
}

/* ───── Cart Overlay ────────────────────────────────────────── */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.cart-overlay.active {
  display: block;
}

/* ───── Cart Sidebar ────────────────────────────────────────── */
.cart-sidebar {
  position: fixed;
  right: -420px;
  top: 0;
  width: 400px;
  height: 100%;
  background: #1f1f1f;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
  padding: 1.25rem;
  transition: right 0.3s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #333;
}

.cart-header h2 {
  color: #ff79c6;
  font-size: 1.4rem;
}

.cart-close {
  background: none;
  border: none;
  color: #999;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.cart-close:hover {
  color: #ff5555;
}

/* Cart items scroll area */
#cart-items {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.cart-empty {
  text-align: center;
  color: #666;
  padding: 3rem 0;
  font-size: 0.95rem;
}

/* Individual cart item row */
.cart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #2a2a2a;
}

.cart-item img {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-details h4 {
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.8rem;
  color: #50fa7b;
}

/* Quantity controls */
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.btn-qty {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 4px;
  color: #eee;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.15s ease;
}

.btn-qty:hover {
  background: #444;
}

.qty-display {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-remove {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #ff5555;
  cursor: pointer;
  font-size: 1.1rem;
  margin-left: 0.25rem;
  transition: background 0.15s ease;
}

.btn-remove:hover {
  background: rgba(255, 85, 85, 0.15);
  border-color: #ff5555;
}

/* Cart footer */
.cart-footer {
  border-top: 2px solid #333;
  padding-top: 1rem;
  margin-top: auto;
}

.cart-footer p {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cart-footer button {
  margin-top: 0.4rem;
  width: 100%;
  padding: 0.6rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

#checkout-btn {
  background: #50fa7b;
  color: #121212;
}

#checkout-btn:hover {
  background: #8cff9a;
}

#clear-cart-btn {
  background: #ff5555;
  color: #fff;
  margin-top: 0.5rem;
}

#clear-cart-btn:hover {
  background: #ff7777;
}

/* ───── Modal ───────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  inset: 0;
  overflow: auto;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background: #1f1f1f;
  margin: 8vh auto;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 550px;
  position: relative;
}

.modal-content h2 {
  color: #ff79c6;
  margin-bottom: 1rem;
}

.close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: #ff79c6;
  transition: color 0.2s ease;
  background: none;
  border: none;
}

.close:hover {
  color: #ff5555;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #2a2a2a;
  font-size: 0.95rem;
}

.checkout-item span:last-child {
  color: #50fa7b;
  font-weight: 600;
}

#checkout-summary {
  margin: 1rem 0;
}

.modal-content > p {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1rem 0;
}

#confirm-order-btn {
  width: 100%;
  padding: 0.7rem;
  border: none;
  border-radius: 6px;
  background: #50fa7b;
  color: #121212;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

#confirm-order-btn:hover {
  background: #8cff9a;
}

/* ───── FAQ ─────────────────────────────────────────────────── */
.faq {
  padding: 3rem 2rem;
}

.faq h2 {
  color: #ff79c6;
  margin-bottom: 2rem;
  text-align: center;
}

.faq-item {
  margin-bottom: 0.75rem;
}

.faq-item button {
  width: 100%;
  text-align: left;
  padding: 1rem;
  border: none;
  background: #2a2a2a;
  color: #eee;
  cursor: pointer;
  border-radius: 6px;
  font-size: 1rem;
  transition: background 0.2s ease;
}

.faq-item button:hover {
  background: #333;
}

.faq-item button::after {
  content: "\25BC";
  float: right;
  transition: transform 0.2s ease;
}

.faq-item button.active::after {
  transform: rotate(180deg);
}

.faq-item .content {
  display: none;
  padding: 1rem;
  background: #1f1f1f;
  border-radius: 0 0 6px 6px;
  margin-top: 2px;
  color: #ccc;
}

/* ───── Feedbacks ───────────────────────────────────────────── */
.feedbacks {
  background: #1a1a1a;
  padding: 3rem 2rem;
}

.feedbacks h2 {
  text-align: center;
  color: #ff79c6;
  margin-bottom: 2rem;
}

.feedback-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.feedback-card {
  background: #2a2a2a;
  padding: 1.25rem;
  border-radius: 10px;
}

.feedback-card p {
  margin-bottom: 0.5rem;
  font-style: italic;
  color: #ccc;
}

.feedback-card span {
  color: #50fa7b;
  font-weight: bold;
}

/* ───── Contact Form ────────────────────────────────────────── */
.contact {
  padding: 3rem 2rem;
}

.contact h2 {
  color: #ff79c6;
  margin-bottom: 2rem;
  text-align: center;
}

.contact form {
  display: grid;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.contact input,
.contact textarea {
  padding: 0.8rem 1rem;
  border: 1px solid #333;
  border-radius: 6px;
  background: #2a2a2a;
  color: #eee;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.contact input:focus,
.contact textarea:focus {
  outline: none;
  border-color: #ff79c6;
}

.contact button {
  padding: 0.8rem;
  border: none;
  border-radius: 6px;
  background: #50fa7b;
  color: #121212;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.contact button:hover {
  background: #8cff9a;
}

/* ───── Footer ──────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem;
  background: #1a1a1a;
  color: #666;
  font-size: 0.85rem;
  border-top: 1px solid #2a2a2a;
}

/* ───── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.3rem;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .products-container {
    padding: 1.5rem 1rem;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .products-container {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .product-card img {
    height: 160px;
  }
}
