/**
 * Fix inline height styles on images
 * Force override height auto for all images in content
 */

/* Override inline height styles with !important */
img {
    height: auto !important;
    max-width: 100%;
}
.main_content img {
    margin: 0 auto;
    display: table;
}
table#tbl-order-detail tr th {
    text-align: left;
}
ul.menu-cus img {
    position: relative;
    top: -3px;
    left: -2px;
}
/* Specific content areas */
.article-content img,
.post-content img,
.product-content img,
.content img,
.description img,
.news-content img,
.detail-content img {
    height: auto !important;
    width: auto !important;
    max-width: 100% !important;
}
button.btn.btn-sm.btn-quantity svg {
    top: 3px;
    position: relative;
}

/* Hide spinner arrows for number input */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Fix header navigation alignment */
.nav_login_resign_group_header {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav_login_resign_group_header > li {
    display: flex;
    align-items: center;
}

.nav_login_resign_group_header li.customer-icon {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.nav_login_resign_group_header li.customer-icon a {
    display: flex;
    align-items: center;
}

.nav_login_resign_group_header li.my-card {
    display: flex;
    align-items: center;
}
.fa-user-circle:before {
    color: #79b530;
}
/**
 * Search Autocomplete Styles
 * Styling cho chức năng gợi ý tìm kiếm
 */

/* Container */
.box_search_header {
    position: relative;
    z-index: 9999;
}

#search_autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99999;
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    margin-top: -1px;
}

/* Loading state */
.autocomplete-loading {
    padding: 15px 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.autocomplete-loading i {
    margin-right: 8px;
    color: #007bff;
}

/* No results */
.autocomplete-no-results {
    padding: 15px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    font-style: italic;
}

/* Results list */
.autocomplete-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.autocomplete-item {
    border-bottom: 1px solid #f0f0f0;
}

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

.autocomplete-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.autocomplete-item a:hover,
.autocomplete-item a:focus {
    background-color: #f8f9fa;
    color: #007bff;
    text-decoration: none;
}

.autocomplete-item-content {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.autocomplete-item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-item a i {
    margin-right: 8px;
    color: #999;
    font-size: 13px;
    flex-shrink: 0;
}

.autocomplete-item a:hover i {
    color: #007bff;
}

.autocomplete-item-price {
    color: #e74c3c;
    font-weight: 600;
    font-size: 14px;
    margin-left: 15px;
    white-space: nowrap;
    flex-shrink: 0;
}

.autocomplete-item a:hover .autocomplete-item-price {
    color: #c0392b;
}

/* Scrollbar styling */
#search_autocomplete::-webkit-scrollbar {
    width: 8px;
}

#search_autocomplete::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

#search_autocomplete::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive styles */
@media (max-width: 768px) {
    #search_autocomplete {
        max-height: 300px;
        font-size: 13px;
    }

    .autocomplete-item a {
        padding: 10px 15px;
        font-size: 13px;
    }

    .autocomplete-item-price {
        font-size: 13px;
        margin-left: 10px;
    }

    .autocomplete-item-title {
        font-size: 13px;
    }

    .autocomplete-loading,
    .autocomplete-no-results {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#search_autocomplete {
    animation: fadeIn 0.2s ease;
}

/**
 * Related Products Slider Styles
 * Styling cho slider sản phẩm liên quan
 */

/* Slick Related Products Container */
.slick-related-products {
    position: relative;
    padding: 0 40px;
}

/* Slick Arrows */
.slick-related-products .slick-prev,
.slick-related-products .slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.slick-related-products .slick-prev {
    left: 0;
}

.slick-related-products .slick-next {
    right: 0;
}

.slick-related-products .slick-prev:hover,
.slick-related-products .slick-next:hover {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.slick-related-products .slick-prev i,
.slick-related-products .slick-next i {
    font-size: 20px;
    color: #333;
}

.slick-related-products .slick-prev:hover i,
.slick-related-products .slick-next:hover i {
    color: #fff;
}

.slick-related-products .slick-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Slick Dots */
.slick-related-products .slick-dots {
    bottom: -40px;
    text-align: center;
}

.slick-related-products .slick-dots li button:before {
    font-size: 12px;
    color: #999;
}

.slick-related-products .slick-dots li.slick-active button:before {
    color: #007bff;
}

/* Product Item in Slider */
.slick-related-products .item_product_list {
    margin: 0 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .slick-related-products {
        padding: 0 20px;
    }

    .slick-related-products .slick-prev,
    .slick-related-products .slick-next {
        width: 35px;
        height: 35px;
    }

    .slick-related-products .slick-prev i,
    .slick-related-products .slick-next i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .slick-related-products {
        padding: 0;
    }

    .slick-related-products .slick-dots {
        bottom: -30px;
    }
  .single-product-box-content iframe {
    max-width: 100%;
}
}

/* Animation */
.slick-related-products .slick-slide {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.slick-related-products .slick-slide.slick-active {
    opacity: 1;
}

.slick-related-products .slick-slide.slick-current {
    opacity: 1;
}
/**
 * Cart Variant Display Styles
 * Styling hiển thị biến thể trong giỏ hàng
 */

/* Variant display in cart */
.variant_atc {
    margin: 5px 0 0 0;
    padding: 3px 8px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 12px;
    color: #555;
    display: inline-block;
}

.variant_atc strong {
    color: #333;
    font-weight: 600;
}

.color_atc,
.size_atc {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #666;
}

.color_atc span,
.size_atc span {
    margin-left: 5px;
    font-weight: 600;
    color: #333;
}

/* Modal cart table styling */
.list_product_item_cart td {
    vertical-align: middle !important;
}

.list_product_item_cart td p {
    margin: 3px 0;
}
