/* ======================================================
   TIINA BUTIIK – CLEAN PRODUCT LAYOUT (FINAL CLEAN)
====================================================== */

:root{
  --bg:#efe6dc;
  --ink:#2e2222;
  --accent:#4b2e2e;
  --muted:#7a6a6a;
  --line:#e2d8cf;
}

/* ================= RESET ================= */

*{box-sizing:border-box;}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:Georgia,serif;
  line-height:1.7;
}

/* ================= MAIN ================= */

main{
  margin:30px auto 80px;
  position:relative;
}

/* WATERMARK */

main::before,
main::after{
  content:"Tiina Butiik";
  position:fixed;
  top:50%;
  transform:translateY(-50%) rotate(-90deg);
  font-size:90px;
  letter-spacing:6px;
  color:rgba(75,46,46,.04);
  pointer-events:none;
  z-index:0;
}

main::before{ left:20px; }

main::after{
  right:20px;
  transform:translateY(-50%) rotate(90deg);
}

/* ================= PRODUCT CONTAINER ================= */

#productSection{ position:relative; z-index:1; }

.product-box{
  width:100%;
  max-width:860px;
  margin:0 auto;
}


/* ================= PRODUCT TOP LAYOUT ================= */

.product-layout{
  display:grid;
  grid-template-columns:420px 1fr;
  gap:40px;
  align-items:start;
}

#productImages{
  display:grid;
  grid-template-columns:repeat(4,220px);
  gap:18px;
  justify-content:center;
}

/* ---- PILT ---- */

#prodImg{
  width:100%;
  max-width:420px;   /* ↓ teeb pildi väiksemaks */
  height:auto;
  border-radius:16px;
  display:block;
}

/* ---- TEKST ---- */

.product-info{
  min-width:0;
  width:100%;
  max-width:none;

  font-size:18px;
  line-height:1.8;

  text-align:justify;
  hyphens:auto;
}

.product-info p{
  margin:0 0 16px;
}

.product-info strong{
  font-size:19px;
}

/* ---- PEALKIRI ---- */

#prodName{
  text-align:center;
  margin:0 0 50px;
}

/* ---- MOBILE ---- */

@media (max-width:900px){
  .product-layout{
    grid-template-columns:1fr;
    gap:28px;
  }
}
/* ================= BUTTON ================= */

.btn-primary{
  margin-top:30px;
  padding:14px 30px;
  background:var(--accent);
  color:#fff;
  border:none;
  border-radius:8px;
  cursor:pointer;
  font-family:Georgia,serif;
  font-size:15px;
}

.btn-primary:hover{ opacity:.85; }

/* ================= PRODUCT ACTIONS ================= */

.product-actions{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  margin:40px auto 30px;
  text-align:center;
}


#blogPostBtn{ order:2; }
#backLink{ order:3; }

.product-actions a,
.product-actions a:visited,
.product-actions a:hover,
.product-actions a:active{
  font-weight:normal;
  text-decoration:none;
  color:inherit;
  opacity:.75;
}

.product-actions a:hover{ opacity:1; }

/* BACK LINK */

.back-bottom{
  background:none;
  color:var(--muted);
  padding:0;
  text-decoration:none;
  font-weight:600;
  cursor:pointer;
}

.back-bottom:hover{
  color:var(--accent);
  text-decoration:underline;
}
#backLink{
  cursor:pointer;
  opacity:.75;
}

#backLink:hover{
  opacity:1;
}
/* ================= GALLERY ================= */

.gallery{
  grid-column:1 / -1;
  width:100%;
  margin:70px auto 10px;

  display:grid;
  grid-template-columns:repeat(4,180px);
  justify-content:center;

  gap:18px;
  text-align:center;
}

.gallery img,
.gallery video{
  width:100%;
  height:auto;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:12px;
}

/* ================= PRODUCT BOTTOM ================= */

.product-bottom{
  width:100%;
  margin-top:60px;
}

.product-bottom-inner{
  max-width:1100px;
  margin:0 auto;
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:40px;
  align-items:start;
}

.product-main{ min-width:0; }

.product-side{
  position:sticky;
  top:120px;
  display:flex;
  flex-direction:column;
  gap:20px;
}

.info-box{
  padding:20px;
  border:1px solid #e5e5e5;
  background:#fff;
}
/* ---- product notes full width ---- */

.product-note{
  width:100%;
  margin:50px 0;
  padding:0 20px;

  font-size:16px;
  line-height:1.9;
  letter-spacing:.2px;
}
/* ================= SEARCH GRID ================= */

.items-grid{
  max-width:1100px;
  margin:40px auto;
  display:grid;
  grid-template-columns:repeat(4,170px);
  justify-content:center;
  gap:22px;
}

.item-card{
  background:none;
  padding:0;
  border-radius:0;
  text-align:center;
  box-shadow:none;
  transition:transform .25s ease, box-shadow .25s ease;
}

.item-card:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 26px rgba(0,0,0,.1);
}

.item-card img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:12px;
  margin-bottom:6px;
  display:block;
}

.item-card h3{
  font-size:15px;
  margin:6px 0 2px;
  color:var(--accent);
}

.item-card .price{
  font-size:13px;
  font-weight:600;
  color:var(--ink);
}

/* ================= REVIEWS + RELATED ================= */

#reviewsSection,
#relatedProductsSection{
  max-width:1100px;
  margin:40px auto 0;
  padding:30px 20px 0;
  border-top:1px solid var(--line);
}

/* ================= HEADER ================= */

header nav ul{
  list-style:none;
  display:flex;
  justify-content:center;
  gap:28px;
  margin:15px 0 5px;
  padding:0;
}

header nav ul li a{
  font-size:1.05rem;
  font-weight:600;
  color:var(--accent);
  text-decoration:none;
}

header nav ul li a:visited{ color:var(--accent); }
header nav ul li a:hover{ text-decoration:underline; }
header nav ul li a:focus{ outline:none; }

/* ================= HEADER SEARCH ================= */

.header-search{
  max-width:1100px;
  margin:6px auto 0;
  display:flex;
  justify-content:flex-end;
}

.header-search form{
  display:flex;
  gap:6px;
  align-items:center;
}

.header-search input{
  padding:8px 12px;
  border:1px solid #ccc;
  border-radius:20px;
  width:150px;
  font-size:14px;
}

.header-search button{
  background:#4b2e2e;
  color:#fff;
  border:none;
  border-radius:50%;
  width:34px;
  height:34px;
  cursor:pointer;
  font-size:16px;
}

/* ================= MINI CART ================= */

#miniCartBox{
  position:fixed;
  right:24px;
  bottom:90px;   /* oli 24px */
  width:260px;
  z-index:9999;
  box-shadow:0 8px 24px rgba(0,0,0,.15);
}

/* MOBILE CART */

.mobile-cart{ display:none; }

@media(max-width:768px){
  .mobile-cart{ display:flex; }
}


/* ================= SHOP LAYOUT ================= */

.shop-layout{
  max-width:1200px;
  margin:0 auto;
  padding:20px 0 40px;
}

/* ================= SEARCH PAGE ================= */

.search-main{
  max-width:1100px;
  margin:40px auto 80px;
  padding:0 20px;
}

.search-container{ text-align:center; }

.search-page main::before,
.search-page main::after,
.search-page .hero,
.search-page header img,
.search-page .header-hero{
  display:none !important;
}

.search-page header{ padding:10px 0; }

.search-page main{ margin-top:10px; }

.search-page .items-grid{
  grid-template-columns:repeat(auto-fit,minmax(240px,240px));
  justify-content:center;
}

.search-page #quoteBlock{
  max-width:1100px;
  margin:10px auto 20px;
  padding:0 20px;
  text-align:center;
}

/* ================= RESPONSIVE ================= */

@media(max-width:1100px){

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

  .gallery{
    grid-template-columns:repeat(2,1fr);
  }

  main::before,
  main::after{
    display:none;
  }
}

@media(max-width:900px){

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

  .product-side{
    position:static;
  }
}
/* ===== TOOTE LISAPLOKID ===== */

.product-extra{
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

.product-extra h2{
  font-size: 28px;
  margin-bottom: 18px;
}

.product-extra ul{
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-extra li{
  margin: 10px 0;
  font-size: 18px;
}

.product-extra a{
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.product-extra a:hover{
  border-bottom: 1px solid currentColor;
}

/* arvustused */
.review-item{
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5ddd6;
}

.review-header{
  font-weight: 600;
  margin-bottom: 6px;
}

.review-stars{
  margin-bottom: 8px;
  letter-spacing: 2px;
}
/* ======================================================
   CATEGORY PAGE – FINAL CLEAN VERSION
====================================================== */



/* tsitaat */
.category-page #quoteBlock{
  text-align:center;
  margin:20px 0 10px;
}

/* GRID (päris element on .grid) */
.category-page #categoryList .grid,
.category-page #subContent .grid{
  width:100%;
  max-width:1400px;
  margin:40px auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,240px));
  justify-content:center;
  gap:40px; /* kaartide vahe */
}

/* kaart */
.category-page #categoryList .item,
.category-page #subContent .item{
  background:transparent;
  padding:0;
  border-radius:0;
  text-align:center;
}

.category-page #categoryList .item:hover,
.category-page #subContent .item:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 26px rgba(0,0,0,.1);
}

.category-page #categoryList .item img,
.category-page #subContent .item img{
  width:100%;
  max-width:320px;
  height:220px;        /* fikseeritud kõrgus */
  object-fit:cover;
  border-radius:12px;
  margin:0 auto 10px;
  display:block;
}

.category-page #categoryList .item h3,
.category-page #subContent .item h3{
  display:block;
  width:100%;
  text-align:center;
}

.category-page #categoryList .item a,
.category-page #subContent .item a{
  display:flex;
  flex-direction:column;
  align-items:center;
  width:100%;
}

/* ================= CATEGORY TITLE CENTER ================= */

.category-page h1{
  width:100%;
  text-align:center;
  margin:40px auto 30px;
}

/* === NEWSLETTER FLOAT ANIMATION === */

#newsletterFloat{
  position:fixed;
  left:20px;      /* kolib vasakule */
  bottom:20px;
  right:auto;

  transform:translateY(120%);
  opacity:0;
  transition:transform .6s ease, opacity .6s ease;
  z-index:9997;
}

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

/* peida hind alamkategooria gridis */
.category-page #subContent .price{
  display:none;
}
.category-page #categoryList .price{
  display:none !important;
}
/* === TOOTEKAARDI HOVER (ka alamkat ja tootelehed) === */

.grid .item{
  transition:transform .25s ease, box-shadow .25s ease;
}

.grid .item:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 26px rgba(0,0,0,.1);
}
/* === TOOTELEHE PILTIDE HOVER === */

#prodImg,
.gallery img,
.gallery video{
  transition:transform .25s ease, box-shadow .25s ease;
  cursor:pointer;
}

#prodImg:hover,
.gallery img:hover,
.gallery video:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 26px rgba(0,0,0,.12);
}
.maimu-up{
  position:fixed;
  right:20px;
  bottom:20px;
  background:#4b2e2e;
  color:#fff;
  padding:10px 14px;
  border-radius:30px;
  font-size:14px;
  cursor:pointer;
  opacity:0;
  transition:opacity .3s ease;
  z-index:9998;   /* oli 9999 */
}

.maimu-up:hover{
  background:#2e2222;
}
#productImages{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  justify-content:center;
}

#productImages .gallery-img{
  width:180px;
  height:auto;
  aspect-ratio:1/1;
  object-fit:cover;
}

#productImages video.gallery-img{
  width:220px;
  height:220px;
}
#blogPostBtn{
  display:inline-block;
  margin-top:10px;
  padding:8px 14px;

  background:#f3ebe3;
  border-radius:8px;

  font-weight:600;
  color:#4b2e2e;
  text-decoration:none;
}

#blogPostBtn:hover{
  background:#eaded2;
}
.video-thumb{
  position:relative;
}

.video-thumb::after{
  content:"VIDEO";
  position:absolute;
  bottom:8px;
  left:8px;
  background:rgba(0,0,0,.75);
  color:#fff;
  font-size:11px;
  font-weight:700;
  padding:3px 7px;
  border-radius:4px;
  letter-spacing:.5px;
}
#giftGrid{
  max-width:1200px;
  margin:0 auto;
}
#giftGrid .item img{
  width:100%;
  max-width:320px;
  height:220px;
  object-fit:cover;
  border-radius:12px;
  display:block;
  margin:0 auto 10px;
}
#groupVariants{
  margin:18px 0 10px;
}

.variant-item{
  display:flex;
  align-items:center;
  gap:10px;
  margin:8px 0;
  text-decoration:none;
  color:#4b2e2e;
}

.variant-item img{
  width:46px;
  height:46px;
  object-fit:cover;
  border-radius:6px;
}
/* ======================================================
   MOBILE HEADER FIX
====================================================== */

#hamburger{
  display:none;
}

.cart-icon{
  display:none;
}

@media (max-width:768px){

  header{
    position:relative;
  }

  /* hamburger nähtav */
  #hamburger{
    display:block;
    position:absolute;
    left:14px;
    top:14px;
    font-size:26px;
    cursor:pointer;
    z-index:20000;
  }

  /* desktop menüü peitu */
  header nav ul{
    display:none;
  }

  /* hamburger avab menüü */
  header nav ul.open{
  display:flex;
  flex-direction:column;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100vh;
  background:rgba(239,230,220,0.92);
backdrop-filter:blur(4px);
  padding-top:80px;
  gap:16px;
  z-index:99999;
}

  /* otsing keskele */
  .header-search{
    justify-content:center;
    margin-top:8px;
  }

  .header-search input{
    width:120px;
  }

  /* minicart peitu */
  #miniCartBox{
    display:none !important;
  }

  /* ostukorv paremal */
  .cart-icon{
    display:block;
    position:absolute;
    right:14px;
    top:14px;
    font-size:22px;
    cursor:pointer;
  }

  /* natuke ruumi headerile */
  header nav{
    margin-top:20px;
  }

}
/* ================= NEWSLETTER MOBILE ================= */

@media (max-width:768px){

#newsletterFloat{
width:220px !important;
right:12px !important;
bottom:12px !important;
padding:12px 10px !important;
}

#newsletterFloat h3{
font-size:16px;
}

#newsletterFloat p{
font-size:13px;
}

#newsletterFloat a{
font-size:13px;
padding:6px 12px !important;
}

}
/* === TEISED VARIANDID === */

#groupVariants{
  margin-top:20px;
}

.variant-item{
  display:flex;
  align-items:center;
  gap:10px;
  margin:8px 0;
  padding:10px 12px;
  border:1px solid #e8ddd3;
  border-radius:8px;
  background:#f6f1ea;
  text-decoration:none;
  color:#4b2e2e;
}

#groupVariants a:hover{
  background:#efe6db;
}

#groupVariants img{
  width:45px;
  height:45px;
  object-fit:cover;
  border-radius:6px;
}
/* ===== MOBILE PRODUCT TEXT FIX ===== */

@media (max-width:768px){

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

.product-box{
  max-width:100%;
  padding:0 16px;
}

.product-info{
  width:100%;
  max-width:100%;
  text-align:left;
}

#boxInfo{
  width:100%;
  max-width:100%;
}

}
html, body{
overflow-x:hidden;
}
#miniCartBox{
  display:block;
}