/* Base */
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background: #fff;
  color: #333;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

header {
  background: linear-gradient(to right, #ffc0cb, #dda0dd, #ffd700);
  padding: 2rem;
  text-align: center;
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: white;
  margin: 0;
}

nav {
  margin-top: 1rem;
}

nav a {
  color: white;
  text-decoration: none;
  margin: 0 1rem;
  font-weight: bold;
}

.hero {
  padding: 4rem 2rem;
  text-align: center;
}

.hero h2 {
  font-size: 2rem;
  color: #c71585;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 1rem auto;
}

.hero button {
  background-color: #c71585;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
}

.portfolio {
  padding: 3rem 2rem;
  background-color: #fdf6f9;
  text-align: center;
}

.portfolio h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
}

/* Portfolio grid */
.portfolio .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* mobile-first */
  gap: 12px;
  padding: 0 16px;
  margin-top: 2rem;
}

/* Square cards */
.portfolio .card {
  position: relative;
  aspect-ratio: 1 / 1;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  background: #f5f5f5;
  touch-action: manipulation;
}

/* Make the image fill and crop to the square */
.portfolio .card picture,
.portfolio .card img {
  width: 100%;
  height: 100%;
  display: block;
}
.portfolio .card img {
  object-fit: cover;
}

.about {
  padding: 3rem 2rem;
  text-align: center;
}

.signup {
  padding: 2rem;
  background: #fff0f5;
  text-align: center;
}

.signup input[type="email"] {
  padding: 0.5rem;
  width: 250px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.signup button {
  background-color: #da70d6;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
  border-radius: 5px;
}

.contact {
  padding: 2rem;
  text-align: center;
}

.social-icons a {
  margin: 0 0.5rem;
  color: #c71585;
  text-decoration: none;
  font-weight: bold;
}

footer {
  background-color: #f8f8f8;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: #000;
  color: #fff;
  border-radius: 4px;
  z-index: 9999;
}

/* Focus visible */
a:focus, button:focus {
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

/* Mobile adjustments */
@media (max-width:600px){
  header { padding: 1rem; }
  .hero { padding: 2rem 1rem; }
  header h1 { font-size: 1.6rem; }
  .hero h2 { font-size: 1.25rem; }
  .hero button { padding: 0.9rem 1.2rem; font-size: 1rem; }
  .portfolio .grid { gap: 0.5rem; }
  nav a { display:inline-block; margin: 0 .5rem; font-size: 0.95rem; }
}

@media (min-width: 480px) {
  .portfolio .grid { gap: 14px; }
}
@media (min-width: 768px) {
  .portfolio .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}


/* Reduced motion & focus */
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }
.portfolio .card:focus-visible { outline: 2px solid #222; outline-offset: 3px; }

/* Category grid cards */
.portfolio .grid { display:grid; gap:12px; grid-template-columns:repeat(2,1fr); }
@media (min-width:640px){ .portfolio .grid { grid-template-columns:repeat(3,1fr); } }
@media (min-width:1024px){ .portfolio .grid { grid-template-columns:repeat(4,1fr); } }

.portfolio .card { position:relative; border-radius:10px; overflow:hidden; display:block; }
.portfolio .card img { width:100%; height:100%; aspect-ratio:1/1; object-fit:cover; display:block; }
.card-label { position:absolute; left:8px; bottom:8px; padding:6px 10px; background:rgba(0,0,0,.55); color:#fff; font-size:.95rem; border-radius:6px; }


/* Card label layout for price */
.card-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.card-price {
  font-size: 0.8rem;
  color: #eee;
  opacity: 0.9;
}

/* Lightbox captions */
#lbCaption {
  text-align: center;
  color: #fff;
  margin-top: 12px;
  font-size: 0.95rem;
}
#lbPrice {
  font-size: 0.85rem;
  opacity: 0.8;
}


/* Lightbox layout: flex, arrows absolute, thumbs pinned bottom */
#lightbox[hidden]{ display:none; }
#lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: flex;               /* no grid */
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Center area holds image + bottom filmstrip */
#lbCenter{
  display: grid;
  grid-template-rows: 1fr auto;     /* image grows, thumbs auto */
  align-items: center;
  justify-items: center;
  width: 92vw;
  height: 92vh;                      /* fill viewport area */
  margin: 0 auto;
  box-sizing: border-box;
  min-height: 0;                      /* prevent overflow calc issues */
}

#lbImg{
  grid-row: 1;
  width: 100%;
  max-width: 100%;
  max-height: 100%;                   /* fills the 1fr row */
  object-fit: contain;
  display: block;
  margin: 0;
  touch-action: pan-y;
  min-height: 0;                      /* allow shrink for tall portraits */
}

/* Close button stays in top-right */
#lbClose{
  position: absolute;
  top: 8px; right: 10px;
  font-size: 32px; line-height: 1;
  background: transparent; border: 0; color: #fff; cursor: pointer;
  z-index: 1002;
}

/* Arrows: always visible, vertically centered */
#lbPrev, #lbNext{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent; border: 0; color: #fff; cursor: pointer;
  font-size: 40px; line-height: 1;
  z-index: 1001;
}
#lbPrev{ left: 12px; }
#lbNext{ right: 12px; }
@media (hover:hover){ #lbPrev:hover,#lbNext:hover,#lbClose:hover{ color:#ddd; } }

#lbThumbs{
  grid-row: 2;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  height: 88px;                       /* visible strip height */
  max-height: 88px;
  box-sizing: border-box;
  background: transparent;            /* no overlay change */
}
#lbThumbs img{
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  background: #111;
}
#lbThumbs img.active{ border-color: #fff; }

/* Notes:
   - This removes the grid layout that pushed arrows off-screen.
   - Arrows are absolutely positioned so they never shift.
   - Thumbnails are a horizontal filmstrip pinned to the bottom of the lightbox center.
*/
