/* ============================================
   MUNDO DAS JOIAS 3D - Design System 2026
   Premium & Modern Jewelry E-commerce
   ============================================ */

/* CSS Variables */
:root {
  /* Colors - Luxury Palette */
  --gold: #C9A962;
  --gold-light: #E8D5A3;
  --gold-dark: #9A7B4F;
  --black: #0D0D0D;
  --black-soft: #1A1A1A;
  --black-card: #141414;
  --white: #FAFAFA;
  --white-soft: #F0F0F0;
  --gray-100: #E5E5E5;
  --gray-200: #CCCCCC;
  --gray-300: #999999;
  --gray-400: #666666;
  --gray-500: #404040;
  --success: #4ADE80;
  --warning: #FBBF24;
  --error: #F87171;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
  --shadow-glow: 0 0 40px rgba(201,169,98,0.15);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

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

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

/* Container */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13,13,13,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201,169,98,0.1);
  padding: var(--space-md) 0;
  transition: var(--transition-base);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.search-form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition-base);
}

.search-form:focus-within {
  border-color: var(--gold);
  box-shadow: var(--shadow-glow);
}

.search-form input {
  background: transparent;
  border: none;
  padding: var(--space-sm) var(--space-md);
  color: var(--white);
  font-size: 0.875rem;
  width: 200px;
  outline: none;
}

.search-form input::placeholder {
  color: var(--gray-400);
}

.search-form button {
  background: var(--gold);
  border: none;
  padding: var(--space-sm) var(--space-md);
  color: var(--black);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-form button:hover {
  background: var(--gold-light);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
  min-height: 100vh;
  padding-top: 80px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--black) 0%, var(--black-soft) 100%);
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201,169,98,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(201,169,98,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero h1 {
  color: var(--white);
  margin-bottom: var(--space-md);
  position: relative;
}

.hero h1 span {
  color: var(--gold);
}

.hero p {
  color: var(--gray-300);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.products-section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  color: var(--black);
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--gray-400);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-100);
  transition: var(--transition-base);
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-light);
}

.product-card a {
  display: block;
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, var(--black-soft) 0%, var(--black) 100%);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

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

.placeholder-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--black-soft) 0%, var(--black) 100%);
  color: var(--gold);
  font-size: 3rem;
  font-family: var(--font-display);
}

.placeholder-image.large {
  aspect-ratio: 1;
  font-size: 5rem;
}

.placeholder-image.small {
  width: 80px;
  height: 80px;
  font-size: 1.5rem;
  border-radius: var(--radius-md);
}

.product-info {
  padding: var(--space-lg);
}

.product-info h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
  color: var(--black);
  transition: var(--transition-fast);
}

.product-card:hover .product-info h3 {
  color: var(--gold-dark);
}

.product-info .tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.product-info .tags span {
  background: var(--gray-100);
  color: var(--gray-500);
  padding: 2px 10px;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-info .price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold-dark);
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  padding: var(--space-2xl) 0;
  align-items: start;
}

@media (max-width: 968px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

.product-gallery {
  position: sticky;
  top: 100px;
}

.main-image {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: var(--black-soft);
}

.product-content {
  padding: var(--space-md) 0;
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--gray-400);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.breadcrumb a:hover {
  color: var(--gold);
}

.product-content h1 {
  margin-bottom: var(--space-md);
  color: var(--black);
}

.product-content .tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.product-content .tags span {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--black);
  padding: 6px 16px;
  border-radius: var(--radius-xl);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-large {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.price-large::before {
  content: 'R$';
  font-size: 1.5rem;
  color: var(--gray-400);
}

.description {
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background: var(--white-soft);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--gold);
}

.description h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
  font-weight: 600;
}

.description p {
  color: var(--gray-500);
  line-height: 1.8;
}

.buy-section {
  margin-bottom: var(--space-xl);
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--black);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-md);
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: var(--transition-base);
  box-shadow: var(--shadow-md);
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.delivery-info {
  margin-top: var(--space-md);
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.delivery-info::before {
  content: '⚡';
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

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

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg);
  background: var(--white-soft);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
}

.feature:hover {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.feature .icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  font-size: 1.25rem;
}

.feature span:last-child {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */
.checkout-page {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-3xl);
  padding: var(--space-2xl) 0;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .checkout-page {
    grid-template-columns: 1fr;
  }
}

.checkout-summary {
  background: linear-gradient(135deg, var(--black-soft) 0%, var(--black) 100%);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  color: var(--white);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.checkout-summary h2 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: var(--space-lg);
  font-family: var(--font-body);
  font-weight: 600;
}

.summary-item {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.summary-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.item-details h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-xs);
  color: var(--white);
}

.item-details .price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
}

.checkout-form-container {
  padding: var(--space-lg) 0;
}

.checkout-form-container h1 {
  margin-bottom: var(--space-xl);
}

.checkout-form .form-group {
  margin-bottom: var(--space-lg);
}

.checkout-form label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.checkout-form input {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: var(--transition-fast);
  background: var(--white);
}

.checkout-form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,169,98,0.1);
}

.checkout-form small {
  display: block;
  margin-top: var(--space-xs);
  color: var(--gray-400);
  font-size: 0.8125rem;
}

.error-message {
  background: rgba(248,113,113,0.1);
  color: var(--error);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  display: none;
  border: 1px solid rgba(248,113,113,0.3);
}

.btn-checkout {
  width: 100%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--black);
  border: none;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: var(--transition-base);
}

.btn-checkout:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-checkout:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.secure-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  color: var(--gray-400);
  font-size: 0.875rem;
}

/* ============================================
   RESULT & DOWNLOAD PAGES
   ============================================ */
.result-page, .download-page, .error-page {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  max-width: 600px;
  margin: 0 auto;
}

.result-icon, .download-icon, .error-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-xl);
  font-size: 3rem;
}

.result-page.success .result-icon {
  background: rgba(74,222,128,0.1);
  color: var(--success);
}

.result-page.pending .result-icon {
  background: rgba(251,191,36,0.1);
  color: var(--warning);
}

.result-page.failure .result-icon {
  background: rgba(248,113,113,0.1);
  color: var(--error);
}

.download-icon {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--black);
}

.error-icon {
  background: rgba(248,113,113,0.1);
  color: var(--error);
}

.result-page h1, .download-page h1, .error-page h1 {
  margin-bottom: var(--space-md);
}

.result-page p, .download-page p, .error-page p {
  color: var(--gray-500);
  margin-bottom: var(--space-lg);
}

.result-info, .download-info {
  background: var(--white-soft);
  padding: var(--space-xl);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
  text-align: left;
}

.btn-back, .link-home {
  display: inline-block;
  margin-top: var(--space-md);
}

.btn-back {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--black);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--success);
  color: var(--white);
  padding: var(--space-lg) var(--space-2xl);
  border-radius: var(--radius-md);
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: var(--space-xl) 0;
  transition: var(--transition-base);
}

.btn-download:hover {
  background: #3ECF70;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--white);
}

.btn-download.disabled {
  background: var(--gray-300);
  pointer-events: none;
}

.download-tips {
  text-align: left;
  background: var(--white-soft);
  padding: var(--space-xl);
  border-radius: var(--radius-md);
  margin-top: var(--space-xl);
}

.download-tips h3 {
  font-size: 1rem;
  margin-bottom: var(--space-md);
  color: var(--gray-500);
}

.download-tips ul {
  margin-left: var(--space-lg);
  color: var(--gray-400);
}

.download-tips li {
  margin-bottom: var(--space-sm);
}

.download-page .product-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-dark);
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--white-soft);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  border-left: 3px solid var(--gold);
}

.search-results-info a {
  color: var(--gold-dark);
  font-weight: 600;
}

.search-results-info a:hover {
  text-decoration: underline;
}

.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl);
  color: var(--gray-400);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--black);
  color: var(--white);
  padding: var(--space-3xl) var(--space-lg);
  margin-top: var(--space-3xl);
  text-align: center;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer p {
  color: var(--gray-400);
  font-size: 0.875rem;
}

.footer p:first-child {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}

/* ============================================
   UTILITIES
   ============================================ */
@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
  }

  .search-form {
    order: 3;
    width: 100%;
  }

  .search-form input {
    width: 100%;
  }

  .hero {
    padding: var(--space-2xl) var(--space-md);
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
  }

  .price-large {
    font-size: 2rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-card {
  animation: fadeIn 0.5s ease backwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
