/*
Theme Name: Meghvault
Theme URI: https://site.veedanhsu.space
Description: Dark theme for Meghvault NAS - Your private digital sky
Version: 1.0
Author: Veedanhsu
Text Domain: meghvault
*/

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a2e;
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --accent: #10b981;
  --accent-hover: #059669;
  --border: #1f2937;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

a { color: var(--text-primary); text-decoration: none; }
img { max-width: 100%; height: auto; }

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 100;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
}

.site-logo .nas { color: var(--accent); }

.logo-mark {
  width: 40px; height: 40px;
  flex-shrink: 0;
}

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--text-secondary); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }

.cart-icon { color: var(--text-secondary); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 80px 48px;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #0d1117 50%, #0a0f1a 100%);
  min-height: 80vh;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}

.hero-badges span {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-secondary); font-size: 0.9rem;
}

.hero-badges span::before {
  content: ""; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
}

.hero-buttons { display: flex; gap: 16px; }

.btn-primary {
  background: var(--accent);
  color: white;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary:hover { background: var(--accent-hover); color: white; }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  padding: 12px 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  cursor: pointer;
  font-size: 1rem;
}

.btn-secondary:hover { border-color: var(--text-secondary); }

.hero-image {
  background: linear-gradient(145deg, #1a1a3e, #2a2a4e);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  max-width: 380px;
  margin-left: auto;
}

.hero-image img { border-radius: 8px; width: 100%; max-height: 332px; object-fit: contain; }

/* Features */
.features-section {
  padding: 80px 48px;
  text-align: center;
}

.features-section h2 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.features-section .subtitle {
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto 48px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: left;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* CTA */
.cta-section {
  padding: 80px 48px;
  text-align: center;
  background: linear-gradient(180deg, #0d1117 0%, #0a1628 100%);
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Footer */
.site-footer {
  padding: 48px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-brand .brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand .brand-name .nas { color: var(--accent); }

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.social-links { display: flex; gap: 16px; }
.social-links a { color: var(--text-secondary); }

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-col a:hover { color: var(--text-primary); }

.footer-email {
  display: flex;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 12px;
}

.footer-email input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px;
  color: var(--text-primary);
  outline: none;
}

.footer-email button {
  background: var(--accent);
  border: none;
  padding: 12px 16px;
  color: white;
  cursor: pointer;
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* WooCommerce overrides */
.woocommerce .products { background: var(--bg-primary); }
.woocommerce ul.products li.product a { color: var(--text-primary); }
.woocommerce .price { color: var(--accent) !important; }
.woocommerce a.button, .woocommerce button.button {
  background: var(--accent) !important;
  color: white !important;
  border-radius: 8px !important;
}

/* Single Product Page */
.product-page { max-width: 1200px; margin: 0 auto; padding: 56px 48px; }

.product-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.product-gallery { position: sticky; top: 96px; }
.pg-main {
  background: linear-gradient(145deg, #1a1a3e, #2a2a4e);
  border-radius: 16px;
  padding: 24px;
  display: flex; align-items: center; justify-content: center;
}
.pg-main img { width: 100%; max-height: 420px; object-fit: contain; border-radius: 8px; }
.pg-thumbs { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pg-thumb {
  width: 72px; height: 72px; object-fit: cover; border-radius: 8px;
  background: var(--bg-card); padding: 4px; cursor: pointer;
  border: 2px solid var(--border); transition: border-color 0.2s;
}
.pg-thumb:hover { border-color: var(--text-secondary); }
.pg-thumb.active { border-color: var(--accent); }

.product-title { font-size: 2.5rem; font-weight: 700; line-height: 1.1; }
.product-tagline { color: var(--accent); font-size: 1.05rem; margin: 8px 0 20px; }

.product-price { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.pp-now { font-size: 2rem; font-weight: 700; color: var(--text-primary); }
.pp-now .woocommerce-Price-amount { color: var(--text-primary); }
.pp-was { color: var(--text-secondary); text-decoration: line-through; font-size: 1.1rem; }
.pp-badge {
  background: rgba(16,185,129,0.15); color: var(--accent);
  border: 1px solid var(--accent); border-radius: 6px;
  padding: 4px 10px; font-size: 0.85rem; font-weight: 600;
}

.product-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.product-chips span {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); border-radius: 999px;
  padding: 8px 14px; font-size: 0.85rem;
}
.product-chips span::before {
  content: ""; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
}

.product-desc { color: var(--text-secondary); margin-bottom: 28px; }

.product-cart form.cart { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.product-cart .quantity input {
  width: 80px; padding: 12px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 1rem;
}
.product-cart button.button, .product-cart .single_add_to_cart_button {
  background: var(--accent) !important; color: #fff !important;
  padding: 14px 36px !important; border-radius: 8px !important;
  font-weight: 600 !important; font-size: 1rem !important; border: none !important; cursor: pointer;
}
.product-cart button.button:hover { background: var(--accent-hover) !important; }

/* Product badges row (tagline + out-of-stock) */
.product-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pb-tagline {
  display: inline-flex; align-items: center;
  background: rgba(16,185,129,0.12); color: var(--accent);
  border: 1px solid rgba(16,185,129,0.4); border-radius: 999px;
  padding: 5px 14px; font-size: 0.85rem; font-weight: 600;
}
.pb-oos {
  display: inline-flex; align-items: center;
  background: rgba(239,68,68,0.12); color: #f87171;
  border: 1px solid rgba(239,68,68,0.4); border-radius: 999px;
  padding: 5px 14px; font-size: 0.85rem; font-weight: 600;
}

/* Out-of-stock button */
.product-cart.oos { margin-bottom: 24px; }
.oos-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg-card); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 32px; font-size: 1rem; font-weight: 600;
  cursor: not-allowed;
}
.oos-pill {
  background: rgba(239,68,68,0.15); color: #f87171;
  border: 1px solid rgba(239,68,68,0.4); border-radius: 6px;
  padding: 3px 10px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
}

/* Remind-me-when-in-stock box */
.product-notify {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px 24px; margin-bottom: 24px;
}
.product-notify h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.product-notify p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 14px; }
.notify-form { display: flex; gap: 10px; flex-wrap: wrap; }
.notify-form input {
  flex: 1 1 200px; padding: 12px 14px; border-radius: 8px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 0.95rem;
}
.notify-form button {
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
}
.notify-form button:hover { background: var(--accent-hover); }
.notify-done { color: var(--accent) !important; font-weight: 600; margin-bottom: 0 !important; }

/* Trust badges */
.product-trust { display: flex; flex-wrap: wrap; gap: 28px; }
.product-trust span {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-secondary); font-size: 0.85rem;
}
.product-trust svg { width: 18px; height: 18px; color: var(--accent); }

.product-specs, .product-features { margin-top: 72px; }
.product-specs h2, .product-features h2 {
  font-size: 1.8rem; font-weight: 700; text-align: center; margin-bottom: 32px;
}
.specs-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.spec-item {
  display: flex; justify-content: space-between; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 20px;
}
.spec-label { color: var(--text-secondary); }
.spec-value { color: var(--text-primary); font-weight: 600; text-align: right; }

.pf-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.pf-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px;
}
.pf-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 10px;
  background: rgba(16,185,129,0.12); color: var(--accent); margin-bottom: 16px;
}
.pf-icon svg { width: 24px; height: 24px; }
.pf-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.pf-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Responsive */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding: 40px 24px; }
  .hero h1 { font-size: 2rem; }
  .hero-image { margin: 0 auto; max-width: 320px; }
  .site-nav { padding: 16px 24px; }
  .features-section { padding: 40px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .product-page { padding: 32px 24px; }
  .product-top { grid-template-columns: 1fr; gap: 32px; }
  .product-gallery { position: static; }
  .product-title { font-size: 2rem; }
  .specs-grid { grid-template-columns: 1fr; }
  .pf-grid { grid-template-columns: 1fr; }
}
