/* PMG Taral B4B - Custom Styles */
/* Agricu Template Uyumlu */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --pmg-primary: #253448;
    --pmg-secondary: #6dab3c;
    --pmg-accent: #ff6f3c;
    --pmg-dark: #1a252f;
    --pmg-light: #f8f9fa;
    --pmg-text: #666666;
    --pmg-heading: #222222;
}

/* ========================================
   SECTION OVERLAP FIX
   ======================================== */
.services-one {
    margin-top: 0 !important;
}

/* Product Categories Cards Hover */
.product-categories-section .col-lg-4 > div:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
    transform: translateY(-5px);
}

/* ========================================
   PAGE TITLE (Alt Sayfa Banner)
   ======================================== */
.page-title {
    background: linear-gradient(135deg, #253448 0%, #1a2533 100%) !important;
    padding: 80px 0 40px !important;
}

/* ========================================
   TOP BAR (Üst Bar - Gösterge Paneli, Banka vs.)
   ======================================== */
.top-bar {
    background: #253448;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar_inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar_links {
    display: flex;
    align-items: center;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-bar_links li a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.top-bar_links li a:hover {
    color: var(--pmg-secondary);
}

.top-bar_links li a i {
    font-size: 12px;
}

/* Top Bar Right Section (Sepet + Firma/Profil) */
.top-bar_right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Top Bar Sepet */
.top-bar_cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.top-bar_cart:hover {
    background: var(--pmg-secondary);
    color: #fff;
}

.top-bar_cart .cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    background: var(--pmg-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Top Bar User Dropdown */
.top-bar_user .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--pmg-secondary);
    border: none;
    padding: 6px 15px;
    border-radius: 25px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.top-bar_user .dropdown-toggle:hover {
    background: #5a9432;
}

.top-bar_user .dropdown-toggle::after {
    display: none;
}

.top-bar_user .dropdown-toggle .company-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-bar_user .dropdown-toggle i {
    font-size: 18px;
}

.top-bar_user .dropdown-menu {
    min-width: 240px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin-top: 10px;
    padding: 0;
    overflow: hidden;
    background-color: #ffffff !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 9999 !important;
    opacity: 1 !important;
}

.top-bar_user .dropdown-menu.show {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

.top-bar_user .dropdown-menu * {
    background-color: transparent;
}

.top-bar_user .dropdown-header {
    background-color: #f8f9fa !important;
    background: var(--pmg-light) !important;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.top-bar_user .dropdown-header small {
    color: var(--pmg-text);
    font-size: 12px;
}

.top-bar_user .dropdown-header .fw-bold {
    color: var(--pmg-primary);
    font-size: 14px;
}

.top-bar_user .dropdown-item {
    padding: 12px 15px;
    font-size: 14px;
    color: var(--pmg-heading);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-bar_user .dropdown-item:hover {
    background: var(--pmg-light);
    color: var(--pmg-primary);
}

.top-bar_user .dropdown-item i {
    color: var(--pmg-secondary);
    width: 18px;
    font-size: 14px;
}

.top-bar_user .dropdown-item.text-danger i {
    color: #dc3545;
}

/* ========================================
   HEADER CUSTOMIZATIONS
   ======================================== */

/* Logo */
.main-header .logo-box {
    flex-shrink: 0;
    display: block !important;
}

.main-header .logo-box .logo {
    display: block !important;
}

.main-header .logo-box .logo a {
    display: block;
}

.main-header .logo img {
    max-height: 50px;
    width: auto;
    display: block !important;
}

/* Header Currency Widget */
.header-currency {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.currency-widget {
    display: flex;
    align-items: center;
    gap: 15px;
}

.currency-widget .currency-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(109, 171, 60, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(109, 171, 60, 0.3);
}

.currency-widget .currency-icon {
    color: var(--pmg-secondary);
    font-size: 14px;
    font-weight: 600;
}

.currency-widget .currency-value {
    color: var(--pmg-heading);
    font-size: 13px;
    font-weight: 600;
}

/* Top Bar Search Button */
.top-bar_search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.top-bar_search:hover {
    color: var(--pmg-secondary);
}

/* Header Representative Widget */
.header-representative {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(0,0,0,0.1);
    max-width: 220px;
    flex-shrink: 0;
}

.header-representative .rep-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
}

.header-representative .rep-info {
    overflow: hidden;
}

.header-representative .rep-info span,
.header-representative .rep-info a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.representative-widget {
    display: flex;
    align-items: center;
    gap: 10px;
}

.representative-widget .rep-icon {
    width: 36px;
    height: 36px;
    background: var(--pmg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.representative-widget .rep-info {
    display: flex;
    flex-direction: column;
}

.representative-widget .rep-name {
    font-size: 12px;
    color: var(--pmg-text);
    font-weight: 500;
}

.representative-widget .rep-phone {
    font-size: 13px;
    color: var(--pmg-heading);
    font-weight: 600;
    text-decoration: none;
}

.representative-widget .rep-phone:hover {
    color: var(--pmg-secondary);
}

.representative-widget .rep-phone i {
    font-size: 11px;
    margin-right: 3px;
    color: var(--pmg-secondary);
}

/* Header Cart Button */
.header-cart-btn {
    position: relative;
    width: 45px;
    height: 45px;
    background: var(--pmg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pmg-heading);
    font-size: 18px;
    text-decoration: none;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.header-cart-btn:hover {
    background: var(--pmg-secondary);
    color: #fff;
}

.header-cart-btn .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    background: var(--pmg-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header User Dropdown */
.header-user {
    margin-left: 5px;
}

.header-user .user-btn {
    width: 45px;
    height: 45px;
    background: var(--pmg-primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-user .user-btn:hover {
    background: var(--pmg-secondary);
}

.header-user .user-btn::after {
    display: none;
}

.header-user .dropdown-menu {
    min-width: 220px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-top: 15px;
    padding: 10px 0;
}

.header-user .dropdown-header {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
}

.header-user .dropdown-header small {
    color: var(--pmg-text);
}

.header-user .dropdown-header .fw-bold {
    color: var(--pmg-primary);
}

.header-user .dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: var(--pmg-heading);
    transition: all 0.2s ease;
}

.header-user .dropdown-item:hover {
    background: var(--pmg-light);
    color: var(--pmg-primary);
}

.header-user .dropdown-item i {
    color: var(--pmg-secondary);
    width: 20px;
}

.header-user .dropdown-item.text-danger i {
    color: #dc3545;
}

/* ========================================
   HEADER NAVIGATION FIX
   ======================================== */
.main-header .inner-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-header .inner-container > .d-flex {
    flex-wrap: nowrap !important;
    width: 100%;
}

.main-header .nav-outer {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-header .navigation {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
}

.main-header .navigation > li > a {
    font-size: 13px !important;
    padding: 20px 12px !important;
    white-space: nowrap;
}

.main-header .outer-box {
    flex-shrink: 0;
}

/* ========================================
   QUICK ACCESS BAR (Alt Bar - Hızlı Erişim)
   ======================================== */
.quick-access-bar {
    background: #fff;
    border-bottom: 2px solid var(--pmg-secondary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.quick-access_links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 12px 0;
}

.quick-access_links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pmg-heading);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.quick-access_links li a:hover {
    background: var(--pmg-secondary);
    color: #fff;
}

.quick-access_links li a i {
    font-size: 16px;
    color: var(--pmg-secondary);
    transition: all 0.3s ease;
}

.quick-access_links li a:hover i {
    color: #fff;
}

/* Quick Access Bar Dropdown */
.quick-access_links .quick-dropdown {
    position: relative;
}

.quick-access_links .quick-dropdown-toggle {
    cursor: pointer;
}

.quick-access_links .quick-dropdown-arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.quick-access_links .quick-dropdown:hover .quick-dropdown-arrow {
    transform: rotate(180deg);
}

.quick-access_links .quick-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    min-width: 180px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 8px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
}

.quick-access_links .quick-dropdown:hover .quick-dropdown-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 0;
}

.quick-access_links .quick-dropdown-menu li a {
    display: flex;
    padding: 10px 16px;
    border-radius: 0;
    font-size: 13px;
}

.quick-access_links .quick-dropdown-menu li a:hover {
    background: var(--pmg-secondary);
    color: #fff;
}

.quick-access_links .quick-dropdown-menu li a i {
    min-width: 20px;
}

/* ========================================
   NAVIGATION MENU OVERRIDES
   ======================================== */
.main-header .navigation > li > a {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   FOOTER CUSTOMIZATIONS
   ======================================== */
.main-footer .footer-title {
    color: var(--pmg-secondary) !important;
}

.main-footer .footer-logo img {
    max-height: 50px;
}

.main-footer .footer_socials a {
    background: var(--pmg-secondary);
}

.main-footer .footer_socials a:hover {
    background: var(--pmg-accent);
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */
@media (max-width: 1399px) {
    .quick-access_links {
        gap: 20px;
    }

    .quick-access_links li a span {
        display: none;
    }

    .quick-access_links li a i {
        font-size: 20px;
    }
}

@media (max-width: 1199px) {
    .header-representative {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .top-bar_links {
        display: none;
    }

    .top-bar_company {
        width: 100%;
        justify-content: center;
    }

    .header-currency {
        display: none !important;
    }

    .quick-access_links {
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .top-bar {
        display: none;
    }

    .quick-access-bar {
        display: none;
    }

    .main-header .logo img {
        max-height: 40px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-pmg-primary { color: var(--pmg-primary) !important; }
.text-pmg-secondary { color: var(--pmg-secondary) !important; }
.text-pmg-accent { color: var(--pmg-accent) !important; }
.bg-pmg-primary { background-color: var(--pmg-primary) !important; }
.bg-pmg-secondary { background-color: var(--pmg-secondary) !important; }
.bg-pmg-accent { background-color: var(--pmg-accent) !important; }

/* ========================================
   SEARCH BUTTON
   ======================================== */
.search-btn-link:hover {
    background: var(--pmg-secondary) !important;
    color: #fff !important;
}

/* ========================================
   MOBILE BOTTOM NAVIGATION BAR
   ======================================== */
.mobile-bottom-nav {
    display: none !important;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--pmg-text);
    font-size: 10px;
    font-weight: 500;
    padding: 5px 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 60px;
}

.mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    color: var(--pmg-primary);
}

.mobile-nav-item span {
    white-space: nowrap;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--pmg-secondary);
}

.mobile-nav-item:hover i,
.mobile-nav-item.active i {
    color: var(--pmg-secondary);
}

/* Mobile Cart Button with Badge */
.mobile-cart-btn {
    position: relative;
}

.mobile-cart-badge {
    position: absolute;
    top: 0;
    right: 10px;
    min-width: 18px;
    height: 18px;
    background: var(--pmg-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   MOBILE MENU USER INFO
   ======================================== */
.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--pmg-primary), var(--pmg-dark));
    margin: 0 -30px;
    margin-bottom: 15px;
}

.mobile-user-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-user-avatar i {
    font-size: 28px;
    color: #fff;
}

.mobile-user-details {
    display: flex;
    flex-direction: column;
}

.mobile-user-welcome {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.mobile-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mobile Quick Actions */
.mobile-quick-actions {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-quick-btn i {
    font-size: 20px;
    color: var(--pmg-secondary);
}

.mobile-quick-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    margin-top: auto;
    padding: 15px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-representative {
    padding: 10px 0;
    margin-bottom: 10px;
}

.mobile-representative .representative-widget {
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 8px;
}

.mobile-representative .rep-icon {
    background: var(--pmg-secondary);
}

.mobile-representative .rep-name {
    color: rgba(255,255,255,0.7);
}

.mobile-representative .rep-phone {
    color: #fff;
}

.mobile-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-logout-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

/* ========================================
   MOBILE RESPONSIVE OVERRIDES
   ======================================== */
@media (max-width: 767px) {
    /* Show mobile bottom nav */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 -2px 20px rgba(0,0,0,0.15);
        z-index: 9999;
        padding: 10px 0;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid #eee;
    }

    /* Add padding to body for bottom nav */
    body {
        padding-bottom: 75px;
    }

    /* Footer adjustment */
    .main-footer {
        margin-bottom: 0;
        padding-bottom: 20px;
    }

    /* Progress wrap adjustment */
    .progress-wrap {
        bottom: 90px;
    }
}

/* Tablet adjustments */
@media (max-width: 991px) and (min-width: 768px) {
    .top-bar_right {
        gap: 10px;
    }

    .top-bar_user .dropdown-toggle .company-name {
        max-width: 120px;
    }
}

/* Mobile Menu Box Adjustments */
@media (max-width: 767px) {
    .mobile-menu .menu-box {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .mobile-menu .menu-outer {
        flex: 1;
        overflow-y: auto;
    }
}
