/* Packverse catalogue-inspired system: editorial, tactile, and deliberately restrained. */
:root {
  --primary: #159fd3;
  --primary-dark: #08789f;
  --primary-light: #dff4fc;
  --gold: #a86436;
  --gold-dark: #84451f;
  --gold-light: #ecd8c6;
  --accent: #af3f40;
  --accent-hover: #8d2d30;
  --background: #fffdf9;
  --surface: #ffffff;
  --section-bg: #f6f0e9;
  --heading: #171311;
  --text-primary: #2c2926;
  --text-secondary: #68615b;
  --text-muted: #8b837c;
  --border: #e5dbd0;
  --border-light: #f1e9e1;
  --font-display: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 14px; --radius-xl: 18px;
  --shadow-sm: 0 8px 24px rgba(54,37,24,.06);
  --shadow-md: 0 18px 42px rgba(54,37,24,.10);
  --shadow-primary: 0 12px 28px rgba(21,159,211,.22);
}
body { background: var(--background); letter-spacing: -.01em; }
.display-font, h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.045em;
}
h1 { line-height: .98; }
h2 { line-height: 1.06; }
p { color: var(--text-secondary); line-height: 1.7; }
.section { padding: clamp(4.5rem, 8vw, 7rem) 0; }
.container { max-width: 1240px; }
.section-label { color: var(--accent); border-color: rgba(175,63,64,.24); font-size: .68rem; letter-spacing: .14em; }
.divider { width: 38px; height: 2px; background: var(--accent); }
.btn {
  border-radius: 4px;
  letter-spacing: 0;
  text-transform: none;
  padding: .85rem 1.35rem;
  font-size: .86rem;
  font-weight: 600;
}
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 10px 22px rgba(175,63,64,.2); }
.btn-outline { color: var(--heading); border-color: var(--heading); }
.btn-outline:hover { background: var(--heading); border-color: var(--heading); }

/* Header */
.site-header { background: #FAFAFA; backdrop-filter: blur(14px); box-shadow: none; }
.site-header.scrolled { box-shadow: 0 1px 0 var(--border); }
.header-inner { height: 78px; }
.main-nav { gap: .35rem; }
.nav-link { color: var(--heading); font-size: .86rem; font-weight: 500; letter-spacing: 0; text-transform: none; padding: .55rem .7rem; }
.nav-link:hover, .nav-link.active { color: var(--accent); background: transparent; }
.nav-link::after { background: var(--accent); height: 1px; }
.logo--image { width: 218px; height: 62px; }
.brand-logo-frame { background: #FAFAFA; }
.brand-logo-frame img { width: 305px; transform: translate(-43px,-66px); }

/* Hero */
.hero { min-height: min(780px, 88vh); background: #241b16; }
.hero-overlay { background: linear-gradient(90deg, rgba(26,19,14,.91), rgba(26,19,14,.59) 55%, rgba(26,19,14,.25)); }
.hero-pattern { background-image: linear-gradient(90deg, rgba(175,63,64,.45), transparent 32%); opacity: .6; }
.hero-inner { grid-template-columns: minmax(0,680px); }
.hero-title { font-size: clamp(3rem,6vw,5.4rem); letter-spacing: -.07em; font-weight: 600; }
.hero-title-line { display: block; }
/* Scoped font choice for the home hero text; remove to restore the display/body font pairing. */
.hero-title--rice, .hero-title--rice + .hero-desc { font-family: 'DM Sans', sans-serif; }
.hero-title--rice .hero-title-line:nth-child(-n + 2) { font-weight: 700; }
.hero-title--rice .hero-title-line:nth-child(3) { color: var(--white); font-size: clamp(1rem, 3.5vw, 2.1rem); font-weight: 700; letter-spacing: .025em; margin-top: .7em; white-space: nowrap; }
.hero-desc { font-size: clamp(1rem,1.5vw,1.16rem); font-weight: 400; }
.hero-title--rice + .hero-desc { font-weight: 700; }
.hero-title-accent, .hero-badge { color: #f1d1b6; }
.hero-badge { background: transparent; border-color: rgba(255,255,255,.25); }
.hero-desc { max-width: 570px; }

/* Cards and content */
.about-values, .products-section, .category-carousel-section { background: var(--background); }
.value-card, .service-card, .product-card, .team-card, .contact-form-wrap { border: 1px solid var(--border); box-shadow: none; border-radius: var(--radius-md); }
.value-card:hover, .service-card:hover, .product-card:hover, .team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfb199; }
.value-card { background: var(--surface); text-align: left; padding: 2rem; }
.value-icon { font-size: 2rem; }
.product-card { background: var(--surface); }
.product-img-wrap { background: #faf6f1; border-bottom: 1px solid var(--border-light); }
.product-badge { background: var(--accent); border-radius: 3px; }
.product-category-tag, .product-stock.in-stock { color: #4f8530; }
.product-name, .value-title, .service-title { font-weight: 600; letter-spacing: -.025em; }
.product-desc, .value-desc, .service-desc { line-height: 1.55; }
.prod-tab { background: transparent; border-radius: 3px; }
.prod-tab:hover, .prod-tab--active { background: var(--heading); border-color: var(--heading); }
.site-footer { background: #241b16; }
.page-hero, .cta-section { background: linear-gradient(120deg,#8d2d30,#af3f40); }
.cta-section-pattern { opacity: .35; }
.category-card-img { background: #f6f0e9; border-radius: 8px; }
.category-card:hover .category-card-img { background: #ecd8c6; border-color: var(--gold); }
.category-carousel-wrap { overflow: hidden; }
.category-track {
  width: 100%;
  max-width: 100%;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.category-track-set { display: flex; flex: 0 0 auto; gap: 1.25rem; }
.carousel-arrow { display: none; }
@media (prefers-reduced-motion: reduce) {
  .category-track { scroll-behavior: smooth; }
}

/* Homepage Rice Husk innovation story. */
.packverse-usp { position: relative; overflow: hidden; padding: clamp(4rem, 7vw, 6.5rem) 0; background: var(--surface); }
.packverse-usp::before { content: ''; position: absolute; width: 38rem; height: 38rem; border-radius: 50%; right: -23rem; top: 0; background: radial-gradient(circle, rgba(203,151,95,.16), transparent 68%); pointer-events: none; }
.rice-story { position: relative; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-areas: 'copy visual' 'reimagine visual' 'benefits benefits'; column-gap: clamp(2rem, 7vw, 8rem); row-gap: clamp(1.75rem, 3vw, 3rem); align-items: center; }
.rice-story-copy { grid-area: copy; }
.rice-story-hook { margin: 1rem 0 0; color: var(--heading); font-family: var(--font-display); font-size: clamp(3.7rem, 6.8vw, 7rem); font-weight: 600; letter-spacing: -.08em; line-height: .88; }
.rice-story-reimagine { grid-area: reimagine; }
.rice-story-pause { width: 38px; height: 1px; margin: 0 0 1.35rem; background: var(--accent); }
.rice-story h2 { margin: 0; max-width: 620px; color: var(--heading); font-size: clamp(3.7rem, 6.8vw, 7rem); font-weight: 600; letter-spacing: -.08em; line-height: .88; }
.rice-story h2 span { color: var(--accent); }
.rice-story-intro { max-width: 420px; margin: 1.25rem 0 0; font-size: 1rem; }
.rice-story-visual { grid-area: visual; position: relative; min-height: 460px; isolation: isolate; }
.rice-story-main-image { position: absolute; inset: 0 0 0 16%; margin: 0; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.rice-story-main-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform var(--dur-slow) var(--ease); }
.rice-story-main-image:hover img { transform: scale(1.025); }
.rice-story-support-image { position: absolute; z-index: 2; left: 0; bottom: 8%; width: 36%; aspect-ratio: 1 / 1.08; margin: 0; overflow: hidden; border: 5px solid var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.rice-story-support-image img { width: 100%; height: 100%; object-fit: cover; }
.rice-story-material { position: absolute; z-index: 3; top: 7%; left: 0; display: grid; gap: .14rem; min-width: 138px; padding: .85rem 1rem; border: 1px solid rgba(100,72,40,.14); border-radius: 9px; background: rgba(250,248,244,.91); color: var(--heading); box-shadow: 0 12px 30px rgba(58,38,21,.1); backdrop-filter: blur(8px); font-size: .78rem; font-weight: 700; }
.rice-story-material small { color: var(--text-secondary); font-size: .61rem; font-weight: 500; }
.rice-story-material-grain { width: 24px; height: 12px; margin-bottom: .2rem; background: radial-gradient(ellipse at 20% 50%, #bc8b57 0 17%, transparent 19%), radial-gradient(ellipse at 48% 30%, #d4aa79 0 17%, transparent 19%), radial-gradient(ellipse at 78% 55%, #aa7547 0 17%, transparent 19%), radial-gradient(ellipse at 48% 78%, #c89560 0 17%, transparent 19%); }
.rice-story-flow { position: absolute; z-index: 3; right: 1rem; bottom: 1rem; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; padding: .7rem .8rem; border: 1px solid rgba(255,255,255,.42); border-radius: 8px; background: rgba(36,27,22,.8); color: #fff; backdrop-filter: blur(8px); font-size: .69rem; font-weight: 700; letter-spacing: .015em; }
.rice-story-flow i { width: 18px; height: 1px; background: #f1d1b6; }
.rice-story-benefits { grid-area: benefits; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 4vw, 4rem); margin: 0; padding: 1.6rem 0 0; list-style: none; border-top: 1px solid var(--border-light); }
.rice-story-benefits li { display: flex; align-items: flex-start; gap: .8rem; }
.rice-story-benefits > li > span { color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .1em; }
.rice-story-benefits h3 { margin: 0 0 .35rem; font-size: 1.15rem; }
.rice-story-benefits p { margin: 0; font-size: .87rem; line-height: 1.55; }

/* Product detail and footer */
.product-main-image, .product-thumb-item, .product-meta-row { background: #faf6f1; }
.product-detail-title, .product-price-main, .size-selector-label { color: var(--heading); }
.size-pill.active, .size-pill:hover { background: var(--accent); border-color: var(--accent); }
.site-footer { border-top: 4px solid var(--accent); }
.footer-col h4 { font-weight: 600; letter-spacing: -.01em; }
.footer-links a:hover, .footer-bottom-links a:hover { color: #f1d1b6; }

@media (max-width: 900px) {
  .header-inner { height: 68px; padding: 0 1rem; justify-content: flex-end; position: relative; }
  .site-header .logo--image { width: 172px; height: 52px; position: absolute; left: 1rem; transform: none; }
  .site-header .logo--image .brand-logo-frame img { width: 278px; transform: translate(-44px,-59px); }
  .mobile-toggle { width: 46px; height: 46px; background: var(--surface); border-color: var(--border); border-radius: 50%; box-shadow: var(--shadow-sm); z-index: 1; }
  .mobile-toggle:hover { background: #f8eee7; border-color: #d4a68b; }
  .toggle-bar { width: 19px; background: var(--heading); }
  .mobile-nav-overlay { background: rgba(23,19,17,.46); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
  .mobile-nav { width: min(360px, 92vw); overflow-x: hidden; background: var(--background); box-shadow: -18px 0 54px rgba(23,19,17,.2); transition: transform .42s cubic-bezier(.22,1,.36,1); }
  .mobile-nav-header { min-height: 72px; padding: .75rem 1rem; background: #FAFAFA; border-bottom: 1px solid var(--border); }
  .mobile-nav-header .logo--image { width: 154px; height: 42px; position: relative; left: auto; transform: none; }
  .mobile-nav-header .logo--image .brand-logo-frame img { width: 250px; transform: translate(-40px,-53px); }
  .mobile-nav-close { width: 42px; height: 42px; border-radius: 50%; background: #f8eee7; border-color: transparent; color: var(--heading); }
  .mobile-nav-links { flex: 0; padding: .4rem .85rem; gap: .15rem; }
  .mobile-nav .nav-link { min-height: 46px; padding: .65rem .8rem; border: 0; border-radius: 7px; color: var(--heading); font-size: .9rem; font-weight: 600; text-transform: none; letter-spacing: -.01em; }
  .mobile-nav .nav-link::before { width: 5px; height: 5px; background: #d8c8bb; }
  .mobile-nav .nav-link:hover, .mobile-nav .nav-link.active { padding-left: 1rem; color: var(--accent); background: #f8eee7; }
  .mobile-nav .nav-link.active::before, .mobile-nav .nav-link:hover::before { background: var(--accent); transform: scale(1.25); }
  .mobile-nav-footer { margin-top: auto; padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom,0px)); background: #FAFAFA; border-top: 1px solid var(--border); }
  .mobile-nav-footer .btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-nav, .mobile-nav-overlay, .mobile-toggle, .toggle-bar { transition: none; }
}
@media (max-width: 768px) {
  /* The home hero remains content-led on mobile instead of reserving a viewport-height panel. */
  .hero { min-height: auto; }
  .hero-content { padding: 108px 0 52px; }
  .rice-story { grid-template-columns: 1fr; grid-template-areas: 'copy' 'visual' 'reimagine' 'benefits'; row-gap: 1.75rem; }
  .rice-story-visual { min-height: 400px; max-width: 620px; width: 100%; }
  .rice-story-benefits { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 480px) {
  body { padding-top: 68px; }
  html, body { width: 100%; max-width: 100%; overflow-x: clip; }
  .site-header, .header-inner, main, section, .container { max-width: 100%; }
  .container { width: 100%; }
  /* Decorative translated elements are contained; interactive horizontal
     scrollers retain their own overflow behavior. */
  .hero, .page-hero, .cta-section, .site-footer { overflow-x: clip; }
  .hero-float-card, .gallery-deco { max-width: calc(100vw - 2rem); }
  .header-inner { height: 64px; }
  .site-header .logo--image { width: 192px; height: 52px; left: 1rem; }
  .site-header .logo--image .brand-logo-frame img { width: 260px; transform: translate(-36px,-55px); }
  .hero { margin-top: -68px; min-height: auto; }
  .hero-content { padding: 104px 0 44px; }
  .hero-title { font-size: 2.8rem; }
  .hero-title--rice { font-size: clamp(2.1rem, 9vw, 2.55rem); line-height: 1.08; letter-spacing: -.055em; }
  .products-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
  .product-img-wrap { height: 118px; padding: .3rem; }
  .product-badge { top: .4rem; left: .4rem; padding: .12rem .32rem; font-size: .45rem; line-height: 1.1; letter-spacing: .03em; border-radius: 2px; }
  .product-badge-detail { padding: .14rem .34rem; font-size: .48rem; line-height: 1.1; }
  .product-category-tag { font-size: .45rem; letter-spacing: .035em; }
  .product-info { padding: .8rem; }
  .product-name { font-size: .84rem; }
  .product-desc { font-size: .72rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product-meta { font-size: .64rem; flex-wrap: wrap; gap: .25rem; }
  .about-values.section { padding: 2.75rem 0; }
  .about-values .text-center { margin-bottom: 1.5rem !important; }
  .about-values .text-center p { display: none; }
  .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: 1.25rem; }
  .value-card { padding: 1rem; min-height: 0; }
  .value-icon { font-size: 1.45rem; margin-bottom: .55rem; }
  .value-title { font-size: .92rem; }
  .value-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .72rem; line-height: 1.45; }
  .packverse-usp.section { padding-top: 2.75rem; padding-bottom: 2.75rem; }
  .packverse-usp::before { width: 22rem; height: 22rem; right: -13rem; top: 7rem; }
  .rice-story { gap: 1.35rem; }
  .rice-story-hook { font-size: clamp(3.2rem, 16vw, 4.45rem); letter-spacing: -.08em; line-height: .88; }
  .rice-story h2 { font-size: clamp(3.15rem, 14.5vw, 4.1rem); letter-spacing: -.08em; line-height: .88; }
  .rice-story-pause { margin: 0 0 1rem; }
  .rice-story-intro { max-width: 285px; margin-top: 1rem; font-size: .9rem; }
  .rice-story-visual { min-height: 320px; }
  .rice-story-main-image { left: 12%; }
  .rice-story-support-image { bottom: 7%; width: 39%; border-width: 4px; }
  .rice-story-material { top: 5%; min-width: 126px; padding: .7rem .8rem; font-size: .72rem; }
  .rice-story-flow { right: .65rem; bottom: .65rem; gap: .3rem; padding: .55rem .6rem; font-size: .56rem; }
  .rice-story-flow i { width: 11px; }
  .rice-story-benefits { width: 100%; grid-template-columns: 1fr; gap: .9rem; padding-top: 1.25rem; }
  .rice-story-benefits li { gap: .65rem; }
  .rice-story-benefits h3 { margin-bottom: .2rem; font-size: 1rem; }
  .rice-story-benefits p { font-size: .78rem; line-height: 1.45; }
}

/* Off-canvas drawers previously cast their dark shadows into the viewport
   while closed, appearing as a strip along the mobile right edge. */
@media (max-width: 900px) {
  .mobile-nav:not(.open), #cart-drawer:not(.open) { box-shadow: none; }
}

/* Catalogue popup: visual-only enhancement of the existing modal and actions. */
#catalogue-modal { padding: clamp(.75rem, 3vw, 2rem) !important; background: rgba(23,19,17,.18); animation: modalFade .24s ease-out; }
#catalogue-modal > div:nth-child(2) {
  max-width: 880px !important;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px !important;
  box-shadow: 0 28px 80px rgba(23,19,17,.34) !important;
  animation: catalogueRise .42s cubic-bezier(.22,1,.36,1) !important;
}
#catalogue-modal > div:nth-child(2) > div:first-child {
  background: #241b16 !important;
  padding: 1.2rem 1.5rem !important;
}
#catalogue-modal > div:nth-child(2) > div:first-child > div > div:first-child { color: #e6b8a0 !important; }
#catalogue-modal > div:nth-child(2) > div:first-child > div > div:nth-child(2) { font-family: var(--font-display) !important; font-size: 1.25rem !important; letter-spacing: -.03em; }
#catalogue-modal .catalogue-pdf-viewer { height: min(70vh, 650px); background: #f6f0e9; }
#catalogue-modal .catalogue-pdf-frame { display: block; width: 100%; height: 100%; border: 0; background: #f6f0e9; }
#catalogue-modal .catalogue-mobile-open { display: none; }
#catalogue-modal > div:nth-child(2) > div:last-child { background: var(--surface); padding: 1rem 1.5rem !important; }
#catalogue-modal > div:nth-child(2) > div:last-child .btn { min-height: 44px; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes catalogueRise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 560px) {
  #catalogue-modal > div:nth-child(2) { max-height: calc(100dvh - 1.5rem); border-radius: 10px !important; }
  #catalogue-modal > div:nth-child(2) > div:first-child { padding: 1rem 1.1rem !important; }
  #catalogue-modal > div:nth-child(2) > div:first-child > div > div:nth-child(2) { font-size: 1.05rem !important; }
  #catalogue-modal .catalogue-pdf-viewer { height: auto !important; min-height: 0; padding: 1.25rem 1rem; }
  #catalogue-modal .catalogue-pdf-frame { display: none; }
  #catalogue-modal .catalogue-mobile-open { min-height: 154px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; text-align: center; color: var(--text-muted); }
  #catalogue-modal .catalogue-mobile-open span { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 8px; background: #ede5dc; color: var(--heading); font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
  #catalogue-modal .catalogue-mobile-open p { max-width: 250px; margin: 0; font-size: .82rem; line-height: 1.45; }
  #catalogue-modal .catalogue-mobile-open .btn { width: min(100%, 260px); min-height: 44px; font-size: .82rem !important; }
  #catalogue-modal > div:nth-child(2) > div:last-child { padding: .85rem 1rem !important; }
  #catalogue-modal > div:nth-child(2) > div:last-child .btn { flex: 1; justify-content: center; padding: .7rem .6rem; font-size: .76rem !important; }
}
