/* =====================
   ST Premium - Public CSS
   ===================== */

:root {
  --kredia-primary: #1E7A6E;
  --kredia-primary-dark: #155f56;
  --kredia-danger: #dc3545;
  --kredia-secondary: #6c757d;
  --kredia-bg: #f9f7f4;
  --kredia-border: #e0ddd8;
  --kredia-radius: 8px;
  --kredia-font: 'DM Sans', 'Plus Jakarta Sans', sans-serif;
}

/* --- BUTTONS --- */
.kredia-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--kredia-radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  text-align: center;
  text-decoration: none;
}
.kredia-btn--primary { background: var(--kredia-primary); color: #fff; width: 100%; padding: 14px; font-size: 16px; }
.kredia-btn--primary:hover { background: var(--kredia-primary-dark); }

/* =====================
   Products Shortcode
   ===================== */
.kredia-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.kredia-products-shortcode .kredia-product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}
.kredia-products-shortcode .kredia-product-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.kredia-products-shortcode .kredia-product-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.kredia-products-shortcode .kredia-product-card__body {
  padding: 16px;
}
.kredia-products-shortcode .kredia-product-card__name {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}
.kredia-products-shortcode .kredia-product-card__type {
  font-size: 12px;
  color: var(--kredia-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.kredia-products-shortcode .kredia-product-card__price {
  margin-bottom: 12px;
}
.kredia-products-shortcode .kredia-orig-price {
  text-decoration: line-through;
  color: #999;
  font-size: 13px;
}
.kredia-products-shortcode .kredia-discount-badge {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 4px;
}
.kredia-add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  background: #f0fdf4;
  border: 1.5px solid #22c55e;
  color: #15803d;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.kredia-add-to-cart-btn:hover {
  background: #dcfce7;
}
.kredia-add-to-cart-btn--block {
  width: 100%;
  justify-content: center;
}
.kredia-add-to-cart-btn.in-cart {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
  cursor: default;
}
.kredia-add-to-cart-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* =====================
   Cart Page
   ===================== */
.kredia-cart-page {
  max-width: 900px;
  margin: 0 auto;
}
.kredia-cart-layout {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.kredia-cart-items {
  flex: 1;
  min-width: 300px;
}
.kredia-cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.kredia-cart-item__img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}
.kredia-cart-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kredia-cart-item__info {
  flex: 1;
  min-width: 0;
}
.kredia-cart-item__info h4 {
  margin: 0 0 4px;
  font-size: 15px;
}
.kredia-cart-item__type {
  font-size: 11px;
  color: var(--kredia-primary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.kredia-cart-item__price {
  font-size: 14px;
  font-weight: 600;
}
.kredia-cart-item__qty {
  display: flex;
  align-items: center;
  gap: 4px;
}
.kredia-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kredia-qty-btn:hover {
  background: #e2e8f0;
}
.kredia-qty-input {
  width: 48px;
  height: 32px;
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
}
.kredia-cart-item__subtotal {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}
.kredia-cart-item__remove {
  background: none;
  border: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.kredia-cart-item__remove:hover {
  color: #c0392b;
}
.kredia-cart-summary {
  width: 280px;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 20px;
}
.kredia-cart-summary h3 {
  margin: 0 0 16px;
  font-size: 16px;
}
.kredia-cart-summary__rows {
  margin-bottom: 12px;
}
.kredia-cart-summary__row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
}
.kredia-cart-summary__total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 0;
  border-top: 2px solid #e2e8f0;
  font-size: 16px;
}

/* =====================
   Cart Checkout Table
   ===================== */
.kredia-cart-checkout-table th,
.kredia-cart-checkout-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}

/* =====================
   Add-to-Cart Badge
   ===================== */
.kredia-cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--kredia-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 6px;
  vertical-align: top;
  margin-left: 4px;
}

/* =====================
   Foto Produk
   ===================== */
.kredia-product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}
.kredia-product-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.kredia-product-card__img {
    width:100%; aspect-ratio:16/9; overflow:hidden;
    border-radius:10px 10px 0 0;
    display: block;
}
.kredia-product-card__img img {
    width:100%; height:100%; object-fit:cover; display:block;
    transition:transform .3s ease;
}
.kredia-product-card:hover .kredia-product-card__img img {
    transform:scale(1.04);
}

/* =====================
   Checkout Form
   ===================== */
.kredia-checkout {
  max-width: 680px;
  margin: 0 auto;
}
.kredia-checkout__product {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.kredia-checkout__product h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #0f172a;
}
.kredia-checkout__price {
  font-size: 28px;
  font-weight: 800;
  color: var(--kredia-primary, #1E7A6E);
  margin: 12px 0 4px;
}
.kredia-checkout__user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.kredia-checkout__user-info .kredia-logout-btn {
  background: none;
  border: none;
  color: var(--kredia-primary, #1E7A6E);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.kredia-checkout__login-hint {
  text-align: center;
  margin-bottom: 16px;
  font-size: 14px;
  color: #64748b;
}
.kredia-checkout__login-hint a {
  color: var(--kredia-primary, #1E7A6E);
  font-weight: 600;
}
.kredia-checkout__form {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.kredia-field {
  margin-bottom: 16px;
}
.kredia-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}
.kredia-field input[type="text"],
.kredia-field input[type="email"],
.kredia-field input[type="tel"],
.kredia-field input[type="password"],
.kredia-field textarea,
.kredia-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.kredia-field input:focus,
.kredia-field textarea:focus,
.kredia-field select:focus {
  outline: none;
  border-color: var(--kredia-primary, #1E7A6E);
  box-shadow: 0 0 0 3px rgba(30,122,110,0.1);
}
.kredia-field textarea {
  resize: vertical;
  min-height: 72px;
}
.kredia-password-wrap {
  display: flex;
  align-items: center;
  gap: 0;
}
.kredia-password-wrap input {
  flex: 1;
  border-radius: 8px 0 0 8px !important;
}
.kredia-password-wrap .kredia-toggle-pw {
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: #f8fafc;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.kredia-coupon-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.kredia-coupon-wrap input {
  flex: 1;
}
.kredia-coupon-wrap .kredia-btn {
  white-space: nowrap;
}
.kredia-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kredia-payment-group-label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 8px 0 4px;
}
.kredia-payment-group-label:first-child {
  margin-top: 0;
}
.kredia-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #0f172a;
  transition: border-color 0.2s, background 0.2s;
}
.kredia-radio:hover {
  border-color: var(--kredia-primary, #1E7A6E);
}
.kredia-radio input[type="radio"] {
  accent-color: var(--kredia-primary, #1E7A6E);
  margin: 0;
}
.kredia-radio--indented {
  margin-left: 0;
}
.kredia-unique-note {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #856404;
}
.kredia-domain-input-group input {
  width: 100%;
}
.kredia-slot-picker select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}
.kredia-timer {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 14px;
  color: #92400e;
  font-weight: 600;
  text-align: center;
}
.kredia-timer--ended {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

/* =====================
   Checkout Product Grid
   ===================== */
#kredia-product-grid.kredia-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  margin: 20px 0;
}
/* Fallback card styles for standalone checkout (outside kredia-app) */
.kredia-product-list .kredia-product-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.kredia-product-list .kredia-product-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.kredia-product-list .kredia-product-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f8fafc;
}
.kredia-product-list .kredia-product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.kredia-product-list .kredia-product-card:hover .kredia-product-card__img img {
  transform: scale(1.06);
}
.kredia-product-list .kredia-product-card__name {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #0f172a;
  line-height: 1.4;
}
.kredia-product-list .kredia-product-card__desc {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
  line-height: 1.5;
}
.kredia-product-list .kredia-product-card__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--teal, #0AABAB);
  margin-bottom: 16px;
}
.kredia-product-list .kredia-product-card__cta {
  width: 100%;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  border-radius: 8px;
  background: var(--teal, #0AABAB);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-sizing: border-box;
}
.kredia-discount-badge {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
@media (max-width: 1200px) {
  #kredia-product-grid.kredia-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 900px) {
  #kredia-product-grid.kredia-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 500px) {
  #kredia-product-grid.kredia-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* =====================
   Social Proof Popup
   ===================== */
.kredia-sp-popup {
  position: fixed;
  z-index: 99999;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  max-width: 340px;
  font-size: 13px;
  line-height: 1.5;
  color: #1a2b3c;
  animation: kredia-sp-slide-in 0.4s ease;
}
.kredia-sp-popup--left {
  left: 20px;
  bottom: 20px;
}
.kredia-sp-popup--right {
  right: 20px;
  bottom: 20px;
}
.kredia-sp-close {
  position: absolute;
  top: 4px;
  right: 8px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #94a3b8;
  padding: 0;
  line-height: 1;
}
.kredia-sp-close:hover {
  color: #475569;
}
@keyframes kredia-sp-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 480px) {
  .kredia-sp-popup {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    max-width: none;
  }
}

/* =====================
   Product Description
   ===================== */
.kredia-desc-content {
  font-size: 15px;
  color: #334155;
  margin: 12px 0 16px;
  line-height: 1.75;
  word-wrap: break-word;
}
.kredia-desc-content p {
  margin: 0 0 12px;
}
.kredia-desc-content p:last-child {
  margin-bottom: 0;
}
.kredia-desc-content h1,
.kredia-desc-content h2,
.kredia-desc-content h3,
.kredia-desc-content h4 {
  margin: 20px 0 10px;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.3;
}
.kredia-desc-content h1 { font-size: 22px; }
.kredia-desc-content h2 { font-size: 19px; }
.kredia-desc-content h3 { font-size: 17px; }
.kredia-desc-content h4 { font-size: 15px; }
.kredia-desc-content ul,
.kredia-desc-content ol {
  margin: 0 0 12px;
  padding-left: 24px;
}
.kredia-desc-content li {
  margin-bottom: 4px;
}
.kredia-desc-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}
.kredia-desc-content blockquote {
  border-left: 4px solid var(--teal, #0AABAB);
  padding: 10px 16px;
  margin: 12px 0;
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
  color: #475569;
  font-style: italic;
}
.kredia-desc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}
.kredia-desc-content th,
.kredia-desc-content td {
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  text-align: left;
}
.kredia-desc-content th {
  background: #f8fafc;
  font-weight: 700;
}
.kredia-desc-content a {
  color: var(--teal, #0AABAB);
  text-decoration: underline;
}
.kredia-desc-content hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 16px 0;
}
.kredia-desc-content pre {
  background: #f1f5f9;
  padding: 12px 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
}
.kredia-desc-content code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* =====================
   Toolbar (Filter + Search)
   ===================== */
.kredia-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}
.kredia-cat-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.kredia-search-wrap {
  flex-shrink: 0;
}
.kredia-search-input {
  width: 260px;
  padding: 9px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  background: #fff;
}
.kredia-search-input:focus {
  border-color: var(--teal, #0AABAB);
  box-shadow: 0 0 0 3px rgba(10, 171, 171, 0.1);
}
.kredia-search-input::placeholder {
  color: #94a3b8;
}
@media (max-width: 700px) {
  .kredia-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .kredia-cat-filter {
    flex: none;
  }
  .kredia-search-input {
    width: 100%;
  }
}
