@layer reset, core;

@layer reset {
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

#root, #__next {
  isolation: isolate;
}
}
@layer core {
  figcaption {
    max-inline-size: max-content;
    margin-inline: auto;
  }
  a:focus-visible {
    outline-offset: .25em;
    outline-width: .25em;
    outline-color: currentColor;
  }
  ul,ol,dl,dt,dd,p,figure,blockquote {
    hanging-punctuation: first last;
    text-wrap: pretty;
  }
}

html {
	font-size: 16px;
	height: -webkit-fill-available;
	scrollbar-color: #18233a transparent;
	scrollbar-width: thin;
	color-scheme: light dark;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  width: clamp(25rem,calc(100% - 2rem),88rem);
  margin: 0 auto;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  size: 16px;
  color: #eee;
  background-color: #18233a;
  /* @media (prefers-color-scheme: dark) {
    background-color: #333;
  } */
  /* &>nav>ul {
    width: 100%;
    list-style: none;
    display: inline-flex;
    justify-content: space-between;
    padding: 0;
    & li {
      & a {
        color: #eee;
        padding: 1em;
        text-decoration: none;
      }
    }
  } */
}
main {
  h1 {
    padding-block: 1em;
    text-shadow: 1px 2px 1px #1119;
    text-transform: uppercase;
  }
}
main > a {
  display: inline-flex;
  background-color: #333;
  color: #eee;
  font-size: 1em;
  border: 1px solid #eee3;
  border-radius: 1em;
  padding: .125em .875em;
  text-decoration: none;
  margin: .5em;
  corner-shape: squircle;
  &:hover {
    background-color: #ccc;
    color: #333;
  }
}
body > header {
  margin-inline: -.5em;
  position: sticky;
  top: 0;
  display: flex;
  background-color: transparent;
  backdrop-filter: blur(4px) saturate(.25);
  flex-flow: row nowrap;
  justify-content: space-around;
  align-items: center;
  z-index: 8;
  border-radius: 0 0 3em 3em;
  box-shadow: 0 2px 2px #1113;
  corner-shape: squircle;
  button {
    background: transparent;
    background-color: #eee1;
    border-radius: 2em;
    flex-shrink: 0;
    padding: 1em;
    border: none;
    cursor: pointer;
    corner-shape: squircle;
    svg {
      width: 2em;
      height: 2em;
      fill: #eee;
    }
    &:is(:hover,:focus) {
      background-color: #eee3;
      svg { fill: #fff; filter: drop-shadow(0 0 2px #000); }
    }
  }
}

body>footer{position:sticky;top:100vh;}

.category-layout {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1em;
	margin: 1em 0;
  list-style: none;
  padding: 0;
  & li {
    transition: opacity .5s ease;
    transition-delay: calc(sibling-index() * 100ms);
  }
  & li a {
    position: relative;
    color: #eee;
    aspect-ratio: 1;
    display: flex;
    align-items: flex-end;
    padding: 0;
    border: .125em solid #666;
    text-decoration: none;
    transition: border-color .5s ease;
    &:hover {
      border-color: #ccc;
    }
    &>:not(img) {z-index: 1;}
    &>img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      z-index: 0;
    }
    &>h3 {
      width: 100%;
      min-height: 5rem;
      background: linear-gradient(to top, #1119, #1110);
      text-transform: uppercase;
      padding: .5em 1em;
    }
  }
}
@media (max-width: 48rem) {
  .category-layout {
    grid-template-columns: 1fr 1fr;
    gap: .5em;
    & li a {
      aspect-ratio: 16/9;
      &>h3 {
        font-size: 1em;
        min-height: auto;
      }
    }
  }
}
@media (width < 30rem) {
  .category-layout {
    grid-template-columns: 1fr;
    & li a {
      aspect-ratio: 21/9;
    }
  }
}



.label-sale,.label-new{position:absolute;left:0;transform-origin:top left;transform:rotate(-90deg);color:#fff;display:inline;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;text-transform:uppercase;}
.label-sale{top:4em;background-color:#c33c;font-size:1em;padding:.25em .5em;letter-spacing:1px;}
.label-new{top:8em;background-color:#33cc;font-size:.875em;padding:.25em .5em;}
.product-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16em, 1fr));
  grid-template-rows: masonry;
  gap: 1em;
  margin-bottom: 1em;
  row-rule: 1px dotted #ccc;
  .product-thumb {
    display: flex;
    flex-direction: column;
    background-color: #ccc3;
    align-items: center;
    text-align: center;
    transition: opacity .5s ease;
    transition-delay: calc(sibling-index() * 100ms);
    &:nth-of-type(even) {
      background-color: #ccc4;
    }
    a {
      color: #ccc;
      text-decoration: none;
      > img {
        height: auto;
      }
      > h4 { padding: 0 .5em 1em; }
    }
    button {
      flex-shrink: 0;
      border-radius: 50%;
      padding: .25em;
      margin: .25em;
      border: none;
      cursor: pointer;
      svg {
        width: 1.5em;
        height: 1.5em;
        margin: .25em;
      }
      &:is(:hover,:focus) {
        outline: 2px solid #ccc;
        outline-offset: 2px;
      }
    }
    &:is(:hover,:focus) {
      color: #eee;
      outline: 1px dotted #ccc9;
      /* border-radius: 3em; */
      background-color: #ccc6;
      a { color: #eee; }
    }
  }
}


@media (prefers-reduced-motion: no-preference) {
html, body {scroll-behavior: smooth;}
/* .product-thumb {transition: box-shadow 280ms cubic-bezier(.4,0,.2,1);} */
.product-thumb:hover img {transform: scale(1.1);}
.product-thumb > a img {
z-index: -1;
inset: 0;
object-fit: cover;
object-position: 50% 50%;
transition: transform 1s ease-in-out .5s, filter .2s;
transform-origin: center;
/* -webkit-box-reflect: below 0 linear-gradient(transparent 75%, #fff3); */
}
@view-transition { navigation: auto; }
@keyframes transition-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes transition-in { from { opacity: 0; translate: 0 -8rem; } to { opacity: 1; translate: 0; } }
::view-transition-old(root) { animation: .4s ease-in both transition-out; }
::view-transition-new(root) { animation: .4s ease-in both transition-in; }
}
.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  clip: rect(0 0 0 0); 
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  white-space: nowrap; 
}
.product-thumb .dims {
padding: 0 1em;
overflow: hidden;
color: #444;
margin-top: -.5em;
text-transform: lowercase;
display: flex;
flex-flow: row wrap;
justify-content: space-between;
font-size: .875em;
white-space: nowrap;
line-height: 1;
position: relative;
}
.product-thumb .dims::before {
position: absolute;
top: 4px;
left: 4px;
height: 8px;
width: 8px;
background-color: #3c3;
content: '';
border-radius: 4px;
}
.product-thumb .red::before {
background-color: #c33;
}
.product-thumb .red span:first-of-type {
background-color: #c333;
border-radius: 8px;
padding: 0 4px 2px 14px;
margin-left: -13px;
}
.product-thumb .yellow::before {
background-color: #cc3;
}
.product-thumb:not(:hover) > a:has(.red) img {filter: grayscale(.5) opacity(.5);}
#menu {
height: 100%;
max-width: 32em;
border: none;
inset: 0 auto 0 0;
padding: 1em;
box-shadow: 0 1px 1px 0 #3339;
display: flex;
width: 50%;
flex-wrap: wrap;
align-content: center;
background-color: #000;
/* backdrop-filter: blur(2px); */
transform: translateX(-4rem);
&:popover-open {
transform: translateX(0);
&::backdrop {
  background: linear-gradient(to right, #0009, #0003);
  backdrop-filter: blur(1px) grayscale(.5);
  opacity: 1;
}
}
@starting-style {
  /* &:popover-open, &:popover-open::backdrop { opacity: 0; } */
  &:popover-open {
    transform: translateX(-8rem);
  }
}
ul {
  list-style: none;
  padding: 0;
  a {
    color: #eee;
    text-decoration: none;
  }
}
}


[popover], dialog, ::backdrop {
  --timing: .25s;
  opacity: 0;
  transition:
    display var(--timing) ease allow-discrete,
    overlay var(--timing) ease allow-discrete,
    opacity var(--timing) ease,
    transform var(--timing) ease-out;
}
:popover-open, /* :popover-open::backdrop, */ [open], [open]::backdrop { opacity: 1; }
@starting-style {
  :popover-open, /* :popover-open::backdrop, */ [open], [open]::backdrop { opacity: 0; }
}
dialog {
  background-color: #ccc;
  background-color: light-dark(#ccc, #999);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .5);
  border: 1px outset #fff9;
  border-radius: 1rem;
  overflow-y: hidden;
  transform: translateY(-1rem);
  &[open] {
    transform: translateY(0);
    &::backdrop {
      opacity: .5;
      background: linear-gradient(#0003, #0006);
      backdrop-filter: blur(1px) grayscale(.5);
    }
  }
  @starting-style {
    &[open],
    &[open]::backdrop {
      opacity: 0;
    }
    &[open] {
      transform: translateY(1rem);
    }
  }
  &::backdrop {
    background: linear-gradient(#0003, #0006);
    backdrop-filter: blur(1px) grayscale(.5);
  }
}
