/* RUHII.cms — store.css
   Images made larger by increasing per-breakpoint max-heights.
   Other responsiveness safeguards kept to avoid horizontal overflow.
*/

:root{
  --card-img-height: 480px;    /* desktop - increased */
  --card-img-height-lg: 420px; /* large tablet - increased */
  --card-img-height-sm: 360px; /* phone - increased */
  --card-img-height-xs: 300px; /* very small phones - increased */
}

/* Global safety */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
}

body {
font-family: 'Special Elite', monospace;
  background: #0a0a0a;
  color: #d0d8e8;
  overflow-x: hidden; /* final safety net */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout container */
.store-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.store-header {
  text-align: center;
  margin-bottom: 3rem;
  text-shadow: 0 0 10px #2a3b5caa, 0 0 20px #1f2a43aa;
}

.store-header h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: 0.1em;
  color: #cbd4e1;
  margin: 0;
}

/* Grid: responsive but never overflow horizontally */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(0.9rem, 2vw, 2rem);
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Card */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0; /* allow shrinking */
  padding: 0.5rem; /* slightly reduced padding to allow more image space */
  margin: 0;
}

/* Image container:
   - default image remains in flow and defines height (so no reflow/overflow).
   - hover image overlays but uses the same max sizes.
   - both use object-fit: contain so the entire image is visible.
*/
.img-hover-container {
  position: relative;
  width: 100%;
  background: #00000000; /* letterbox background */
  border-radius: 14px;
  overflow: hidden;
  display: block;
}

/* Default image in flow (defines layout height) */
.img-hover-container .default-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: var(--card-img-height);        /* increased desktop cap */
  object-fit: contain;                       /* show whole image */
  object-position: center;
  border-radius: 14px;
}

/* Hover image overlays the container, but doesn't alter layout */
.img-hover-container .hover-img {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  border-radius: 14px;
  transition: opacity .35s ease, transform .35s ease;
}

/* swap on hover */
.img-hover-container:hover .hover-img {
  opacity: 1;
  transform: translateY(-3px);
}
.img-hover-container:hover .default-img {
  opacity: 0;
}

/* Titles / price */
.product-card h2 {
  font-family: 'Special Elite', monospace;
  font-weight: 400;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  margin: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a1b0cb;
  text-shadow: 0 0 3px #304060cc;
  overflow-wrap: anywhere; /* prevents long words causing scroll */
}

/* Price/desc */
.product-card p {
  font-family: 'Special Elite', monospace;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: #8996b0;
  margin: 0;
  overflow-wrap: anywhere;
}

/* Footer area inside card - always wrap and fit */
.product-card .card-footer {
  margin-top: auto;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  flex-wrap: wrap; /* ensures no overflow */
}

/* internal layout: allow stacking on narrow screens */
.product-card .price-and-controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Size select and buttons should shrink but not overflow */
.size-select-card,
.size-select,
.product-card button,
.product-card .price-and-controls > div {
  max-width: 100%;
  min-width: 0;
  font-family: 'Special Elite', monospace;
}

/* Buttons */
.product-card button {
  display: inline-block;
  width: 100%;
  padding: 0.6rem 0;
  font-family: 'Special Elite', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  background: transparent;
  border: 2px solid #5a709ecc;
  color: #5a709e;
  border-radius: 30px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: bold;
  box-shadow: 0 0 6px #5a709ecc;
  box-sizing: border-box;
}

/* Prevent selects / text inputs from overflowing */
select, input[type="number"] {
  width: auto;
  max-width: 100%;
  min-width: 0;
}

/* small thumbnail */
.thumb { width: 64px; height: auto; border-radius: 8px; object-fit: cover; }

/* Footer */
.store-footer {
  text-align: center;
  margin: 3rem 0 2rem 0;
  font-family: 'Special Elite', monospace;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  color: #586a8f;
}

/* Breakpoints: reduce image sizes on smaller viewports so everything fits */
@media (max-width: 1024px) {
  .img-hover-container .default-img { max-height: var(--card-img-height-lg); }
}

@media (max-width: 760px) {
  .store-wrapper { padding: 0.9rem 0.5rem; }
  .product-card { padding: 0.4rem; gap: 0.45rem; }
  /* larger phone images */
  .img-hover-container .default-img { max-height: calc(var(--card-img-height-sm)); border-radius: 12px; }
  .img-hover-container .hover-img { border-radius: 12px; }
  .product-card h2 { font-size: 1rem; }
  .product-card p { font-size: 0.88rem; }
  .product-card .price-and-controls { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .product-card .price-and-controls > div { width: 100%; }
}

@media (max-width: 420px) {
  .img-hover-container .default-img { max-height: var(--card-img-height-xs); }
  .product-card h2, .product-card p { font-size: 0.95rem; }
  .product-card button { padding: 0.5rem 0; font-size: 0.9rem; }
}

/* Final safety: ensure no element can cause horizontal overflow */
html, body, .store-wrapper, .store-grid, .product-card, .img-hover-container, .product-card .card-footer {
  max-width: 100%;
  overflow-x: hidden;
}

/* end of file */