/* ============================================
   DopamINK - Digital Coloring Pages Store
   Complete Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-hover: #1e1e1e;
  --border: #2a2a2a;
  --primary: #ff2d9b;
  --primary-glow: rgba(255, 45, 155, 0.3);
  --secondary: #9b4dca;
  --accent: #00d4ff;
  --gradient: linear-gradient(135deg, #ff2d9b, #9b4dca, #00d4ff);
  --gradient-btn: linear-gradient(135deg, #ff2d9b, #9b4dca);
  --text: #ffffff;
  --text-muted: #888888;
  --success: #00ff88;
  --warning: #ffaa00;
  --font: 'Poppins', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px var(--primary-glow);
  --transition: all 0.3s ease;
  --header-height: 70px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font);
  outline: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header / Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}

.header-logo img {
  height: 44px;
  width: auto;
}

.header-logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.header-logo-text span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-toggle {
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-toggle:hover {
  color: var(--text);
  background: var(--surface);
}

.cart-btn {
  position: relative;
  color: var(--text);
  font-size: 1.3rem;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-btn:hover {
  background: var(--surface);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  padding: 32px 24px;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* Ink splash decorations */
.ink-splash {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}

.ink-splash-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.ink-splash-2 {
  width: 350px;
  height: 350px;
  background: var(--secondary);
  bottom: -80px;
  left: -80px;
  animation-delay: -3s;
}

.ink-splash-3 {
  width: 250px;
  height: 250px;
  background: var(--accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -5s;
  opacity: 0.2;
}

/* Paint splatter shapes */
.splatter {
  position: absolute;
  border-radius: 50%;
  z-index: 0;
}

.splatter-1 {
  width: 12px;
  height: 12px;
  background: var(--primary);
  top: 20%;
  left: 15%;
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
}

.splatter-2 {
  width: 8px;
  height: 8px;
  background: var(--accent);
  top: 30%;
  right: 20%;
  opacity: 0.5;
  animation: float 7s ease-in-out infinite reverse;
}

.splatter-3 {
  width: 16px;
  height: 16px;
  background: var(--secondary);
  bottom: 25%;
  left: 25%;
  opacity: 0.4;
  animation: float 5s ease-in-out infinite;
  animation-delay: -2s;
}

.splatter-4 {
  width: 6px;
  height: 6px;
  background: var(--success);
  top: 60%;
  right: 30%;
  opacity: 0.5;
  animation: float 9s ease-in-out infinite;
}

.splatter-5 {
  width: 20px;
  height: 20px;
  background: var(--gradient);
  bottom: 15%;
  right: 15%;
  opacity: 0.3;
  animation: float 8s ease-in-out infinite reverse;
  animation-delay: -4s;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-logo {
  width: 180px;
  height: auto;
  margin: 0 auto 32px;
  filter: drop-shadow(0 0 30px var(--primary-glow));
  animation: float 6s ease-in-out infinite;
}

.hero-tagline {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 40px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-cta {
  display: inline-flex;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--primary-glow), 0 0 40px var(--primary-glow);
  color: #fff;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid transparent;
  background-image: linear-gradient(var(--surface), var(--surface)), var(--gradient);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.btn-secondary:hover {
  background-image: linear-gradient(var(--surface-hover), var(--surface-hover)), var(--gradient);
  transform: translateY(-2px);
  color: var(--text);
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text);
  font-size: 1.2rem;
  border: 1px solid var(--border);
}

.btn-icon:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: #ff3b3b;
  color: #fff;
}

.btn-danger:hover {
  background: #ff5555;
  color: #fff;
}

/* --- Category Tabs --- */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 24px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.category-tab:hover {
  color: var(--text);
  border-color: var(--primary);
}

.category-tab.active {
  color: #fff;
  background: var(--gradient-btn);
  border-color: transparent;
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* --- Search Bar --- */
.search-bar {
  position: relative;
  margin-bottom: 24px;
}

.search-bar input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-bar-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

/* --- Product Grid --- */
.products-section {
  padding: 40px 0 80px;
}

.products-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.products-section .section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* --- Product Card --- */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: scale(1.03);
  border-color: var(--primary);
  box-shadow: 0 0 30px var(--primary-glow);
}

.product-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface-hover);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.badge {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.badge-bundle {
  left: 12px;
  background: var(--secondary);
  color: #fff;
}

.badge-featured {
  right: 12px;
  background: var(--warning);
  color: #000;
}

.product-info {
  padding: 16px;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.product-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
}

.btn-add-cart {
  width: 100%;
  padding: 10px;
  font-size: 0.85rem;
}

/* --- Cart Sidebar --- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100%;
  background: var(--surface);
  z-index: 2001;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
}

.cart-overlay.open .cart-sidebar {
  transform: translateX(0);
}

.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.cart-sidebar-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.cart-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.cart-close:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.cart-item-image {
  width: 60px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-hover);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 600;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cart-item-qty button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.cart-item-qty button:hover {
  border-color: var(--primary);
}

.cart-item-qty span {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
  background: none;
  border: none;
}

.cart-item-remove:hover {
  color: #ff3b3b;
}

.cart-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.cart-empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.cart-empty p {
  margin-bottom: 20px;
}

.cart-sidebar-footer {
  padding: 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cart-total-label {
  font-size: 1rem;
  color: var(--text-muted);
}

.cart-total-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

/* --- Product Detail Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.8);
  color: var(--text);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--primary);
}

.modal-image {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: var(--surface-hover);
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-details {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
}

.modal-details h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-details .product-category {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.8rem;
}

.modal-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
  flex: 1;
}

.modal-bundle-info {
  background: rgba(155, 77, 202, 0.15);
  border: 1px solid rgba(155, 77, 202, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.modal-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 24px;
}

/* --- Cart Page --- */
.cart-page {
  padding-top: calc(var(--header-height) + 40px);
  min-height: 100vh;
}

.cart-page-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.cart-page h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 32px;
}

.cart-page-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  align-items: center;
}

.cart-page-item-image {
  width: 80px;
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-hover);
}

.cart-page-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-page-item-info {
  flex: 1;
}

.cart-page-item-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-page-item-info .product-price {
  font-size: 1.1rem;
}

.cart-page-summary {
  margin-top: 32px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.cart-page-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.cart-page-total span:first-child {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.cart-page-total span:last-child {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.checkout-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.checkout-form input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 20px;
  transition: var(--transition);
}

.checkout-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.cart-empty-page {
  text-align: center;
  padding: 80px 24px;
}

.cart-empty-page-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.cart-empty-page h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.cart-empty-page p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* --- Success Page --- */
.success-page {
  padding-top: calc(var(--header-height) + 60px);
  min-height: 100vh;
  text-align: center;
}

.success-page-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.success-icon {
  width: 100px;
  height: 100px;
  background: var(--gradient-btn);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 32px;
  box-shadow: 0 0 40px var(--primary-glow);
  animation: glow 2s ease-in-out infinite;
}

.success-page h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.success-page > .success-page-inner > p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.download-list {
  text-align: left;
  margin-bottom: 40px;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.download-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.download-item-icon {
  font-size: 1.5rem;
}

.download-item-title {
  font-weight: 600;
}

.btn-download {
  padding: 8px 20px;
  background: var(--gradient-btn);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-download:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
  color: #fff;
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confetti 3s ease-out forwards;
}

/* --- Newsletter Section --- */
.newsletter {
  padding: 80px 0;
  border-top: 2px solid;
  border-image: var(--gradient) 1;
}

.newsletter-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 0 24px;
}

.newsletter h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.newsletter p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
}

.newsletter-form input::placeholder {
  color: var(--text-muted);
}

.newsletter-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.newsletter-success {
  color: var(--success);
  font-weight: 600;
  margin-top: 16px;
  display: none;
}

.newsletter-success.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* --- Footer --- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand img {
  height: 40px;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 48px;
}

.footer-links-group h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links-group a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: var(--transition);
}

.footer-links-group a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--primary);
}

/* --- Toast Notifications --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 5000;
  box-shadow: var(--shadow);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 400px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-left: 3px solid var(--success);
}

.toast-error {
  border-left: 3px solid #ff3b3b;
}

.toast-info {
  border-left: 3px solid var(--accent);
}

/* --- Loading States --- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface-hover) 50%,
    var(--surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-card {
  height: 380px;
  border-radius: var(--radius-lg);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  flex-direction: column;
  gap: 16px;
}

.loading-container p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* --- Animations --- */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px var(--primary-glow);
  }
  50% {
    box-shadow: 0 0 40px var(--primary-glow), 0 0 60px rgba(155, 77, 202, 0.2);
  }
}

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

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

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes confetti {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* --- Page Content Wrapper --- */
.page-content {
  padding-top: var(--header-height);
  min-height: 100vh;
}

/* --- Section Spacing --- */
.section {
  padding: 60px 0;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
  }

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

  .modal-content {
    grid-template-columns: 1fr;
    max-height: 95vh;
  }

  .modal-image {
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .modal-details {
    padding: 24px;
  }

  .hero {
    padding: 100px 24px 60px;
    min-height: auto;
  }

  .hero-logo {
    width: 140px;
  }

  .hero-tagline {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .cart-sidebar {
    width: 100%;
  }

  .cart-page-item {
    flex-wrap: wrap;
  }

  .success-page h1 {
    font-size: 1.6rem;
  }

  .search-bar input {
    font-size: 16px; /* Prevent iOS zoom */
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-info {
    padding: 12px;
  }

  .product-title {
    font-size: 0.85rem;
  }

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

  .btn-add-cart {
    padding: 8px;
    font-size: 0.8rem;
  }

  .hero-tagline {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .category-tab {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .cart-page h1 {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 16px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

/* --- Admin-specific Styles (shared base) --- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.admin-sidebar-logo {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.admin-sidebar-logo img {
  height: 36px;
}

.admin-sidebar-logo span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-nav {
  flex: 1;
  padding: 0 12px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  margin-bottom: 4px;
}

.admin-nav a:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.admin-nav a.active {
  background: rgba(255, 45, 155, 0.1);
  color: var(--primary);
}

.admin-nav a .nav-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.admin-logout {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
}

.admin-header {
  margin-bottom: 32px;
}

.admin-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
}

.admin-header p {
  color: var(--text-muted);
  margin-top: 4px;
}

/* Admin stat cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Admin tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.admin-table thead {
  background: var(--bg);
}

.admin-table th {
  text-align: left;
  padding: 14px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 20px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.admin-table tbody tr:hover {
  background: var(--surface-hover);
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table tbody tr:nth-child(even):hover {
  background: var(--surface-hover);
}

.admin-table .actions {
  display: flex;
  gap: 8px;
}

/* Admin forms */
.admin-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group input[type="file"] {
  padding: 10px;
  background: transparent;
  border-style: dashed;
}

.form-group-row {
  display: flex;
  gap: 16px;
}

.form-group-row .form-group {
  flex: 1;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* Admin modal */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.admin-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
}

.admin-modal h2 {
  font-size: 1.4rem;
  margin-bottom: 24px;
}

/* Image preview */
.image-preview {
  width: 120px;
  height: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  margin-top: 8px;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-completed {
  background: rgba(0, 255, 136, 0.15);
  color: var(--success);
}

.status-pending {
  background: rgba(255, 170, 0, 0.15);
  color: var(--warning);
}

.status-failed {
  background: rgba(255, 59, 59, 0.15);
  color: #ff3b3b;
}

/* Admin login */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.admin-login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.admin-login-card img {
  height: 50px;
  margin: 0 auto 8px;
}

.admin-login-card h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.admin-login-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.admin-login-card .form-group {
  text-align: left;
}

.admin-error {
  color: #ff3b3b;
  font-size: 0.85rem;
  margin-top: 12px;
  display: none;
}

.admin-error.show {
  display: block;
}

/* Responsive admin */
@media (max-width: 1024px) {
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    display: none;
  }

  .admin-main {
    margin-left: 0;
    padding: 20px;
  }

  .stat-cards {
    grid-template-columns: 1fr;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
  }

  .form-group-row {
    flex-direction: column;
    gap: 0;
  }
}
