/* SUBSCRIPTION BD - Clean Black & White Theme */

:root {
  --primary: #000000;
  --primary-hover: #1a1a1a;
  --secondary: #ffffff;
  --accent: #333333;
  --text: #000000;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #e5e5e5;
  --border-dark: #cccccc;
  --bg: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-dark: #000000;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--secondary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--secondary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Form Elements */
.input, input, textarea, select {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}

.input:focus, input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
}

/* Card */
.card {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-body {
  padding: 16px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 16px;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--border);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--primary);
  color: var(--secondary);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Search */
.search-bar {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.search-bar input {
  padding-left: 40px;
}

.search-bar svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

/* Hero */
.hero {
  position: relative;
  background: var(--bg-dark);
  color: var(--secondary);
  overflow: hidden;
}

.hero-slide {
  display: none;
  padding: 48px 16px;
  min-height: 280px;
}

.hero-slide.active {
  display: block;
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.hero p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
}

.hero-dots button.active {
  background: var(--secondary);
  width: 24px;
  border-radius: 4px;
}

/* Categories */
.categories-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 16px;
  scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.category-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 80px;
  transition: var(--transition);
}

.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.category-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card span {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

/* Section */
.section {
  padding: 24px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
}

.section-link {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px;
}

.product-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.product-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  background: var(--primary);
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
}

.product-wishlist {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: var(--bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-wishlist:hover {
  background: var(--primary);
  color: var(--secondary);
}

.product-wishlist.active {
  background: var(--primary);
  color: var(--secondary);
}

.product-info {
  padding: 12px;
}

.product-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-current {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.product-rating svg {
  width: 14px;
  height: 14px;
  fill: #fbbf24;
}

.product-rating span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Product List View */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px;
}

.product-list-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.product-list-item .product-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.product-list-item .product-info {
  flex: 1;
  padding: 0;
}

/* Flash Sale */
.flash-sale {
  background: var(--bg-secondary);
  padding: 16px;
  margin: 16px;
  border-radius: var(--radius);
}

.flash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.flash-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.flash-timer {
  display: flex;
  gap: 4px;
}

.timer-box {
  padding: 4px 8px;
  background: var(--primary);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  font-family: monospace;
}

.flash-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.flash-scroll::-webkit-scrollbar {
  display: none;
}

.flash-card {
  flex-shrink: 0;
  width: 140px;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.flash-card .product-image {
  aspect-ratio: 1;
}

.flash-card .product-info {
  padding: 8px;
}

.flash-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.flash-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

/* Banner */
.promo-banner {
  margin: 16px;
  padding: 24px;
  background: var(--primary);
  color: var(--secondary);
  border-radius: var(--radius);
  text-align: center;
}

.promo-banner h3 {
  margin-bottom: 8px;
}

.promo-banner p {
  opacity: 0.9;
  margin-bottom: 16px;
}

/* Trust Badges */
.trust-section {
  background: var(--bg-secondary);
  padding: 24px 16px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
}

.trust-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-item h4 {
  font-size: 13px;
  margin-bottom: 2px;
}

.trust-item p {
  font-size: 11px;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: var(--secondary);
  padding: 32px 16px;
  margin-top: 24px;
}

.footer-content {
  display: grid;
  gap: 24px;
}

.footer h4 {
  margin-bottom: 12px;
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 13px;
  opacity: 0.8;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 13px;
  opacity: 0.6;
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 100;
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  font-size: 10px;
  color: var(--text-muted);
  transition: var(--transition);
}

.mobile-nav a.active, .mobile-nav a:hover {
  color: var(--primary);
}

.mobile-nav svg {
  width: 24px;
  height: 24px;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--bg);
  z-index: 200;
  transition: 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-image {
  width: 60px;
  height: 60px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 700;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 700;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  background: var(--bg);
  border-radius: var(--radius-lg);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  overflow: auto;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-body {
  padding: 16px;
}

.modal-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 24px;
  background: var(--primary);
  color: var(--secondary);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--error);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 16px;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-state h3 {
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Pages */
.page {
  display: none;
  padding-bottom: 80px;
}

.page.active {
  display: block;
}

/* Product Detail */
.product-detail {
  padding: 16px;
}

.product-gallery {
  margin-bottom: 16px;
}

.product-main-image {
  aspect-ratio: 1;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
}

.thumb {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.thumb.active {
  border-color: var(--primary);
}

.product-detail-info h1 {
  font-size: 20px;
  margin-bottom: 8px;
}

.product-detail-price {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.product-detail-price .price-current {
  font-size: 24px;
}

.product-stock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--success);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 16px;
}

.product-stock.out {
  background: var(--error);
}

.product-variations {
  margin-bottom: 16px;
}

.variation-group {
  margin-bottom: 12px;
}

.variation-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.variation-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variation-option {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.variation-option:hover, .variation-option.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--secondary);
}

.product-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.qty-selector button {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

.qty-selector span {
  width: 40px;
  text-align: center;
  font-weight: 600;
}

.product-description {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.product-description h3 {
  margin-bottom: 12px;
}

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 8px;
}

.auth-card p {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Checkout */
.checkout-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.checkout-section h3 {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.payment-method.selected {
  border-color: var(--primary);
  background: var(--bg-secondary);
}

.payment-method-logo {
  width: 48px;
  height: 32px;
  object-fit: contain;
}

.payment-method-info {
  flex: 1;
}

.payment-method-name {
  font-weight: 600;
}

.payment-method-number {
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsive */
@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  
  .mobile-nav {
    display: none;
  }
  
  .page {
    padding-bottom: 0;
  }
  
  .hero h1 {
    font-size: 36px;
  }
  
  .hero-slide {
    padding: 64px 16px;
    min-height: 360px;
  }
  
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .cart-sidebar {
    right: -400px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 24px;
  }
  
  .product-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }
}

