
/* Custom Login Button Style */
.btn-custom-login {
    background-color: #0d6efd !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.btn-custom-login:hover {
    background-color: #0b5ed7 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-custom-login i {
    font-size: 1.2em;
}

/* Fix product card text overlap */
.hs-product-card .title {
    white-space: normal !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    height: auto !important;
    min-height: 48px;
}


/* ===================================================================
   MOBILE RESPONSIVE FIXES
   =================================================================== */

/* --- Logo sizing (inline !important removed from HTML) --- */
.hs-header .logo img {
    max-height: 85px;
    height: 85px;
}

/* --- TABLET (≤1200px) --- */
@media (max-width: 1200px) {
    .hs-header .hs-header-grid {
        flex-wrap: wrap;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between;
        gap: 12px;
    }

    .hs-header .logo-area {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
        order: 1;
    }

    .hs-header .logo img {
        max-height: 65px;
        height: 65px;
    }

    /* Right area flows to far right */
    .hs-header .right-area {
        order: 2;
        margin-left: auto !important;
        flex-shrink: 0;
    }

    /* Search takes full width below */
    .hs-header .search {
        order: 3;
        width: 100%;
        flex-basis: 100%;
    }

    /* Mobile actions button - flow with layout instead of absolute */
    .hs-header .btn-all-categories {
        position: static;
    }

    /* Hide empty wrapper on mobile (button moved to right-area via JS) */
    .hs-header .mobile-actions-area {
        display: flex;
        align-items: center;
        gap: 8px;
        order: 1;
    }
}

/* --- MOBILE (≤768px) --- */
@media (max-width: 768px) {
    /* Header padding reduction */
    .hs-header {
        padding: 10px 0;
    }

    /* Grid layout: logo left, icons right, search below */
    .hs-header .hs-header-grid {
        display: grid !important;
        grid-template-columns: 1fr auto auto;
        grid-template-rows: auto auto;
        gap: 8px 6px;
        align-items: center;
    }

    .hs-header .logo-area {
        grid-column: 1;
        grid-row: 1;
    }

    /* Right area first (cart + auth), then hamburger last — standard mobile order */
    .hs-header .right-area {
        display: flex !important;
        align-items: center;
        grid-column: 2;
        grid-row: 1;
        gap: 6px;
    }

    .hs-header .mobile-actions-area {
        grid-column: 3;
        grid-row: 1;
    }

    .hs-header .search {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }

    /* Logo smaller on mobile */
    .hs-header .logo {
        height: 45px;
    }

    .hs-header .logo img {
        max-height: 45px;
        height: 45px;
    }

    /* Dark mode toggle: compact, next to logo */
    .hs-header .hs-color-selector {
        display: flex !important;
        align-items: center;
        margin-left: 6px;
    }

    .hs-header .hs-color-selector .link {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        font-size: 16px;
        padding: 0;
    }

    .hs-header .logo-area {
        display: flex !important;
        align-items: center;
    }

    /* Categories button compact */
    .hs-header .btn-all-categories {
        position: static !important;
        width: 40px;
        height: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        padding: 0;
    }

    .hs-header .mobile-actions-area .btn-all-categories .btn-text {
        display: none;
    }

    /* Right area: only cart icon visible */
    .hs-header .right-area > div.position-relative {
        display: none;
    }

    /* Auth buttons: icon-only, same size as other header icons */
    .hs-header .right-area .auth-buttons {
        display: flex !important;
        gap: 6px;
    }

    .hs-header .right-area .auth-buttons .btn {
        width: 40px;
        height: 40px;
        padding: 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        margin-left: 0;
        font-size: 0;
        gap: 0 !important;
    }

    .hs-header .right-area .auth-buttons .btn i {
        font-size: 20px;
        margin: 0 !important;
    }

    /* User profile: show as icon-only on mobile when logged in */
    .hs-header .right-area .user-profile-area {
        display: none !important;
    }

    .hs-header .right-area .user-profile-area.d-flex {
        display: flex !important;
    }

    .hs-header .right-area .user-profile-area .user-display {
        width: 40px;
        height: 40px;
        padding: 0 !important;
        border: 1px solid var(--hs-border) !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .hs-header .right-area .user-profile-area .user-display .user-info,
    .hs-header .right-area .user-profile-area .user-display .dropdown-arrow {
        display: none;
    }

    .hs-header .right-area .user-profile-area .user-display img {
        margin: 0 !important;
    }

    .hs-header .right-area .user-profile-area .balance-area {
        display: none !important;
    }

    .hs-header .right-area .user-profile-area > .position-relative.me-2 {
        margin-right: 0 !important;
    }

    .hs-header .right-area .balance-area {
        display: none !important;
    }

    .hs-header .right-area .btn-icon {
        width: 40px;
        height: 40px;
        margin-left: 0;
    }

    .hs-header .right-area .btn-icon i {
        font-size: 20px;
    }

    /* Search box height reduction */
    .hs-header .search .search-box .form-control {
        height: 44px;
        font-size: 14px;
        padding-left: 14px;
        padding-right: 44px;
    }

    .hs-header .search .search-box .icon {
        font-size: 20px;
        right: 14px;
    }
}

/* --- SMALL MOBILE (≤576px) --- */
@media (max-width: 576px) {
    .hs-header .logo {
        height: 38px;
    }

    .hs-header .logo img {
        max-height: 38px;
        height: 38px;
    }

    .hs-header .search .search-box .form-control {
        height: 40px;
        font-size: 13px;
    }

    /* Mobile actions button compact */
    .hs-header .btn-all-categories {
        width: 38px;
        height: 38px;
    }
}

/* --- MOBILE BAR FIXES --- */
.hs-mobile-bar .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hs-mobile-bar .grid .link {
    font-size: 11px;
    gap: 2px;
    padding: 4px 0;
}

.hs-mobile-bar .grid .link .icon i {
    font-size: 22px;
}

.hs-mobile-bar .grid .link .text {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

/* --- NAVBAR MOBILE FIXES --- */
@media (max-width: 992px) {
    .hs-navbar {
        z-index: 9998;
        background-color: var(--hs-surface);
        padding-top: 10px;
        border-bottom: 1px solid var(--hs-border);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }

    .hs-navbar .list li .link {
        height: auto;
        padding: 10px 12px;
        border-bottom: 1px solid var(--hs-border);
        margin-right: 0;
    }

    .hs-navbar .list .grid-dropdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 8px;
    }
}

@media (max-width: 768px) {
    /* Override the fixed positioning from style.css — keep navbar in document flow
       so it appears right below the header when toggled */
    .hs-navbar {
        position: relative !important;
        height: auto !important;
        max-height: 70vh;
        overflow-y: auto;
        width: 100%;
        left: auto;
    }
}

/* --- GENERAL MOBILE OVERFLOW PREVENTION --- */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Slider area mobile */
    .hs-slider-area {
        padding: 15px 0;
    }

    /* Product cards grid mobile */
    .hs-product-grid {
        gap: 10px;
    }

    /* Notification menu mobile */
    .hs-nav-notification-menu {
        width: 280px;
        right: 0;
        left: auto;
        transform: none;
    }

    /* Top navigation bar mobile - keep visible for İletişim & Gizlilik links */
    .hs-topnav .right-area {
        display: none;
    }

    .hs-topnav .left-area {
        display: flex !important;
        justify-content: center;
        align-items: center;
        gap: 0 !important;
        width: 100%;
    }

    .hs-topnav .left-area a {
        font-size: 11px !important;
        opacity: 0.75;
        transition: opacity 0.2s;
    }

    .hs-topnav .left-area a:hover {
        opacity: 1;
    }

    .hs-topnav .left-area a:not(:last-child)::after {
        content: "|";
        margin: 0 10px;
        opacity: 0.4;
        font-size: 10px;
    }

    .hs-topnav .flex {
        justify-content: center;
    }
}

/* --- HERO / SLIDER MOBILE --- */
@media (max-width: 576px) {
    .hs-hero-content-wrapper {
        border-radius: 12px;
    }

    .hs-swiper-home-item img {
        border-radius: 12px;
    }
}

/* ===================================================================
   FOOTER LOGO — desktop default + mobile
   =================================================================== */
.footer-logo-img {
    max-height: 100px;
    max-width: 360px;
    width: auto;
}

@media (max-width: 768px) {
    .footer-logo-img {
        max-height: 50px;
        max-width: 200px;
    }

    .footer-logo {
        margin-top: 10px !important;
        margin-bottom: 1rem !important;
    }

    .footer-description {
        font-size: 0.85rem;
        line-height: 1.5;
        max-width: 100%;
    }

    .footer-title {
        font-size: 1rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .hs-footer .hs-footer-main {
        padding: 10px 0 0;
    }
}

@media (max-width: 576px) {
    .footer-logo-img {
        max-height: 40px;
        max-width: 160px;
    }
}

/* --- FOOTER MOBILE SPACING (above mobile bar) --- */
@media (max-width: 992px) {
    .hs-footer {
        padding-bottom: 80px;
    }
}

/* ===================================================================
   SIMILAR PRODUCTS — mobile compact
   =================================================================== */

/* Sidebar similar products: compact card */
@media (max-width: 768px) {
    .hs-similar-products {
        padding: 12px !important;
    }

    .hs-similar-products .section-title {
        font-size: 14px !important;
    }

    .hs-similar-products .product-count {
        font-size: 11px;
        padding: 2px 6px;
    }

    .hs-similar-products .hs-product-card {
        padding: 6px !important;
        gap: 8px !important;
    }

    .hs-similar-products .product-image-container {
        width: 44px !important;
        height: 44px !important;
        border-radius: 6px;
    }

    .hs-similar-products .hs-product-title {
        font-size: 12px !important;
        margin-bottom: 2px !important;
    }

    .hs-similar-products .hs-price {
        font-size: 12px !important;
        gap: 4px !important;
    }

    .hs-similar-products .hs-price-original {
        font-size: 11px !important;
    }

    /* products-grid: 2 columns on mobile */
    .hs-similar-products .products-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .hs-similar-products .product-card-link {
        display: block;
    }

    .hs-similar-products .hs-product-horizontal-mini {
        margin-bottom: 0;
    }
}

/* Horizontal mini product cards — tighter on mobile */
@media (max-width: 768px) {
    .hs-product-horizontal-mini {
        gap: 8px;
        margin-bottom: 10px;
    }

    .hs-product-horizontal-mini .img {
        width: 40px;
        min-width: 40px;
    }

    .hs-product-horizontal-mini .hs-product-title {
        font-size: 12px;
        line-height: 1.3;
        margin-bottom: 2px;
    }

    .hs-product-horizontal-mini .hs-price {
        font-size: 12px;
        gap: 6px;
    }
}

/* Main product grid on category/home pages — compact cards */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .product-card {
        padding: 0.75rem !important;
        border-radius: 10px !important;
    }
}

@media (max-width: 576px) {
    .product-grid {
        gap: 6px !important;
    }

    .product-card {
        padding: 0.6rem !important;
        font-size: 0.85rem;
    }
}
