/* base.css */

/* Preloader */
#preloader {
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
    background-color: rgb(16, 16, 16);
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease-in-out; /* Smooth fade-out */
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none; /* Make elements behind preloader clickable */
}

.animate-spin {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Modal window smooth appearance */
#image-modal {
    transition: opacity 0.5s ease-in-out;
    opacity: 0;
}

#image-modal.hidden {
    opacity: 0;
}

#image-modal.show {
    opacity: 1;
}

/* Smooth image appearance */
#modal-image {
    transform: scale(0.8);
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 0;
}

#image-modal.show #modal-image {
    transform: scale(1);
    opacity: 1;
}

@keyframes fadeIn {
    0% {
        opacity: 0.1;
    }
    100% {
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px); /* Left shift */
    }
    100% {
        opacity: 1;
        transform: translateX(0); /* Element in its place */
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(50px); /* Right shift */
    }
    100% {
        opacity: 1;
        transform: translateX(0); /* Element in its place */
    }
}

.grid-appearance {
    opacity: 0; /* Elements hidden by default */
    transition: opacity 0.9s ease-in-out, transform 0.5s ease-in-out; /* Transition for smoothness */
}

.grid-appearance.slide-in-left {
    animation: slideInFromLeft 0.9s ease forwards;
}

.grid-appearance.slide-in-right {
    animation: slideInFromRight 0.9s ease forwards;
}

.font-small-caps {
    font-variant: small-caps;
}

.font-small-caps-none {
    font-variant: unset;
}

.eveens {
    font-variant: small-caps;
    font-weight: 600;
}

html {
    scroll-behavior: smooth;
}


.no-select {
    user-select: none;
    -webkit-user-select: none; /* For Safari */
    -moz-user-select: none;    /* For Firefox */
    -ms-user-select: none;     /* For IE10+ */
}

/* Additional selection blocking for all elements in the menu */
nav * {
    user-select: none;
    -webkit-user-select: none; /* For Safari */
    -moz-user-select: none;    /* For Firefox */
    -ms-user-select: none;     /* For IE10+ */
}

/* Locket caption — подпись в музейном стиле (index, product) */
.locket-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.locket-caption {
    text-align: left;
    padding-top: 8px;
    border-top: 1px solid var(--line-light, #E2DED7);
}

.locket-caption-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.locket-preview {
    width: auto;
    height: 64px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.locket-caption:hover .locket-preview {
    opacity: 1;
}

.locket-caption-text {
    flex: 1;
    min-width: 0;
}

.locket-title {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-main, #1F1F1F);
    margin: 0 0 4px 0;
    line-height: 1.4;
    font-style: italic;
}

.locket-title-link {
    color: var(--text-main, #1F1F1F);
    text-decoration: none;
    transition: color 0.2s ease;
}

.locket-title-link:hover {
    color: var(--gold-main, #C9A45C);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.locket-details {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-muted, #6B6B6B);
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

/* Gold lines on sides (shared utility) */
.gold-line-sides {
    position: relative;
    padding-left: 90px;
    padding-right: 90px;
}

.gold-line-sides::before,
.gold-line-sides::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 70px;
    height: 1px;
    transform: translateY(-50%);
    z-index: 1;
}

.gold-line-sides::before {
    left: 0;
    background: linear-gradient(
        to left,
        var(--gold-main, #C9A45C) 0%,
        rgba(201, 164, 92, 0.7) 30%,
        rgba(201, 164, 92, 0.3) 70%,
        rgba(201, 164, 92, 0) 100%
    );
}

.gold-line-sides::after {
    right: 0;
    background: linear-gradient(
        to right,
        var(--gold-main, #C9A45C) 0%,
        rgba(201, 164, 92, 0.7) 30%,
        rgba(201, 164, 92, 0.3) 70%,
        rgba(201, 164, 92, 0) 100%
    );
}

@media (max-width: 768px) {
    .gold-line-sides {
        padding-left: 52px;
        padding-right: 52px;
    }

    .gold-line-sides::before,
    .gold-line-sides::after {
        width: 40px;
    }
}

@media (max-width: 768px) {
    .locket-container {
        gap: 12px;
    }

    .locket-caption-content {
        gap: 12px;
    }

    .locket-preview {
        width: 56px;
        height: 56px;
    }

    .locket-title {
        font-size: 16px;
    }

    .locket-details {
        font-size: 13px;
    }
}

/* FOOTER */
/* ВАЖНО: использую твои переменные вида --*-rgb (как ты уже делал) */

.footer-eveens{
    position: relative;
    background:
      radial-gradient(900px 260px at 20% 0%,
        rgba(var(--gold-light-rgb), .18),
        rgba(var(--bg-main-rgb), 0) 60%),
      rgba(var(--bg-soft-rgb), .92);
    color: rgba(var(--text-main-rgb), 1);
    border-top: 1px solid rgba(var(--line-light-rgb), 1);
  }
  
  .footer-eveens::before{
    content:"";
    position:absolute;
    left:0; right:0; top:0;
    height:2px;
    background: linear-gradient(90deg,
      rgba(var(--gold-main-rgb), 0),
      rgba(var(--gold-main-rgb), .9),
      rgba(var(--gold-main-rgb), 0));
  }
  
  .footer-eveens__inner{
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 16px;
  }
  
  .footer-eveens__grid{
    display: grid;
    gap: 28px;
    grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
    align-items: start;
  }
  
  .footer-eveens__brand{ padding-right: 12px; }
  .footer-eveens__logo{
    display: inline-flex;
    align-items: center;
    letter-spacing: .08em;
    font-weight: 600;
    font-size: 20px;
    color: rgba(var(--text-main-rgb), 1);
  }
  .footer-eveens__logo img{
    display: block;
    width: auto;
    height: 32px;
    max-width: 160px;
    object-fit: contain;
  }
  .footer-eveens__tagline{
    margin-top: 10px;
    color: rgba(var(--text-muted-rgb), 1);
    line-height: 1.5;
    max-width: 34ch;
  }
  
  .footer-eveens__title{
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(var(--text-muted-rgb), 1);
    margin-bottom: 10px;
  }
  
  .footer-eveens__link{
    display: block;
    padding: 6px 0;
    text-decoration: none;
    color: rgba(var(--text-main-rgb), 1);
    opacity: .92;
    transition: opacity 160ms ease, transform 160ms ease;
  }
  .footer-eveens__link:hover{
    opacity: 1;
    transform: translateX(2px);
  }
  
  .footer-eveens__muted{
    color: rgba(var(--text-muted-rgb), 1);
    line-height: 1.5;
    margin-bottom: 12px;
  }
  
  .footer-eveens__form{
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  
  .footer-eveens__input{
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(var(--gold-main-rgb), .35);
    background: rgba(var(--bg-main-rgb), .9);
    padding: 0 14px;
    color: rgba(var(--text-main-rgb), 1);
    outline: none;
  }
  .footer-eveens__input:focus-visible{
    box-shadow: 0 0 0 2px rgba(var(--gold-light-rgb), .35);
    border-color: rgba(var(--gold-main-rgb), .6);
  }
  
  .footer-eveens__button{
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid rgba(var(--gold-main-rgb), .65);
    background: rgba(var(--gold-light-rgb), .22);
    color: rgba(var(--text-main-rgb), 1);
    cursor: pointer;
    transition: background-color 160ms ease, transform 120ms ease, border-color 160ms ease;
  }
  .footer-eveens__button:hover{
    background: rgba(var(--gold-light-rgb), .30);
    border-color: rgba(var(--gold-main-rgb), .85);
  }
  .footer-eveens__button:active{ transform: translateY(1px); }
  
  .footer-eveens__bottom{
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid rgba(var(--line-light-rgb), 1);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    color: rgba(var(--text-muted-rgb), 1);
    font-size: 13px;
  }
  
  .footer-eveens__link--inline{ display: inline; padding: 0; }
  .footer-eveens__sep{ margin: 0 8px; opacity: .6; }
  
  @media (max-width: 1024px){
    .footer-eveens__grid{ grid-template-columns: 1fr 1fr; }
  }
  
  @media (max-width: 640px){
    .footer-eveens__inner{ padding: 28px 18px 14px; }
    .footer-eveens__grid{ grid-template-columns: 1fr 1fr; }
    .footer-eveens__brand{ grid-column: 1 / -1; }
    .footer-eveens__grid > .footer-eveens__col:last-child{ grid-column: 1 / -1; }
    .footer-eveens__form{ grid-template-columns: 1fr; }
    .footer-eveens__button{ width: 100%; }
  }