:root {
    --color-bg: #F0E6E1;
    --color-text: #775846;
    --accent: #d4906d;
    --accent-dark: #5D6848;
    --card-bg: rgba(241, 194, 143, 0.14);
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);

    --max-width: 1440px;
    --radius: 20px;

    --font-sans: 'Roboto', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Pacifico', var(--font-sans);

    --swiper-theme-color: #5D6848;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
}

.container {
    text-align: center;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
    box-sizing: border-box;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    text-align: center;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 6rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.25rem, 2.2vw, 2rem);
}

p {
    font-family: 'Delius', var(--font-sans);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    margin: 0.625rem 0;
    text-align: left;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(212, 144, 109, 0.7);
    color: var(--accent-dark);
    border: none;
    border-radius: 30px;
    padding: 0 1rem;
    min-height: 3.75rem;
    min-width: 9.375rem;
    font-size: 1.125rem;
    font-family: var(--font-display);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;

}

button:hover,
button:focus {
    background-color: var(--accent);
    color: var(--color-text);
}

button:active {
    transform: translateY(1px);
}

/* Фокусировка для клавиатуры */
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(93, 104, 72, 0.4);
    outline-offset: 2px;
}

header,
.buttons,
.gelery,
.cardMenu,
.contact,
.icons,
.order {
    display: flex;
}

header {
    flex-wrap: wrap;
    align-items: center;
    height: 160px;
    justify-content: space-around;
    gap: 1rem;
    padding: 1rem 0;
    position: relative;
}

.header-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.language-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.lang-abbr {
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--color-text);
    min-width: 18px;
    text-align: center;
    line-height: 1;
    text-decoration: none !important;
    display: block;
}

.language-toggle:hover .lang-icon {
    transform: scale(1.1);
}

.logo {
    max-height: 10rem;
    height: auto;
    width: auto;
}

.insta,
.vinted,
.wallapop,
.lang-icon {
    width: 3.625rem;
    height: 3.625rem;
    transition: transform 0.1s;
}

.banner {
    width: 100%;
    min-height: 507px;
    background-image: url(../img/banner1.jpg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem 5rem;
}

.banner h1 {
    color: var(--accent-dark);
    margin: 0;
    text-align: right;
}

.about p {
    text-align: center;
}

.menu {
    background-color: rgba(241, 194, 143, 0.14);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
    padding: 2rem 1rem;
}

.buttons {
    justify-content: space-around;
    align-items: center;
    gap: 1rem;
    user-select: none;
    flex-wrap: wrap;
}

.ringBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(212, 144, 109, 0.7);
    width: 9.375rem;
    height: 9.375rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: background-color 0.35s ease, transform 0.35s ease;
    border: none;
    padding: 0;
}

.ringBtn h2 {
    color: var(--accent-dark);
    margin: 0;
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.ringBtn:hover {
    background-color: rgba(93, 104, 72, 0.7);
    transform: scale(1.05);
}

.ringBtn:hover h2 {
    color: var(--color-text);
    transform: scale(1.02);
}

.ringBtn.active {
    background-color: rgba(93, 104, 72, 0.7);
}

.ringBtn.active h2 {
    color: var(--color-text);
}

/* Toggle Switch Styles */
.filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.toggle-label {
    font-size: 1rem;
    color: var(--color-text);
    user-select: none;
    min-width: 140px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.gelery {
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem 0;
}

.card {
    border-radius: var(--radius);
    background-color: var(--card-bg);
    width: clamp(18.75rem, 90%, 28.125rem);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.swiper {
    width: 100%;
    max-width: 25rem;
    margin: 1.5rem auto;
}

.card h2 {
    color: var(--accent-dark);
    padding: 0 1rem;
    min-height: 2.5rem;
    text-align: center;
}

.card p {
    margin: 0.625rem 1.25rem;
    text-align: center;
}

/* Fixed height for card paragraph — JS will shrink font-size if needed */
.card p {
    height: 6.5rem;
    overflow: initial;
    line-height: 1.2;
}

.cardMenu {
    justify-content: space-around;
    align-items: center;
    padding: 1rem;
}

.more {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 2rem;
}

footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    background-image: url(../img/bannerStones.jpg);
    background-size: cover;
    background-position: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    gap: 1.5rem;
}

footer h2,
footer h3 {
    margin: 0;
    color: var(--accent-dark);
}

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

footer a:hover {
    color: var(--color-text);
}

.icons {
    gap: 1.5rem;
}

.icon {
    width: auto;
    height: 3rem;
}

.mail,
.whatsapp,
.vinted,
.wallapop {
    height: 2.75rem;
    width: auto;
    transition: transform 0.2s;
}

.mail:hover,
.whatsapp:hover {
    transform: scale(1.1);
}

#modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background-color: rgba(240, 225, 213, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity 0.25s ease;
    opacity: 0;
}

#modal.show {
    opacity: 1;
    pointer-events: all;
}

#modal[aria-hidden="true"] {
    display: none;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: clamp(20rem, 70%, 70rem);
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-content-wrapper {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.modal-swiper-container {
    flex: 0 0 35%;
    min-width: 200px;
}

.modal-swiper {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
}

.modal-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-swiper img.photo {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--color-text);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
    min-width: auto;
    min-height: auto;
}

.close:hover,
.close:focus {
    color: #000;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.content h2 {
    color: var(--accent-dark);
    margin: 0;
}

.order {
    align-items: center;
    gap: 1rem;
}

.sellerPrice {
    font-size: clamp(2rem, 5vw, 4.375rem);
    color: var(--color-text);
    margin: 0.5rem 0;
}

.price {
    color: var(--color-text);
    font-size: clamp(1.75rem, 4vw, 4.375rem);
    padding-left: 1.25rem;
}

small {
    text-align: left;
    font-size: 0.875rem;
    color: #999;
}

.contact {
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.contact p {
    flex: 1;
    min-width: 200px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: rgba(212, 144, 109, 0.7);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top:hover {
    background-color: rgba(212, 144, 109, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

.scroll-to-top.show {
    display: flex;
}

.scroll-to-top svg {
    width: 1.5rem;
    height: 1.5rem;
}

.photo {
    border-radius: 20px;
}

/* Disable selection and image dragging across the site (allow form controls) */
html,
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

input,
textarea,
select,
button {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}