/*
Theme Name: Eimzaonline
Theme URI: https://eimzaonline.com
Author: Fatih
Author URI: https://eimzaonline.com
Description: Lightweight custom WordPress theme for eimzaonline.com using Tailwind CSS via CDN.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eimza
*/

/* Minimal reset / base overrides can go here if needed. Tailwind handles the majority of styling. */

/**
 * Primary navigation dropdown styling.
 * Ensures WooCommerce CSS doesn't break the header on product pages.
 */
.eimza-primary-menu,
.eimza-primary-menu > li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.eimza-primary-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* roughly Tailwind gap-6 */
}

.eimza-primary-menu > li {
    position: relative;
}

.eimza-primary-menu > li > a {
    display: inline-flex;
    align-items: center;
}

/* Arrow indicator for items with children */
.eimza-primary-menu > li.menu-item-has-children > a::after {
    content: "\f107"; /* Font Awesome angle-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 0.4rem;
    transition: transform 0.15s ease, color 0.15s ease;
}

.eimza-primary-menu > li.menu-item-has-children:hover > a::after,
.eimza-primary-menu > li.menu-item-has-children:focus-within > a::after {
    transform: translateY(1px) rotate(180deg);
    color: #FF7D01;
}

.eimza-primary-menu li ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: #ffffff;
    border-radius: 0.75rem; /* ~ rounded-2xl */
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.12);
    padding: 0.75rem 0;
    margin-top: 0; /* aradaki boşluğu kaldır, hover sırasında menü kapanmasın */
    z-index: 40;
    display: none;
}

.eimza-primary-menu li:hover > ul,
.eimza-primary-menu li:focus-within > ul {
    display: block;
}

.eimza-primary-menu li ul li a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #1B2D3E; /* secondary */
    white-space: nowrap;
}

.eimza-primary-menu li ul li a:hover {
    background: #fff2e5;
    color: #FF7D01; /* primary */
}

/* Header logo fix on WooCommerce pages */
.eimza-header-logo {
    height: 2.5rem; /* Tailwind h-10 */
    width: auto;
    max-width: 220px;
    display: block;
}

/* Force logo size even on WooCommerce pages that set img { max-width:100%; height:auto; } */
body.woocommerce .eimza-header-logo,
body.woocommerce-page .eimza-header-logo {
    height: 2.5rem !important;
    width: auto !important;
    max-width: 220px !important;
}

/* Single product: quantity hidden, button styled like theme */
.single-product form.cart .quantity {
    display: none;
}

.single-product form.cart .single_add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 9999px;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #FF7D01; /* primary */
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(248, 113, 22, 0.35);
    border: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.single-product form.cart .single_add_to_cart_button:hover {
    background-color: #ea580c; /* slightly darker */
    box-shadow: 0 12px 30px rgba(234, 88, 12, 0.4);
}

.single-product form.cart .single_add_to_cart_button:active {
    transform: translateY(1px);
}

/* Single product: Sizi Arayalım butonu outline stilde olsun */
.single-product .eimza-callback-wrapper [data-eimza-callback-open] {
    background-color: transparent;
    color: #FF7D01;
    border: 2px solid #FF7D01;
    box-shadow: none;
}

.single-product .eimza-callback-wrapper [data-eimza-callback-open]:hover {
    background-color: #fff2e5;
    color: #ea580c;
}

/* Hide global footer "Sizi Arayalım" trigger button; keep modal available */
.eimza-global-callback .eimza-callback-wrapper [data-eimza-callback-open] {
    display: none;
}

/* Cart sidebar animations */
.eimza-cart-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.eimza-cart-overlay.eimza-cart-open {
    opacity: 1;
    pointer-events: auto;
}

.eimza-cart-panel {
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.eimza-cart-overlay.eimza-cart-open .eimza-cart-panel {
    transform: translateX(0);
}

/* WooCommerce checkout & form alanları: modern input tasarımı */
body.woocommerce form .form-row input.input-text,
body.woocommerce form .form-row textarea,
body.woocommerce form .form-row select,
body.woocommerce-page form .form-row input.input-text,
body.woocommerce-page form .form-row textarea,
body.woocommerce-page form .form-row select {
    border-radius: 0.75rem !important; /* ~ rounded-xl */
    border: 1px solid #e5e7eb !important; /* gray-200 */
    padding: 0.6rem 0.9rem !important;
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    background-color: #ffffff !important;
}

/* Checkout form-row'lar arasındaki boşluğu azalt */
body.woocommerce form .form-row,
body.woocommerce-page form .form-row {
    margin-bottom: 0.5rem !important; /* eski Woo spacing'den daha kompakt */
}

body.woocommerce form .form-row input.input-text:focus,
body.woocommerce form .form-row textarea:focus,
body.woocommerce form .form-row select:focus,
body.woocommerce-page form .form-row input.input-text:focus,
body.woocommerce-page form .form-row textarea:focus,
body.woocommerce-page form .form-row select:focus {
    border-color: #FF7D01 !important; /* primary */
    box-shadow: 0 0 0 1px #FF7D01 !important;
    outline: none !important;
}

/* Checkout label'ları */
body.woocommerce .woocommerce-billing-fields__field-wrapper label,
body.woocommerce .woocommerce-shipping-fields__field-wrapper label,
body.woocommerce form .form-row label {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: #4b5563 !important; /* gray-600 */
    margin-bottom: 0.15rem !important;
}

/* Checkout / cart mesaj kutuları temaya uygun olsun */
body.woocommerce .woocommerce-error,
body.woocommerce-page .woocommerce-error {
    border-radius: 0.75rem !important;
    border-left: 4px solid #dc2626 !important; /* red-600 */
    background-color: #fef2f2 !important;      /* red-50 */
    color: #991b1b !important;                 /* red-800 */
}

body.woocommerce .woocommerce-message,
body.woocommerce-page .woocommerce-message {
    border-radius: 0.75rem !important;
    border-left: 4px solid #16a34a !important; /* green-600 */
    background-color: #f0fdf4 !important;      /* green-50 */
    color: #166534 !important;                 /* green-700 */
}

body.woocommerce .woocommerce-info,
body.woocommerce-page .woocommerce-info {
    border-radius: 0.75rem !important;
    border-left: 4px solid #0ea5e9 !important; /* sky-500 */
    background-color: #e0f2fe !important;      /* sky-100 */
    color: #075985 !important;                 /* sky-800 */
}

/* Woo cart, checkout ve hesabım sayfalarında .prose max-width kısıtını kaldır */
body.woocommerce-cart .prose,
body.woocommerce-checkout .prose,
body.woocommerce-account .prose {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ödeme sayfası ödeme yöntemleri (wc_payment_methods) modern görünüm */
body.woocommerce-checkout #payment {
    border-radius: 1rem !important;
    border: 1px solid #e5e7eb !important;
    background-color: transparent !important;
    padding: 0 !important;
}

body.woocommerce-checkout #payment ul.wc_payment_methods {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method {
    padding: 0.75rem 0.75rem !important;
    border-radius: 0.75rem !important;
    border: 1px solid transparent !important;
    display: block !important;
}

body.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method input[type="radio"] {
    margin-right: 0.4rem !important;
    margin-bottom: 0.25rem !important;
}

body.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method label {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #1f2933 !important; /* gray-800-ish */
}

body.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method.wc_payment_method_selected,
body.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method:hover {
    border-color: #FF7D01 !important;
    background-color: #fff7ed !important; /* orange-50 */
}

/* Özellikle gpos payment_box alanı saydam olsun */
body.woocommerce-checkout #payment .payment_box.payment_method_gpos,
body.woocommerce-checkout #payment .payment_box {
    background: transparent !important;
    border: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.woocommerce-checkout #payment .payment_box.payment_method_gpos::before {
    display: none !important;
    content: '' !important;
}

/* GPOS ödeme yöntemi satırını yatay hizala */
body.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method.payment_method_gpos {
    display: flex !important;
    gap: 0.5rem !important;
    flex-direction: column;
}

/* Şehir alanına hafif highlight verelim */
body.woocommerce #billing_city,
body.woocommerce #shipping_city,
body.woocommerce-page #billing_city,
body.woocommerce-page #shipping_city {
    background-color: #f9fafb !important;
    border-color: #e5e7eb !important;
}

/* Ödeme butonu (Siparişi Ver) tam genişlikte ve primary renkte olsun */
body.woocommerce-checkout #payment #place_order {
    width: 100% !important;
    border-radius: 9999px !important;
    background-color: #FF7D01 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    border: none !important;
    box-shadow: 0 10px 25px rgba(248, 113, 22, 0.35) !important;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease !important;
    margin-top: 0.75rem !important;
}

/* Ödeme butonunun ALTINA güvenli ödeme metni (butonun dışında) */
body.woocommerce-checkout #payment .form-row.place-order::after {
    content: 'Garanti Bankası ile Güvenli Ödeme';
    display: block;
    margin-top: 0.75rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280; /* gray-500 */
    text-align: center;
}

.eimza-whatsapp-help-button {
    /* Z-index footer.php içinde ayarlı */
}

body.woocommerce-checkout #payment #place_order:hover {
    background-color: #ea580c !important;
    box-shadow: 0 12px 30px rgba(234, 88, 12, 0.4) !important;
}

body.woocommerce-checkout #payment #place_order:active {
    transform: translateY(1px) !important;
}

/* Sidebar cart footer safe area */
.safe-pb {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

/* Mobile Menu Submenu Improvements */
@media (max-width: 767.98px) {
    /* Ensure submenus are hidden by default with high specificity */
    .eimza-mobile-nav li ul,
    .eimza-mobile-nav li.menu-item-has-children ul {
        display: none;
        visibility: hidden;
        opacity: 0;
        height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    /* Open state */
    .eimza-mobile-nav li.menu-item-has-children.open > ul {
        display: block;
        visibility: visible;
        opacity: 1;
        height: auto;
        background-color: #f9fafb; /* gray-50 */
        margin-top: 0.5rem;
        border-radius: 0.5rem;
        padding: 0.5rem 0;
    }

    /* Link Styling in Mobile Menu */
    .eimza-mobile-nav > li > a {
        font-weight: 600;
        font-size: 1rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid #f3f4f6;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Remove border from last item */
    .eimza-mobile-nav > li:last-child > a {
        border-bottom: none;
    }

    /* Arrow Icon for Submenu Toggle */
    .eimza-mobile-nav li.menu-item-has-children > a::after {
        content: "\f107" !important; /* Font Awesome angle-down */
        font-family: "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        display: inline-block;
        margin-left: auto; /* Push to right */
        transition: transform 0.3s ease;
        font-size: 1rem;
        color: #9ca3af; /* gray-400 */
    }

    .eimza-mobile-nav li.menu-item-has-children.open > a::after {
        transform: rotate(180deg);
        color: #FF7D01; /* primary */
    }
    
    /* Submenu link styling */
    .eimza-mobile-nav li ul li a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        color: #4b5563; /* gray-600 */
        display: block;
    }
    
    .eimza-mobile-nav li ul li a:hover {
        color: #FF7D01;
        background-color: transparent;
    }
}

/* WhatsApp bottom bar positioning on mobile (keep slightly above browser UI) */
@media (max-width: 767.98px) {
    .eimza-whatsapp-bottom {
        bottom: calc(env(safe-area-inset-bottom) + 0.25rem);
    }
}

