/* ===================================================
   SHOP.CSS — GameBoard Store (FINAL POLISHED VERSION)
   Theme: Orange + White | Layout: Modern Responsive
   =================================================== */

:root {
  --primary: #ff7b00;
  --primary-dark: #e56b00;
  --accent: #fff3e0;
  --text-dark: #222;
  --text-light: #555;
  --border: #ddd;
  --bg-light: #f8f9fa;
  --radius: 12px;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Base Reset */
body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-light);
  color: var(--text-dark);
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
}

/* ===========================================
   Layout
=========================================== */
.shop-wrap {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  flex-wrap: wrap;
  position: relative;
}

/* ===========================================
   Sidebar (Final Polished)
=========================================== */
.shop-sidebar {
  flex: 0 0 240px;
  background: linear-gradient(180deg, #fff, #fff6ed);
  border: 1px solid #ffe3c4;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(255, 123, 0, 0.1);
  padding: 1.8rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.shop-sidebar:hover {
  box-shadow: 0 6px 16px rgba(255, 123, 0, 0.15);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.sidebar-header h2 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: var(--primary-dark);
}

/* Category List */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 10px;
}

.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.25s ease;
}

.category-list a::after {
  content: "›";
  font-weight: bold;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.2s ease;
}

.category-list a:hover,
.category-list a.active {
  background: var(--primary);
  color: white;
  transform: translateX(4px);
}

.category-list a:hover::after,
.category-list a.active::after {
  opacity: 1;
  transform: translateX(4px);
}

/* Sidebar Toggle (Mobile) */
.filter-toggle {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 14px;
  border-radius: 50%;
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.filter-toggle:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .filter-toggle {
    display: block;
  }

  .shop-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 2000;
    overflow-y: auto;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .shop-sidebar.active {
    transform: translateX(0);
    box-shadow: 6px 0 20px rgba(0, 0, 0, 0.1);
  }

  .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
  }
}

/* ===========================================
   Shop Header
=========================================== */
.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.shop-header input[type="text"] {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  outline: none;
  width: 200px;
}

.shop-header select {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-right: 10px;
}

/* ===========================================
   Product Grid
=========================================== */
.shop-content {
  flex: 1;
  min-width: 300px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-info {
  padding: 0.8rem 1rem;
}

.product-info h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.price {
  font-size: 0.95rem;
}

.price .old {
  text-decoration: line-through;
  color: var(--text-light);
  margin-right: 6px;
}

.price .new {
  color: var(--primary-dark);
  font-weight: 600;
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.9rem;
  transition: background 0.25s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* ===========================================
   Pagination
=========================================== */
.pagination {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
  gap: 8px;
}

.page-btn {
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.page-btn.active,
.page-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===========================================
   Loading Shimmer
=========================================== */
.shimmer {
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 270px;
}

.shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150px;
  height: 100%;
  width: 150px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.6),
    rgba(255, 255, 255, 0)
  );
  animation: shimmer 1.3s infinite;
}

@keyframes shimmer {
  100% {
    left: 100%;
  }
}

/* ===========================================
   Toast Notification
=========================================== */
#toast {
  visibility: hidden;
  min-width: 220px;
  background: #333;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 10px 16px;
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}

#toast.show {
  visibility: visible;
  opacity: 0.95;
}

#toast.success {
  background: #27ae60;
}

#toast.error {
  background: #e74c3c;
}

#toast.info {
  background: #3498db;
}

/* ===========================================
   Fade Animation
=========================================== */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
