:root{
  --sage:#8a8f6a;
  --cream:#e6dbc6;
  --ink:#6a563f;
  --line:#cbbfa8;
  --sage-dark:#
}

/* GLOBAL */

body{
  margin:0;
  background:var(--cream);
  font-family:"Libre Baskerville", serif;
  color:var(--ink);
  text-align:center;
}

h1,h2,h3{
  font-family:"Cormorant Garamond", serif;
}


/* HEADER */

.top-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:20px 80px;
  background:var(--cream);
}

.header-left,
.header-right{
  display:flex;
  gap:18px;
}

.header-left img,
.header-right img {
  width: 60px;  /* try 34–36px */
}

.top-header img{
  width:28px;
}

.logo img{
  width:600px;
}

/* Account button */
#account-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Cart button */
#cart-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

#cart-panel {
  position: absolute;
  top: 70px;
  right: 20px;
  width: 300px;
  padding: 18px;
  border-radius: 20px;
  background: #f4efe6;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  z-index: 1000;
}

/* Hidden state */
.hidden {
  display: none;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.cart-img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
}

.cart-info {
  flex: 1;
  font-size: 14px;
  line-height: 1.3;
}

.cart-info p {
  margin: 2px 0;
}

.cart-info p:first-child {
  font-weight: 600;
}

#cart-items hr {
  margin: 10px 0;
  border: none;
  border-top: 1px solid rgba(106, 86, 63, 0.2);
}

.cart-info div {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.cart-info button {
  background: #8a8f6a; /* sage */
  color: white;
  border: none;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
}

.cart-info button:hover {
  background: #747a57;
}

/* Cart Footer */
.cart-footer {
  margin-top: 10px;
  text-align: right;
}

#cart-total {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

#checkout-btn {
  width: 100%;
  padding: 10px;
  border-radius: 999px;
  border: none;
  background: #8a8f6a;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

#checkout-btn:hover {
  background: #747a57;
}

/* POPUP */

.cart-popup {
  position: fixed;
  bottom: 30px;
  right: 30px;

  background: #f4efe6; /* cream */
  color: #6a563f; /* ink */

  padding: 12px 18px;
  border-radius: 999px;

  box-shadow: 0 6px 20px rgba(0,0,0,0.15);

  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;

  z-index: 2000;
}

/* SHOW STATE */
.cart-popup.show {
  opacity: 1;
  transform: translateY(0);
}

/* NAV */

.main-nav{
  background:var(--sage);
  padding:14px 0;
}

.main-nav a{
  color:white;
  text-decoration:none;
  margin:0 30px;
  font-size:18px;
  letter-spacing:1px;
}


/* PAGE CONTAINER */

.page{
  max-width:1500px;
  margin:auto;
  min-height:100vh;
  padding-bottom:50px;

  background:
    url("assets/pattern.png") left top repeat-y,
    url("assets/pattern.png") right top repeat-y,
    var(--cream);

  background-size:
    280px auto,
    280px auto;
}


/* IMPACT BANNER */

.impact-banner{
  margin:35px 0;
}

.impact-banner img{
  width:600px;
  max-width:90%;
}


/* HERO */

.hero{
  max-width:1100px;
  margin:auto;
}

.hero-text{
  font-size:26px;
  margin-bottom:35px;
}

.product-layout{
  display:grid;
  grid-template-columns: 360px 360px; /* 👈 equal columns */
  justify-content:center;
  gap:30px;
  max-width:900px;
  margin:60px auto;
  align-items:start;
}

.product-gallery{
  display:flex;
  flex-direction:column;
  align-items:center;
}

/* 👇 LOCK the main image size */
.main-product-image{
  width:360px;
  height:360px;
  object-fit:cover;
  border-radius:16px;
}

/* 👇 THIS WAS BROKEN BEFORE */
.thumbnail-row{
  display:grid; /* ⭐ YOU WERE MISSING THIS */
  grid-template-columns:repeat(4, 80px);
  gap:10px;
  margin-top:12px;
}

/* 👇 LOCK thumbnail size */
.thumb{
  width:80px;
  height:80px;
  object-fit:cover;
  border-radius:10px;
  cursor:pointer;
  opacity:0.6;
  transition:0.2s;
}

.thumb:hover{
  opacity:1;
}

.thumb.active{
  opacity:1;
  outline:2px solid var(--sage);
}

.color-option input{
  display:none;
}

.color-option img{
  width:42px;        /* 👈 smaller */
  height:42px;
  object-fit:cover;
  border-radius:50%;
  border:2px solid transparent;
  cursor:pointer;
  transition:0.2s;
}
/* hover effect */
.color-option img:hover{
  transform:scale(1.08);
}

/* SELECTED STATE */
.color-option input:checked + img{
  border:2px solid var(--sage);
  transform:scale(1.05);
}

.color-options{
  display:flex;
  gap:12px;
  margin:10px 0 20px;
}

.product-info{
  text-align:left;
  width:360px; /* 👈 match image width */
}

.product-info h1{
  margin-bottom:10px;
}

.product-description{
  margin-top:25px;
  line-height:1.6;
}

.product-info h3{
  margin-top:15px;
  margin-bottom:8px;
}

.price{
  font-size:24px;
  margin-bottom:18px;
}

.product-details{
  margin-top:15px;
  line-height:1.6;
  padding:0;
}

.price{
font-size:28px;
margin-bottom:20px;
}

.cart-btn{
  background:var(--sage);
  color:white;
  padding:14px 30px;
  border-radius:30px;
  border:none;
  font-size:16px;
  cursor:pointer;
  margin:15px 0 10px;
  width:260px; /* 👈 fixed width instead of full stretch */
  text-align:center;
}

.favorites-btn{
  background:transparent;
  border:2px solid var(--sage);
  font-size:16px;
  color:var(--sage);
  padding:12px 30px;
  border-radius:30px;
  cursor:pointer;
  width:260px;
}

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

/* SALE IMAGE */

.sale-card{
  margin:25px 0;
}

.sale-card img{
  width:650px;
  max-width:90%;
  border-radius:18px;
}


/* SHOP BUTTON */

.shop-btn{
  display:inline-block;
  background:var(--sage);
  color:white;
  padding:16px 40px;
  border-radius:30px;
  text-decoration:none;
  margin-top:25px;
  font-size:18px;
}


/* COLLECTIONS */

.collections{
  margin-top:80px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 240px); /* fixed card width */
  gap: 18px;
  justify-content: center; /* centers the whole grid */
}
  
.collection-card img {
  width: 100%;
  height: 220px;        /* force same height */
  object-fit: cover;    /* prevents distortion */
  display: block;
}

.collection-card p{
  font-size:22px;
  margin-top:10px;
}

.collection-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.collection{
max-width:1000px;
margin:auto;
text-align:center;
padding:40px 20px;
}

.collection-title{
font-size:32px;
margin-bottom:40px;
}

.product-grid{
display:grid;
grid-template-columns:repeat(3, 220px);
gap: 16px;
justify-content: center; /* centers the whole grid */
}

/* PRODUCT CARD */

.product-card{
text-decoration:none;
color:var(--ink);
display:block;
}

.product-card img{
width:100%;
border-radius:14px;
display:block;
}

.product-card h3{
font-size:16px;
margin-top:12px;
font-weight:normal;
}

/* PRICE BUTTON */

.price{
display:inline-block;
margin-top:8px;
background:var(--sage);
color:white;
padding:6px 18px;
border-radius:20px;
font-size:14px;
}

/* CONTACT FORM */

.contact-form{
  max-width:520px;
  margin:2rem auto;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.contact-form input,
.contact-form textarea{
  width:100%;
  padding:14px 16px;
  border-radius:6px;
  border:1px solid var(--line);
  background:white;
  font-family:"Libre Baskerville", serif;
  font-size:0.95rem;
}

.contact-form textarea{
  min-height:140px;
  resize:vertical;
}

/* placeholder styling */
.contact-form ::placeholder{
  color:#8a8a8a;
  font-family:"Libre Baskerville", serif;
}

/* focus effect */
.contact-form input:focus,
.contact-form textarea:focus{
  outline:none;
  border-color:var(--sage);
  box-shadow:0 0 0 2px rgba(136,138,101,.15);
}

/* button */
.contact-form button{
  margin-top:10px;
  padding:12px;
  border:none;
  border-radius:6px;
  background:var(--sage);
  color:white;
  font-family:"Libre Baskerville", serif;
  letter-spacing:.05em;
  cursor:pointer;
}

.contact-form button:hover{
  background:var(--sage-dark);
}

/* FOOTER */

.footer-links{
  margin-top:90px;
}

.footer-grid{
  display:flex;
  justify-content:center;
  gap:140px;
  margin-top:30px;
}

.footer-grid a{
  display:block;
  color:var(--ink);
  margin:10px 0;
  text-decoration:none;
}


/* SOCIAL */
.social-footer{
  margin-top:50px;
  padding-bottom:40px;
}

.social-grid{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:24px;
  margin-top:20px;
  flex-direction:row; /* 👈 THIS is the key */
}

.social-grid a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.social-grid img{
  width:42px;
  height:42px;
  display:block;
}

.social-footer{
  margin-top:70px;
  padding-bottom:50px;
}

  /* MOBILE FIXES */

/* MOBILE FIXES FOR COLLECTION + PRODUCT PAGES */
@media (max-width: 768px) {

  /* general page width */
  .page{
    width:100%;
    max-width:100%;
    margin:0 auto;
    padding:0 12px 40px;
    box-sizing:border-box;
  }

  /* COLLECTION PAGE */
  .collection{
    width:100%;
    max-width:100%;
    margin:0 auto;
    padding:30px 12px;
    box-sizing:border-box;
  }

  .collection-title{
    font-size:24px;
    margin-bottom:24px;
  }

  .product-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:16px;
  width:100%;
  max-width:340px;
  margin:0 auto;
  }

  .product-card{
    width:100%;
    max-width:340px;
    margin:0 auto;
    text-align:center;
  }

  .product-card img{
    width:100%;
    max-width:100%;
    height:auto;
    display:block;
    margin:0 auto;
    border-radius:14px;
  }

  .product-card h3{
    font-size:16px;
    line-height:1.35;
    margin:12px 0 6px;
  }

  .price{
    display:inline-block;
    margin-top:8px;
    font-size:14px;
    padding:8px 18px;
  }

  /* PRODUCT PAGE */
  .product-layout{
    display:grid;
    grid-template-columns:1fr;   /* stack image + info */
    gap:24px;
    width:100%;
    max-width:340px;             /* keeps everything centered and smaller */
    margin:30px auto;
    justify-content:center;
  }

  .product-gallery{
    width:100%;
    max-width:340px;
    margin:0 auto;
  }

  .main-product-image{
    width:100%;
    max-width:340px;
    height:auto;
    display:block;
    margin:0 auto;
    border-radius:16px;
  }

  .thumbnail-row{
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:8px;
    width:100%;
    max-width:340px;
    margin:12px auto 0;
  }

  .thumb{
    width:100%;
    aspect-ratio:1 / 1;
    height:auto;
    object-fit:cover;
    border-radius:10px;
  }

  .product-info{
    width:100%;
    max-width:340px;
    margin:0 auto;
    text-align:center;
  }

  .product-info h1{
    font-size:24px;
    line-height:1.2;
    margin-bottom:10px;
  }

  .product-info h3{
    margin-top:14px;
    margin-bottom:8px;
  }

  .color-options{
    justify-content:center;
    flex-wrap:wrap;
  }

  .price{
    font-size:16px;
  }

  .cart-btn,
  .favorites-btn{
    width:100%;
    max-width:340px;
    margin-left:auto;
    margin-right:auto;
    display:block;
  }

  .product-description,
  .product-details{
    text-align:left;
    font-size:16px;
    line-height:1.6;
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .top-header {
    padding: 16px 18px;
    gap: 10px;
  }

  .header-left,
  .header-right {
    gap: 10px;
    align-items: center;
  }

  .top-header img {
    width: 22px;
  }

  .logo img {
    width: 260px;
    max-width: 100%;
    height: auto;
  }

  .main-nav {
    padding: 10px;
  }

  .main-nav a {
    display: inline-block;
    margin: 6px 10px;
    font-size: 16px;
  }

  .page {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 0 40px;
    min-height: 100vh;
    background-image: none !important;
    background: var(--cream) !important;
  }

  .impact-banner {
    margin: 24px 0;
  }

  .impact-banner img,
  .sale-card img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .hero {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }

  .hero-text {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 24px;
    padding: 0 6px;
  }

  .shop-btn {
    margin-top: 20px;
    padding: 14px 28px;
    font-size: 16px;
  }

  .collections {
    margin-top: 50px;
  }

  .collection-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    margin-top: 28px;
  }

  .collection-card {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }

  .collection-card img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .collection-card p {
    font-size: 20px;
    margin-top: 10px;
  }

  .contact-form {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 2rem auto;
  }

  .footer-links {
    margin-top: 60px;
  }

  .footer-grid,
  .social-grid {
    flex-direction: row;
    align-items: center;
    gap: 28px;
  }

  .social-footer {
    margin-top: 50px;
    padding-bottom: 40px;
  }

  .social-grid img {
    width: 42px;
  }
}
