:root{
  --rk-primary:#7dcfff;
  --rk-primary-dark:#4ba5db;
  --rk-bg:#f6fbff;
  --rk-card:#ffffff;
  --rk-text:#334155;
  --rk-muted:#64748b;
  --rk-border:#dbe7f1;
  --rk-shadow:0 8px 25px rgba(86,142,178,.08);
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:'Kodchasan',Arial,sans-serif;
  color:var(--rk-text);
  background:linear-gradient(180deg,#fbfdff 0%,var(--rk-bg) 100%);
}

button,input,select,textarea,a{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.55;cursor:not-allowed}
.hidden{display:none!important}

.rk-page-header,
.page-header{
  position:sticky;
  top:0;
  z-index:100;
  min-height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:11px 16px;
  background:rgba(255,255,255,.94);
  border-bottom:1px solid rgba(219,231,241,.95);
  box-shadow:0 5px 18px rgba(71,85,105,.07);
  backdrop-filter:blur(10px);
}

.rk-page-header h1,
.page-header h1{
  flex:1;
  margin:0;
  padding:0 12px;
  color:#3f6078;
  text-align:center;
  font-size:20px;
}

.rk-icon-button,
.rk-icon-link,
.icon-btn{
  width:46px!important;
  height:46px;
  padding:0!important;
  border:none;
  border-radius:999px;
  background:#fff;
  color:var(--rk-text);
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-size:22px;
  box-shadow:0 4px 14px rgba(71,85,105,.1);
}

.rk-cart-link,
.cart-btn{
  position:relative;
  width:46px!important;
  height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#fff;
  text-decoration:none;
  font-size:21px;
  box-shadow:0 4px 14px rgba(71,85,105,.1);
}

.rk-cart-link span,
.cart-btn span,
#cartCount{
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  border-radius:999px;
  background:#ff5c7a;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:700;
}

.rk-overlay,
.overlay{
  position:fixed;
  inset:0;
  z-index:999;
  background:rgba(0,0,0,.35);
  opacity:1;
  transition:.25s;
}

.rk-overlay.hidden,
.overlay.hidden{opacity:0;pointer-events:none}

.rk-side-menu,
.side-menu{
  position:fixed;
  top:0;
  left:0;
  z-index:1000;
  width:280px;
  max-width:82%;
  height:100vh;
  display:flex;
  flex-direction:column;
  background:#fff;
  box-shadow:0 0 30px rgba(0,0,0,.15);
  transform:translateX(-100%);
  transition:.3s ease;
}

.rk-side-menu.open,
.side-menu.open{transform:translateX(0)}

.rk-menu-header,
.menu-header{padding:24px;border-bottom:1px solid #eee}

.rk-side-menu a,
.side-menu a{
  padding:18px 24px;
  color:#333;
  text-decoration:none;
  font-size:16px;
  font-weight:600;
}

.rk-side-menu a:hover,
.side-menu a:hover{background:#f7f9ff}

.rk-product-card,
.card{
  overflow:hidden;
  border:1px solid var(--rk-border);
  border-radius:18px;
  background:#fff;
  box-shadow:0 7px 22px rgba(86,142,178,.07);
  cursor:pointer;
  transition:.2s;
}

.rk-product-card:hover,
.card:hover{
  transform:translateY(-4px);
  box-shadow:0 14px 30px rgba(86,142,178,.13);
}

.rk-product-image,
.image-box{
  position:relative;
  aspect-ratio:1/1;
  overflow:hidden;
  background:#edf7fc;
}

.rk-product-image img,
.image-box img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transition:.3s;
}

.rk-product-card:hover img{transform:scale(1.04)}
.rk-image-placeholder{height:100%;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:12px}
.rk-product-badges{position:absolute;top:9px;left:9px;right:9px;display:flex;justify-content:space-between;gap:7px}
.rk-badge{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:700}
.rk-badge-preorder{background:#ffedd5;color:#9a3412}.rk-badge-stock{background:#dcfce7;color:#166534}.rk-badge-sale{background:#ffe4e6;color:#9f1239;margin-left:auto}.rk-badge-new{background:#e0f2fe;color:#075985;margin-left:auto}
.rk-product-body,.card-body{padding:12px}.rk-product-body h3,.card-body h3{margin:0;min-height:42px;font-size:14px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.rk-product-fandom,.fandom{margin:6px 0 0;color:var(--rk-muted);font-size:12px}.rk-price-box,.price-box{display:flex;align-items:flex-end;gap:7px;margin-top:10px}.rk-normal-price,.normal-price,.rk-sale-price,.sale-price{font-size:18px;font-weight:700;color:#347fb4}.rk-sale-price,.sale-price{color:#e84a68}.rk-old-price,.old-price{color:#94a3b8;font-size:12px;text-decoration:line-through}.rk-deadline,.deadline{margin-top:9px;color:#ea580c;font-size:12px;font-weight:600}

@media(max-width:600px){
  .rk-page-header,.page-header{min-height:64px;padding:9px 11px}
  .rk-page-header h1,.page-header h1{font-size:17px}
}

.page-header button,
.page-header a,
.collection-topbar button,
.collection-topbar a,
.product-topbar button,
.product-topbar a,
.checkout-topbar button,
.checkout-topbar a{
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

.page-header button:active,
.page-header a:active,
.collection-topbar button:active,
.collection-topbar a:active,
.product-topbar button:active,
.product-topbar a:active,
.checkout-topbar button:active,
.checkout-topbar a:active{
  transform:scale(.96);
}

button,
a{
  -webkit-tap-highlight-color:
    transparent;
}

button{
  touch-action:
    manipulation;
}

img{
  max-width:100%;
}

/*
=========================================
GLOBAL FRONTEND POLISH
=========================================
*/

html{
  scroll-behavior:smooth;
}

body{
  min-height:100dvh;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

button,
a,
input,
select,
textarea{
  font:inherit;
}

button,
a{
  -webkit-tap-highlight-color:transparent;
}

button{
  touch-action:manipulation;
}

img{
  max-width:100%;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:3px solid rgba(125,207,255,.35);
  outline-offset:2px;
}


/*
=========================================
COMMON LOADING
=========================================
*/

.rinka-loading{
  min-height:220px;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;

  gap:12px;

  padding:28px 18px;

  color:#64748b;

  text-align:center;
}


.rinka-spinner{
  width:38px;
  height:38px;

  border:4px solid #dff2fc;
  border-top-color:#4aa4db;

  border-radius:999px;

  animation:
    rinkaSpin .8s linear infinite;
}


@keyframes rinkaSpin{

  to{
    transform:rotate(360deg);
  }

}


/*
=========================================
COMMON EMPTY / ERROR
=========================================
*/

.rinka-state{
  min-height:260px;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;

  gap:10px;

  padding:28px 18px;

  border:1px solid #dbe7f1;
  border-radius:20px;

  background:#fff;

  text-align:center;
}


.rinka-state-icon{
  font-size:46px;
}


.rinka-state-title{
  color:#3f6078;

  font-size:17px;
  font-weight:700;
}


.rinka-state-text{
  max-width:430px;

  color:#64748b;

  font-size:13px;
  line-height:1.65;
}


/*
=========================================
COMMON TOAST
=========================================
*/

.rinka-toast{
  position:fixed;

  left:50%;
  bottom:
    max(
      20px,
      env(safe-area-inset-bottom)
    );

  z-index:100000;

  width:
    min(
      390px,
      calc(100% - 28px)
    );

  padding:13px 16px;

  border-radius:14px;

  background:#18384e;
  color:#fff;

  text-align:center;

  font-size:13px;
  font-weight:600;

  box-shadow:
    0 12px 30px
    rgba(15,23,42,.24);

  opacity:0;

  transform:
    translate(
      -50%,
      18px
    );

  pointer-events:none;

  transition:
    opacity .2s ease,
    transform .2s ease;
}


.rinka-toast.show{
  opacity:1;

  transform:
    translate(
      -50%,
      0
    );
}


.rinka-toast.error{
  background:#991b1b;
}


.rinka-toast.success{
  background:#166534;
}


/*
=========================================
IMAGE LOAD
=========================================
*/

img{
  transition:
    opacity .18s ease;
}

img[loading="lazy"]{
  background:#edf7fc;
}


/*
=========================================
MOBILE
=========================================
*/

@media(max-width:640px){

  body{
    font-size:14px;
  }

  button,
  input,
  select,
  textarea{
    min-height:42px;
  }

  .rinka-state{
    min-height:220px;
    border-radius:16px;
  }

}


/*
=========================================
REDUCED MOTION
=========================================
*/

@media(
  prefers-reduced-motion:
  reduce
){

  *,
  *::before,
  *::after{
    scroll-behavior:auto !important;
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }

}

.side-menu a.active{
  background:#eef8ff;
  color:#347fb4;
  font-weight:700;
}

@media(max-width:640px){

  .icon-btn,
  .cart-btn,
  .collection-cart,
  .cart-floating{
    flex-shrink:0;
  }

}
