/***
 Keranad store pages: cart, checkout, auth, account.
 Uses the brand tokens from material.css.
***/
.ks-hero { padding: 48px 0 44px; }
.ks-hero h1 { margin: 0; font-size: 40px; }
.ks-hero p { margin: 8px 0 0; opacity: .85; }
.ks-section { padding: 48px 0 80px; }
.ks-flash-wrap { margin-top: 18px; }
.ks-flash { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; margin-bottom: 8px; font-size: 15px; font-weight: 500; }
.ks-flash--success { background: #e3f4e8; color: #0a4d2a; }
.ks-flash--warning { background: #fff2cc; color: #5c4300; }
.ks-flash--error { background: #fde4e1; color: #7a1c10; }

.cart-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand-yellow); color: #0a3d22; font: 700 11px/18px sans-serif; text-align: center; }
.cart-count[hidden] { display: none; }
.main-header .outer-box .ui-btn { position: relative; }

.ks-card { background: #fff; border-radius: 20px; box-shadow: 0 1px 3px rgba(10, 61, 34, .12), 0 6px 24px rgba(10, 61, 34, .06); padding: 28px; margin-bottom: 24px; }
.ks-card h2, .ks-card h3 { font-size: 22px; margin: 0 0 16px; color: #0a3d22; }
.ks-narrow { max-width: 520px; margin: 0 auto; }
.ks-muted { color: #6b7a70; font-size: 14px; }
.ks-link { color: var(--brand-green); font-weight: 600; }

/* forms */
.ks-field { margin-bottom: 18px; }
.ks-field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: #1d3a2a; }
.ks-field input[type=text], .ks-field input[type=email], .ks-field input[type=tel], .ks-field input[type=password], .ks-field input[type=number], .ks-field select, .ks-field textarea {
  width: 100%; padding: 13px 14px; border: 1.5px solid #cfd8d2; border-radius: 12px; background: #fff; font-size: 16px; color: #1d2b22; transition: border-color .15s, box-shadow .15s; }
.ks-field input:focus, .ks-field select:focus, .ks-field textarea:focus { outline: 0; border-color: var(--brand-green); box-shadow: 0 0 0 3px rgba(10, 107, 58, .15); }
.ks-field .is-invalid, .ks-field input.is-invalid { border-color: #c0392b; }
.ks-error { color: #b3261e; font-size: 13px; margin-top: 5px; }
.ks-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; font-size: 15px; cursor: pointer; }
.ks-check input { margin-top: 4px; accent-color: var(--brand-green); width: 18px; height: 18px; }
.ks-check small { display: block; color: #6b7a70; }
.ks-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border: 0; border-radius: 999px; background: var(--brand-green); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; transition: background .15s, transform .15s; text-decoration: none; }
.ks-btn:hover { background: var(--brand-green-deep); color: #fff; }
.ks-btn:active { transform: scale(.98); }
.ks-btn--block { width: 100%; }
.ks-btn--ghost { background: #eef3ef; color: var(--brand-green); }
.ks-btn--ghost:hover { background: #dfe9e2; color: var(--brand-green-deep); }
.ks-btn--danger { background: #b3261e; }
.ks-btn--danger:hover { background: #8a1c16; }
.ks-btn--sm { padding: 8px 16px; font-size: 14px; }
.ks-btn[disabled] { opacity: .6; cursor: not-allowed; }
.ks-row { display: flex; gap: 16px; flex-wrap: wrap; }
.ks-row > * { flex: 1 1 200px; }
.ks-split { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* verification */
.ks-verify { display: grid; gap: 20px; }
.ks-step { display: flex; gap: 14px; align-items: flex-start; }
.ks-step__icon { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff0c2; color: #8a6420; font-size: 18px; }
.ks-step.is-done .ks-step__icon { background: #e3f4e8; color: var(--brand-green); }
.ks-step h3 { margin: 0 0 4px; font-size: 18px; }
.ks-otp { letter-spacing: .5em; text-align: center; font-size: 26px !important; font-weight: 700; }
.ks-dev { background: #fff6dd; border: 1px dashed #d9a400; border-radius: 12px; padding: 10px 14px; font-size: 13px; color: #5c4300; }

/* cart & checkout */
.ks-cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.ks-line { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid #eef1ee; }
.ks-line:last-child { border-bottom: 0; }
.ks-line img { width: 84px; height: 84px; object-fit: contain; border-radius: 14px; background: #f6f8f3; padding: 6px; }
.ks-line h4 { margin: 0 0 4px; font-size: 17px; }
.ks-line h4 a { color: #0a3d22; }
.ks-qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.ks-qty input { width: 64px; padding: 6px 8px; border: 1.5px solid #cfd8d2; border-radius: 10px; text-align: center; }
.ks-qty button { background: none; border: 0; color: var(--brand-green); font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 6px; }
.ks-qty button.is-danger { color: #b3261e; }
.ks-price { font-weight: 700; color: #0a3d22; font-size: 17px; white-space: nowrap; }
.ks-totals { list-style: none; padding: 0; margin: 0 0 18px; }
.ks-totals li { display: flex; justify-content: space-between; padding: 8px 0; color: #3a4a40; }
.ks-totals li.is-total { border-top: 1.5px solid #e1e8e3; margin-top: 8px; padding-top: 14px; font-size: 20px; font-weight: 800; color: #0a3d22; }
.ks-sticky { position: sticky; top: 100px; }
.ks-empty { text-align: center; padding: 56px 20px; }
.ks-empty i { font-size: 48px; color: #b9c9be; margin-bottom: 14px; }
.ks-pay-option { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1.5px solid #cfd8d2; border-radius: 14px; margin-bottom: 10px; cursor: pointer; }
.ks-pay-option:has(input:checked) { border-color: var(--brand-green); background: #f1f8f3; }
.ks-pay-option input { accent-color: var(--brand-green); width: 18px; height: 18px; }

/* product page */
.ks-product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; }
.ks-product__media { border-radius: 28px; padding: 36px; text-align: center; background: var(--kp, #0a6b3a); }
.ks-product__media img { max-height: 440px; width: auto; max-width: 100%; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .25)); }
.ks-product h1 { font-size: 38px; margin: 0 0 8px; color: #0a3d22; }
.ks-product .ks-price-big { font-size: 32px; font-weight: 800; color: var(--brand-green); margin: 12px 0; }
.ks-product .ks-price-big s { font-size: 18px; color: #8a968e; font-weight: 500; margin-left: 8px; }
.ks-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #fff0c2; color: #5c4300; }

/* account */
.ks-account { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.ks-nav { list-style: none; margin: 0; padding: 10px; background: #fff; border-radius: 20px; box-shadow: 0 1px 3px rgba(10, 61, 34, .12); }
.ks-nav a, .ks-nav button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: #1d3a2a; font-weight: 600; background: none; border: 0; text-align: left; cursor: pointer; font-size: 15px; }
.ks-nav a:hover, .ks-nav button:hover { background: #f1f8f3; }
.ks-nav a.is-active { background: var(--brand-green); color: #fff; }
.ks-nav .ks-count { margin-left: auto; background: var(--brand-yellow); color: #0a3d22; border-radius: 999px; font-size: 12px; padding: 1px 8px; }
.ks-table { width: 100%; border-collapse: collapse; }
.ks-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #6b7a70; padding: 8px 10px; }
.ks-table td { padding: 12px 10px; border-top: 1px solid #eef1ee; vertical-align: middle; }
.ks-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef1ee; color: #3a4a40; }
.ks-status--processing, .ks-status--shipped { background: #e1effb; color: #124a7a; }
.ks-status--delivered, .ks-status--paid { background: #e3f4e8; color: #0a4d2a; }
.ks-status--pending { background: #fff2cc; color: #5c4300; }
.ks-status--cancelled, .ks-status--failed, .ks-status--refunded { background: #fde4e1; color: #7a1c10; }
.ks-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid #dfe9e2; }
.ks-timeline li { position: relative; padding: 0 0 16px 16px; }
.ks-timeline li:before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-green); }
.ks-notice { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid #eef1ee; }
.ks-notice.is-unread { background: linear-gradient(90deg, #fffaeb, transparent); }
.ks-notice a { color: inherit; display: block; }
.ks-notice__dot { flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: transparent; }
.ks-notice.is-unread .ks-notice__dot { background: var(--brand-green); }
.ks-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid #eef1ee; }

@media (max-width: 991px) {
  .ks-cols, .ks-account, .ks-product { grid-template-columns: 1fr; }
  .ks-sticky { position: static; }
  .ks-hero h1 { font-size: 30px; }
}
@media (max-width: 575px) {
  .ks-line { grid-template-columns: 64px minmax(0, 1fr); }
  .ks-line .ks-price { grid-column: 2; }
  .ks-line img { width: 64px; height: 64px; }
  .ks-card { padding: 20px; }
  .ks-table.is-responsive thead { display: none; }
  .ks-table.is-responsive td { display: block; border: 0; padding: 4px 0; }
  .ks-table.is-responsive tr { display: block; border-top: 1px solid #eef1ee; padding: 10px 0; }
}

/* Cart: trash icon button and auto-saving quantity */
.ks-qty button.is-danger { width: 34px; height: 34px; border-radius: 50%; padding: 0; display: inline-grid; place-items: center; font-size: 15px; background: #fde4e1; }
.ks-qty button.is-danger:hover { background: #f8cfca; }
.ks-qty.is-saving input { opacity: .5; }
