/* ============================================
   Elefantive — Handcraft Website
   Clean, warm design for handmade products
   ============================================ */

:root {
  --color-bg: #f7f8f7;
  --color-bg-warm: #edf0ee;
  --color-text: #231F20;
  --color-text-light: #3a3536;
  --color-primary: #2A706C;
  --color-primary-dark: #1e5451;
  --color-primary-light: #85908A;
  --color-accent: #2A706C;
  --color-white: #ffffff;
  --color-border: #d0d5d2;

  --font-heading: 'Baloo 2', cursive;
  --font-body: 'Josefin Sans', 'Segoe UI', sans-serif;

  --max-width: 1100px;
  --spacing: 2rem;
  --radius: 8px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-dark);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* ============================================
   Header
   ============================================ */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.site-logo-img {
  height: 55px;
  width: auto;
}

.site-logo:hover {
  opacity: 0.8;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--color-text-light);
  font-weight: 400;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.site-nav a:hover,
.site-nav a.active:not(.lang-link) {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: 0.3s;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--color-border);
}

.lang-link {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  color: var(--color-text-light);
  text-decoration: none;
}

.lang-link:hover {
  color: var(--color-text);
  background: var(--color-bg-warm);
}

.site-nav .lang-link.active,
.lang-link.active {
  color: var(--color-white);
  background: #6b6f6c;
  font-weight: 800;
  border-bottom-color: transparent;
}

.site-nav .lang-link.active:hover,
.lang-link.active:hover {
  color: var(--color-white);
  background: var(--color-text);
  border-bottom-color: transparent;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background: var(--color-bg-warm);
  text-align: center;
  padding: 5rem var(--spacing);
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-order {
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
}

.text-center {
  text-align: center;
  margin-top: 2.5rem;
}

/* ============================================
   Product Grid
   ============================================ */
.featured-products,
.products-listing {
  padding: 4rem 0;
}

.featured-products h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

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

/* Product Card */
.product-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.product-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-image {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--color-bg-warm);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--color-primary-light);
}

.product-image--large {
  aspect-ratio: 1/1;
  font-size: 5rem;
  min-height: 300px;
}

.product-info {
  padding: 1.2rem 1.5rem;
}

.product-info h3 {
  margin-bottom: 0.3rem;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.product-excerpt {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ============================================
   Product Detail
   ============================================ */
.product-detail {
  padding: 3rem 0;
}

.product-detail-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.product-detail-header h1 {
  margin-bottom: 0;
}

.product-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.product-hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-hero-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.product-intro {
  font-size: 1.15rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

.product-intro p {
  margin-bottom: 0.75rem;
}

.product-hero-text .btn-order {
  align-self: flex-start;
}

.product-intro p:last-child {
  margin-bottom: 0;
}

/* Version sections */
.product-version {
  margin-bottom: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-primary-light);
}

.product-version:first-of-type {
  border-top: none;
  padding-top: 0;
}

.product-version-title {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

/* Product footer */
.product-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-primary-light);
  text-align: center;
}

.product-footer-text {
  font-size: 1.15rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.product-footer-text:empty {
  display: none;
}

.product-footer .btn {
  margin: 0 0.5rem 0.5rem;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Main media display */
.media-main-wrap {
  position: relative;
}

.media-main-wrap:hover .media-nav {
  opacity: 1;
}

.media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.6rem 0.5rem;
  border-radius: 4px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}

.media-nav:hover {
  background: rgba(0,0,0,0.7);
}

.media-nav--prev { left: 0.5rem; }
.media-nav--next { right: 0.5rem; }

.media-main {
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.media-main-img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
}

.media-main-video {
  width: 100%;
  max-height: 400px;
  display: block;
  border-radius: var(--radius);
}

/* Thumbnail strip */
.media-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  position: relative;
}

.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb:hover {
  border-color: var(--color-primary);
}

.thumb--active {
  border-color: var(--color-text);
}

.thumb--video .thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 1.2rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox--open {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--color-primary);
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem 0.75rem;
  border-radius: 4px;
  z-index: 1001;
  transition: background 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.product-detail-info h1 {
  margin-bottom: 0.5rem;
}

.product-detail-price {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.product-detail-description {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.product-detail-info .btn {
  display: block;
  text-align: center;
  margin-bottom: 0.75rem;
}

/* ============================================
   Page Header & Content
   ============================================ */
.page-header {
  background: var(--color-bg-warm);
  padding: 3rem 0;
  text-align: center;
}

.page-description {
  color: var(--color-text-light);
  margin-top: 0.75rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.content-area {
  padding: 3rem 0;
}

.content-area p {
  margin-bottom: 1rem;
}

.about-content .container {
  max-width: 750px;
}

.home-content {
  padding: 3rem 0;
  background: var(--color-white);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--color-text);
  color: var(--color-bg-warm);
  text-align: center;
  padding: 2rem 0;
  margin-top: auto;
}

.site-footer p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.site-footer a,
.site-footer-content a {
  color: #9a9e9b;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer-content a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.footer-social-link {
  color: #9a9e9b;
  transition: color 0.2s;
}

.footer-social-link:hover {
  color: var(--color-white);
  text-decoration: none;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 1rem var(--spacing);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }

  .language-switcher {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero {
    padding: 3rem var(--spacing);
  }

  .product-hero {
    grid-template-columns: 1fr;
  }

  .product-hero-image {
    order: -1;
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
}
