body {
    --tw-bg-opacity: 1;
    background-color: rgb(255 255 255 / var(--tw-bg-opacity));
    color: rgb(15 23 42 / var(--tw-text-opacity));
}
body.dark {
    --tw-bg-opacity: 1;
    background-color: rgb(15 23 42 / var(--tw-bg-opacity));
    color: rgb(248 250 252 / var(--tw-text-opacity));
}

#products-container {
    min-height: 600px; /* или подберите подходящую высоту */
}

.product-card {
    height: auto; /* Убираем фиксированную высоту */
    min-height: 280px; /* Минимальная высота для мобильных */
    display: flex;
    flex-direction: column;
}

.product-card .h-48 {
    height: 12rem; /* Фиксируем высоту изображения */
    min-height: 12rem; /* Минимальная высота для изображения */
}

.product-card .p-4 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1; /* Занимает оставшееся пространство */
    min-height: 120px; /* Минимальная высота для контента */
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .product-card {
        min-height: 260px; /* Уменьшаем минимальную высоту на мобильных */
    }
    
    .product-card .h-48 {
        height: 10rem; /* Уменьшаем высоту изображения на мобильных */
        min-height: 10rem;
    }
    
    .product-card .p-4 {
        min-height: 100px; /* Уменьшаем минимальную высоту контента */
        padding: 1rem; /* Уменьшаем отступы */
    }
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.parallax-img {
    transition: transform 0.3s ease-out;
}
.cart-item-enter {
    opacity: 0;
    transform: translateX(-20px);
}
.cart-item-enter-active {
    opacity: 1;
    transform: translateX(0);
    transition: all 300ms ease-in;
}
.cart-item-exit {
    opacity: 1;
}
.cart-item-exit-active {
    opacity: 0;
    transform: translateX(20px);
    transition: all 300ms ease-in;
}
.category-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.social-icon:hover {
    color: rgb(15 23 42 / var(--tw-text-opacity));
}
body.dark .social-icon:hover {
    color: rgb(248 250 252 / var(--tw-text-opacity));
}
.zoom-container {
    position: relative;
    overflow: hidden;
}
.zoom-image {
    transition: transform 0.3s ease;
}
.zoom-container:hover .zoom-image {
    transform: scale(1.5);
}
/* Стили для input quantity */
#quantity {
    -moz-appearance: textfield; /* Убирает спиннеры в Firefox */
}
#quantity::-webkit-outer-spin-button,
#quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Улучшенная рамка для описания (уже в HTML, но добавьте если нужно тень) */
.bg-gradient-to-r.from-green-50.to-emerald-50 {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Прямоугольные кнопки пагинации со скруглением */
.pagination-btn {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px; /* Мягкие углы вместо круглых */
    border: none;
    background-color: #e5e7eb; /* slate-200 */
    color: #1e293b; /* slate-800 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Отступ между иконкой и текстом */
    transition: all 0.2s ease;
    cursor: pointer;
}
.dark .pagination-btn {
    background-color: #374151; /* slate-700 */
    color: #e5e7eb; /* slate-200 */
}
.pagination-btn:hover:not(.disabled) {
    background-color: #10b981; /* emerald-500 */
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.pagination-btn.active {
    background-color: #059669; /* emerald-600 */
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.pagination-btn.disabled {
    background-color: #f3f4f6; /* slate-100 */
    color: #9ca3af; /* slate-400 */
    cursor: not-allowed;
    opacity: 0.6;
}
.dark .pagination-btn.disabled {
    background-color: #4b5563; /* slate-600 */
    color: #6b7280; /* slate-500 */
}
.input-error {
    border-color: #f87171 !important;
    background-color: #fef2f2 !important;
}

.dark .input-error {
    border-color: #dc2626 !important;
    background-color: #7f1d1d/20 !important;
}

#checkout-btn:disabled,
#submit_message:disabled {
    background-color: #9ca3af !important;
    cursor: not-allowed !important;
}

#checkout-btn:disabled:hover,
#submit_message:disabled:hover {
    background-color: #9ca3af !important;
    transform: none !important;
}

/* Стили для товаров не в наличии */
.product-card.unavailable {
    filter: grayscale(1);
    opacity: 0.7;
}

.product-card.unavailable .h-48 {
    background-color: #f3f4f6;
}

.dark .product-card.unavailable .h-48 {
    background-color: #4b5563;
}

.availability-status {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.available {
    color: #059669;
    background-color: #d1fae5;
}

.dark .available {
    color: #34d399;
    background-color: #064e3b;
}

.unavailable-status {
    color: #dc2626;
    background-color: #fee2e2;
}

.dark .unavailable-status {
    color: #f87171;
    background-color: #7f1d1d;
}

/* Неактивная кнопка корзины */
.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.btn-disabled:hover {
    background-color: #d1fae5 !important;
    transform: none !important;
}

.dark .btn-disabled {
    opacity: 0.3;
}

.dark .btn-disabled:hover {
    background-color: #064e3b !important;
}



/* Скрываем скроллбар в описании товара */
#modal-description::-webkit-scrollbar {
    display: none;
}

#modal-description {
    -ms-overflow-style: none;  /* IE и Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Общий стиль кнопок закрытия */
#modal-close,
#cart-close {
    background-color: rgba(239, 68, 68, 0.1) !important;
    backdrop-filter: blur(10px);
    border: 1px solid #ef444418;
    transition: all 0.3s ease;
}

/* Ховер для обеих */
#modal-close:hover,
#cart-close:hover {
    background-color: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4);
}

#modal-close svg,
#modal-close svg * ,
#cart-close svg,
#cart-close svg * {
    fill: hwb(0 6% 94%) !important;
    stroke: hwb(0 6% 94%) !important;
}

.dark #modal-close svg,
.dark #modal-close svg * ,
.dark #cart-close svg,
.dark #cart-close svg * {
    fill: hsl(0, 0%, 81%) !important;
    stroke: hsl(0, 0%, 81%) !important;
}


/* Тёмная тема */
.dark #modal-close,
.dark #cart-close {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Ховер в тёмной теме */
.dark #modal-close:hover,
.dark #cart-close:hover {
    background-color: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.5);
}

/* УНИВЕРСАЛЬНЫЕ СТИЛИ ДЛЯ УВЕДОМЛЕНИЙ */
.success-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    text-align: center;
    max-width: 400px;
    width: 90%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Темная тема для уведомлений */
.dark .success-toast {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.success-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.success-toast .toast-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease infinite;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.success-toast .toast-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.success-toast .toast-message {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.success-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Стили для кнопки в уведомлениях */
.success-toast .toast-button {
    background: white !important;
    color: #059669 !important;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.dark .success-toast .toast-button {
    background: #f1f5f9 !important;
    color: #065f46 !important;
}

.success-toast .toast-button:hover {
    background: #f0f4ff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.dark .success-toast .toast-button:hover {
    background: #e2e8f0 !important;
}

/* Анимация bounce для иконки */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

/* Стили для блока благодарности */
.thank-you-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 300px;
    text-align: center;
    padding: 2rem 1rem;
}

.thank-you-container i {
    margin-bottom: 1rem;
}

.thank-you-container h3 {
    margin-bottom: 0.5rem;
}

/* Универсальные стили для текста и полей ввода */
.text-theme {
    color: rgb(15 23 42 / var(--tw-text-opacity));
}

.dark .text-theme {
    color: rgb(248 250 252 / var(--tw-text-opacity));
}

.input-theme {
    background-color: white;
    color: rgb(15 23 42);
    border: 1px solid rgb(203 213 225);
}

.dark .input-theme {
    background-color: rgb(51 65 85 / 0.5);
    color: rgb(248 250 252);
    border: 1px solid rgb(71 85 105);
}

.input-theme::placeholder {
    color: rgb(156 163 175);
}

.dark .input-theme::placeholder {
    color: rgb(148 163 184);
}

.select-theme {
    background-color: white;
    color: rgb(15 23 42);
    border: 1px solid rgb(203 213 225);
}

.dark .select-theme {
    background-color: rgb(51 65 85 / 0.5);
    color: rgb(248 250 252);
    border: 1px solid rgb(71 85 105);
}

.logo-mask {
    mask: url("/static/images/logo_transparent.svg") no-repeat center / contain;
    -webkit-mask: url("/static/images/logo_transparent.svg") no-repeat center / contain;
    background-color: #16a34a; /* зелёный по умолчанию */
    transition: background-color 0.3s ease;
}

/* Тёмная тема */
.dark .logo-mask {
    background-color: #4ade80; /* светло-зелёный для dark mode */
}