/* BraveCub Storefront Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #1a1a2e;
  --warm: #f5a623;
  --sky: #4a90d9;
  --clay: #e8734a;
  --sand: #faf7f2;
  --fog: #f0ede8;
  --muted: #7a7a8c;
  --success: #2d8a4e;
  --danger: #d44a4a;
  --white: #ffffff;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--sand);
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
}

a { color: inherit; text-decoration: none; }

/* STORE NAV */
.store-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.store-nav .logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.store-nav .logo span { color: var(--clay); }

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

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

.nav-links a:hover { color: var(--ink); }

.nav-links a.active { color: var(--ink); }

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-badge {
  background: var(--clay);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -8px;
  right: -12px;
}

.cart-badge.hidden { display: none; }

/* PAGE CONTAINER */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 48px 80px;
}

.page-header {
  margin-bottom: 48px;
}

.page-header h1 {
  font-size: 2.8rem;
  letter-spacing: -1.5px;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 600px;
}

/* PRODUCT GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.product-card-image {
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
}

.product-card-image .gradient-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.product-card-image .product-icon {
  font-size: 4rem;
  opacity: 0.3;
  color: white;
}

.product-card-info {
  padding: 24px;
}

.product-card-info .category-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--clay);
  font-weight: 600;
  margin-bottom: 8px;
}

.product-card-info h3 {
  font-size: 1.15rem;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.product-card-info .tagline {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.product-card-info .price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.product-card-info .price .compare {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 8px;
}

/* PRODUCT DETAIL */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-image-main {
  aspect-ratio: 4/5;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.product-image-main .gradient-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.product-image-main .product-icon {
  font-size: 8rem;
  opacity: 0.2;
  color: white;
}

.product-info {
  padding-top: 20px;
}

.product-info .category-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--clay);
  font-weight: 600;
  margin-bottom: 12px;
}

.product-info h1 {
  font-size: 2.4rem;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.product-info .tagline {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.product-info .price-display {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 32px;
}

.product-info .description {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 32px;
}

/* SIZE SELECTOR */
.selector-group {
  margin-bottom: 24px;
}

.selector-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  color: var(--ink);
}

.size-options, .color-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.size-btn, .color-btn {
  border: 2px solid var(--fog);
  background: var(--white);
  border-radius: 12px;
  padding: 10px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--ink);
}

.size-btn:hover, .color-btn:hover {
  border-color: var(--ink);
}

.size-btn.selected, .color-btn.selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.color-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  position: relative;
}

.color-btn.selected::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: -0.3px;
}

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

.btn-primary:hover {
  background: #2a2a4e;
  transform: translateY(-1px);
}

.btn-clay {
  background: var(--clay);
  color: var(--white);
}

.btn-clay:hover {
  background: #d45d33;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--fog);
}

.btn-outline:hover {
  border-color: var(--ink);
}

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

.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.add-to-cart-group {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

/* QUANTITY SELECTOR */
.qty-selector {
  display: flex;
  align-items: center;
  border: 2px solid var(--fog);
  border-radius: 14px;
  overflow: hidden;
}

.qty-btn {
  background: none;
  border: none;
  padding: 14px 16px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
  transition: background 0.2s;
}

.qty-btn:hover { background: var(--fog); }

.qty-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  min-width: 40px;
  text-align: center;
}

/* CART PAGE */
.cart-empty {
  text-align: center;
  padding: 80px 0;
}

.cart-empty h2 {
  font-size: 1.8rem;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

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

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(0,0,0,0.06);
}

.cart-item-image {
  width: 100px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
}

.cart-item-image .gradient-bg {
  width: 100%;
  height: 100%;
}

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

.cart-item-details h3 {
  font-size: 1rem;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.cart-item-details .meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.cart-item-details .item-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
  transition: color 0.2s;
}

.remove-btn:hover { color: var(--danger); }

/* CART SUMMARY */
.cart-summary {
  background: var(--white);
  border-radius: 20px;
  padding: 32px;
  border: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 20px;
}

.cart-summary h3 {
  font-size: 1.2rem;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--fog);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.summary-row .label { color: var(--muted); }

.summary-row.total {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--fog);
  color: var(--ink);
}

.free-shipping-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--success);
  margin-top: 16px;
  padding: 10px;
  background: rgba(45,138,78,0.08);
  border-radius: 10px;
}

.cart-summary .btn {
  margin-top: 20px;
}

/* NOTIFICATION TOAST */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--ink);
  color: var(--white);
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

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

/* SUCCESS PAGE */
.success-page {
  text-align: center;
  padding: 80px 48px;
  max-width: 600px;
  margin: 0 auto;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: rgba(45,138,78,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2.5rem;
}

.success-page h1 {
  font-size: 2.4rem;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}

.success-page p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.order-id {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--ink);
  background: var(--fog);
  padding: 12px 20px;
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 32px;
}

/* FOOTER */
.store-footer {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 40px 48px 32px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: auto;
}

.store-footer a {
  color: var(--muted);
  text-decoration: none;
}

/* Footer newsletter */
.footer-newsletter {
  max-width: 500px;
  margin: 0 auto 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.footer-newsletter-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.footer-newsletter-text strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.footer-newsletter-text span {
  font-size: 0.85rem;
  color: var(--muted);
}

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

.footer-newsletter-input {
  flex: 1;
  padding: 11px 16px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: white;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}

.footer-newsletter-input:focus {
  border-color: var(--clay);
}

.footer-newsletter-btn {
  padding: 11px 20px;
  background: var(--clay);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.footer-newsletter-btn:hover {
  background: #d45d33;
  transform: translateY(-1px);
}

.footer-newsletter-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.footer-newsletter-msg {
  font-size: 0.82rem;
  margin-top: 8px;
  min-height: 18px;
}

.footer-newsletter-msg.success { color: var(--success); }
.footer-newsletter-msg.error { color: var(--danger); }

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

@media (max-width: 768px) {
  .store-footer { padding: 32px 24px 24px; }
  .footer-newsletter-form { flex-direction: column; }
  .footer-newsletter-btn { width: 100%; }
}

/* LOADING */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}

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

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

/* RESPONSIVE */
@media (max-width: 768px) {
  .store-nav { padding: 16px 24px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 0.85rem; }
  .page-container { padding: 24px 24px 60px; }
  .page-header h1 { font-size: 2rem; }

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

  .product-card-info { padding: 16px; }
  .product-card-info h3 { font-size: 0.95rem; }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-info h1 { font-size: 1.8rem; }

  .cart-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: 16px;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .cart-item-image { width: 80px; height: 100px; }

  .add-to-cart-group { flex-direction: column; }

  .success-page { padding: 40px 24px; }
  .success-page h1 { font-size: 1.8rem; }
}

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