/**
 * Cronus Zen - Custom CSS
 * Additional styles and animations not handled by Tailwind
 */

/* ===== SMOOTH SCROLL ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ===== CUSTOM ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 40px rgba(99, 102, 241, 0.6); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

.animate-gradient {
    animation: gradient 3s ease infinite;
    background-size: 200% 200%;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ===== SCROLLBAR CUSTOM ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #06b6d4);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4f46e5, #0891b2);
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: #1e293b;
}

/* ===== HEADER SCROLL STATE ===== */
#site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(99, 102, 241, 0.1);
}

/* ===== MOBILE MENU ===== */
#mobile-menu.active {
    transform: translateX(0);
}

#mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

#mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== SCROLL TO TOP ===== */
#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== PRODUCT GALLERY ===== */
.gallery-thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.gallery-thumb:hover {
    opacity: 1;
}

.gallery-thumb.active {
    border-color: #6366f1;
    opacity: 1;
}

.gallery-thumb img {
    display: block;
}

/* ===== FAQ ACCORDION ===== */
.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-item:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

/* ===== WOOCOMMERCE OVERRIDES ===== */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #6366f1 !important;
    color: #1e293b !important;
    border-radius: 0.75rem !important;
    padding: 1rem 1.5rem !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: #6366f1 !important;
}

.woocommerce-error {
    border-left-color: #ef4444 !important;
}

.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button {
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 0.875rem 1.75rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3) !important;
}

.woocommerce .quantity .qty {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    border-radius: 0.5rem !important;
}

/* WooCommerce cart & checkout */
.woocommerce table.shop_table {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1rem !important;
    overflow: hidden;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
    border-color: #e2e8f0 !important;
    color: #1e293b !important;
    padding: 1rem !important;
}

.woocommerce table.shop_table thead th {
    background: #f8fafc !important;
    color: #64748b !important;
}

.woocommerce .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
}

.woocommerce form .form-row label {
    color: #1e293b !important;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container--default .select2-selection--single {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    border-radius: 0.5rem !important;
    padding: 0.875rem 1rem !important;
    height: auto !important;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: #6366f1 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* Select2 dropdown */
.select2-dropdown {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

.select2-container--default .select2-results__option {
    color: #1e293b !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #6366f1 !important;
    color: #ffffff !important;
}

/* ===== ADD TO CART ANIMATION ===== */
.add-to-cart-form button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.add-to-cart-form button.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success state */
.add-to-cart-form button.added {
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%) !important;
}

/* ===== TOAST NOTIFICATION ===== */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    color: #1e293b;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-notification.success {
    border-left: 4px solid #10b981;
}

.toast-notification.error {
    border-left: 4px solid #ef4444;
}

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 640px) {
    .woocommerce table.shop_table {
        font-size: 0.875rem;
    }

    .woocommerce table.shop_table th,
    .woocommerce table.shop_table td {
        padding: 0.75rem 0.5rem !important;
    }
}

/* ===== PRINT ===== */
@media print {
    #site-header,
    #scroll-to-top,
    footer {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}
