/* premium.css - Adding WOW factor */
:root {
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --gradient-primary: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    --gradient-bg: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

body {
    background: var(--gradient-bg);
    min-height: 100vh;
}

/* Glassmorphism Header */
header {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Enhancing Buttons */
.button--primary,
.btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 126, 95, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
}

.button--primary:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 126, 95, 0.4);
}

/* Product Cards */
.product-card {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px !important;
    box-shadow: var(--glass-shadow) !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(31, 38, 135, 0.15) !important;
}

.product-card__image {
    transition: transform 0.5s ease;
    width: 100%;
    max-width: 100%;
    height: 250px;
    object-fit: contain;
    padding: 10px;
    background-color: transparent;
    border-bottom: 1px solid #eee;
    display: block;
    margin: 0 auto;
}

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

.product-card__info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

/* Smooth gradients for text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Micro-animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-grid>div {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.product-grid>div:nth-child(1) {
    animation-delay: 0.1s;
}

.product-grid>div:nth-child(2) {
    animation-delay: 0.2s;
}

.product-grid>div:nth-child(3) {
    animation-delay: 0.3s;
}

.product-grid>div:nth-child(4) {
    animation-delay: 0.4s;
}

.product-grid>div:nth-child(5) {
    animation-delay: 0.5s;
}

.product-grid>div:nth-child(6) {
    animation-delay: 0.6s;
}

.product-grid>div:nth-child(7) {
    animation-delay: 0.7s;
}

.product-grid>div:nth-child(8) {
    animation-delay: 0.8s;
}

/* Custom Search Input */
.search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto 40px auto;
}

.search-input {
    width: 100%;
    padding: 15px 25px;
    border-radius: 30px;
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05), 0 4px 10px rgba(0, 0, 0, 0.05);
    font-size: 16px;
    transition: all 0.3s ease !important;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 126, 95, 0.2), 0 6px 15px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    border-radius: 25px;
    padding: 0 20px;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    cursor: zoom-out;
    justify-content: center;
    align-items: center;
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: zoom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.modal-next, .modal-prev {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.5);
    z-index: 10000;
}

.modal-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.modal-prev {
    left: 0;
}

.modal-next:hover, .modal-prev:hover {
    background-color: rgba(0,0,0,0.8);
}

/* Language Dropdown */
.lang-dropdown { position: relative; display: inline-block; }
.lang-dropbtn { background: none; border: none; font-size: 16px; cursor: pointer; font-weight: bold; color: var(--primary-color); padding: 5px 10px; display: flex; align-items: center; transition: 0.3s ease; }
.lang-dropbtn:hover { color: var(--green); }
.lang-dropdown-content { display: none; position: absolute; background-color: #fff; min-width: 100px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.15); z-index: 1000; border-radius: 8px; overflow: hidden; right: 0; top: 100%; border: 1px solid #eee; }
.lang-dropdown-content button { color: #333; padding: 12px 16px; text-decoration: none; display: block; width: 100%; border: none; background: none; text-align: left; cursor: pointer; font-size: 14px; font-family: 'Inter', sans-serif; transition: 0.2s ease; }
.lang-dropdown-content button:hover { background-color: #f8f9fa; color: var(--green); }
.lang-dropdown:hover .lang-dropdown-content { display: block; }

.header__nav-container { display: flex; align-items: center; width: 100%; justify-content: space-between; }
.mobile-menu-toggle { display: none; font-size: 24px; cursor: pointer; color: var(--black-main); padding: 10px; }
.cart-badge { background: var(--green); color: white; border-radius: 50%; padding: 2px 6px; font-size: 12px; margin-left: 4px; }

/* Mobile Adaptation */
@media (max-width: 992px) {
    .main-content-grid {
        grid-template-columns: 1fr !important;
    }
    .site-header { padding: 10px 0; position: relative; }
    .header-container {
        justify-content: space-between !important;
        align-items: center !important;
    }
    .header__logo img {
        height: 50px !important;
    }
    
    .mobile-menu-toggle { display: block; }
    
    .header__nav-container {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 20px;
        z-index: 999;
        gap: 20px;
        border-top: 1px solid #eee;
    }
    
    .header__nav-container.active {
        display: flex;
    }
    
    .header__nav ul {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100%;
        gap: 15px !important;
    }
    
    .header__nav ul li { width: 100%; text-align: center; }
    .header__nav ul li a { display: block; padding: 10px; border-radius: 8px; background: #f8f9fa; }
    
    .header__right { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 15px !important; }
    .header__lang { margin-left: 0; align-self: center; }
    .lang-dropdown-content { right: auto; left: 50%; transform: translateX(-50%); }
    
    .header__auth-buttons { width: 100%; display: flex; justify-content: center; }
    
    /* Каталог товаров: 2 колонки на мобильных */
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; /* Строго 2 колонки даже на самых маленьких */
        gap: 8px !important;
    }
    .product-card {
        padding: 10px;
        gap: 10px;
    }
    .product-card__title { font-size: 14px; }
    .product-card__price { font-size: 16px; }
}

/* Header and Footer spacing adjustments */
@media (min-width: 993px) {
    .site-header .header-container {
        max-width: 100% !important;
        padding: 0 40px;
    }
    .header__nav-container {
        flex: 1;
        justify-content: center;
    }
    .header__nav {
        margin: 0 auto;
    }
    .header__right {
        margin-left: auto;
    }
}

/* Fix footer nesting and frames */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}
.main-content {
    flex: 1 0 auto;
}
footer {
    padding: 0 !important;
    background: none !important;
    display: block !important;
    height: auto !important;
    flex-shrink: 0;
}
.footer-container {
    margin-top: 0 !important;
    height: auto !important;
}