/* css/styles.css */

:root {
  --primary: #1e293b;
  --accent: #2563eb;
  --bg: #f8fafc;
  --text: #334155;
  --secondary: hsl(33, 73%, 75%);
  --secondary-dark: hsl(33, 73%, 40%);
  --egglant: #eeeee4;
  --btnBG: hsl(33, 73%, 40%);
  --btnCol:#fff;

  --shadow: 0 4px 10px rgba(0,0,0,0.3);

  /*--accent: #e8132a;*/
  --font-cond: 'Barlow Condensed', sans-serif;
  --font-display: 'Bebas Neue', sans-serif;
  --font-serif: 'Cormorant Garamond', serif;
  --white: #fff;
  --white-50: rgba(255, 255, 255, 0.50);
  --white-25: rgba(255, 255, 255, 0.25);
  --ease: 0.3s;

}


/* =========================================
             MODERN CSS RESET
========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    width: 100vw;
    min-height: 100dvh;
    overflow-x: hidden;
}


/* Structural lists */
ul:not([class]),
ol:not([class]) {
  list-style: none;
}

/* Media elements */
img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  border-color: transparent;
  cursor: pointer;
}

/* Typography */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

h1, h2, h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}


/* =========================================
              PRESET CLASSES
========================================= */

/* --- Positioning --- */
.relative {
  position: relative;
}
.absolute {
  position: absolute;
}
.fixed {
  position: fixed;
}
.sticky {
  position: sticky;
}

/* --- Display --- */
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.flex {
  display: flex;
}
.grid {
  display: grid;
}
.hide {
  display: none;
}

/* --- Flexbox Helpers --- */
.fl1 {
  flex: 1;
}
.fl-column {
  flex-direction: column;
}
.fl-wrap {
  flex-wrap: wrap;
}
.fl-hcenter {
  justify-content: center;
}
.fl-vcenter {
  align-items: center;
}
.fl-middle {
  justify-content: center;
  align-items: center;
}
.fl-between {
  justify-content: space-between;
}

/* --- Sizing & Margins --- */
.w-100 {
  width: 100%;
}
.h-100 {
  height: 100%;
}
.m-0 {
  margin: 0;
}
.p-0 {
  padding: 0;
}
.p-box {
  padding: 1rem 2rem;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* --- Typography --- */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}
.fw-bold {
  font-weight: bold;
}
/* Truncates long text with an ellipsis (...) */
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- UI & Interaction --- */
.pointer {
  cursor: pointer;
}
.overflow-hidden {
  overflow: hidden;
}

/* Visually hides elements but keeps them accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}



/* =========================================
             UI COMPONENTS
========================================= */

.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  background: var(--btnBG);
  color: var(--btnCol);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: 0.2s;

  &:hover {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

.btnFW {
    display: block;
    padding: 0.6rem 1rem;
    width: 100%;
    background: var(--btnBG);
    color: var(--btnCol);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: var(--shadow);

    &:hover {
      opacity: 0.8;
      transform: scale(1.1);
    }
}

.tag {
  background: #e2e8f0;
  color: #475569;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-block;
  margin: 0.25rem 0;

  &:hover {
    background: #cbd5e1;
  }
}

/* Merged & Cleaned Heart Button */
.heart-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  &:hover {
    transform: scale(1.2);
  }

  &:active {
    transform: scale(0.9);
  }

  &.active {
    color: #ef4444;
  }
}

/* Merged & Cleaned Back-to-Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  background: var(--btnBG);
  color: var(--btnCol);
  border: none;
  outline: none;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;

  &.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  &:hover {
    opacity: 0.8;
    transform: scale(1.1);
  }

  @media (max-width: 600px) {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}

/* Merged Loaders */
.loading-sentinel {
  text-align: center;
  padding: 3rem;
  color: #64748b;
  font-size: 1.1rem;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top-color: var(--accent, #2563eb);
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================
             LAYOUT & HEADER
========================================= */
.banner {
  position: sticky;
  top: 0;
  pointer-events: auto;
  background: var(--secondary);
  color: var(--text);
  font-size: .9rem;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001;

  a {
    color: var(--text);
    font-weight: bold;
  }
}

#banner-text {
  margin-left: 6px;
  transition: opacity 0.5s ease-in-out;
  opacity: 1;

  &.fade-out {
    opacity: 0;
  }
}

header {
  background: var(--egglant);
}

.logo {
  margin: 8px auto;
  height: 50px;
}

.top-nav {
    margin: 0 auto;
    padding: 1px .5rem;
    max-width: 1600px;

    a {
      padding: 4px 8px;
      color: var(--primary);
      font-size: 1rem;
      text-decoration: none;
      font-weight: 500;
      transition: color 0.2s;

      &:hover {
        text-decoration: underline;
      }

      &.active {
        border-radius: 3px;
        border-bottom: 5px solid var(--secondary);
      }

      @media (max-width: 600px) {
        margin-left: 0.75rem;
        font-size: 0.95rem;
      }
    }

    button {
      padding: 4px 8px;
      color: var(--primary);
      font-size: 1rem;
      font-weight: 500;
    }
}

main {
    margin: 0 auto;
    width: 100vw;
    /*max-width: 1600px;*/
    min-height: 70vh;
    flex-grow: 1;
}

/*.hero {
  aspect-ratio: 16 / 9;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(6, 1fr);
    overflow: hidden;

  img {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 35%;
    transition: transform 0.1s ease-out;
    will-change: transform;
    z-index: 1;
  }

  .hero-text-box {
    grid-column: 1 / 6;
    grid-row: 3 / 5;
    align-self: center;
    z-index: 2;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    padding: 2rem;
    border-radius: 0 12px 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  h1, h2 {
    color: white;
    margin: 0;
    line-height: 1.1;
  }

  h2 {
    margin-top: .5rem;
    line-height: 1.4;
  }

  .cta-btn {
    grid-column: 8 / 12;
    grid-row: 5 / 6;
    justify-self: end;
    align-self: center;
    z-index: 2;
    background: var(--btnBG);
    color: var(--btnCol);
    padding: 1.2rem 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: opacity 0.2s;

    &:hover {
      opacity: 0.8;
    }
  }
}*/

.content {
  padding: 2rem;
}

/* ------ AWESOME SLIDER ----- */
.slider {
    position: relative;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
    &.active {
        opacity: 1;
        pointer-events: all;
        .slide-bg {
            transform: scale(1);
        }
        .slide-label,
        .slide-title,
        .slide-name,
        .slide-desc,
        .slide-btns {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    transition: transform 6s ease;
    filter: brightness(1) saturation(1.2) contrast(1.1);
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
}

.slide-content {
    position: absolute;
    bottom: 16vh;
    left: 7vw;
    max-width: 560px;
    z-index: 10;
    padding-right: 16px;
    .slide-label,
    .slide-desc,
    .slide-btns {
        opacity: 0;
        transform: translateY(18px);
    }
    .slide-label {
        font: 14px var(--font-cond);
        text-transform: uppercase;
        letter-spacing: 5px;
        color: var(--white-50);
        margin-bottom: 10px;
        transition: opacity 0.6s 0.3s, transform 0.6s 0.3s;
    }
    .slide-title, .slide-name {
        font-family: var(--font-display);
        font-size: clamp(42px, 7vw, 90px);
        line-height: 0.95;
        letter-spacing: 2px;
        opacity: 0;
        transform: translateY(25px);
    }
    .slide-title {
        color: var(--white);
        transition: opacity 0.7s 0.45s, transform 0.7s 0.45s;
    }
    .slide-name {
        margin-top: 10px;
        color: var(--secondary);
        transition: opacity 0.7s 0.55s, transform 0.7s 0.55s;

    }
    .slide-desc {
        font-family: var(--font-serif);
        margin-top: 10px;
        font-size: clamp(18px, 2.2vw, 20px);
        line-height: 1.8;
        letter-spacing: 0.5px;
        color: var(--egglant);
        font-weight: 300;
        transition: opacity 0.6s 0.7s, transform 0.6s 0.7s;
    }
    .slide-btns {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        margin-top: 24px;
        transition: opacity 0.6s 0.85s, transform 0.6s 0.85s;
        .btn {
            padding: 11px 24px;
            font: 13px var(--font-cond);
            letter-spacing: 2.5px;
            text-transform: uppercase;
            border: 1px solid rgba(255, 255, 255, 0.75);
            background: transparent;
            color: var(--white);
            cursor: pointer;
            transition: background var(--ease), color var(--ease);
            &:hover {
                background: var(--white);
                color: #000;
            }
            &.btn-ghost {
                border-color: rgba(255, 255, 255, 0.28);
                color: var(--white-50);
                &:hover {
                    background: rgba(255, 255, 255, 0.1);
                    color: var(--white);
                    border-color: var(--white-50);
                }
            }
        }
    }
}

.arrows {
    position: absolute;
    bottom: 5vh;
    left: 7vw;
    display: flex;
    gap: 12px;
    z-index: 30;
}

.arrow {
    width: 46px;
    height: 46px;
    border: 1px solid var(--white-25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease), transform 0.2s;
    &:hover {
        background: rgba(255, 255, 255, 0.18);
        transform: scale(1.08);
    }
    svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: var(--white);
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
}

.counter {
    position: absolute;
    bottom: 5.8vh;
    left: calc(7vw + 120px);
    font: 13px var(--font-cond);
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 30;
    .cur {
        font-size: 22px;
        font-weight: 700;
        color: var(--white);
    }
    .line {
        width: 26px;
        height: 1px;
        background: var(--white-25);
    }
}

.dot-pills {
    position: absolute;
    bottom: 6.5vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 30;
}

.pill {
    width: 14px;
    height: 6px;
    border-radius: 99px;
    background: var(--white-25);
    cursor: pointer;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.45s ease;
    &:hover:not(.active) {
        background: rgba(255, 255, 255, 0.5);
    }
    &.active {
        width: 44px;
        background: var(--secondary);
        position: relative;
        overflow: hidden;
        &::after {
            content: '';
            position: absolute;
            inset: 0 auto 0 0;
            width: 0%;
            background: rgba(255, 255, 255, 0.45);
            animation: pillTimer 5s linear forward;
        }
    }
}

@keyframes pillTimer {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}



/* =========================================
             GALLERY & FILTER BAR
========================================= */
/* Merged & Cleaned Filter Bar */
.filter-bar {
  position: sticky;
  top: 1rem;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  flex-wrap: wrap;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;

  button {
    position: relative;
    z-index: 2;
  }

  input, select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    position: relative;
    z-index: 2;
  }

  input[type="text"] {
    flex: 1;
    min-width: 150px;
  }

  @media (max-width: 600px) {
    top: 0.5rem;

    select {
      flex: 1;
      min-width: 100px;
    }
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-card {
  position: relative;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid var(--border, #e2e8f0);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.2s;

  &.is-visible {
    opacity: 1;
    transform: translateY(0);

    &:hover {
      transform: translateY(-4px);
      box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }
  }
}

.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.view-btn, .tag, .purchase-options, .heart-btn {
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.card-img-container {
  height: 200px;
  overflow: hidden;
  background: #f1f5f9;
  position: relative;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}

.view-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 1rem;
  transition: 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);

  &:hover {
    background: white;
    transform: scale(1.05);
  }
}

.card-content {
  padding: 1rem;
}

.card-content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.1rem;
  color: var(--primary);
}

/* =========================================
             PHOTO LAYOUT
========================================= */
.photo-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;

  @media (max-width: 768px) {
    grid-template-columns: 1fr;
  }
}

.main-image {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: block;
}

.meta-box {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.meta-item {
  margin-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 1rem;

  &:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
}

.meta-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
  cursor: pointer;

  &:hover {
    color: var(--primary);
  }
}

/* =========================================
             MASONRY GRID
========================================= */
.masonry-grid {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.masonry-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}

.masonry-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  will-change: opacity;

  &.is-visible {
    opacity: 1;
  }

  img {
    width: 100%;
    height: auto;
    display: block;
    background: #f1f5f9;
    cursor: zoom-in;
  }
}

.masonry-meta {
  padding: 0.75rem 1rem;
  background: white;
  font-size: 0.85rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* =========================================
             FOOTER
========================================= */
footer {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;

  a {
    color: #93c5fd;
    text-decoration: none;
    margin: 0 0.5rem;

    &:hover {
      text-decoration: underline;
    }
  }

  .footer-links {
    margin-top: 1rem;
    font-size: 0.9rem;
  }
}

/* =========================================
             LIGHTBOX
========================================= */
#lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  z-index: 11000;

  img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  }

  #lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    user-select: none;
  }
}

.clickable-img {
  cursor: zoom-in;
  transition: opacity 0.2s;

  &:hover {
    opacity: 0.9;
  }
}

/* =========================================
             COOKIE CONSENT BANNER
========================================= */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #222222;
  color: #ffffff;
  padding: 15px 20px;
  z-index: 9999;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.cookie-content {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;

  p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
  }

  a {
    color: var(--secondary);
    text-decoration: underline;

    &:hover {
      color: white;
    }
  }

  @media (min-width: 768px) {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* =========================================
          GLOBAL CART DRAWER
========================================= */
#cart-drawer {
  position: fixed;
  top: 0;
  right: -350px;
  width: 350px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 15px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  z-index: 12000;
  padding: 20px;
  display: flex;
  flex-direction: column;

  .cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;

    h3 {
      margin: 0; color: #1e293b;
    }

    button {
      background:none;
      border:none;
      font-size: 24px;
      cursor:pointer;
      color: #64748b;
    }
  }

  .cart-main {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;

    p {
      color: #64748b;
      font-size: 0.95rem;
      text-align: center;
      margin-top: 20px;
    }
  }

  .cart-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;

    .cart-footer-wrapper {
      display:flex;
      justify-content:space-between;
      font-weight:bold;
      margin-bottom:15px;
      font-size:1.1rem;
      color: #1e293b;
    }
  }
}


/* =========================================
             REDUCED MOTION
========================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
