/*
Theme Name: Ramah.id
Theme URI: https://ramah.id
Author: Ramah.id
Author URI: https://ramah.id
Description: Tema WooCommerce ringan, mobile-first, fokus UX cepat dan hemat resource VPS.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: ramahid
Tags: e-commerce, woo-commerce, mobile-first, fast
*/

:root{
  --rh-bg:#f3fbf6;
  --rh-card:#ffffff;
  --rh-text:#111827;
  --rh-muted:#6b7280;
  --rh-border:#e5e7eb;
  --rh-green:#16a34a;
  --rh-green-2:#0f7a33;
  --rh-orange:#f97316;
  --rh-radius:16px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  background: var(--rh-bg);
  color: var(--rh-text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}

.rh-container{max-width:1100px;margin:0 auto;padding:0 14px}
@media(min-width:900px){.rh-container{padding:0 18px}}

.rh-topbar{
  position:sticky;top:0;z-index:50;
  background:rgba(243,251,246,.92);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid rgba(229,231,235,.7);
}
.rh-topbar-inner{display:flex;gap:10px;align-items:center;padding:8px 0}
.rh-search{
  flex:1;display:flex;gap:8px;align-items:center;
  background:#fff;border:1px solid var(--rh-border);
  border-radius:999px;padding:10px 12px;
}
.rh-search input{
  border:0;outline:0;background:transparent;flex:1;
  font-size:15px;color:var(--rh-text);
}
.rh-search button{
  border:0;outline:0;
  background:var(--rh-green);
  color:#fff;
  font-weight:700;
  padding:8px 14px;
  border-radius:999px;
}
.rh-search button:active{transform:translateY(1px)}

.rh-section{padding:14px 0}
.rh-section-head{display:flex;align-items:end;justify-content:space-between;margin:10px 0 12px}
.rh-section-title{font-size:20px;margin:0;font-weight:900;letter-spacing:-.02em}
.rh-section-link{font-size:14px;color:var(--rh-green-2);font-weight:700}

.rh-banner{
  border-radius:var(--rh-radius);
  overflow:hidden;
  background:#e8f6ee;
  border:1px solid rgba(229,231,235,.7);
}
.rh-banner img{width:100%;aspect-ratio:16/6;object-fit:cover;max-height:220px}

/* Woo archives (shop, category) */
.woocommerce ul.products{
  margin:0 !important;
  padding:0 !important;
  list-style:none !important;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
@media(min-width:900px){.woocommerce ul.products{grid-template-columns:repeat(4,minmax(0,1fr));}}
.woocommerce ul.products li.product{margin:0 !important;}
.woocommerce ul.products li.product a{display:block;}

@media(max-width:520px){.rh-banner img{aspect-ratio: 16/8}}
.rh-dots{display:flex;gap:6px;justify-content:center;padding:8px 0}
.rh-dot{width:7px;height:7px;border-radius:999px;background:#cbd5e1}
.rh-dot.is-active{background:var(--rh-green)}

.rh-catgrid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:10px;
}
@media(max-width:900px){.rh-catgrid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:520px){.rh-catgrid{grid-template-columns:repeat(4,1fr)}}
.rh-cat{
  background:var(--rh-card);
  border:1px solid rgba(229,231,235,.9);
  border-radius:14px;
  padding:10px 8px;
  text-align:center;
  min-height:74px;
  display:flex;flex-direction:column;justify-content:center;gap:6px;
}
.rh-cat svg{margin:0 auto;opacity:.75}
.rh-cat span{font-weight:800;font-size:12.5px;line-height:1.1}
@media(min-width:900px){
  .rh-catgrid{grid-template-columns:repeat(8,1fr)}
  .rh-cat{min-height:80px}
  .rh-cat span{font-size:13px}
}

.rh-grid{
  display:grid;gap:10px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
@media(min-width:900px){
  .rh-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
}

.rh-card{
  background:var(--rh-card);
  border:1px solid rgba(229,231,235,.9);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 1px 0 rgba(0,0,0,.03);
  position:relative;
}
.rh-thumb{aspect-ratio:1/1;background:#f1f5f9;overflow:hidden}
.rh-thumb img{width:100%;height:100%;object-fit:cover}
.rh-meta{padding:10px 10px 12px}
.rh-title{
  font-weight:900;font-size:14px;line-height:1.15;margin:0 0 6px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  letter-spacing:-.01em;
}
.rh-sub{font-size:12px;color:var(--rh-muted);margin:0 0 8px}
.rh-price{
  display:flex;align-items:baseline;gap:6px;margin:0 0 8px;flex-wrap:wrap
}
.rh-price .now{font-weight:900;color:var(--rh-orange);font-size:15px}
.rh-price .was{font-size:12px;color:#9ca3af;text-decoration:line-through}
.rh-cta{display:flex;justify-content:flex-end}
.rh-btn-plus{
  width:42px;height:42px;border-radius:999px;
  display:grid;place-items:center;
  border:1px solid rgba(22,163,74,.25);
  background:rgba(22,163,74,.10);
  color:var(--rh-green);
  font-weight:900;font-size:20px;
}
.rh-btn-plus:active{transform:translateY(1px)}
.rh-qty{
  display:flex;align-items:center;gap:10px;
  border:1px solid rgba(22,163,74,.35);
  background:#fff;border-radius:999px;padding:8px 10px;
}
.rh-qty button{
  width:34px;height:34px;border-radius:999px;border:0;
  background:rgba(22,163,74,.10);color:var(--rh-green);
  font-weight:900;font-size:18px;
}
.rh-qty .n{min-width:18px;text-align:center;font-weight:900}
.rh-badge{
  position:absolute;left:10px;top:10px;
  background:#ef4444;color:#fff;font-weight:900;
  font-size:12px;padding:4px 8px;border-radius:999px;
}
.rh-toast{
  position:fixed;left:50%;transform:translateX(-50%);
  bottom:88px;z-index:60;
  background:#111827;color:#fff;
  padding:10px 12px;border-radius:999px;
  font-weight:700;font-size:13px;
  opacity:0;pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}
.rh-toast.show{opacity:1;transform:translateX(-50%) translateY(-4px)}

.rh-bottomnav{
  position:fixed;left:0;right:0;bottom:0;z-index:55;
  background:#fff;border-top:1px solid rgba(229,231,235,.9);
  padding-bottom:env(safe-area-inset-bottom);
}
.rh-bottomnav-inner{
  display:flex;justify-content:space-around;align-items:center;
  max-width:1100px;margin:0 auto;
  padding:8px 10px;
}
.rh-navitem{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11.5px;color:#111827}
.rh-navitem svg{width:22px;height:22px}
.rh-navitem.is-active{color:var(--rh-green)}
.rh-cart-badge{
  position:absolute;top:-6px;right:-8px;
  background:var(--rh-green);color:#fff;border-radius:999px;
  font-size:12px;font-weight:900;min-width:20px;height:20px;display:grid;place-items:center;
  padding:0 6px;border:2px solid #fff;
}
.rh-navicon-wrap{position:relative}

.rh-page{padding:12px 0 84px}

.woocommerce ul.products{margin:0;list-style:none;display:grid;gap:10px;padding:0;grid-template-columns:repeat(2,minmax(0,1fr))}
@media(min-width:900px){.woocommerce ul.products{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}}
.woocommerce ul.products li.product{margin:0 !important;width:auto !important;float:none !important}
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link{display:block}
.woocommerce ul.products li.product .button{display:none !important}
.woocommerce div.product div.images{margin-bottom:10px}
.woocommerce div.product .product_title{font-size:22px;font-weight:900;letter-spacing:-.02em}
.woocommerce-Price-amount{font-weight:900}
.rh-stickybar{
  position:fixed;left:0;right:0;bottom:0;z-index:56;
  background:#fff;border-top:1px solid rgba(229,231,235,.9);
  padding:10px 12px calc(10px + env(safe-area-inset-bottom));
}
.rh-stickybar-inner{max-width:1100px;margin:0 auto;display:flex;align-items:center;gap:10px}
.rh-iconbtn{
  width:42px;height:42px;border-radius:14px;border:1px solid rgba(229,231,235,.9);
  background:#fff;display:inline-flex;align-items:center;justify-content:center;
}
.rh-iconbtn:active{transform:translateY(1px)}
.rh-iconbtn.active{border-color:rgba(22,163,74,.35);background:rgba(22,163,74,.08)}
.rh-cartbtn{position:relative;text-decoration:none;color:inherit}
.rh-cartbtn .rh-badge{
  position:absolute;top:-6px;right:-6px;background:var(--rh-green);color:#fff;
  font-size:12px;font-weight:900;line-height:1;padding:4px 6px;border-radius:999px;
}
.rh-stickybar .rh-add{
  background:var(--rh-green);border:0;color:#fff;font-weight:900;
  padding:12px 16px;border-radius:14px;min-width:140px;
}
.rh-stickybar .rh-add.full{width:100%;min-width:0}
.rh-stickybar .rh-add:active{transform:translateY(1px)}

/* Hide Woo default add-to-cart + meta; we use sticky bar */
.single-product form.cart{display:none !important}
.single-product .product_meta{display:none !important}
.single-product .woocommerce-tabs{display:none !important}

/* Sticky bar (v2.2) */
.rh-stickybar-inner{gap:12px;padding:10px 16px;}
.rh-sticky-icon{width:42px;height:42px;border-radius:14px;border:1px solid #E3EDE7;background:#fff;display:inline-flex;align-items:center;justify-content:center;position:relative;flex:0 0 auto;color:var(--rh-text);}
.rh-sticky-icon svg{width:22px;height:22px;}
.rh-fav.is-active svg{fill:#16a34a;stroke:#16a34a;}
.rh-sticky-action{flex:1;display:flex;justify-content:flex-end;}
.rh-sticky-slot{width:100%;display:flex;justify-content:flex-end;align-items:center;gap:10px;}
.rh-sticky-slot .rh-add{width:100%;}
.rh-sticky-slot .rh-qty{margin:0;}

/* Hide bottom nav on product page to avoid stacked fixed bars */
body.single-product .rh-bottomnav{display:none;}
body.single-product .rh-page{padding-bottom:110px;}

/* Sticky cart badge matches bottom nav */
.rh-cartbtn{position:relative;}
.rh-sticky-icon .rh-cart-badge{top:-6px;right:-6px;border:2px solid #F2FAF5;}
