/*============================================================
* Tashead Mobile Responsive Fixes
* Matches iOS App UI/UX patterns
* Created: 2026-03-23
===========================================================*/

/* ==================== MOBILE HEADER (iOS-like) ==================== */
@media (max-width: 991px) {
    .mobile-view-nav {
        background: #fff;
        padding: 8px 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
        position: relative;
        z-index: 100;
    }

    .mobile-view-nav .m-headerinner.ios-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 10px;
        min-height: 44px;
    }

    /* Menu Button */
    .bar-toggler {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
    }

    .bar-toggler-inner {
        width: 22px;
    }

    .bar-toggler-inner .bar1,
    .bar-toggler-inner .bar2,
    .bar-toggler-inner .bar3 {
        width: 100%;
        height: 2px;
        background-color: #474455;
        margin: 5px 0;
        transition: 0.3s;
        border-radius: 2px;
    }

    /* Center Logo */
    .mobile-logo {
        flex: 1;
        text-align: center;
    }

    .mobile-logo img {
        max-height: 35px;
        width: auto;
    }

    /* Right Section */
    .ios-header-right {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
    }

    /* Search Icon */
    .search-icon-btn a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
    }

    .search-icon-btn a img {
        width: 22px;
        height: 22px;
    }

    /* Cart Icon */
    .mobile-view-nav .cart-icon {
        position: relative;
    }

    .mobile-view-nav .cart-icon a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
    }

    .mobile-view-nav .cart-icon a img {
        width: 22px;
        height: 22px;
    }

    .mobile-view-nav .cart-icon a span.cart-count {
        position: absolute;
        top: -5px;
        right: -8px;
        height: 18px;
        width: 18px;
        font-size: 10px;
        line-height: 18px;
        background: #ff0000;
        color: #fff;
        border-radius: 50%;
        text-align: center;
        font-weight: bold;
    }

    /* Hide old user dropdown on mobile */
    .mobile-view-nav .user-propic,
    .mobile-view-nav .user-dropdown {
        display: none;
    }
}

/* ==================== MOBILE SIDEBAR (iOS-like) ==================== */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 20px rgba(0,0,0,0.15);
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-sidebar.show,
.mobile-sidebar.active {
    left: 0;
}

.mobile-sidebar-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.mobile-sidebar-innerflex {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.msi-inner-top {
    flex: 1;
    padding: 20px 15px;
}

.mobile-sidebar-closeBtn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-sidebar-closeBtn img {
    width: 14px;
    height: 14px;
}

/* User Info Section - iOS Style */
.msi-user-info {
    display: flex;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.msi-user-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #BF7869 0%, #F6CE9A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.msi-user-avatar img {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
}

.msi-user-details {
    flex: 1;
    min-width: 0;
}

.msi-user-details h4 {
    font-size: 16px;
    font-weight: 600;
    color: #474455;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msi-user-details p {
    font-size: 13px;
    color: #999;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msi-user-info.msi-guest {
    justify-content: center;
    padding: 25px 0;
}

.msi-login-btn {
    background: linear-gradient(135deg, #BF7869 0%, #d4a574 100%);
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.msi-login-btn:hover {
    background: linear-gradient(135deg, #a56555 0%, #c49564 100%);
    color: #fff;
}

/* Menu Items - iOS Style */
.msi-menubar {
    list-style: none;
    padding: 0;
    margin: 0;
}

.msi-menubar li {
    margin-bottom: 0;
}

.msi-menubar li > a {
    display: flex;
    align-items: center;
    padding: 14px 5px;
    font-size: 15px;
    color: #474455;
    text-transform: capitalize;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
}

.msi-menubar li > a i {
    width: 24px;
    font-size: 16px;
    color: #BF7869;
    margin-right: 12px;
    text-align: center;
}

.msi-menubar li > a.active {
    color: #BF7869;
    background: rgba(191, 120, 105, 0.08);
    margin: 0 -15px;
    padding-left: 20px;
    padding-right: 20px;
}

.msi-menubar li > a:hover {
    color: #BF7869;
    background: rgba(191, 120, 105, 0.05);
}

.msi-menubar li:last-child > a {
    border-bottom: none;
}

/* Dropdown Menu */
.mobile-menu-dropdown ul {
    display: none;
    padding-left: 36px;
    margin: 0;
    background: #fafafa;
}

.mobile-menu-dropdown.active ul {
    display: block;
}

.mobile-menu-dropdown ul li a {
    padding: 12px 5px;
    font-size: 14px;
    border-bottom: none;
    color: #666;
}

.mobile-menu-dropdown ul li a:hover {
    color: #BF7869;
}

/* Language & Notification Section */
.lang-notif {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.lang-notif-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5px;
}

.lang-notif-inner > span:first-child {
    font-size: 14px;
    color: #474455;
    display: flex;
    align-items: center;
}

.lang-notif-inner > span:first-child i {
    width: 24px;
    font-size: 16px;
    color: #BF7869;
    margin-right: 12px;
    text-align: center;
}

.lang-switchlink {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-switchlink a {
    color: #999;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lang-switchlink a.active {
    color: #fff;
    background: #BF7869;
}

.lang-switchlink a:hover {
    color: #BF7869;
}

.lang-switchlink a.active:hover {
    color: #fff;
}

.lang-divider {
    color: #ddd;
}

/* Logout Button */
.msi-logout {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.msi-logout a {
    display: flex;
    align-items: center;
    color: #dc3545;
    font-size: 15px;
    font-weight: 500;
}

.msi-logout a i {
    width: 24px;
    font-size: 16px;
    margin-right: 12px;
    text-align: center;
}

.msi-logout a:hover {
    color: #c82333;
}

/* Logo & Social */
.msi-logobar {
    margin-top: 25px;
    text-align: center;
}

.msi-logobar img {
    max-width: 100px;
    opacity: 0.8;
}

.msi-socialbar {
    margin-top: 15px;
}

.msi-socialbar ul {
    display: flex;
    justify-content: center;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.msi-socialbar ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.msi-socialbar ul li a:hover {
    background: #BF7869;
}

.msi-socialbar ul li a:hover img {
    filter: brightness(0) invert(1);
}

.msi-socialbar ul li a img {
    width: 18px;
    height: 18px;
}

/* Bottom Section */
.msi-inner-bottom {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.msi-powerby-logobar {
    text-align: center;
}

.msi-powerby-logobar img {
    max-width: 70px;
    opacity: 0.5;
}

/* Overlay when sidebar is open */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-sidebar-overlay.show,
.mobile-sidebar.active + .mobile-sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

/* Custom Switch - iOS Style */
.custom-control.custom-switch {
    padding-left: 0;
}

.custom-control-label {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.custom-control-input {
    position: absolute;
    opacity: 0;
}

.custom-control-label-span {
    display: block;
    width: 50px;
    height: 28px;
    background: #ddd;
    border-radius: 14px;
    position: relative;
    transition: all 0.3s ease;
}

.custom-control-label-span::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.custom-control-input:checked + .custom-control-label-span {
    background: #BF7869;
}

.custom-control-input:checked + .custom-control-label-span::after {
    left: calc(100% - 26px);
}

/* ==================== MOBILE SEARCH BAR ==================== */
@media (max-width: 991px) {
    .toggle-searchbars {
        padding: 10px 15px;
        background: #f9f9f9;
    }

    .toggle-searchbars-inner .seach-forminner {
        position: relative;
    }

    .toggle-searchbars-inner .seach-forminner input {
        width: 100%;
        height: 44px;
        border-radius: 22px;
        border: 1px solid #e2e2e2;
        background: #fff;
        padding: 10px 20px 10px 45px;
        font-size: 14px;
    }

    .toggle-searchbars-inner .seach-forminner input:focus {
        border-color: #BF7869;
        outline: none;
    }

    .toggle-searchbars-inner .search-btn {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        padding: 0;
    }

    .toggle-searchbars-inner .search-btn img {
        width: 18px;
        height: 18px;
    }
}

/* ==================== MOBILE BANNER ==================== */
@media (max-width: 767px) {
    .banner {
        margin-top: 0;
    }

    .banner .banner-item {
        height: auto;
        min-height: 180px;
    }

    .banner-image {
        width: 100%;
        height: auto;
    }

    .banner-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
        max-height: 250px;
    }

    .banner-inner .swiper-pagination {
        bottom: 10px;
    }

    .banner-inner .swiper-pagination span.swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }
}

/* ==================== MOBILE PRODUCT CARDS (iOS-like) ==================== */
@media (max-width: 575px) {
    .product-slider {
        padding: 20px 0;
    }

    .product-main-title.common-main-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    .product-main-title.common-main-title h2 {
        font-size: 18px;
        line-height: 22px;
        padding-bottom: 0;
    }

    .product-main-title.common-main-title h2::before {
        display: none;
    }

    .view-moreLink {
        font-size: 13px;
        color: #BF7869;
    }

    /* Product Box Card Style */
    .product-box {
        background: #fff;
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        margin-bottom: 15px;
    }

    .product-img {
        height: 140px;
        border-radius: 8px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f9f9f9;
    }

    .product-img img {
        max-height: 120px;
        max-width: 100%;
        object-fit: contain;
    }

    .product-data {
        margin-top: 10px;
    }

    .product-data h4,
    .product-data h4 a {
        font-size: 14px;
        line-height: 18px;
        color: #474455;
        margin-bottom: 8px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-varient {
        margin-bottom: 8px;
    }

    .product-varient-inner {
        display: flex;
        align-items: flex-start;
        margin-bottom: 6px;
    }

    .product-varient-inner label {
        font-size: 11px;
        color: #999;
        min-width: 60px;
        margin-right: 5px;
    }

    .product-varient-inner .pvi-flex p,
    .product-varient-inner .pvi-flex span {
        font-size: 11px;
        color: #474455;
    }

    /* Supplier & Size Tags */
    .supplier-tags,
    .size-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .supplier-tag,
    .size-tag {
        padding: 3px 8px;
        font-size: 10px;
        border-radius: 4px;
        border: 1px solid #ddd;
        background: #f8f8f8;
        cursor: pointer;
    }

    .supplier-tag.active,
    .size-tag.active {
        background: #BF7869;
        color: #fff;
        border-color: #BF7869;
    }

    /* Price & Actions Row */
    .product-pricedata {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
    }

    .ppd-flex {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .ppd-flex .add-cartBtn,
    .ppd-flex .add-favBtn {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .ppd-flex .add-cartBtn {
        background: #BF7869;
    }

    .ppd-flex .add-cartBtn img {
        width: 18px;
        height: 18px;
        filter: brightness(0) invert(1);
    }

    .ppd-flex .add-favBtn {
        background: #f0f0f0;
        margin-left: 8px;
    }

    .ppd-flex .add-favBtn i {
        font-size: 16px;
        color: #BF7869;
    }

    .price-amount {
        text-align: right;
    }

    .price-amountinner .price-discount {
        font-size: 10px;
        color: #999;
        display: block;
    }

    .price-amountinner .current-price {
        font-size: 15px;
        font-family: 'hn-bold';
        color: #474455;
    }

    /* Swiper Controls */
    .swiper-button-prev.common-swipercontrol-btn,
    .swiper-button-next.common-swipercontrol-btn {
        display: none;
    }
}

/* ==================== MOBILE CATEGORIES (iOS-like) ==================== */
@media (max-width: 575px) {
    .shopbycat {
        padding: 20px 0;
    }

    .home-catname {
        margin-bottom: 10px;
    }

    .home-catimg {
        border-radius: 12px;
        overflow: hidden;
        position: relative;
    }

    .home-catimg img {
        width: 100%;
        height: auto;
        display: block;
    }

    .home-catimg h4 {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 15px;
        background: linear-gradient(transparent, rgba(0,0,0,0.7));
        color: #fff;
        font-size: 14px;
        line-height: 18px;
        margin: 0;
    }

    /* Step-wise Construction */
    .swc-boxflex {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
    }

    .swc-boxflex-inner {
        width: calc(33.33% - 7px);
        text-align: center;
    }

    .swc-boxflex-img {
        width: 60px;
        height: 60px;
        margin: 0 auto 8px;
        background: #f5f5f5;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .swc-boxflex-img img {
        max-width: 35px;
        max-height: 35px;
    }

    .swc-boxflex-inner h5 {
        font-size: 9px;
        line-height: 12px;
        color: #474455;
    }

    /* Shop By Category Tabs */
    .mob-shoptabs-inner {
        margin-bottom: 15px;
    }

    .mob-shoptabs-inner ul.nav-tabs {
        display: flex;
        border: none;
        background: #f5f5f5;
        border-radius: 25px;
        padding: 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mob-shoptabs-inner ul.nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .mob-shoptabs-inner ul.nav-tabs li.nav-item {
        flex: 1;
        min-width: 0;
    }

    .mob-shoptabs-inner ul.nav-tabs li.nav-item a {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 10px 12px;
        border-radius: 20px;
        font-size: 11px;
        color: #474455;
        white-space: normal;
        word-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        border: none;
        background: transparent;
        min-height: 44px;
        line-height: 1.3;
    }

    .mob-shoptabs-inner ul.nav-tabs li.nav-item a.active {
        background: #BF7869;
        color: #fff;
    }
}

/* ==================== MOBILE INFLUENCERS (iOS-like) ==================== */
@media (max-width: 575px) {
    .influencers-boxcol {
        width: 90px !important;
        text-align: center;
    }

    .influencers-img {
        width: 70px;
        height: 70px;
        margin: 0 auto;
        border-radius: 50%;
        overflow: hidden;
        border: 2px solid #f0f0f0;
    }

    .influencers-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .influencers-name {
        margin-top: 8px;
    }

    .influencers-name h4 {
        font-size: 11px;
        line-height: 14px;
        color: #474455;
    }
}

/* ==================== MOBILE CART (iOS-like) ==================== */
@media (max-width: 575px) {
    .cart-view {
        padding: 15px 0;
    }

    .cart-viewedit {
        text-align: right;
        margin-bottom: 15px;
    }

    .cart-viewedit-link {
        font-size: 14px;
        color: #BF7869;
    }

    /* Cart Item Card */
    .cart-view .cart-item {
        background: #fff;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        position: relative;
    }

    .cart-view .proview-flex.cpf-flex {
        display: flex;
        flex-direction: row;
        gap: 12px;
    }

    .cart-view .proview-left {
        position: relative;
        flex-shrink: 0;
    }

    .cart-view .cart-viewimg {
        width: 80px;
        height: 80px;
        border-radius: 8px;
        overflow: hidden;
        background: #f9f9f9;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cart-view .cart-viewimg img {
        max-width: 70px;
        max-height: 70px;
        object-fit: contain;
    }

    .cart-view .pro-delete-btn {
        position: absolute;
        top: -5px;
        right: -5px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #ff4444;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .cart-view .pro-delete-btn img {
        width: 10px;
        height: 10px;
        filter: brightness(0) invert(1);
    }

    .cart-view .proview-right {
        flex: 1;
        min-width: 0;
    }

    .cart-view .product-data h4,
    .cart-view .product-data h4 a {
        font-size: 14px;
        line-height: 18px;
        margin-bottom: 8px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .cart-view .product-varient-inner {
        display: flex;
        align-items: center;
        margin-bottom: 4px;
    }

    .cart-view .product-varient-inner label {
        font-size: 11px;
        color: #999;
        min-width: 70px;
    }

    .cart-view .product-varient-inner .pvi-flex p,
    .cart-view .product-varient-inner .pvi-flex span {
        font-size: 12px;
        color: #474455;
    }

    /* Quantity Controls */
    .cart-view .product-pricedata {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
    }

    .cart-view .product-pricedata .ppd-flex {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-view .quantity.cart-qty {
        display: flex;
        align-items: center;
        background: #f5f5f5;
        border-radius: 8px;
        overflow: hidden;
    }

    .cart-view .quantity button {
        width: 36px;
        height: 36px;
        border: none;
        background: none;
        font-size: 18px;
        color: #474455;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cart-view .quantity input {
        width: 40px;
        height: 36px;
        border: none;
        background: none;
        text-align: center;
        font-size: 14px;
        font-family: 'hn-md';
    }

    .cart-view .price-amountinner .item-total {
        font-size: 16px;
        font-family: 'hn-bold';
        color: #474455;
    }

    /* Cart Totals */
    .cart-viewtotals {
        background: #f9f9f9;
        border-radius: 12px;
        padding: 15px;
        margin: 20px 0;
    }

    .cart-viewtotals-inner {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px solid #e2e2e2;
    }

    .cart-viewtotals-inner:last-child,
    .cart-viewtotals-inner.cvi-noborder {
        border-bottom: none;
    }

    .cart-viewtotals-inner.cvi-bott {
        padding-top: 15px;
        margin-top: 5px;
        border-top: 2px solid #474455;
    }

    .cart-viewtotals-inner label,
    .cart-viewtotals-inner span {
        font-size: 14px;
        color: #474455;
    }

    .cart-viewtotals-inner.cvi-bott label,
    .cart-viewtotals-inner.cvi-bott span {
        font-size: 18px;
        font-family: 'hn-bold';
    }

    /* Use Credit Field */
    .use-credit-fields {
        flex-direction: column;
        align-items: flex-start;
    }

    .use-credit-fields label {
        margin-bottom: 8px;
    }

    .use-credit-fields .credit-span {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .use-credit-fields .credit-span input {
        flex: 1;
        height: 40px;
        border-radius: 8px;
        border: 1px solid #ddd;
        padding: 0 12px;
    }

    /* General Notes */
    .general-notes {
        margin: 20px 0;
    }

    .general-notes h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .general-notes textarea {
        width: 100%;
        min-height: 100px;
        border-radius: 12px;
        border: 1px solid #ddd;
        padding: 12px;
        font-size: 14px;
    }

    /* Cart Buttons */
    .cart-view-btngroup {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }

    .cart-view-btngroup .btn {
        width: 100%;
        height: 50px;
        border-radius: 25px;
        font-size: 16px;
        font-family: 'hn-md';
    }

    .cart-view-btngroup .btn.login-btn {
        background: #BF7869;
        color: #fff;
        border: none;
    }

    .cart-view-btngroup .btn.login-btn:first-child {
        background: #f5f5f5;
        color: #474455;
    }
}

/* ==================== MOBILE PROFILE (iOS-like) ==================== */
@media (max-width: 575px) {
    .main-profile-sec {
        padding: 15px 0;
    }

    .profile-sec-innerdata {
        display: flex;
        align-items: center;
        background: #fff;
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        transition: all 0.2s ease;
    }

    .profile-sec-innerdata:active {
        transform: scale(0.98);
    }

    .mpsi-leftbar {
        width: 50px;
        height: 50px;
        min-width: 50px;
        background: linear-gradient(135deg, #BF7869 0%, #F6CE9A 100%);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 15px;
    }

    .mpsi-leftbar img {
        width: 24px;
        height: 24px;
        filter: brightness(0) invert(1);
    }

    .mpsi-rightbar {
        flex: 1;
        min-width: 0;
    }

    .mpsi-rightbar h4 {
        font-size: 15px;
        line-height: 19px;
        color: #474455;
        margin-bottom: 3px;
        font-family: 'hn-md';
    }

    .mpsi-rightbar p {
        font-size: 12px;
        line-height: 16px;
        color: #999;
        margin: 0;
    }

    .mpsi-rightbar p b {
        color: #BF7869;
    }

    .mpsi-col {
        margin-bottom: 10px;
    }
}

/* ==================== MOBILE ORDERS (iOS-like Card Style) ==================== */
@media (max-width: 575px) {
    .wishlist-sec.order-listsec {
        padding: 15px 0;
    }

    .order-filter-dropdown {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }

    .order-filter-dropdown select {
        width: 100%;
        height: 44px;
        border-radius: 10px;
        border: 1px solid #ddd;
        padding: 0 15px;
        font-size: 14px;
        background: #fff;
    }

    .order-export-btns {
        display: flex;
        gap: 10px;
    }

    .order-export-btns .btn {
        flex: 1;
        height: 44px;
        border-radius: 10px;
        font-size: 14px;
    }

    /* Order Card Style */
    .order-items {
        background: #fff;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .order-items-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .order-items h4 {
        font-size: 14px;
        color: #474455;
    }

    .order-items-tag {
        font-size: 11px;
        padding: 4px 10px;
        border-radius: 12px;
        background: #f0f0f0;
    }

    .order-items-tag.order-delivered-tag {
        background: #e8f5e9;
        color: #2e7d32;
    }

    .order-items-tag.order-cancelled-tag {
        background: #ffebee;
        color: #c62828;
    }

    .order-items-tag.order-processing-tag {
        background: #fff3e0;
        color: #ef6c00;
    }

    .order-items-details p,
    .order-items-time p {
        font-size: 12px;
        color: #999;
        margin-bottom: 4px;
    }

    .order-items-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
    }

    .orderdetail-viewLink {
        display: inline-block;
        padding: 8px 20px;
        background: #BF7869;
        color: #fff;
        border-radius: 20px;
        font-size: 13px;
    }
}

/* ==================== MOBILE PRODUCT VIEW (iOS-like) ==================== */
@media (max-width: 575px) {
    .main-productview {
        padding: 0;
    }

    .main-productview .proview-top.productview-top {
        margin: 0;
        padding: 15px;
    }

    .main-productview .proview-flex {
        flex-direction: column;
    }

    .main-productview .proview-left {
        width: 100%;
        margin-bottom: 20px;
    }

    /* Image Slider */
    .proview-flex .lSSlideOuter.vertical {
        padding-left: 0;
    }

    .proview-flex .lSSlideWrapper {
        width: 100% !important;
        height: auto !important;
        max-width: 100%;
    }

    .proview-flex #lightSlider li a {
        height: auto;
        display: block;
    }

    .proview-flex #lightSlider li a img {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: contain;
    }

    .proview-flex .lSSlideOuter .lSPager.lSGallery {
        display: flex !important;
        justify-content: center;
        margin-top: 10px;
    }

    .proview-flex .lSSlideOuter .lSPager.lSGallery li {
        width: 60px !important;
        height: 60px !important;
        margin: 0 5px !important;
        border-radius: 8px;
        overflow: hidden;
    }

    /* Lightslider Controls */
    .common-lightcontorl {
        display: none;
    }

    /* Product Info */
    .main-productview .proview-right {
        width: 100%;
        padding: 0;
    }

    .main-productview .proview-right .product-data h4,
    .main-productview .proview-right .product-data h4 a {
        font-size: 18px;
        line-height: 24px;
        margin-bottom: 10px;
    }

    .main-productview .main-pro-fav {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    .main-productview .main-pro-fav .add-favBtn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #f5f5f5;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-productview .main-pro-fav .add-favBtn i {
        font-size: 18px;
        color: #BF7869;
    }

    /* Supplier & Size Tabs */
    .main-productview .supplier-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .main-productview .supplier-tab {
        min-width: 70px;
        height: 36px;
        padding: 0 12px;
        font-size: 12px;
        border-radius: 8px;
    }

    .main-productview .unit-options {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .main-productview .unit-tab {
        min-width: 50px;
        height: 36px;
        padding: 0 12px;
        font-size: 12px;
        border-radius: 8px;
    }

    /* Quantity & Price */
    .main-productview .product-pricedata {
        margin-top: 15px;
    }

    .main-productview .product-pricedata .ppd-flex {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .main-productview .pro-quantity .quantity {
        display: flex;
        align-items: center;
        background: #f5f5f5;
        border-radius: 10px;
        overflow: hidden;
    }

    .main-productview .pro-quantity .quantity button {
        width: 44px;
        height: 44px;
        border: none;
        background: none;
        font-size: 20px;
        color: #474455;
    }

    .main-productview .pro-quantity .quantity input {
        width: 50px;
        height: 44px;
        border: none;
        background: none;
        text-align: center;
        font-size: 16px;
        font-family: 'hn-md';
    }

    .main-productview .price-amountinner {
        text-align: right;
    }

    .main-productview .price-amountinner .price-discount {
        font-size: 12px;
        color: #999;
        display: block;
    }

    .main-productview .price-amountinner span#net_price {
        font-size: 20px;
        font-family: 'hn-bold';
        color: #474455;
    }

    /* Add to Cart Button */
    .pro-addcartbtn {
        margin-top: 20px;
    }

    .pro-addcartbtn .btn.pro-addcart-btn {
        width: 100%;
        height: 50px;
        border-radius: 25px;
        background: #BF7869;
        color: #fff;
        font-size: 16px;
        font-family: 'hn-md';
        border: none;
    }

    /* Description */
    .main-productview .pro-description {
        padding: 15px;
        background: #f9f9f9;
        border-radius: 12px;
        margin-top: 15px;
    }

    .main-productview .pro-description p {
        font-size: 13px;
        line-height: 20px;
        color: #666;
    }
}

/* ==================== MOBILE WISHLIST (iOS-like) ==================== */
@media (max-width: 575px) {
    .wishlist-sec {
        padding: 15px 0;
    }

    /* Wishlist Card Style */
    .wishlist-item-card {
        background: #fff;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        display: flex;
        gap: 12px;
    }

    .wishlist-product-img {
        width: 80px;
        height: 80px;
        border-radius: 8px;
        overflow: hidden;
        background: #f9f9f9;
        flex-shrink: 0;
    }

    .wishlist-product-img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .wishlist-product-info {
        flex: 1;
        min-width: 0;
    }

    .wishlist-product-name {
        font-size: 14px;
        line-height: 18px;
        margin-bottom: 5px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .wishlist-unitprice h5 {
        font-size: 15px;
        font-family: 'hn-bold';
        color: #474455;
    }

    .wishlist-unitprice del {
        font-size: 11px;
        color: #999;
    }

    .wishlist-addcartbtn .btn {
        height: 36px;
        padding: 0 20px;
        border-radius: 18px;
        font-size: 12px;
        background: #BF7869;
        color: #fff;
        border: none;
    }
}

/* ==================== MOBILE AUTH PAGES (iOS-like) ==================== */
@media (max-width: 575px) {
    .common-credform {
        padding: 20px;
    }

    .common-credform h3 {
        font-size: 24px;
        text-align: center;
        margin-bottom: 30px;
    }

    .common-credform .form-group {
        margin-bottom: 15px;
    }

    .common-credform .form-control {
        height: 50px;
        border-radius: 12px;
        border: 1px solid #ddd;
        padding: 0 15px;
        font-size: 14px;
    }

    .common-credform .form-control:focus {
        border-color: #BF7869;
    }

    .common-credform-btns {
        margin-top: 25px;
    }

    .common-credform-btns .btn {
        width: 100%;
        height: 50px;
        border-radius: 25px;
        font-size: 16px;
        margin-bottom: 12px;
    }

    .common-credform-btns .login-btn {
        background: #BF7869;
        color: #fff;
        border: none;
    }

    .common-credform-btns .guest-btn,
    .common-credform-btns .register-btn {
        background: #f5f5f5;
        color: #474455;
        border: none;
    }

    /* Social Login Buttons */
    .common-ga-btns {
        margin-top: 30px;
    }

    .common-ga-btns h5 {
        text-align: center;
        font-size: 14px;
        color: #999;
        margin-bottom: 15px;
    }

    .common-ga-btns .btn {
        width: 100%;
        height: 50px;
        border-radius: 12px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-size: 14px;
    }
}

/* ==================== MOBILE ADDRESS PAGES (iOS-like) ==================== */
@media (max-width: 575px) {
    .address-card {
        background: #fff;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .address-card h4 {
        font-size: 15px;
        margin-bottom: 8px;
        color: #474455;
    }

    .address-card p {
        font-size: 13px;
        color: #666;
        line-height: 20px;
    }

    .address-card-actions {
        display: flex;
        gap: 10px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
    }

    .address-card-actions a {
        font-size: 13px;
        color: #BF7869;
    }
}

/* ==================== MOBILE MODALS (iOS-like) ==================== */
@media (max-width: 575px) {
    .comm-msg-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 10000;
        display: none;
        align-items: flex-end;
        justify-content: center;
    }

    .comm-msg-modal.show {
        display: flex;
    }

    .comm-msg-modal .modl-inner {
        width: 100%;
        max-height: 80vh;
        background: #fff;
        border-radius: 20px 20px 0 0;
        overflow: hidden;
        animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .comm-msg-modal .modl-header {
        padding: 20px;
        border-bottom: 1px solid #f0f0f0;
    }

    .comm-msg-modal .modl-header h3 {
        font-size: 18px;
        text-align: center;
    }

    .comm-msg-modal .modal-close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 30px;
        height: 30px;
        padding: 0;
        background: none;
        border: none;
    }

    .comm-msg-modal .modl-body {
        padding: 20px;
        max-height: calc(80vh - 70px);
        overflow-y: auto;
    }
}

/* ==================== MOBILE BREADCRUMB ==================== */
@media (max-width: 575px) {
    .cs-breadcrumb {
        padding: 10px 0;
        background: #f9f9f9;
    }

    .cs-breadcrumb ul {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }

    .cs-breadcrumb ul li {
        font-size: 12px;
        color: #999;
    }

    .cs-breadcrumb ul li a {
        color: #999;
    }

    .cs-breadcrumb ul li:last-child {
        color: #474455;
    }

    .cs-breadcrumb ul li::after {
        content: '>';
        margin: 0 8px;
        color: #999;
    }

    .cs-breadcrumb ul li:last-child::after {
        display: none;
    }
}

/* ==================== MOBILE TOAST NOTIFICATIONS ==================== */
.cart-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    z-index: 10001;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ==================== TOUCH FRIENDLY IMPROVEMENTS ==================== */
@media (max-width: 767px) {
    /* Increase tap targets */
    a, button, .btn, input[type="submit"], input[type="button"] {
        min-height: 44px;
    }

    /* Better spacing for touch */
    .form-group {
        margin-bottom: 15px;
    }

    /* Disable hover effects on touch devices */
    @media (hover: none) {
        a:hover, button:hover, .btn:hover {
            opacity: 1;
        }
    }

    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
    }

    /* Better focus states */
    input:focus, select:focus, textarea:focus {
        outline: none;
        border-color: #BF7869;
    }
}

/* ==================== SEPARATOR LINE ==================== */
@media (max-width: 575px) {
    .product-separator {
        height: 8px;
        background: #f5f5f5;
        margin: 0 -15px;
    }
}

/* ==================== HIDE/SHOW CLASSES ==================== */
@media (max-width: 575px) {
    .comm-desk-sec {
        display: none !important;
    }

    .comm-mob-sec {
        display: block !important;
    }
}

@media (min-width: 576px) {
    .comm-desk-sec {
        display: block !important;
    }

    .comm-mob-sec {
        display: none !important;
    }
}

/* ==================== SCROLLBAR STYLING ==================== */
@media (max-width: 767px) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }

    ::-webkit-scrollbar-track {
        background: transparent;
    }

    ::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 4px;
    }
}

/* ==================== CLIENT FIXES - 2026-03-31 ==================== */

/* 1. Category Name - 2 lines max, not 3 */
.stepwise-title,
.catg-sliderbox h5,
.ios-cat-card h4,
.subcategory-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-height: 2.6em;
    word-break: break-word;
}

/* 2. Product Card - Add to Cart beside Wishlist (Web View) */
@media (min-width: 768px) {
    .product-pricedata .ppd-flex {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .product-pricedata .ppd-flex .add-cartBtn,
    .product-pricedata .ppd-flex .add-favBtn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    .product-pricedata .price-amount {
        margin-left: auto;
    }
}

/* 3. Spacing Fixes - Home Page */
.middle-content {
    padding-top: 0;
}

.banner {
    margin-bottom: 15px;
}

.product-slider {
    padding: 15px 0;
}

.product-separator {
    margin: 10px 0;
}

@media (max-width: 575px) {
    .banner {
        margin-bottom: 10px;
    }

    .product-slider {
        padding: 10px 0;
    }

    .product-main-title {
        margin-bottom: 10px;
    }

    .product-main-title h2 {
        font-size: 16px;
    }

    /* Reduce spacing between sections */
    .product-boxcol {
        padding: 5px;
    }

    .influencers {
        padding: 10px 0;
    }

    .stepwise-grid-section {
        padding: 10px 0;
    }
}

/* 4. Cart Page - Mobile View Fix */
@media (max-width: 575px) {
    .cart-page-main {
        padding: 10px;
    }

    .cart-item {
        padding: 12px;
        margin-bottom: 10px;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .cart-item-img {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }

    .cart-item-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
    }

    .cart-item-details {
        flex: 1;
        padding-left: 12px;
    }

    .cart-item-name {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 5px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .cart-item-price {
        font-size: 15px;
        font-weight: 700;
        color: #BF7869;
    }

    .cart-summary {
        background: #fff;
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
        position: sticky;
        bottom: 0;
    }

    .cart-summary-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        font-size: 14px;
    }

    .cart-summary-row.total {
        font-size: 16px;
        font-weight: 700;
        border-top: 1px solid #eee;
        padding-top: 12px;
        margin-top: 8px;
    }
}

/* 5. Checkout Page - Mobile View Fix */
@media (max-width: 575px) {
    .checkout-page {
        padding: 10px;
    }

    .checkout-section {
        background: #fff;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .checkout-section-title {
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 12px;
        color: #333;
    }

    .checkout-item {
        display: flex;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .checkout-item:last-child {
        border-bottom: none;
    }

    .checkout-item-img {
        width: 60px;
        height: 60px;
        border-radius: 8px;
        overflow: hidden;
        flex-shrink: 0;
    }

    .checkout-item-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .checkout-summary {
        background: linear-gradient(135deg, #BF7869 0%, #F6CE9A 100%);
        color: #fff;
        border-radius: 12px;
        padding: 15px;
    }
}

/* 6. Category Images - Ensure proper display */
.catg-sliderbox .catg-img,
.ios-cat-card img,
.subcategory-img img,
.stepwise-icon img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.catg-sliderbox .catg-img img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* Make category links clickable */
.catg-boxlink,
.ios-cat-link,
.subcategory-link,
.stepwise-link {
    display: block;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.catg-boxlink:hover,
.ios-cat-link:hover,
.subcategory-link:hover,
.stepwise-link:hover {
    opacity: 0.9;
}

/* 7. Login Page OTP Box Fix */
.otp-input-container {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.otp-input-container input {
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    border: 2px solid #ddd;
    border-radius: 10px;
    outline: none;
}

.otp-input-container input:focus {
    border-color: #BF7869;
}

/* 8. Wholesaler Section */
.wholesaler-section {
    background: #fff;
    padding: 15px;
    margin: 15px 0;
    border-radius: 12px;
}

.wholesaler-link {
    display: flex;
    align-items: center;
    padding: 12px;
    background: linear-gradient(135deg, #BF7869 0%, #F6CE9A 100%);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
}

.wholesaler-link:hover {
    opacity: 0.9;
    color: #fff;
}

/* 9. Country Code Dropdown Arrow Fix */
.country-code-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* 10. Add Address Map Fix */
.address-map-container {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.address-map-container iframe,
.address-map-container #map {
    width: 100%;
    height: 100%;
    border: none;
}

/* 11. User Profile Dropdown */
.user-propic {
    position: relative;
}

.user-propic .user-droptoggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.user-propic .user-droptoggle img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-propic .user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 10px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    list-style: none;
    margin: 0;
}

.user-propic.show .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.user-propic .user-dropdown li {
    list-style: none;
}

.user-propic .user-dropdown li a,
.user-propic .user-dropdown li button {
    display: block;
    padding: 10px 20px;
    color: #474455;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

.user-propic .user-dropdown li a:hover,
.user-propic .user-dropdown li button:hover {
    background: #f5f5f5;
    color: #BF7869;
}

.user-propic .user-dropdown li a i,
.user-propic .user-dropdown li button i {
    margin-right: 10px;
    width: 16px;
}
