/* Terra Home — demonstration store: cart, product detail and shared UI
   All product names and prices are placeholders. */

/* ---------- header cart link ---------- */
.cart-link{display:inline-flex;align-items:center;gap:9px}
.cart-count{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:22px;height:22px;padding:0 6px;border-radius:999px;
  background:#FFFFFF;color:#B4552D;
  font-family:'Space Grotesk',system-ui,sans-serif;
  font-size:12px;font-weight:700;line-height:1;
  transition:transform .25s ease,background .25s ease;
}
.cart-count.is-empty{background:rgba(255,255,255,.28);color:#FFFFFF}
.cart-count.bump{transform:scale(1.28)}

/* ---------- placeholder markers ---------- */
.ph-tag{
  display:inline-block;font-size:10.5px;font-weight:600;letter-spacing:.1em;
  text-transform:uppercase;color:#B4552D;background:#FAF6F1;
  border:1px dashed #D9C4B4;border-radius:999px;padding:3px 9px;
  vertical-align:middle;margin-left:8px;white-space:nowrap;
}
.notice{
  display:flex;gap:12px;align-items:flex-start;
  background:#FAF6F1;border:1px dashed #D9C4B4;border-radius:12px;
  padding:16px 18px;font-size:13.6px;color:#7A6A60;margin:0 0 30px;
}
.notice b{color:#2A211C;font-weight:600}
.notice svg{flex:0 0 auto;margin-top:2px}

/* ---------- breadcrumb ---------- */
.crumbs{font-size:13px;color:#7A6A60;padding:22px 0 0;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.crumbs a{transition:color .25s}
.crumbs a:hover{color:#B4552D}
.crumbs span.sep{opacity:.45}
.crumbs span.now{color:#2A211C;font-weight:500}

/* ---------- product detail ---------- */
.product{display:grid;grid-template-columns:1fr 1fr;gap:clamp(32px,5vw,64px);align-items:start}
.product-media{
  border-radius:14px;overflow:hidden;background:#FAF6F1;
  border:1px solid #EDE3D9;position:relative;
}
.product-media img{width:100%;aspect-ratio:1/1;object-fit:cover;transition:transform .8s ease}
.product-media:hover img{transform:scale(1.04)}
.product-media .ph-tag{position:absolute;top:16px;left:16px;margin:0;background:#FFFFFF}
.product-cat{font-size:12px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:#B4552D;margin:0 0 14px}
.product h1{font-size:clamp(1.7rem,3.2vw,2.5rem);margin-bottom:.35em}
.product-price{
  font-family:'Space Grotesk',system-ui,sans-serif;
  font-size:clamp(1.5rem,2.6vw,2rem);font-weight:700;color:#2A211C;
  letter-spacing:-.02em;margin:0 0 6px;display:flex;align-items:center;flex-wrap:wrap;gap:4px;
}
.product-price small{font-size:13px;font-weight:500;color:#7A6A60;letter-spacing:0;font-family:Inter,system-ui,sans-serif}
.product-desc{color:#7A6A60;font-size:15.4px;margin:20px 0 26px;max-width:52ch}
.product-buy{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-bottom:26px}
.product-meta{list-style:none;padding:22px 0 0;margin:0;border-top:1px solid #EDE3D9;display:grid;gap:12px}
.product-meta li{display:flex;justify-content:space-between;gap:20px;font-size:14px}
.product-meta b{font-weight:600;color:#2A211C}
.product-meta span{color:#7A6A60;text-align:right}

/* ---------- quantity stepper ---------- */
.qty{display:inline-flex;align-items:center;border:1px solid #EDE3D9;border-radius:999px;background:#FFFFFF;overflow:hidden}
.qty-btn{
  width:42px;height:46px;border:0;background:transparent;cursor:pointer;
  font-size:19px;line-height:1;color:#2A211C;font-family:inherit;
  display:flex;align-items:center;justify-content:center;
  transition:background .2s,color .2s;
}
.qty-btn:hover{background:#FAF6F1;color:#B4552D}
.qty-btn:active{background:#F2E9E0}
.qty-input{
  width:46px;height:46px;border:0;text-align:center;font-family:inherit;
  font-size:15px;font-weight:600;color:#2A211C;background:transparent;
  -moz-appearance:textfield;appearance:textfield;
}
.qty-input::-webkit-outer-spin-button,.qty-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.qty-input:focus{outline:none;background:#FAF6F1}

/* ---------- add to cart feedback ---------- */
.add-note{font-size:13.5px;font-weight:600;color:#B4552D;margin:0;min-height:20px}
.toast{
  position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);
  background:#2A211C;color:#FFFFFF;font-size:14px;font-weight:500;
  padding:14px 22px;border-radius:999px;z-index:200;
  box-shadow:0 18px 40px -16px rgba(0,0,0,.5);
  opacity:0;pointer-events:none;transition:opacity .3s ease,transform .3s ease;
  max-width:calc(100vw - 40px);text-align:center;
}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ---------- cart page ---------- */
.cart-layout{display:grid;grid-template-columns:1.55fr 1fr;gap:clamp(28px,4vw,52px);align-items:start}
.cart-list{display:grid;gap:0;border-top:1px solid #EDE3D9}
.cart-row{
  display:grid;grid-template-columns:88px 1fr auto auto auto;
  gap:20px;align-items:center;
  padding:22px 0;border-bottom:1px solid #EDE3D9;
}
.cart-thumb{display:block;border-radius:10px;overflow:hidden;background:#FAF6F1;border:1px solid #EDE3D9}
.cart-thumb img{width:88px;height:88px;object-fit:cover;transition:transform .5s ease}
.cart-thumb:hover img{transform:scale(1.06)}
.cart-name{display:block;font-family:'Space Grotesk',system-ui,sans-serif;font-size:15.5px;font-weight:600;line-height:1.35;margin-bottom:5px;transition:color .25s}
.cart-name:hover{color:#B4552D}
.cart-unit{font-size:13px;color:#7A6A60}
.cart-line{font-family:'Space Grotesk',system-ui,sans-serif;font-size:15.5px;font-weight:600;white-space:nowrap;min-width:88px;text-align:right}
.cart-remove{
  border:0;background:transparent;cursor:pointer;font-family:inherit;
  font-size:12.5px;font-weight:600;color:#7A6A60;padding:8px 4px;
  border-bottom:1px solid transparent;transition:color .25s,border-color .25s;
}
.cart-remove:hover{color:#B4552D;border-bottom-color:#B4552D}

.cart-summary{
  background:#FAF6F1;border:1px solid #EDE3D9;border-radius:14px;
  padding:30px 28px;position:sticky;top:100px;
}
.cart-summary h3{font-size:1.05rem;margin-bottom:20px}
.sum-row{display:flex;justify-content:space-between;gap:16px;font-size:14.5px;padding:11px 0;color:#7A6A60}
.sum-row b{color:#2A211C;font-weight:600}
.sum-total{
  border-top:1px solid #E3D5C8;margin-top:10px;padding-top:18px;
  font-size:16px;color:#2A211C;font-weight:600;
}
.sum-total b{font-family:'Space Grotesk',system-ui,sans-serif;font-size:1.35rem;letter-spacing:-.02em}
.cart-summary .btn{width:100%;justify-content:center;margin-top:12px}
.cart-summary .form-note{margin:18px 0 0;font-size:12.5px}

.cart-empty{
  text-align:center;padding:clamp(48px,7vw,80px) 24px;
  background:#FAF6F1;border:1px dashed #D9C4B4;border-radius:14px;
}
.cart-empty h2{font-size:clamp(1.4rem,2.6vw,1.9rem);margin-bottom:.4em}
.cart-empty p{color:#7A6A60;max-width:44ch;margin:0 auto 26px}

/* ---------- related products ---------- */
.rel-card{display:block;padding:0;overflow:hidden}
.rel-card img{width:100%;aspect-ratio:4/3;object-fit:cover;transition:transform .7s ease}
.rel-card:hover img{transform:scale(1.05)}
.rel-card .rel-body{padding:22px 24px}
.rel-card h3{font-size:1rem;margin-bottom:.3em}
.rel-card .rel-price{font-family:'Space Grotesk',system-ui,sans-serif;font-size:14.5px;font-weight:600;color:#B4552D;margin:0}

/* ---------- shop grid cards ---------- */
.shop-card{display:block;padding:0;overflow:hidden}
.shop-card img{width:100%;aspect-ratio:4/3;object-fit:cover;transition:transform .7s ease}
.shop-card:hover img{transform:scale(1.05)}
.shop-card .shop-body{padding:22px 24px}
.shop-card h3{font-size:1rem;margin-bottom:.3em;line-height:1.35}
.shop-card .shop-price{font-family:'Space Grotesk',system-ui,sans-serif;font-size:14.5px;font-weight:600;color:#B4552D;margin:0 0 10px}
.shop-card .shop-link{font-size:13px;font-weight:600;color:#2A211C;display:inline-flex;align-items:center;gap:6px;transition:gap .25s,color .25s}
.shop-card:hover .shop-link{gap:11px;color:#B4552D}

/* ---------- responsive ---------- */
@media (max-width:980px){
  .product{grid-template-columns:1fr}
  .cart-layout{grid-template-columns:1fr}
  .cart-summary{position:static}
}
@media (max-width:720px){
  .cart-row{grid-template-columns:72px 1fr;grid-template-areas:"thumb info" "qty line" "rm rm";gap:14px 16px}
  .cart-thumb{grid-area:thumb}
  .cart-thumb img{width:72px;height:72px}
  .cart-info{grid-area:info}
  .cart-row .qty{grid-area:qty;justify-self:start}
  .cart-line{grid-area:line;text-align:right;align-self:center}
  .cart-remove{grid-area:rm;justify-self:start;padding-left:0}
  .product-buy .btn{width:100%;justify-content:center}
  .product-buy .qty{width:100%;justify-content:space-between}
}
