/*
Theme Name: OK Кейтеринг
Author: Admin
Version: 1.0
*/

.promo-card .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.promo-card .promo-code-container {
    position: relative;
}

.promo-card .promo-code-hidden {
    pointer-events: none;
}

.promo-card .copy-promo-code {
    pointer-events: auto;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(140, 179, 105, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(140, 179, 105, 0); }
}

#cart-icon-container:not(.opacity-0) #openCheckoutModal {
    animation: pulse-glow 2s infinite;
}

#cart-items-list .w-16 {
    width: 4rem;
    height: 4rem;
}

#cart-items-list .w-20 {
    width: 5rem;
    height: 5rem;
}

#cart-items-list img {
    transition: transform 0.2s ease;
}

#cart-items-list .flex:hover img {
    transform: scale(1.05);
}

/* Обрезка длинных названий */
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

@media (max-width: 768px) {
    #cart-icon-container {
        bottom: 5rem;
        right: 1.5rem;
    }
    
    #cart-count-badge {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.7rem;
    }
    
    #cart-items-list .w-16 {
        width: 5rem;
        height: 5rem;
    }
    
    .group:hover .group-hover\:opacity-100 {
        opacity: 0 !important;
    }
}

/* Стили для модалки обратной связи */

#feedbackModal {
    overflow: visible;
}

.feedback-content, .feedback-content-mobile {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

#feedbackModal.active .feedback-content,
#feedbackModal.active .feedback-content-mobile {
    transform: translateX(0);
}

.feedback-content-mobile {
    width: 100vw;
    height: 100vh;
    box-shadow: none;
}

@media (max-height: 600px) {
    .feedback-content-mobile .p-6 {
        padding: 1rem;
    }
    
    .feedback-content-mobile h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .feedback-content-mobile .space-y-5 {
        gap: 1rem;
    }
}

.open-feedback-modal {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.2s;
}

.open-feedback-modal:hover {
    color: white;
}

@media (max-width: 768px) {
    #feedbackFormMobile input, 
    #feedbackFormMobile textarea {
        font-size: 16px !important;
        min-height: 44px;
    }
    
    #feedbackFormMobile button[type="submit"] {
        min-height: 54px;
        font-size: 16px;
    }
}

#cart-notification {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: calc(100vw - 2rem);
}

#cart-notification.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

@media (max-width: 640px) {
    #cart-notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    #cart-notification > div {
        max-width: 100%;
    }
}

/* Стили шапки */

#mobile-menu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}
.burger-icon {
    width: 24px;
    height: 24px;
    position: relative;
    cursor: pointer;
}
.burger-line {
    position: absolute;
    height: 2px;
    width: 100%;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}
.burger-line:nth-child(1) { top: 6px; }
.burger-line:nth-child(2) { top: 11px; }
.burger-line:nth-child(3) { top: 16px; }
.burger-icon.active .burger-line:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger-icon.active .burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-icon.active .burger-line:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}
.menu-item {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#mobile-menu.open .menu-item {
    opacity: 1;
    transform: translateY(0);
}
#mobile-menu.open .menu-item:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .menu-item:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .menu-item:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .menu-item:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .menu-item:nth-child(5) { transition-delay: 0.3s; }

.categories-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 200px;
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
}

.categories-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.categories-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}
.category-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: #1A1A1A;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}
.category-link:last-child {
    border-bottom: none;
}
.category-link:hover {
    background-color: #f8faf7;
    color: #8CB369;
    padding-left: 1.5rem;
}

.category-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: #9CA3AF;
    background: #f3f4f6;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
}

#categories-menu .categories-dropdown {
    position: absolute;
    top: calc(100% + 13px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 200px;
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
}

#categories-menu:hover .categories-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

#categories-menu .categories-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

/* Стили карточки блюда */

.dish-card {
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dish-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
    transform: translateY(-3px);
}

.dish-card > div:first-child {
    position: relative;
    width: 100%;
    padding-top: 100%;
}

.dish-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .dish-card h3 {
        font-size: 1.125rem;
        min-height: 3rem;
    }
}

.grid > .dish-card {
    display: flex;
    flex-direction: column;
}

.grid {
    align-items: stretch;
}

/* Стили карточки блюда */

.promo-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.promo-card .line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Стили для карусели акций на главной */

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Адаптивное позиционирование фона */
.hero-bg-desktop {
    background-position: center center;
}

.hero-bg-mobile {
    background-position: top center;
}

@media (max-height: 500px) {
    .hero-fullscreen {
        min-height: 500px !important;
    }
}

.hero-bg-desktop,
.hero-bg-mobile {
    animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0.8;
        transform: scale(1.02);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .hero-bg-mobile {
        background-size: cover;
        background-position: top center;
        background-attachment: scroll;
        background-position: center 20%;
    }
}
























