/* NH Mart Shop - styles (scoped under .nhm-root) */
.nhm-root{--primary: #0D9488; /* Hijau Tosca khas Nurul Hayat */             --primary-dark: #0F766E;              --primary-light: #CCFBF1;              --text-main: #111827;             --text-muted: #6b7280;             --bg-body: #f8fafc;             --bg-card: #ffffff;             --border: #e2e8f0;             --danger: #ef4444;             --radius-md: 14px;             --radius-lg: 20px;             --shadow-sm: 0 2px 4px 0 rgba(13, 148, 136, 0.05);             --shadow-md: 0 4px 12px rgba(13, 148, 136, 0.08);             --shadow-lg: 0 10px 25px rgba(13, 148, 136, 0.15);}
.nhm-root,.nhm-root *{box-sizing:border-box}
.nhm-root *{margin:0;padding:0;font-family:'Inter',sans-serif;-webkit-tap-highlight-color:transparent}
.nhm-root{font-family:'Inter',sans-serif;color:var(--text-main);line-height:1.5;text-align:left}
body.nhm-body{margin:0;background:#f8fafc}
.nhm-root button,.nhm-root input,.nhm-root textarea{font-family:inherit}
.nhm-root a{text-decoration:none}
.nhm-root img{max-width:100%;border:0}
.nhm-root .nhm-app{
            max-width: 480px; margin: 0 auto; background: var(--bg-body); min-height: 100vh;
            position: relative; padding-bottom: 90px; box-shadow: var(--shadow-lg);
        }
.nhm-root header{
            position: sticky; top: 0; z-index: 40;
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            padding: 16px; border-bottom: 1px solid rgba(226, 232, 240, 0.5);
            display: flex; flex-direction: column; gap: 14px;
        }
.nhm-root .nhm-header-top{ display: flex; justify-content: space-between; align-items: center; width: 100%; }
.nhm-root .nhm-header-logo-container{ display: flex; align-items: center; }
.nhm-root .nhm-header-logo{ height: 38px; object-fit: contain; }
.nhm-root .nhm-logo-fallback{ font-size: 1.2rem; font-weight: 800; color: var(--primary-dark); letter-spacing: -0.5px; }
.nhm-root .nhm-admin-contact-btn{
            display: flex; align-items: center; gap: 6px;
            background: var(--primary-light); color: var(--primary-dark);
            padding: 8px 14px; border-radius: 30px; font-size: 0.82rem; font-weight: 700;
            text-decoration: none; border: 1px solid rgba(13, 148, 136, 0.2);
            transition: all 0.2s ease;
        }
.nhm-root .nhm-admin-contact-btn:active{ background: #99f6e4; transform: scale(0.96); }
.nhm-root .nhm-admin-contact-btn svg{ width: 16px; height: 16px; }
.nhm-root .nhm-search-container{ position: relative; width: 100%; }
.nhm-root .nhm-search-icon{ position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: #9ca3af; }
.nhm-root .nhm-search-box{
            width: 100%; padding: 12px 14px 12px 42px; border: 1px solid var(--border);
            border-radius: 30px; font-size: 0.9rem; outline: none; 
            transition: all 0.3s ease; background: var(--bg-card); box-shadow: var(--shadow-sm);
        }
.nhm-root .nhm-search-box:focus{ border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15); }
.nhm-root .nhm-hero{
            margin: 16px; padding: 20px; background: linear-gradient(135deg, var(--primary) 0%, #14B8A6 100%);
            border-radius: var(--radius-lg); text-align: left; color: white;
            box-shadow: 0 6px 16px rgba(13, 148, 136, 0.25); position: relative; overflow: hidden;
        }
.nhm-root .nhm-hero::after{
            content: ''; position: absolute; right: -25px; bottom: -25px; width: 110px; height: 110px; 
            background: rgba(255,255,255,0.12); border-radius: 50%;
        }
.nhm-root .nhm-hero h2{ font-size: 1.15rem; margin-bottom: 6px; font-weight: 700; position: relative; z-index: 1; }
.nhm-root .nhm-hero p{ font-size: 0.85rem; opacity: 0.92; position: relative; z-index: 1; line-height: 1.4; }
.nhm-root .nhm-categories{
            display: flex; gap: 10px; padding: 0 16px 16px 16px;
            overflow-x: auto; scrollbar-width: none; white-space: nowrap;
        }
.nhm-root .nhm-categories::-webkit-scrollbar{ display: none; }
.nhm-root .nhm-chip{
            padding: 8px 18px; background: var(--bg-card); border: 1px solid var(--border);
            border-radius: 30px; font-size: 0.85rem; font-weight: 600; cursor: pointer; 
            transition: all 0.25s ease; color: var(--text-muted); box-shadow: var(--shadow-sm);
        }
.nhm-root .nhm-chip.nhm-active{ background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25); }
.nhm-root .nhm-product-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0 16px 24px 16px; }
.nhm-root .nhm-product-card{
            background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid rgba(0,0,0,0.03);
            overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s;
            cursor: pointer; position: relative; box-shadow: var(--shadow-md);
        }
.nhm-root .nhm-product-card:active{ transform: scale(0.97); }
/* OPTIMASI GAMBAR: Memiliki efek transisi perlahan (fade in) */
        .nhm-root .nhm-img-wrapper{ width: 100%; height: 150px; background: #f1f5f9; position: relative; overflow: hidden; }
.nhm-root .nhm-product-img{ width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease-in-out; }
.nhm-root .nhm-product-img.nhm-loaded{ opacity: 1; }
.nhm-root .nhm-product-info{ padding: 12px; display: flex; flex-direction: column; flex-grow: 1; }
.nhm-root .nhm-product-name{ font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; color: var(--text-main); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.nhm-root .nhm-product-price{ font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.nhm-root .nhm-stock-badge{ position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.68); backdrop-filter: blur(4px); color: white; font-size: 0.7rem; font-weight: 600; padding: 4px 8px; border-radius: 8px; z-index: 2;}
.nhm-root .nhm-out-of-stock{ filter: grayscale(1); opacity: 0.72; pointer-events: none; }
.nhm-root .nhm-btn{
            width: 100%; padding: 10px; border: none; border-radius: 30px; font-weight: 700;
            font-size: 0.9rem; cursor: pointer; transition: all 0.2s ease; text-align: center;
        }
.nhm-root .nhm-btn-primary{ background: var(--primary-light); color: var(--primary-dark); box-shadow: none; border: 1px solid rgba(13, 148, 136, 0.1); }
.nhm-root .nhm-btn-primary:active{ background: #99f6e4; transform: scale(0.96); }
.nhm-root .nhm-btn-solid{ background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25); }
.nhm-root .nhm-btn-solid:active{ transform: scale(0.98); box-shadow: none; }
.nhm-root .nhm-btn-solid:disabled{ background: #9ca3af; box-shadow: none; cursor: not-allowed; transform: none; }
.nhm-root .nhm-qty-controls{ display: flex; align-items: center; justify-content: space-between; background: var(--primary-light); border-radius: 30px; overflow: hidden; border: 1px solid rgba(13, 148, 136, 0.15); }
.nhm-root .nhm-qty-btn{ background: transparent; border: none; padding: 10px 14px; font-weight: bold; color: var(--primary-dark); font-size: 1.1rem; cursor: pointer; transition: background 0.2s; }
.nhm-root .nhm-qty-btn:active{ background: rgba(13, 148, 136, 0.1); }
.nhm-root .nhm-qty-value{ font-weight: 700; font-size: 0.9rem; color: var(--primary-dark); }
.nhm-root .nhm-sticky-cart{
            position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
            width: calc(100% - 32px); max-width: 448px; background: var(--primary-dark); color: white;
            padding: 14px 18px; border-radius: 100px; display: flex; justify-content: space-between;
            align-items: center; box-shadow: 0 10px 25px rgba(15, 118, 110, 0.4); z-index: 50;
            cursor: pointer; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
.nhm-root .nhm-sticky-cart.nhm-hidden{ transform: translate(-50%, 150%); }
.nhm-root .nhm-cart-left{ display: flex; align-items: center; gap: 12px; }
.nhm-root .nhm-cart-icon-wrapper{ background: rgba(255,255,255,0.2); padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.nhm-root .nhm-cart-info{ display: flex; flex-direction: column; }
.nhm-root .nhm-cart-items{ font-size: 0.75rem; color: var(--primary-light); font-weight: 500; }
.nhm-root .nhm-cart-total{ font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.nhm-root .nhm-cart-cta{ font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 6px; background: white; color: var(--primary-dark); padding: 8px 16px; border-radius: 30px; transition: transform 0.2s; }
.nhm-root .nhm-modal-overlay{
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(17, 24, 39, 0.6); backdrop-filter: blur(3px); z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.3s;
        }
.nhm-root .nhm-modal-overlay.nhm-active{ opacity: 1; pointer-events: auto; }
.nhm-root .nhm-modal-content{
            position: fixed; bottom: 0; left: 50%; transform: translate(-50%, 100%);
            width: 100%; max-width: 480px; background: var(--bg-card);
            border-radius: 24px 24px 0 0; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
            z-index: 101; max-height: 90vh; overflow-y: auto; padding-bottom: 24px; box-shadow: var(--shadow-lg);
        }
.nhm-root .nhm-modal-content.nhm-active{ transform: translate(-50%, 0); }
.nhm-root .nhm-drag-indicator{ width: 40px; height: 5px; background: #cbd5e1; border-radius: 10px; margin: 12px auto 4px auto; }
.nhm-root .nhm-modal-header{ padding: 12px 20px 16px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); z-index: 2; }
.nhm-root .nhm-modal-title{ font-weight: 700; font-size: 1.15rem; color: var(--text-main); }
.nhm-root .nhm-close-btn{ background: #f1f5f9; border: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: background 0.2s; }
.nhm-root .nhm-pd-img{ width: 100%; height: 280px; object-fit: cover; background: #f1f5f9; }
.nhm-root .nhm-pd-body{ padding: 20px; }
.nhm-root .nhm-pd-price{ font-size: 1.4rem; font-weight: 800; color: var(--primary); margin: 8px 0; }
.nhm-root .nhm-pd-desc{ font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; white-space: pre-wrap; line-height: 1.6; }
.nhm-root .nhm-cart-item-row{ display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.nhm-root .nhm-cart-item-img{ width: 70px; height: 70px; border-radius: 12px; object-fit: cover; background: #f1f5f9; border: 1px solid rgba(0,0,0,0.05); }
.nhm-root .nhm-cart-item-info{ flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.nhm-root .nhm-cart-item-title{ font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; color: var(--text-main); }
.nhm-root .nhm-cart-item-price{ color: var(--primary); font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; }
.nhm-root .nhm-form-group{ padding: 12px 20px; }
.nhm-root .nhm-form-label{ display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: #4b5563; }
.nhm-root .nhm-form-input{ width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 0.95rem; background: var(--bg-body); transition: border 0.2s; }
.nhm-root .nhm-form-input:focus{ border-color: var(--primary); outline: none; background: var(--bg-card); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15); }
.nhm-root .nhm-radio-group{ display: flex; gap: 12px; margin-bottom: 8px; }
.nhm-root .nhm-radio-label{ display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); flex: 1; transition: all 0.2s; }
.nhm-root .nhm-radio-label:has(input:checked){ border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.nhm-root .nhm-radio-label input{ accent-color: var(--primary); transform: scale(1.2); }
.nhm-root .nhm-summary-box{ background: var(--bg-body); padding: 16px 20px; margin: 16px 20px; border-radius: var(--radius-lg); border: 1px dashed #cbd5e1; }
.nhm-root .nhm-summary-row{ display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }
.nhm-root .nhm-summary-total{ display: flex; justify-content: space-between; font-weight: 800; font-size: 1.2rem; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--text-main); }
.nhm-root .nhm-checkout-footer{ padding: 16px 20px; position: sticky; bottom: 0; background: var(--bg-card); border-top: 1px solid var(--border); z-index: 10; box-shadow: 0 -4px 10px rgba(0,0,0,0.03); }
.nhm-root .nhm-loader{ border: 3px solid rgba(255,255,255,0.3); border-top: 3px solid white; border-radius: 50%; width: 20px; height: 20px; animation: nhm-spin 1s linear infinite; margin: 0 auto; }
@keyframes nhm-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
.nhm-root .nhm-skeleton{ background: #e2e8f0; animation: nhm-pulse 1.5s infinite ease-in-out; border-radius: var(--radius-lg); }
@keyframes nhm-pulse{0%{opacity:.6}50%{opacity:1}100%{opacity:.6}}
.nhm-root .nhm-empty-state{ padding: 60px 20px; text-align: center; color: var(--text-muted); }
.nhm-root .nhm-empty-state h3{ color: var(--text-main); margin-bottom: 8px; font-weight: 700; font-size: 1.2rem; }
.nhm-root .nhm-success-icon{ font-size: 5rem; margin-bottom: 20px; }
.nhm-root .nhm-order-badge{ background: var(--primary-light); color: var(--primary-dark); padding: 10px 20px; border-radius: 30px; font-weight: 800; font-size: 1.1rem; display: inline-block; margin: 20px 0; border: 2px dashed rgba(13, 148, 136, 0.4); }
.nhm-root .nhm-toast{ position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-20px); background: rgba(17, 24, 39, 0.9); backdrop-filter: blur(4px); color: white; padding: 12px 24px; border-radius: 30px; font-size: 0.9rem; font-weight: 600; z-index: 1000; opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: var(--shadow-md); }
.nhm-root .nhm-toast.nhm-show{ opacity: 1; transform: translateX(-50%) translateY(0); }
/* --- Tambahan plugin --- */
.nhm-root button{appearance:none;-webkit-appearance:none;text-transform:none;letter-spacing:normal;min-height:0;min-width:0;box-shadow:none;margin:0}
.nhm-root .nhm-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0;overflow:hidden}
.nhm-root .nhm-product-card,.nhm-root .nhm-chip,.nhm-root .nhm-btn,.nhm-root .nhm-sticky-cart{user-select:none;-webkit-user-select:none}
.nhm-root .nhm-form-input{display:block}
.nhm-root textarea.nhm-form-input{resize:vertical}
.nhm-root .nhm-sold-out{text-align:center;color:#94a3b8;font-size:.85rem;font-weight:700;padding:10px 0;background:#f1f5f9;border-radius:30px}
.nhm-root .nhm-success{display:none;position:fixed;top:0;left:0;right:0;bottom:0;z-index:200;background:var(--bg-card);overflow-y:auto;-webkit-overflow-scrolling:touch}
.nhm-root .nhm-success.nhm-active{display:block}
.nhm-root .nhm-success-inner{max-width:480px;margin:0 auto;text-align:center;padding:60px 20px}
.nhm-root .nhm-success-box{background:var(--bg-body);padding:20px;border-radius:var(--radius-lg);text-align:left;margin-bottom:30px;border:1px solid var(--border)}
.nhm-root .nhm-success-box p{font-size:.95rem;line-height:1.6;color:var(--text-main)}
.nhm-root .nhm-success-title{font-weight:800;color:var(--text-main);font-size:1.5rem}
.nhm-root .nhm-btn+.nhm-btn{margin-top:10px}
.nhm-root .nhm-btn-ghost{background:transparent;color:var(--primary-dark);border:1px solid rgba(13,148,136,.3)}
.nhm-root .nhm-btn-ghost:active{background:var(--primary-light)}
.nhm-root .nhm-pd-badge{position:relative;display:inline-block;margin-bottom:12px;background:var(--primary-light);color:var(--primary-dark);padding:6px 12px;border-radius:20px;font-size:.85rem;font-weight:600}
.nhm-root .nhm-pd-badge.nhm-out{background:#fee2e2;color:var(--danger)}
.nhm-root .nhm-pd-name{font-size:1.25rem;font-weight:800;color:var(--text-main);line-height:1.3}
.nhm-root .nhm-form-hint{font-size:.78rem;color:var(--text-muted);margin-top:6px}
.nhm-root .nhm-modal-content.nhm-tall{display:flex;flex-direction:column}
.nhm-root .nhm-scroll{flex-grow:1;overflow-y:auto;-webkit-overflow-scrolling:touch}
.nhm-root .nhm-checking{display:inline-block;width:34px;height:34px;border:4px solid var(--primary-light);border-top-color:var(--primary);border-radius:50%;animation:nhm-spin 1s linear infinite;margin:10px auto 20px}
@media (prefers-reduced-motion:reduce){.nhm-root *{animation-duration:.01ms!important;transition-duration:.01ms!important}}
.nhm-root .nhm-toast{white-space:nowrap;width:max-content;max-width:92vw;overflow:hidden;text-overflow:ellipsis}
