/* =========================================================
   GLOWZY HOUSE — SHOP.CSS
   Clean, responsive styling for shop.html
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root{
  --gh-gold:#b8864b;
  --gh-gold-dark:#986a36;
  --gh-cream:#fffaf5;
  --gh-cream-2:#f7eee7;
  --gh-brown:#34251e;
  --gh-text:#6f5748;
  --gh-muted:#8d7a6d;
  --gh-white:#fff;
  --gh-border:rgba(184,134,75,.20);
  --gh-shadow:0 10px 30px rgba(55,38,27,.08);
  --gh-shadow-hover:0 18px 42px rgba(55,38,27,.14);
}

/* ---------- SHOP HERO ---------- */
.shop-hero{
  position:relative;
  min-height:410px;
  padding:90px 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  overflow:hidden;
  background:
    linear-gradient(rgba(45,31,23,.48),rgba(45,31,23,.48)),
    url("../images/hero.jpg") center/cover no-repeat;
}

.shop-overlay{
  position:relative;
  z-index:2;
  max-width:850px;
  color:#fff;
}

.shop-overlay h1{
  margin:0 0 12px;
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:clamp(48px,7vw,78px);
  line-height:1;
  font-weight:600;
  letter-spacing:.5px;
  text-transform:capitalize;
}

.shop-overlay p{
  margin:0 auto;
  max-width:650px;
  font-size:15px;
  font-weight:300;
  letter-spacing:.3px;
}

.shop-quick-note{
  position:absolute;
  left:50%;
  bottom:24px;
  transform:translateX(-50%);
  z-index:3;
  width:min(92%,700px);
  display:flex;
  justify-content:center;
  gap:9px;
  flex-wrap:wrap;
}

.shop-quick-note span{
  padding:7px 13px;
  border:1px solid rgba(255,255,255,.35);
  border-radius:999px;
  background:rgba(255,255,255,.12);
  color:#fff;
  backdrop-filter:blur(8px);
  font-size:11px;
}

/* ---------- TOOLBAR ---------- */
.shop-toolbar{
  width:min(1250px,90%);
  margin:48px auto 24px;
  display:flex;
  align-items:center;
  gap:15px;
}

.search-box{
  position:relative;
  flex:1;
}

.search-box input{
  width:100%;
  height:50px;
  padding:0 55px 0 17px;
  border:1px solid var(--gh-border);
  border-radius:11px;
  outline:none;
  background:#fff;
  color:var(--gh-brown);
  font-family:Poppins,sans-serif;
  font-size:13px;
  transition:.25s ease;
}

.search-box input:focus{
  border-color:var(--gh-gold);
  box-shadow:0 0 0 3px rgba(184,134,75,.10);
}

.search-box button{
  position:absolute;
  right:5px;
  top:5px;
  width:40px;
  height:40px;
  border:0;
  border-radius:8px;
  background:var(--gh-gold);
  color:#fff;
  transition:.2s ease;
}

.search-box button:hover{
  background:var(--gh-gold-dark);
}

#sortProducts{
  height:50px;
  min-width:200px;
  padding:0 14px;
  border:1px solid var(--gh-border);
  border-radius:11px;
  outline:none;
  background:#fff;
  color:var(--gh-text);
  font-family:Poppins,sans-serif;
  font-size:13px;
  cursor:pointer;
}

/* ---------- CATEGORIES ---------- */
.shop-categories{
  width:min(1250px,90%);
  margin:0 auto 40px;
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}

.shop-categories button{
  padding:10px 19px;
  border:1px solid var(--gh-border);
  border-radius:999px;
  background:#fff;
  color:var(--gh-text);
  font-family:Poppins,sans-serif;
  font-size:12px;
  font-weight:600;
  transition:.22s ease;
}

.shop-categories button:hover{
  border-color:var(--gh-gold);
  color:var(--gh-gold-dark);
  transform:translateY(-1px);
}

.shop-categories button.active{
  background:var(--gh-gold);
  border-color:var(--gh-gold);
  color:#fff;
}

/* ---------- PRODUCTS ---------- */
.products{
  padding:0 5% 70px;
  background:var(--gh-cream);
}

.product-grid{
  width:100%;
  max-width:1250px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:28px;
}

.product-card{
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
  overflow:hidden;
  border:1px solid var(--gh-border);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--gh-shadow);
  transition:transform .28s ease,box-shadow .28s ease,border-color .28s ease;
}

.product-card:hover{
  transform:translateY(-7px);
  border-color:rgba(184,134,75,.38);
  box-shadow:var(--gh-shadow-hover);
}

.product-image{
  position:relative;
  width:100%;
  height:285px;
  overflow:hidden;
  background:var(--gh-cream-2);
}

.product-image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .55s ease;
}

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

.badge{
  position:absolute;
  top:14px;
  left:14px;
  z-index:2;
  padding:7px 12px;
  border-radius:999px;
  background:var(--gh-gold);
  color:#fff;
  font-family:Poppins,sans-serif;
  font-size:10px;
  font-weight:600;
  letter-spacing:.8px;
  text-transform:uppercase;
}

.wishlist{
  position:absolute;
  top:14px;
  right:14px;
  z-index:2;
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(255,255,255,.94);
  color:var(--gh-text);
  box-shadow:0 5px 15px rgba(0,0,0,.08);
  cursor:pointer;
  transition:.22s ease;
}

.wishlist:hover{
  color:var(--gh-gold-dark);
  transform:scale(1.08);
}

.product-info{
  flex:1;
  display:flex;
  flex-direction:column;
  padding:21px 20px 20px;
}

.product-info h3{
  margin:0 0 7px;
  color:var(--gh-brown);
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:26px;
  line-height:1.1;
  font-weight:600;
}

.rating{
  margin:0 0 10px;
  color:var(--gh-gold);
  font-size:12px;
  letter-spacing:.3px;
}

.product-info h4{
  margin:0 0 17px;
  color:var(--gh-gold-dark);
  font-family:Poppins,sans-serif;
  font-size:19px;
  font-weight:700;
}

.product-buttons{
  display:grid;
  grid-template-columns:1fr 52px;
  gap:9px;
  margin-top:auto;
}

.view-btn,
.cart-btn{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  font-family:Poppins,sans-serif;
  font-size:12px;
  font-weight:600;
  transition:.22s ease;
}

.view-btn{
  border:1px solid var(--gh-gold);
  background:#fff;
  color:var(--gh-gold-dark);
  text-decoration:none;
}

.view-btn:hover{
  background:#fff4e8;
}

.cart-btn{
  border:1px solid var(--gh-gold);
  background:var(--gh-gold);
  color:#fff;
}

.cart-btn:hover{
  background:var(--gh-gold-dark);
  border-color:var(--gh-gold-dark);
  transform:translateY(-1px);
}

/* ---------- BOTTOM CUSTOM CTA ---------- */
.shop-bottom-cta{
  padding:75px 20px;
  background:
    linear-gradient(135deg,rgba(255,250,245,.98),rgba(247,238,231,.98));
  text-align:center;
  border-top:1px solid var(--gh-border);
}

.cta-inner{
  width:min(850px,100%);
  margin:auto;
}

.eyebrow{
  display:inline-block;
  margin-bottom:10px;
  color:var(--gh-gold);
  font-family:Poppins,sans-serif;
  font-size:11px;
  font-weight:600;
  letter-spacing:1.6px;
}

.cta-inner h2{
  margin:0 0 12px;
  color:var(--gh-brown);
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:clamp(38px,5vw,58px);
  line-height:1.05;
  font-weight:600;
}

.cta-inner p{
  max-width:650px;
  margin:0 auto 24px;
  color:var(--gh-text);
  font-size:14px;
  line-height:1.7;
}

.cta-button,
.promo-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:13px 23px;
  border-radius:9px;
  background:var(--gh-gold);
  color:#fff;
  font-family:Poppins,sans-serif;
  font-size:12px;
  font-weight:600;
  text-decoration:none;
  transition:.22s ease;
}

.cta-button:hover,
.promo-btn:hover{
  background:var(--gh-gold-dark);
  transform:translateY(-2px);
}

/* ---------- PROMO ---------- */
.shop-promo{
  width:min(1250px,90%);
  margin:0 auto 45px;
  padding:28px 30px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:25px;
  border:1px solid var(--gh-border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--gh-shadow);
}

.shop-promo h2{
  margin:0 0 5px;
  color:var(--gh-brown);
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:32px;
  line-height:1.1;
}

.shop-promo p{
  margin:0;
  max-width:760px;
  color:var(--gh-text);
  font-size:13px;
}

.promo-btn{
  flex-shrink:0;
}

/* ---------- MODAL ---------- */
.product-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(35,24,18,.65);
}

.product-modal.active,
.product-modal.show{
  display:flex;
}

.product-modal .modal-content{
  position:relative;
  width:min(850px,100%);
  max-height:90vh;
  overflow:auto;
  padding:30px;
  border-radius:18px;
  background:#fff;
  box-shadow:0 25px 70px rgba(0,0,0,.25);
}

.close-modal{
  position:absolute;
  top:12px;
  right:17px;
  z-index:2;
  font-size:30px;
  line-height:1;
  color:var(--gh-text);
  cursor:pointer;
}

#modal-img{
  width:100%;
  max-height:350px;
  object-fit:cover;
  border-radius:12px;
}

#modal-title{
  margin-top:18px;
  color:var(--gh-brown);
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:35px;
}

#modal-price{
  color:var(--gh-gold-dark);
}

#modal-desc,
#modal-delivery,
#modal-occasion{
  color:var(--gh-text);
  font-size:13px;
}

#modal-items{
  padding-left:20px;
  color:var(--gh-text);
  font-size:13px;
}

/* ---------- TOAST ---------- */
.toast{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:10000;
  max-width:320px;
  padding:13px 18px;
  border-radius:10px;
  background:var(--gh-brown);
  color:#fff;
  font-family:Poppins,sans-serif;
  font-size:12px;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
  opacity:0;
  transform:translateY(15px);
  pointer-events:none;
  transition:.25s ease;
}

.toast.show{
  opacity:1;
  transform:translateY(0);
}

/* =========================================================
   TABLET
   ========================================================= */
@media (max-width:1024px){
  .product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:22px;
  }

  .product-image{
    height:270px;
  }

  .products{
    padding-left:4%;
    padding-right:4%;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width:680px){
  .shop-hero{
    min-height:350px;
    padding:75px 18px;
  }

  .shop-overlay h1{
    font-size:52px;
  }

  .shop-overlay p{
    font-size:13px;
  }

  .shop-quick-note{
    bottom:15px;
    width:94%;
  }

  .shop-quick-note span{
    font-size:10px;
    padding:6px 10px;
  }

  .shop-toolbar{
    width:calc(100% - 36px);
    margin-top:35px;
    flex-direction:column;
    align-items:stretch;
  }

  #sortProducts{
    width:100%;
  }

  .shop-categories{
    width:calc(100% - 36px);
    justify-content:flex-start;
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:6px;
    scrollbar-width:none;
  }

  .shop-categories::-webkit-scrollbar{
    display:none;
  }

  .shop-categories button{
    flex:0 0 auto;
    white-space:nowrap;
  }

  .products{
    padding:0 18px 50px;
  }

  .product-grid{
    grid-template-columns:1fr;
    gap:19px;
  }

  .product-image{
    height:285px;
  }

  .product-info{
    padding:19px 17px 17px;
  }

  .product-info h3{
    font-size:24px;
  }

  .shop-promo{
    width:calc(100% - 36px);
    margin-bottom:35px;
    padding:22px 19px;
    flex-direction:column;
    align-items:flex-start;
  }

  .shop-promo h2{
    font-size:29px;
  }

  .promo-btn{
    width:100%;
  }

  .shop-bottom-cta{
    padding:58px 18px;
  }

  .cta-inner h2{
    font-size:40px;
  }

  .cta-button{
    width:100%;
  }

  .product-modal .modal-content{
    padding:22px;
  }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */
@media (max-width:390px){
  .shop-overlay h1{
    font-size:44px;
  }

  .product-image{
    height:255px;
  }

  .product-buttons{
    grid-template-columns:1fr;
  }

  .cart-btn{
    min-height:43px;
  }
}

/* ---------- ACCESSIBILITY ---------- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible{
  outline:2px solid var(--gh-gold);
  outline-offset:3px;
}

@media (prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    transition:none !important;
    scroll-behavior:auto !important;
  }
}

/* =========================================================
   FINAL TOAST FIX
   Overrides toast rules from style.css
========================================================= */
.toast,
.toast.show {
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  right: 18px !important;
  bottom: 18px !important;

  width: fit-content !important;
  min-width: 0 !important;
  max-width: 220px !important;

  display: block !important;
  box-sizing: border-box !important;

  padding: 8px 12px !important;
  margin: 0 !important;

  border-radius: 8px !important;
  background: #4b2e24 !important;
  color: #fff !important;

  font-family: "Poppins", sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  text-align: center !important;

  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.14) !important;

  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(8px) !important;
  pointer-events: none !important;

  transition: opacity .2s ease, transform .2s ease, visibility .2s ease !important;
}

.toast.show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

@media (max-width: 600px) {
  .toast,
  .toast.show {
    right: 12px !important;
    bottom: 12px !important;
    max-width: 190px !important;
    padding: 7px 10px !important;
    font-size: 10px !important;
    border-radius: 7px !important;
  }
}
