/* ===== Home sections: product carousel + category grid ===== */
.cropp-hs {
  --cols: var(--cols-d, 4);
  font-family: var(--font, inherit); color: var(--ink, #121212);
  max-width: 1400px; margin: 40px auto; padding: 0 20px; box-sizing: border-box;
}
.cropp-hs *, .cropp-hs *::before, .cropp-hs *::after { box-sizing: border-box; }
@media (max-width: 1024px) { .cropp-hs { --cols: var(--cols-t, 3); } }
@media (max-width: 640px)  { .cropp-hs { --cols: var(--cols-m, 2); padding: 0 14px; } }

/* Heading */
.cropp-hs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cropp-hs-title { margin: 0; font-size: var(--hs-title-size, 28px); line-height: 1.2; font-weight: 700; color: inherit; }
.cropp-hs-all { font-size: 14px; color: inherit; text-decoration: underline; white-space: nowrap; }
.cropp-hs.head-center .cropp-hs-head { flex-direction: column; align-items: center; text-align: center; }

/* ----- Product carousel ----- */
.cropp-cw { position: relative; }
.cropp-ct { display: flex; gap: var(--hs-p-gap, 16px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.cropp-ct::-webkit-scrollbar { display: none; }
.cropp-pc { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--hs-p-gap, 16px)) / var(--cols)); min-width: 0; scroll-snap-align: start; transition: transform var(--hs-speed, 400ms) ease, box-shadow var(--hs-speed, 400ms) ease; }
.cropp-pc-img { position: relative; display: block; overflow: hidden; aspect-ratio: var(--hs-p-ratio, 4 / 5); border-radius: var(--hs-p-radius, 0); background: #f2f2f2; }
.cropp-pc-img img { backface-visibility: hidden; -webkit-font-smoothing: antialiased; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--hs-speed, 400ms) ease, opacity var(--hs-speed, 400ms) ease; }
.cropp-pc-i2 { opacity: 0; }
.cropp-pc-badge { position: absolute; top: 8px; inset-inline-start: var(--cropp-bd-start, 8px); inset-inline-end: var(--cropp-bd-end, auto); z-index: 2; padding: 2px 10px; border-radius: 999px; font-size: var(--cropp-bd-fs, 12px); line-height: 1.6; font-weight: 600; color: #fff; background: var(--ink, #121212); }
.cropp-pc-badge.is-sale { background: var(--sale, #b3322f); }
.cropp-pc-badge.is-out { background: rgba(18,18,18,.78); }
.cropp-pc-info { padding-top: 10px; }
.cropp-pc-title { margin: 0 0 4px; font-size: 15px; line-height: 1.4; font-weight: 600; }
.cropp-pc-title a { color: inherit; text-decoration: none; }
.cropp-pc-price { font-size: 14px; color: var(--ink-soft, rgba(18,18,18,.75)); }
.cropp-pc-price del { opacity: .6; margin-inline-end: 6px; }
.cropp-pc-price ins { text-decoration: none; color: var(--sale, #b3322f); font-weight: 600; }
.cropp-hs.p-align-center .cropp-pc-info { text-align: center; }

/* Arrows: minimal, left and right */
.cropp-cbtn {
  position: absolute; top: calc(50% - 30px); z-index: 4; display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border-radius: 50%; border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.9); color: var(--ink, #121212);
  box-shadow: 0 1px 4px rgba(0,0,0,.12); cursor: pointer; transition: opacity .2s, background .2s, box-shadow .2s;
}
.cropp-cbtn:hover { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.cropp-cbtn.is-prev { inset-inline-start: 8px; }
.cropp-cbtn.is-next { inset-inline-end: 8px; }
.cropp-cbtn:disabled { opacity: 0; pointer-events: none; }
.cropp-cbtn:focus-visible { outline: 2px solid var(--ink, #121212); outline-offset: 2px; }
html[dir="rtl"] .cropp-cbtn svg { transform: scaleX(-1); }
@media (max-width: 640px) { .cropp-cbtn { width: 30px; height: 30px; } }

/* Product hover animations (only on devices that can hover) */
@media (hover: hover) {
  .cropp-hs.p-hover-swap .cropp-pc:hover .cropp-pc-i2,
  .cropp-hs.p-hover-swap_zoom .cropp-pc:hover .cropp-pc-i2 { opacity: 1; }
  .cropp-hs.p-hover-zoom .cropp-pc:hover .cropp-pc-img img,
  .cropp-hs.p-hover-swap_zoom .cropp-pc:hover .cropp-pc-img img { transform: scale(var(--hs-zoom, 1.03)); }
  .cropp-hs.p-hover-lift .cropp-pc:hover { transform: translateY(-5px); }
  .cropp-hs.p-hover-lift .cropp-pc:hover .cropp-pc-img { box-shadow: 0 12px 24px rgba(0,0,0,.14); }
}

/* ----- Category grid ----- */
.cropp-cg { display: grid; grid-template-columns: repeat(var(--cols-c, 4), minmax(0, 1fr)); gap: var(--hs-c-gap, 16px); }
@media (max-width: 1024px) { .cropp-cg { grid-template-columns: repeat(var(--cols-ct, 3), minmax(0, 1fr)); } }
@media (max-width: 640px)  { .cropp-cg { grid-template-columns: repeat(var(--cols-cm, 2), minmax(0, 1fr)); } }
.cropp-cat { position: relative; display: block; color: inherit; text-decoration: none; transition: transform var(--hs-speed, 400ms) ease; }
.cropp-cat-img { position: relative; display: block; overflow: hidden; aspect-ratio: var(--hs-c-ratio, 1 / 1); border-radius: var(--hs-c-radius, 0); background: #f2f2f2; transition: box-shadow var(--hs-speed, 400ms) ease; }
.cropp-cat-img img { backface-visibility: hidden; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--hs-speed, 400ms) ease; }
.cropp-cat-img::after { content: ""; position: absolute; inset: 0; background: var(--hs-c-ov, #000); opacity: 0; transition: opacity var(--hs-speed, 400ms) ease; pointer-events: none; }
.cropp-cat-title { display: block; font-size: var(--hs-c-title-size, 16px); font-weight: 600; line-height: 1.3; text-align: center; padding-top: 10px; }
.cropp-hs.c-title-bottom .cropp-cat-title,
.cropp-hs.c-title-center .cropp-cat-title { position: absolute; inset-inline: 0; z-index: 2; padding: 14px 12px; color: var(--hs-c-title-color, #fff); }
.cropp-hs.c-title-bottom .cropp-cat-title { bottom: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent); }
.cropp-hs.c-title-center .cropp-cat-title { top: 50%; transform: translateY(-50%); }

@media (hover: hover) {
  .cropp-hs.c-hover-zoom .cropp-cat:hover .cropp-cat-img img,
  .cropp-hs.c-hover-zoom_overlay .cropp-cat:hover .cropp-cat-img img { transform: scale(var(--hs-zoom, 1.03)); }
  .cropp-hs.c-hover-overlay .cropp-cat:hover .cropp-cat-img::after,
  .cropp-hs.c-hover-zoom_overlay .cropp-cat:hover .cropp-cat-img::after { opacity: var(--hs-c-ov-op, .35); }
  .cropp-hs.c-hover-lift .cropp-cat:hover { transform: translateY(-5px); }
  .cropp-hs.c-hover-lift .cropp-cat:hover .cropp-cat-img { box-shadow: 0 12px 24px rgba(0,0,0,.16); }
}
@media (prefers-reduced-motion: reduce) {
  .cropp-pc, .cropp-pc-img img, .cropp-cat, .cropp-cat-img img, .cropp-cat-img::after { transition: none !important; }
}

/* ----- Products page grid ([cropp_shop]) ----- */
.cropp-pg { display: grid; grid-template-columns: repeat(var(--g-cols-d, 4), minmax(0, 1fr)); gap: calc(var(--hs-p-gap, 16px) * 1.4) var(--hs-p-gap, 16px); }
@media (max-width: 1024px) { .cropp-pg { grid-template-columns: repeat(var(--g-cols-t, 3), minmax(0, 1fr)); } }
@media (max-width: 640px)  { .cropp-pg { grid-template-columns: repeat(var(--g-cols-m, 2), minmax(0, 1fr)); } }
.cropp-pg .cropp-pc { flex: none; }
.cropp-shop-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.cropp-shop-top .cropp-sf { flex: 1 1 auto; min-width: 0; }
.cropp-shop-top .cropp-sf-bar { margin: 0; }
.cropp-shop-tools { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.cropp-shop-sort { height: 42px; padding: 0 16px; border: 1px solid var(--line-strong, rgba(18,18,18,.55)); border-radius: 999px; background: var(--bg, #fff); color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.cropp-shop-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 34px; }
.cropp-shop-pages a, .cropp-shop-pages span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong, rgba(18,18,18,.55)); border-radius: 999px; color: inherit; font-size: 14px; text-decoration: none; }
.cropp-shop-pages a:hover { border-color: var(--ink, #121212); }
.cropp-shop-pages .is-current { background: var(--btn, #121212); color: var(--btn-text, #fff); border-color: var(--btn, #121212); }
.cropp-shop-empty { padding: 70px 20px; text-align: center; color: var(--ink-soft, rgba(18,18,18,.75)); }
.cropp-shop-tools { margin-inline-start: auto; }

/* ===== Mobile polish ===== */
.cropp-hs-head { flex-wrap: wrap; }
.cropp-cat-title, .cropp-pc-title { overflow-wrap: anywhere; }
.cropp-hs { overflow-x: clip; }
@media (max-width: 640px) {
  .cropp-hs { margin-block: 28px; }
  .cropp-hs-title { font-size: min(var(--hs-title-size, 28px), 24px); }
  .cropp-pc-title { font-size: 14px; }
  .cropp-pc-price { font-size: 13px; }
  .cropp-shop-top { gap: 10px; }
  .cropp-shop-tools { width: 100%; justify-content: space-between; margin-inline-start: 0; }
  .cropp-shop-sort { flex: 1 1 auto; max-width: 62%; font-size: 16px; }   /* 16px stops iPhones from zooming in */
}

@media (max-width: 640px) {
  .cropp-pc-badge { top: 6px; padding: 1px 8px; font-size: var(--cropp-bd-fs-m, 10px); }
}
