/*
Theme Name: Marilene Engler
Theme URI: https://marileneengler.com.br
Author: Marilene Engler
Author URI: https://marileneengler.com.br
Description: Tema e-commerce elegante e artesanal para bolsas em crochê da Marilene Engler. Compatível com WooCommerce. Design moderno com tons quentes e toque artesanal.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marilene-engler
Tags: e-commerce, woocommerce, custom-menu, featured-images, threaded-comments, translation-ready, responsive
*/

/* ==========================================================================
   CSS Variables - Paleta Artesanal
   ========================================================================== */
:root {
  --color-cream: #F9F5F0;
  --color-warm-white: #FFFBF7;
  --color-terracotta: #C47A5A;
  --color-terracotta-dark: #A65D3F;
  --color-sand: #E8D5C4;
  --color-brown: #5C4033;
  --color-brown-soft: #8B6F5C;
  --color-sage: #8A9A7B;
  --color-sage-dark: #6B7B5C;
  --color-gold: #D4A574;
  --color-text: #3D2C29;
  --color-text-light: #6B5B54;
  --color-border: #EDE4DB;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-soft: 0 4px 20px rgba(92, 64, 51, 0.08);
  --shadow-hover: 0 8px 30px rgba(92, 64, 51, 0.12);
  --radius: 12px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-warm-white);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--color-terracotta-dark);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-brown);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-terracotta);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-terracotta-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

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

.btn-outline:hover {
  background: var(--color-terracotta);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--color-brown);
}

.btn-white:hover {
  background: var(--color-cream);
  color: var(--color-brown);
  transform: translateY(-2px);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: var(--color-warm-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-brown);
  letter-spacing: -0.5px;
}

.site-logo span {
  color: var(--color-terracotta);
  font-weight: 400;
  font-size: 0.85rem;
  display: block;
  letter-spacing: 1px;
  text-transform: uppercase;
}

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

.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-terracotta);
  transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-actions a {
  color: var(--color-brown);
  font-size: 1.25rem;
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--color-terracotta);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-brown);
  margin: 5px 0;
  transition: var(--transition);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-sand) 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(196, 122, 90, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  margin-bottom: 20px;
  color: var(--color-brown);
}

.hero-content h1 em {
  font-style: italic;
  color: var(--color-terracotta);
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
  max-width: 480px;
}

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

.hero-image {
  position: relative;
}

.hero-image-placeholder {
  background: var(--color-sand);
  border-radius: var(--radius);
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brown-soft);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-brown);
}

.hero-badge strong {
  color: var(--color-terracotta);
}

/* ==========================================================================
   Categories Section
   ========================================================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--color-sand);
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.category-card-content {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(61, 44, 41, 0.75) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  color: #fff;
}

.category-card h3 {
  color: #fff;
  margin-bottom: 8px;
}

.category-card p {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 16px;
}

.category-card .btn {
  align-self: flex-start;
  padding: 10px 24px;
  font-size: 0.85rem;
}

/* ==========================================================================
   Products Section
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  border: 1px solid var(--color-border);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.product-image {
  aspect-ratio: 1;
  background: var(--color-cream);
  position: relative;
  overflow: hidden;
}

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

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

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-terracotta);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 0.8rem;
  color: var(--color-terracotta);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.product-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--color-brown);
}

.product-title a {
  color: inherit;
}

.product-title a:hover {
  color: var(--color-terracotta);
}

.product-price {
  font-weight: 600;
  color: var(--color-brown);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.product-price del {
  color: var(--color-text-light);
  font-weight: 400;
  font-size: 0.9rem;
  margin-right: 8px;
}

.product-actions {
  display: flex;
  gap: 8px;
}

.product-actions .btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.85rem;
}

/* ==========================================================================
   About / Craft Section
   ========================================================================== */
.craft-section {
  background: var(--color-cream);
}

.craft-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.craft-content h2 {
  margin-bottom: 20px;
}

.craft-content p {
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.craft-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.craft-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.craft-feature-icon {
  width: 44px;
  height: 44px;
  background: var(--color-sand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.craft-feature h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.craft-feature p {
  font-size: 0.9rem;
  margin: 0;
}

.craft-image-placeholder {
  background: var(--color-sand);
  border-radius: var(--radius);
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brown-soft);
  font-family: var(--font-heading);
  box-shadow: var(--shadow-soft);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
  background: linear-gradient(135deg, var(--color-terracotta) 0%, var(--color-terracotta-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 80px 0;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 16px;
}

.cta-section p {
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto 32px;
  font-size: 1.1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--color-brown);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .site-logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 20px;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--color-terracotta);
  border-color: var(--color-terracotta);
}

/* ==========================================================================
   WooCommerce Overrides
   ========================================================================== */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
}

.woocommerce ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  text-align: left;
  padding: 0 !important;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.woocommerce ul.products li.product a img {
  margin: 0;
  border-radius: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  padding: 16px 20px 4px;
  color: var(--color-brown);
}

.woocommerce ul.products li.product .price {
  padding: 0 20px 12px;
  color: var(--color-brown);
  font-weight: 600;
}

.woocommerce ul.products li.product .button {
  margin: 0 20px 20px;
  background: var(--color-terracotta) !important;
  color: #fff !important;
  border-radius: 50px;
  padding: 10px 20px;
  font-weight: 500;
}

.woocommerce ul.products li.product .button:hover {
  background: var(--color-terracotta-dark) !important;
}

.woocommerce span.onsale {
  background: var(--color-terracotta) !important;
  border-radius: 50px;
  padding: 4px 12px;
  min-height: auto;
  min-width: auto;
  line-height: 1.4;
  top: 12px;
  left: 12px;
  right: auto;
}

.woocommerce div.product {
  margin-top: 40px;
}

.woocommerce div.product .product_title {
  font-family: var(--font-heading);
  color: var(--color-brown);
}

.woocommerce div.product p.price {
  color: var(--color-terracotta);
  font-size: 1.4rem;
}

.woocommerce div.product .single_add_to_cart_button {
  background: var(--color-terracotta) !important;
  border-radius: 50px;
  padding: 14px 32px;
  font-weight: 500;
}

.woocommerce div.product .single_add_to_cart_button:hover {
  background: var(--color-terracotta-dark) !important;
}

.woocommerce-tabs {
  margin-top: 40px;
}

.woocommerce-tabs ul.tabs {
  padding: 0;
  margin: 0 0 24px;
  border-bottom: 2px solid var(--color-border);
}

.woocommerce-tabs ul.tabs li {
  background: transparent !important;
  border: none !important;
  margin: 0 24px 0 0;
  padding: 0;
}

.woocommerce-tabs ul.tabs li a {
  color: var(--color-text-light);
  font-weight: 500;
  padding: 12px 0;
}

.woocommerce-tabs ul.tabs li.active a {
  color: var(--color-terracotta);
  border-bottom: 2px solid var(--color-terracotta);
}

.woocommerce-cart-form,
.woocommerce-checkout {
  margin-top: 40px;
}

.woocommerce table.shop_table {
  border-radius: var(--radius);
  overflow: hidden;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--color-terracotta) !important;
  color: #fff !important;
  border-radius: 50px !important;
  font-weight: 500;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--color-terracotta-dark) !important;
}

.woocommerce .quantity .qty {
  border-radius: 8px;
  border: 1px solid var(--color-border);
  padding: 8px;
}

/* Page title */
.page-header {
  background: var(--color-cream);
  padding: 60px 0;
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  margin-bottom: 8px;
}

.woocommerce-breadcrumb {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.woocommerce-breadcrumb a {
  color: var(--color-terracotta);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
  .hero-inner,
  .craft-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-image {
    order: -1;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 20px;
    box-shadow: var(--shadow-soft);
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 16px;
  }

  .menu-toggle {
    display: block;
  }

  .section {
    padding: 60px 0;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .craft-features {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 60px 0;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}
