/* Cart icon */
.cart-icon-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}
.cart-icon-wrapper .cart-icon {
    font-size: 1.3em;
    color: #6c757d;
    transition: color 0.3s ease, transform 0.2s ease-in-out;
}
.cart-icon-wrapper:hover .cart-icon {
    color: #007bff;
    transform: scale(1.1);
}
.cart-icon-wrapper.added .cart-icon {
    color: #28a745;
    transform: scale(1.05);
}
.cart-icon-wrapper .add-feedback {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 12px;
    height: 12px;
    background-color: rgba(40, 167, 69, 0.8);
    border-radius: 50%;
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    pointer-events: none;
}
.cart-icon-wrapper.added .add-feedback {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* Search */
.search-dropdown {
    top: 100%;
    left: 0;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}
.search-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.search-item:hover {
    background-color: #f8f8f8;
}
@media (max-width: 768px) {
    .search-dropdown {
        position: fixed !important;
        top: 60px;
        left: 0;
        width: 100% !important;
        max-height: 80vh;
    }
}

/* Shipping */
.delivery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.delivery-title {
    font-size: 15px;
    font-weight: 600;
    color: #343a40;
}
.btn-change-address {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    transition: all .25s ease;
    white-space: nowrap;
}
.btn-change-address:hover {
    background: #f8f9fa;
    border-color: #dc3545;
    color: #dc3545;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,53,69,.12);
}
@media (max-width: 768px) {
    .delivery-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .btn-change-address { width: 100%; }
}

/* Payment */
.payment-method-item {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    background: #fff;
    transition: all 0.3s ease;
}
.payment-method-item.active {
    border-color: #0d6efd;
    background: #e7f1ff;
}
.gateway-item {
    display: inline-block;
    padding: 10px 24px;
    margin: 5px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 100px;
    text-align: center;
}
.gateway-item:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
}
.gateway-item.selected {
    background: #fff;
    color: #0d6efd;
    border-color: #0d6efd;
    font-weight: 700;
}
.gateway-item .check-icon { display: none; }
.gateway-item.selected .check-icon { display: inline-block; }
.gateway-badge {
    display: inline-block;
    padding: 5px 16px;
    margin: 3px 5px;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    background: #f8f9fa;
    font-size: 13px;
}
.gateway-badge.selected-badge {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}
.gateway-container {
    display: none;
    padding: 20px;
    background: linear-gradient(135deg, #f8fbff, #f0f5ff);
    border-radius: 12px;
    margin-top: 12px;
}
.payment-description {
    display: none;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 8px;
    border-right: 3px solid #0d6efd;
}
.selected-display {
    display: none;
    background: #0d6efd;
    color: #fff;
    padding: 3px 16px;
    border-radius: 20px;
    font-size: 13px;
    margin-right: 10px;
}
.selected-display.show { display: inline-block; }

/* Invoice */
.invoice-wrap {
    max-width: 900px;
    margin: 24px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    overflow: hidden;
}
.invoice-page { background: #f4f6f8; }
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    border-bottom: 3px solid #dc3545;
}
.invoice-brand img { max-height: 56px; }
.invoice-meta { text-align: end; }
.invoice-body { padding: 24px 28px; }
.info-box { background: #f8f9fa; border-radius: 10px; padding: 16px; height: 100%; }
.invoice-table th { background: #212529; color: #fff; }
.totals { max-width: 360px; margin-inline-start: auto; }
.invoice-actions { padding: 0 28px 24px; display: flex; gap: 8px; flex-wrap: wrap; }
#invoice-map, .js-location-map { height: 180px; border-radius: 10px; margin-top: 10px; }

.shipping-label-page { background: #f4f6f8; }
.shipping-label {
    max-width: 420px;
    margin: 24px auto 12px;
    background: #fff;
    border: 2px dashed #212529;
    border-radius: 8px;
    padding: 16px;
}
.shipping-label-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid #212529;
    padding-bottom: 10px;
    margin-bottom: 12px;
}
.shipping-label-header img { max-height: 42px; }
.shipping-order-number {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}
.shipping-to-title {
    font-size: 12px;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 4px;
}
.shipping-receiver { font-size: 26px; font-weight: 800; line-height: 1.2; }
.shipping-phone { font-size: 20px; font-weight: 700; margin: 6px 0; direction: ltr; }
.shipping-address { font-size: 15px; line-height: 1.6; }
.shipping-label-location {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin: 14px 0;
}
.shipping-label-location .js-location-map,
.shipping-label-location #invoice-map {
    flex: 1;
    height: 150px;
    margin-top: 0;
}
.shipping-location-side {
    width: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}
.shipping-qr { width: 110px; height: 110px; }
.shipping-products { border-top: 1px solid #dee2e6; padding-top: 8px; }
.shipping-label-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-top: 2px solid #212529;
    margin-top: 10px;
    padding-top: 8px;
    font-size: 13px;
}
.shipping-label-actions { justify-content: center; padding-bottom: 24px; }

@media print {
    .invoice-page { background: #fff; }
    .invoice-wrap { box-shadow: none; margin: 0; border-radius: 0; }
    .invoice-actions, .no-print { display: none !important; }
    .shipping-label {
        max-width: none;
        margin: 0;
        border-style: solid;
        page-break-inside: avoid;
    }
    .shipping-label-page { background: #fff; }
    @page { margin: 8mm; }
}

/* Product */
.product-slider-2 img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
}
.carousel-indicator-custom button img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}
.font-13.ps-1 ul li {
    list-style: none;
    position: relative;
    padding-right: 25px;
}
.font-13.ps-1 ul li:before {
    content: "✓";
    color: green;
    position: absolute;
    right: 0;
    top: 0;
    font-weight: bold;
}
.price-box { display: inline-block; }
.old-price { text-decoration: line-through; color: #999; }
.new-price { color: #e53935; font-size: 18px; font-weight: bold; }
.modal-close-start { position: absolute; left: 0.5rem; }
.lang-switch-btn { min-width: 100px; }
.cart-color-swatch { background-color: #d4d4d4; }
.pwa-install-btn {
    background: none;
    border: none;
    padding: 0;
}
.cursor-pointer { cursor: pointer; }
.is-unavailable { pointer-events: none; opacity: 0.5; }

/* Listing */
.product-list-filters {
    min-width: 0;
}
.asRange { position: relative; z-index: 1; }
.custom-sidebar {
    position: relative;
    z-index: 1;
}
.custom-sidebar .form-check {
    position: relative;
    z-index: 2;
}
.price-slider {
    padding: 36px 12px 18px;
    box-sizing: border-box;
    max-width: 100%;
}
.price-filter {
    direction: ltr;
    unicode-bidi: isolate;
}
.price-filter .form-control {
    text-align: center;
}
.product-list-filters .asRange {
    width: 100%;
}
.product-list-filters .asRange .asRange-pointer .asRange-tip {
    width: auto;
    min-width: 52px;
    padding: 0 6px;
    margin-left: -26px;
    white-space: nowrap;
    font-size: 11px;
    opacity: 1;
    display: block;
}

/* Home categories */
.category-item {
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    display: block;
    padding: 10px 5px;
}
.category-item:hover { transform: translateY(-4px); }
.category-img-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px auto;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.category-pic { width: 100%; height: 100%; object-fit: cover; }
.category-title { font-size: 13px; margin-bottom: 2px; min-height: 32px; }
.category-count { font-size: 12px; }
@media (max-width: 576px) {
    .category-img-wrapper { width: 65px; height: 65px; }
    .category-title { font-size: 12px; }
}

/* Mobile menu */
.mobile-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 40px;
    padding: 0 20px 0 8px;
    box-sizing: border-box;
}
.mobile-menu-link {
    flex: 1;
    display: block;
    padding: 0;
    line-height: 40px;
}
.mobile-menu-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.mobile-menu-level-1 > li.has-mobile-submenu > .mobile-menu-item + .mobile-menu-level-2,
.mobile-menu-level-1 > li.has-mobile-submenu > .mobile-menu-item ~ .mobile-menu-level-2 {
    display: none;
}
.mobile-menu-level-1 > li.open > .mobile-menu-level-2,
.mobile-menu-level-1 > li.open > .mobile-menu-item + .mobile-menu-level-2,
.mobile-menu-level-1 > li.open > .mobile-menu-item ~ .mobile-menu-level-2,
.mobile-menu-level-2 > li.open > .mobile-menu-level-3,
.mobile-menu-level-2 > li.open > .mobile-menu-item + ul,
.mobile-menu-level-2 > li.open > .mobile-menu-item ~ ul,
.mobile-menu-level-3 > li.open > ul,
li.open > ul[class^="mobile-menu-level-"] {
    display: block;
}

/* Slider */
.main-slider,
#main-slider {
    direction: ltr;
    unicode-bidi: isolate;
}
.main-slider .carousel-inner { height: 400px; }
.main-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 768px) {
    .main-slider .carousel-inner { height: 250px; }
}

/* Orders */
.profile-card { border-radius: 10px; background-color: #fff; }
.order-progress { height: 30px; border-radius: 8px; }
.order-progress .progress-bar { font-weight: 500; }
.order-items .list-group-item { border-radius: 8px; margin-bottom: 5px; }
.fib-qr { max-width: 240px; }

/* Change password */
.input-group .toggle-password {
    cursor: pointer;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-left: none;
}
.input-group .toggle-password:hover { background-color: #e9ecef; }
.input-group.password .form-control { border-right: none; }
.address-map { height: 280px; border-radius: 10px; border: 1px solid #dee2e6; }
.default-address { border-color: #17a2b8 !important; background: #f8fcfd; }
.hint-muted { font-size: 12px; color: #6c757d; }
.fib-qr { max-width: 260px; }
.best-suggestion-slider .slider-pic {
    width: 173px;
    height: 173px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}
.brand-card {
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.brands-pic {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
}
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.product-card img.slider-pic {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.brand-list-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.brand-list-image {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #fff;
}
.brand-list-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.brand-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.custom-product-slider .slider-pic {
    width: 100% !important;
    height: 160px;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
}
.custom-product-slider .product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    min-height: 3.2em;
    max-height: 3.2em;
    word-break: break-word;
    padding: 0 6px;
}
.product-slider {
    padding-bottom: 16px;
}
.asRange-tip {
    display: block;
    opacity: 1;
}
.admin-content {
    position: relative;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 8px;
}
.admin-content:hover {
    border-color: #28a745;
    background: #f8fff9;
}
.edit-btn {
    margin-top: 10px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: #fff;
    font-size: 14px;
    border-radius: 25px;
    cursor: pointer;
}
.mobile-menu-level-2,
.mobile-menu-level-3,
.mobile-menu-level-4,
.mobile-menu-level-5 {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-menu-level-3,
.mobile-menu-level-4,
.mobile-menu-level-5 {
    padding-right: 18px;
    margin-top: 5px;
    border-right: 1px solid #e5e5e5;
}
.mobile-menu-link {
    color: #333;
    font-weight: 400;
    text-decoration: none;
    font-size: 14px;
}
.signup-login-form .text-danger {
    font-size: 12px;
    margin-top: 5px;
    display: block;
    width: 100%;
}
.signup-login-box .alert {
    margin-bottom: 20px;
    border-radius: 8px;
}
