:root {
  --background-color: #d1b2d1;
  --highlights-color: #d1b2d1;
  --highlights-dark-color: #c19cc1;
  --text-color: #000000;
  --font-size: 16px;
  --padding: 1rem;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: Nunito, serif; line-height:1; color:#333; background:#fafafa; }
.container { max-width:1200px; margin:0 auto; padding:0 20px; }

.gallery-title { text-align: center; padding-top: 20px; padding-bottom: 20px;}

/* Header */
header { background:#fff; box-shadow:0 2px 5px rgba(0,0,0,.1); position:fixed; top:0; width:100%; z-index:1000; }
.nav-container { max-width:1200px; margin:0 auto; padding:0 20px; display:flex; justify-content:space-between; align-items:center; height:80px; }
.logo { font-size:1.8rem; color:var(--text-color); font-weight:bold; }
.logo a { color:inherit; text-decoration:none; }
.nav-menu { display:flex; list-style:none; gap:30px; }
.nav-menu a { text-decoration:none; color:#333; font-weight:500; transition:color .3s; }
.nav-menu a:hover, .nav-menu a.active { color:var(--text-color); }

main { margin-top:80px; }

/* Hero */
.hero { display:flex; align-items:center; min-height:60vh; padding:60px 20px; max-width:1200px; margin:0 auto; gap:50px; }
.hero-content { flex:1; }
.hero-content h2 { font-size:3rem; color:#4a4a4a; margin-bottom:20px; line-height:1; }
.hero-content p { font-size:1.2rem; margin-bottom:30px; color:#666; }
.cta-button { display:inline-block; background:var(--highlights-color); color:#fff; padding:15px 30px; text-decoration:none; border-radius:5px; font-weight:bold; transition:background .3s; }
.cta-button:hover { background: var(--highlights-dark-color); }
.hero-image { flex:1; }
.hero-image img { width:100%; height:400px; object-fit:cover; border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.2); }
.hero-image { aspect-ratio: 1 / 1; width: 100%; position: relative; overflow: hidden; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* About */
.about { padding:80px 20px; background-color: var(--background-color);}
.about h2 { text-align:center; font-size:2.5rem; color:var(--text-color); margin-bottom:40px; }
.about-text p { font-size:1.1rem; margin-bottom:20px; text-align:center; max-width:800px; margin-left:auto; margin-right:auto; }

/* Featured */
.featured-works { padding:80px 20px; background-color: var(--background-color);}
.featured-works h2 { text-align:center; font-size:2.5rem; color:var(--text-color); margin-bottom:40px; }
.featured-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(250px,1fr)); gap:30px; }


.ciocheserve { padding:80px 20px; }
.ciocheserve h2 { text-align:center; font-size:2.5rem; color:var(--text-color); margin-bottom:40px; }

/* Contact */
.contact { padding:80px 20px; background-color: var(--background-color); text-align:center; }
.contact h2 { font-size:2.5rem; color:var(--text-color); margin-bottom:20px; }
.contact p { font-size:1.1rem; }
.contact-info p { font-size:1.2rem; margin:10px 0; font-weight:bold; }

.ordina {background-color: var(--background-color);}
.ordinacontatti {background-color: #fff;}

/* Catalog */
.catalog-main { padding:40px 20px; min-height:calc(100vh - 80px); }
.catalog-main h1 { text-align:center; color:var(--text-color); margin-bottom:40px; font-size:2.5rem; }

/* Filter */
.category-filter { text-align:center; margin-bottom:15px; }
.filter-btn { background:#f0f0f0; border:2px solid #ddd; padding:12px 25px; margin:0 10px; border-radius:25px; cursor:pointer; font-size:1rem; transition:all .3s; }
.filter-btn:hover, .filter-btn.active { background:var(--text-color); color:#fff; border-color:var(--text-color); }

/* Gallery grid */
.gallery { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px,1fr)); gap:30px; margin-bottom:40px; }
.gallery-item { background:#fff; border-radius:10px; overflow:hidden; box-shadow:0 5px 15px rgba(0,0,0,.1); transition:transform .3s; }
.gallery-item:hover { transform:translateY(-5px); }
.image-container { position:relative; overflow:hidden; }
.gallery-item img { width:100%; height:250px; object-fit:cover; cursor:pointer; transition:transform .3s; }
.gallery-item img:hover { transform:scale(1.05); }
.image-overlay { position:absolute; bottom:0; left:0; right:0; background:linear-gradient(transparent, rgba(0,0,0,.7)); color:#fff; padding:20px; transform:translateY(100%); transition:transform .3s; }
.gallery-item:hover .image-overlay { transform:translateY(0); }
.image-overlay h3 { font-size:1.2rem; margin-bottom:5px; }
.category-tag { background:var(--text-color); padding:4px 10px; border-radius:15px; font-size:.8rem; display:inline-block; }

/* Item controls */
.item-controls { padding:20px; }
.quantity-control { display:flex; align-items:center; gap:10px; }
.quantity-control label { font-weight:bold; color:var(--text-color); }
.quantity-control input { width:60px; padding:8px; border:1px solid #ddd; border-radius:5px; text-align:center; }

/* Cart */
.cart-summary { background:#fff; padding:25px; border-radius:10px; box-shadow:0 5px 15px rgba(0,0,0,.1); margin-bottom:40px; position:sticky; top:100px; }
.cart-summary h3 { color:var(--text-color); margin-bottom:20px; }
.cart-item { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid #eee; }
.cart-item:last-child { border-bottom:none; }
.cart-total { margin-top:20px; padding-top:20px; border-top:2px solid var(--text-color); text-align:center; font-size:1.1rem; }
.checkout-btn { width:100%; background:var(--text-color); color:#fff; padding:15px; border:none; border-radius:5px; font-size:1.1rem; cursor:pointer; margin-top:20px; transition:background .3s; }
.checkout-btn:hover { background:#1b90c2; }

/* Checkout modal */
.checkout-form { background:#fff; padding:40px; border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.2); position:fixed; top:50%; left:50%; transform:translate(-50%, -50%); width:90%; max-width:600px; z-index:2000; max-height:90vh; overflow-y:auto; }
.checkout-form h2 { color:var(--text-color); margin-bottom:30px; text-align:center; }
.form-group { margin-bottom:20px; }
.form-group label { display:block; margin-bottom:5px; font-weight:bold; color:#333; }
.form-group input, .form-group textarea { width:100%; padding:12px; border:1px solid #ddd; border-radius:5px; font-size:1rem; }
.form-group input:focus, .form-group textarea:focus { outline:none; border-color:var(--text-color); }
.form-actions { display:flex; gap:15px; justify-content:center; margin-top:30px; }
.form-actions button { padding:12px 30px; border:none; border-radius:5px; font-size:1rem; cursor:pointer; transition:all .3s; }
.form-actions button[type="button"] { background:#ccc; color:#333; }
.form-actions button[type="submit"] { background:var(--text-color); color:#fff; }
.form-actions button:hover { opacity:.9; transform:translateY(-2px); }

/* Lightbox */
.lightbox { display:none; position:fixed; z-index:3000; left:0; top:0; width:100%; height:100%; background:rgba(0,0,0,.9); }
.lightbox-content { position:relative; margin:5% auto; max-width:80%; max-height:80%; }
.lightbox-content img { width:100%; height:auto; max-height:70vh; object-fit:contain; border-radius:5px; }
.lightbox-caption { text-align:center; color:#fff; padding:20px; font-size:1.2rem; }
.close { position:absolute; top:-40px; right:0; color:#fff; font-size:40px; font-weight:bold; cursor:pointer; }
.close:hover { opacity:.7; }

.logo { height: 100%;}

/* Footer */
footer { background:#333; color:#fff; text-align:center; padding:40px 20px; margin-top:60px; }

/* Responsive */
@media (max-width: 768px) {
  .hero { flex-direction:column; text-align:center; }
  .hero-content h2 { font-size:2rem; }
  .nav-menu { gap:15px; }
  .gallery { grid-template-columns:repeat(auto-fit, minmax(250px,1fr)); gap:20px; }
  .checkout-form { width:95%; padding:20px; }
}
@media (max-width: 480px) {
  .nav-container { padding:0 15px; }
  .logo { font-size:1.4rem; }
  .nav-menu { gap:10px; }
  .nav-menu a { font-size:.9rem; }
  .hero-content h2 { font-size:1.5rem; }
  .filter-btn { padding:8px 15px; margin:5px; font-size:.9rem; }
}

body {
    padding-bottom: 100px; /* Space for fixed cart */
}

@media (max-width: 768px) {
    body {
        padding-bottom: 120px;
    }
}

/* Fixed Cart at Bottom */
.cart-bottom-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 3px solid var(--text-color);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    z-index: 900;
    transition: all 0.3s ease;
}

.cart-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    user-select: none;
}

.cart-header:hover {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 10px;
    margin: -10px;
}

.cart-header h3 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.3rem;
}

.cart-toggle {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: bold;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.cart-body {
    padding: 20px 0;
    max-height: 40vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.cart-body.collapsed {
    max-height: 0;
    padding: 0;
    opacity: 0;
    transform: translateY(-10px);
    overflow: hidden;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

.social-icons a {
  color: #333;
  font-size: 1.8rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
  color: #4a90e2;
  transform: scale(1.2);
}

a {
  text-decoration: none;
}

.works-section {
  padding: 80px 20px;
  background-color: #f9f7f5; /* Soft watercolor-inspired bg */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  color: #4a4a4a;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.work-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.work-image {
  height: 250px;
  background: linear-gradient(135deg, #a8e6cf, #dcedc1); /* Placeholder watercolor gradient */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #666;
}

.work-content {
  padding: 24px;
}

.work-content h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: #977097;
}

.work-content p {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .works-section { padding: 60px 16px; }
  h2 { font-size: 2rem; margin-bottom: 40px; }
  .works-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 480px) {
  .work-image { height: 200px; }
}
/* GALLERY POPUP - REQUIRED CSS */
.gallery-popup {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: rgba(0,0,0,0.9) !important;
}

.gallery-popup.active {
  display: flex !important;
}

.gallery-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
}

.gallery-container {
  position: relative;
  width: 90%;
  max-width: 1200px;
  height: 80vh;
  margin: auto;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.gallery-track h2 {
  margin: auto;
  color: red;
  font-size: 3em;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  z-index: 10;
}

/* FIXED GALLERY - Horizontal scroll */
.gallery-popup {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 9999; background: rgba(0,0,0,0.9);
}

.gallery-popup.active { display: block; }

.gallery-container {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90%; height: 80vh; max-width: 1200px;
  background: white; border-radius: 15px; overflow: hidden;
}

.gallery-scroller {
  width: 100%; height: 100%;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.gallery-scroller::-webkit-scrollbar { display: none; }

.gallery-track {
  display: flex; height: 100%; width: max-content;
}

.gallery-track img {
  flex: 0 0 100%; /* Each image takes full width */
  width: 100%; height: 100%;
  object-fit: contain;
  scroll-snap-align: center;
}
