/* LiPa Handmade - Sito vetrina artigianale */

:root {
  --max-width: 1200px;
  --accent: #8a5a3a;
  --accent-light: #b8956a;
  --accent-dark: #6b4423;
  --muted: #666;
  --light-bg: #fafaf8;
  --border: #e5ddd0;
  --shadow: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-hover: 0 8px 12px rgba(0,0,0,0.15);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navbar */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand .logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-brand .logo:hover {
  color: var(--accent-light);
}

.nav-brand .logo-img {
  display: inline-block;
}

.logo-image {
  height: 50px;
  width: auto;
  max-width: 200px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.nav-brand .logo:hover .logo-image {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-admin {
  background: var(--accent) !important;
  color: white !important;
  padding: 6px 12px !important;
  border-radius: 4px;
  font-weight: 600 !important;
}

.nav-admin:hover {
  background: var(--accent-dark) !important;
}

/* Hero Section */
.hero {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url('assets/img/background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 4rem 1rem;
  text-align: center;
  position: relative;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  font-size: 3rem;
  color: white;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.7), 1px 1px 3px rgba(0,0,0,0.5);
}

.hero-title {
  width: 300px;
  height: auto;
  margin: 0 auto 1rem auto;
  display: block;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.hero-subtitle {
  font-size: 1.2rem;
  color: white;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.6), 1px 1px 2px rgba(0,0,0,0.4);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: #f0f0f0;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}

.text-center {
  text-align: center;
  margin: 2rem 0;
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
}

/* Intro Section */
.intro {
  padding: 2rem 0;
  text-align: center;
  background: #fff;
}

.intro h2 {
  font-size: 2rem;
  color: var(--accent);
  margin: 0 0 1rem 0;
}

.intro p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Featured / Products Section */
.featured, .products-page {
  padding: 3rem 1rem;
  background: var(--light-bg);
}

.featured h2, .products-page h1 {
  font-size: 2rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 2rem;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Featured Section - 3 Prodotti Centrati */
.featured .products-grid {
  grid-template-columns: repeat(3, 1fr);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.product-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  display: inline-block;
  width: fit-content;
  background: var(--accent-light);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-info h3 {
  margin: 0.5rem 0;
  color: var(--accent-dark);
  font-size: 1.1rem;
}

.product-info p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Link prodotto (rende tutta la card cliccabile) */
.product-card-link {
  text-decoration: none;
  color: inherit;
}

/* Pagina Dettaglio Prodotto */
.product-detail-page {
  padding: 3rem 1rem;
  background: #fff;
  margin: 2rem 0;
}

.back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 2rem;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--accent-dark);
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.product-detail-images {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.main-image {
  background: #f9f7f4;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.main-image img {
  width: 100%;
  height: auto;
  display: block;
}

.secondary-images {
  display: flex;
  gap: 10px;
}

.secondary-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 5px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s, transform 0.3s;
}

.secondary-img:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.secondary-img.active {
  border-color: var(--accent);
  border-width: 3px;
}

.product-detail-info {
  padding: 20px;
}

.detail-category {
  display: inline-block;
  background: var(--accent-light);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.product-detail-info h1 {
  font-size: 2.5rem;
  color: var(--accent-dark);
  margin: 1rem 0;
}

.detail-price {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 2rem 0;
  padding: 20px;
  background: #f9f7f4;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
}

.price-label {
  font-weight: 600;
  color: #333;
}

.detail-price .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.detail-description {
  margin: 2rem 0;
}

.detail-description h2 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.detail-description p {
  line-height: 1.8;
  color: var(--muted);
  font-size: 1.05rem;
}

.detail-contact {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

/* About Page */
.about-page {
  padding: 3rem 1rem;
}

.about-page h1 {
  font-size: 2rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 2rem;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  line-height: 1.8;
}

.about-text {
  max-width: 600px;
}

.about-image {
  text-align: center;
}

.about-image img {
  width: 100%;
  max-width: 350px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.about-content h2 {
  color: var(--accent);
  margin-top: 1.5rem;
}

.about-content ul {
  list-style: none;
  padding: 0;
}

.about-content li {
  padding: 0.5rem 0;
  font-size: 1rem;
}

/* Contacts Page */
.contacts-page {
  padding: 3rem 1rem;
}

.contacts-page h1 {
  font-size: 2rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 2rem;
}

.contacts-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.contact-info h2 {
  color: var(--accent);
  margin-top: 0;
}

.contact-info p {
  margin: 1rem 0;
  line-height: 1.8;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Contact Form */
.contact-form h2 {
  color: var(--accent);
  margin-top: 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138, 90, 58, 0.1);
}

/* Footer */
.site-footer {
  background: #333;
  color: #ccc;
  padding: 2rem 1rem;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

/* Blog Page */
.blog-page {
  padding: 3rem 1rem;
}

.blog-page h1 {
  font-size: 2rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 2rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.blog-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.blog-header {
  padding: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.blog-header h2 {
  margin: 0 0 0.5rem 0;
  color: var(--accent-dark);
  font-size: 1.3rem;
}

.blog-header h2 a {
  color: var(--accent-dark);
  text-decoration: none;
}

.blog-header h2 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.blog-content {
  padding: 1.5rem;
  flex: 1;
  color: #555;
  line-height: 1.7;
}

.read-more {
  display: inline-block;
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: var(--accent-light);
}

/* Pagina Dettaglio Blog */
.blog-detail-page {
  padding: 3rem 1rem;
  background: #fff;
  margin: 2rem 0;
  min-height: 60vh;
}

.blog-detail {
  max-width: 800px;
  margin: 0 auto;
}

.blog-detail h1 {
  color: var(--accent-dark);
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-meta-detail {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.blog-content-detail {
  color: #555;
  line-height: 1.9;
  font-size: 1rem;
  margin-bottom: 3rem;
  word-wrap: break-word;
}

.blog-footer {
  padding-top: 2rem;
  border-top: 2px solid var(--border);
  display: flex;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent-light);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .featured .products-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.active {
    max-height: 300px;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 15px 1rem;
    gap: 1rem;
    font-size: 0.9rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-title {
    width: 200px;
    height: auto;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero {
    background-size: 150%;
    background-attachment: scroll;
    min-height: 300px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .featured .products-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-image img {
    max-width: 250px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-detail h1 {
    font-size: 1.5rem;
  }

  .blog-meta-detail {
    flex-direction: column;
    gap: 0.5rem;
  }

  .blog-content-detail {
    font-size: 0.95rem;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contacts-content {
    grid-template-columns: 1fr;
  }

  .featured h2, .products-page h1, .about-page h1, .contacts-page h1, .blog-page h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  .nav-brand .logo {
    font-size: 1.2rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }
}