:root {
  --bg-color: #faf9f6;
  --text-color: #1a1a1a;
  --text-muted: #707070;
  --border-color: #E2E0D9;
  --accent-color: #A3906B;
  --white: #FFFFFF;
  --success: #3D6A45;
  --danger: #A64B4B;
  --font-sans: Helvetica, Arial, sans-serif;
  --font-serif: Georgia, serif;
  --max-width: 1400px;
  --header-height: 80px;
  --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 400;
  text-transform: uppercase;
}
.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--text-color);
  color: var(--white);
  padding: 1rem 2rem;
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--text-color);
  width: 100%;
}
.btn:hover {
  background-color: transparent;
  color: var(--text-color);
}
.btn-secondary {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  border-color: var(--text-color);
  background-color: rgba(0, 0, 0, 0.02);
}
.btn-danger {
  background-color: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-danger:hover {
  background-color: var(--danger);
  color: var(--white);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

header {
  height: var(--header-height);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  background-color: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: var(--transition);
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.logo {
  font-weight: bold;
  font-size: 1.3rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.logo span {
  font-weight: 200;
  color: var(--text-muted);
}
.nav-menu ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}
nav a {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  font-weight: 400;
  position: relative;
  padding: 0.5rem 0;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--text-color);
  transition: var(--transition);
}
nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}
.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 10px;
    transition: all 0.3s ease;
}
.admin-link {
    margin-left: 1.5rem;
}
@media (max-width: 768px) {
    .menu-toggle {
        display: flex; /* Показуємо гамбургер */
    }

    .nav-menu {
      display: flex;
      /* display: none; */
      position: absolute;
      top: var(--header-height);
      left: 0;
      width: 100%;
      visibility: hidden;
      opacity: 0;
      transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .nav-menu ul {
        flex-direction: column;
        background-color: #ffffff;
        width: 100%;
        padding: 2rem;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        gap: 1.5rem;
        text-align: center;
        z-index: 9;
    }

    .nav-menu.active {
        display: flex;
        visibility: visible;
        opacity: 1;
    }

    /* Скидаємо десктопний відступ для адмінки на мобільному */
    .admin-link {
        margin-right: 0 !important;
    }

    /* Анімація перетворення гамбургера на хрестик (за бажанням) */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

main {
  flex: 1;
}

.hero {
  text-align: center;
  padding: 0 0 1rem 0;
  max-width: 800px;
  margin: 0 auto;
}
.hero.hero-collection {
  padding: 3rem 0 1rem 0;
}
.hero h2 {
  font-size: 2.5rem;
  font-weight: 200;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-style: italic;
}

.gallery-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 5rem 2rem;
}
@media (max-width: 576px) {
  .gallery-container {
    padding: 0 1rem 5rem 1rem;
  }
}
@media (max-width: 400px) {
  .gallery-container {
    padding: 0 0.5rem 5rem 0.5rem;
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
}

.image-wrapper {
  aspect-ratio: 4 / 5;
  background-color: #fcfcfc;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1rem;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.4s ease, transform 0.4s ease; 
}

.gallery-item:hover .image-wrapper img {
  opacity: 0.90;
  transform: scale(1.03);
}

.image-wrapper img:hover {
  opacity: 0.95;
}

.item-info .title {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 0.25rem 0;
}

.item-info .description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.form-container {
  max-width: 400px;
  background-color: var(--white);
  padding: 3rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
}

.login-container {
  margin: 2rem auto;
}
.login-title {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 1.2rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.form-control {
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--text-color);
}
textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.flash-messages {
  color: #d9534f;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

footer {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 4rem 0;
  background-color: var(--white);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}
.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem 5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
@media (min-width: 769px) {
    .detail-container { flex-direction: row; align-items: flex-start; }
    .detail-image { flex: 1.5; }
    .detail-info { flex: 1; position: sticky; top: 2rem; }
}
.detail-image img {
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
    display: block;
    border: 1px solid var(--border-color);
}
.detail-info h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 0 1rem 0;
}
.detail-meta {
    font-style: italic;
    color: var(--muted-color);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}
.detail-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 2rem 0;
    margin-top: auto;
}

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

.footer-copy {
    font-size: 0.9rem;
    color: #ccc;
}

.footer-socials {
    display: flex;
    gap: 1.2rem; /* Відступ між іконками */
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Робимо круглу кнопку */
    background-color: #2a2a2a;
    color: #ffffff;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease; /* Плавна анімація */
}

.social-link.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-link.telegram:hover {
    background-color: #0088cc;
}

.social-link.viber:hover {
    background-color: #7360f2;
}

.social-link:hover {
    transform: translateY(-3px);
    color: #ffffff;
}

@media (max-width: 576px) {
    .footer-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}
/* End Footer */

/* --- Collections dropdown menu --- */
.dropdown {
    position: relative;
}
.dropdown-toggle i {
    font-size: 0.8rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}
.nav-menu .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    list-style: none;
    border-radius: 4px;
    z-index: 100;
}
.nav-menu .dropdown-menu li a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: #333;
    font-size: 0.8rem;
    text-align: left;
    transition: background 0.2s ease;
}
.nav-menu .dropdown-menu li a:hover {
    background-color: #f5f5f5;
    color: #000;
}
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    .dropdown:hover .dropdown-toggle i {
        transform: rotate(180deg);
    }
}

/* --- mobile --- */
@media (max-width: 768px) {
    .dropdown {
        width: 100%;
    }
    .nav-menu .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        background-color: #fafafa;
        box-shadow: none;
        padding: 0;
        margin-top: 0.5rem;
    }
    .nav-menu .dropdown-menu li a {
        text-align: center;
        padding: 0.8rem;
    }
    .dropdown.open .dropdown-menu {
        display: block;
    }
    .dropdown.open .dropdown-toggle i {
        transform: rotate(180deg);
    }
}
/* --- END Collections dropdown menu --- */

/* Painting image lightbox */
.detail-image {
    position: relative;
    cursor: pointer;
}
.zoom-trigger {
    transition: opacity 0.3s ease;
}
.zoom-trigger:hover {
    opacity: 0.9;
}
.zoom-hint {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
    text-align: center;
}
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.lightbox-content {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    animation: zoomIn 0.25s ease;
}
.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}
.lightbox-close:hover {
    color: #bbb;
}
@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Спеціально для мобільних: дозволяємо нативний скрол/зум пальцями, якщо картинка велика */
@media (max-width: 768px) {
    .lightbox {
        overflow: auto; /* Дозволяє скролити велику картинку */
    }
    .lightbox-content {
        max-height: none; /* Знімаємо обмеження висоти для вільного тач-зуму */
    }
    .lightbox-close {
        top: 1rem;
        right: 1.5rem;
        font-size: 3rem; /* Більший хрестик, щоб легше влучити пальцем */
    }
}

/* Банер на всю ширину екрана */
.home-hero-full {
    width: 100%;
    margin-bottom: 2rem;
    overflow: hidden;
}

.home-hero-full img {
    width: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 768px) {
    .home-hero-full img {
        max-height: 300px;
    }
}
