/* Custom Global Variables & Reset */
:root {
  --bg-dark: #030408;
  --panel-dark: #090a12;
  --panel-glass: rgba(10, 11, 20, 0.7);
  --border-glass: rgba(16, 185, 129, 0.15);
  --primary-glow: #10b981;
  --primary-rgb: 16, 185, 129;
  --text-main: #f8fafc;
  --text-muted: #64748b;
  --card-glow: rgba(16, 185, 129, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  background-image: radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 20px 20px;
}

h1, h2, h3, h4, .logo-text {
  font-family: 'Outfit', sans-serif;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-glow);
}

/* Header & Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: var(--panel-glass);
  backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-orb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #34d399 0%, #059669 80%);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.8), 0 0 20px rgba(5, 150, 105, 0.4);
  position: relative;
  display: inline-block;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}

.logo-text .highlight {
  color: var(--primary-glow);
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

/* Search Bar */
.search-bar-container {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

.search-bar-container input {
  width: 100%;
  height: 40px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding-left: 42px;
  padding-right: 16px;
  color: #fff;
  font-size: 0.88rem;
  transition: all 0.3s;
}

.search-bar-container input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--primary-glow);
}

.nav-btn i {
  width: 18px;
  height: 18px;
}

.nav-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.profile-btn {
  padding: 0;
  overflow: hidden;
  border-color: rgba(16, 185, 129, 0.15);
}

.profile-btn .avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero Section */
.hero {
  position: relative;
  height: 320px;
  margin-top: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 180px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(3, 4, 8, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

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

.hero-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary-glow);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #fff;
  letter-spacing: -0.5px;
}

.hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Main Layout & Filter Tabs */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 5rem 2rem;
}

.filter-wrapper {
  margin-bottom: 2rem;
}

.filters {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--primary-glow);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.08);
}

/* Product Grid & Card */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5), 0 0 20px rgba(16, 185, 129, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.card-image-wrapper {
  width: 100%;
  aspect-ratio: 1.2;
  border-radius: 12px;
  overflow: hidden;
  background: #090a10;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.02);
  position: relative;
}

.product-image {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

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

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px;
  background-color: var(--primary-glow);
  color: #000;
}

.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

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

.product-category {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--primary-glow);
}

.product-rating {
  font-size: 0.72rem;
  color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 2px;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

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

.product-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.add-btn {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--primary-glow);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.add-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary-glow);
  color: #000;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.add-btn i {
  width: 14px;
  height: 14px;
}

/* Slide-out Cart Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background-color: #06070c;
  border-left: 1px solid var(--border-glass);
  box-shadow: -10px 0 40px rgba(0,0,0,0.8);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.active {
  right: 0;
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.close-btn:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.04);
}

.close-btn i {
  width: 18px;
  height: 18px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Empty Cart View */
.empty-cart-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 80%;
  color: var(--text-muted);
  gap: 0.8rem;
}

.empty-cart-view i {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

/* Cart Item Row */
.cart-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.cart-item-img-wrapper {
  width: 60px;
  height: 60px;
  background: #090a10;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.03);
}

.cart-item-img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

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

.cart-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-glow);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  color: #94a3b8;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.qty-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.qty-val {
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}

.delete-item-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px;
  margin-left: 0.5rem;
  border-radius: 4px;
  display: flex;
}

.delete-item-btn:hover {
  background-color: rgba(239, 68, 68, 0.08);
}

.delete-item-btn i {
  width: 14px;
  height: 14px;
}

/* Cart Summary */
.cart-summary {
  background: #090a12;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.summary-row .free-shipping {
  color: var(--primary-glow);
  font-weight: 600;
}

.summary-row.total-row {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.summary-row.total-row #cart-total {
  color: var(--primary-glow);
}

.checkout-btn {
  width: 100%;
  height: 48px;
  background: var(--primary-glow);
  color: #000;
  border: none;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  box-shadow: 0 8px 24px rgba(16,185,129,0.3);
  transition: all 0.2s;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(16,185,129,0.45);
}

.checkout-btn i {
  width: 16px;
  height: 16px;
}

/* Checkout Modal Overlay */
.checkout-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.checkout-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.checkout-card {
  width: 90%;
  max-width: 460px;
  background: #090a12;
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8);
  position: relative;
}

.abs-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.checkout-step {
  display: none;
}

.checkout-step.active {
  display: block;
}

.checkout-step h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.checkout-step .subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  height: 44px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 0 1rem;
  color: #fff;
  font-size: 0.88rem;
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-glow);
  background: rgba(255,255,255,0.04);
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
}

.input-icon-wrapper input {
  padding-left: 42px;
}

.form-row {
  display: flex;
  gap: 1rem;
}

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

.submit-payment-btn {
  width: 100%;
  height: 48px;
  background: var(--primary-glow);
  color: #000;
  border: none;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 1rem;
  box-shadow: 0 8px 24px rgba(16,185,129,0.3);
}

/* Spinner Loader */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(16, 185, 129, 0.1);
  border-top-color: var(--primary-glow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.5rem;
}

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

/* Success View */
.success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0;
}

.success-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-glow);
  margin-bottom: 1.5rem;
}

.success-icon-wrapper i {
  width: 36px;
  height: 36px;
}

.order-details {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 1rem;
  width: 100%;
  margin: 1.5rem 0;
  text-align: left;
}

.order-details p {
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.order-details p:last-child {
  margin-bottom: 0;
}

.badge-success {
  background-color: rgba(16,185,129,0.12);
  color: var(--primary-glow);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.back-shop-btn {
  width: 100%;
  height: 44px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.back-shop-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

/* Responsive */
@media (max-width: 600px) {
  .nav-container { padding: 0 1rem; }
  .search-bar-container { display: none; }
  .hero h1 { font-size: 1.8rem; }
  .main-container { padding: 0 1rem 3rem 1rem; }
}
