/* ====================== LAYOUT ====================== */
.h-vh-100 {
    height: 100dvh;
    overflow-x: hidden;
    box-sizing: border-box;
    scrollbar-width: none;
}
#index-section {
    display: flex;
    flex-direction: column;
}
.header-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    flex: 1;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.header-wrapper::-webkit-scrollbar,
.content-wrapper::-webkit-scrollbar,
.product-content::-webkit-scrollbar {
    display: none;
}

/* ====================== SHOPS CONTAINER ====================== */
.shops-container {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    grid-column: span 3;
    position: relative;
}
.search-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 5px;
    width: 100%;
    height: 100%;
    background: #fd7e14;
    position: relative;
    transition: all 0.3s ease;
    flex: 0;
}
.back-button {
    cursor: pointer;
    color: #fff;
    font-size: x-large;
}
.shops-cart-messenger {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.shops-cart-messenger img {
    width: 20px;
}
.filter-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-size: 10px;
    cursor: pointer;
}
.filter-count {
    position: absolute;
    top: 0px;
    right: -2px;
    background: var(--blue);
    color: #fff;
    font-size: 10px;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.menu-popup {
    position: absolute;
    background: white;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
    padding: 10px;
    width: auto;
    display: none;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    z-index: 1000;
}
.menu-popup .menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    text-decoration: none !important;
    cursor: pointer;
}
.menu-popup .menu-item:hover {
    background-color: #f8f9fa;
}
.menu-popup .menu-item img {
    width: 20px;
    height: 20px;
}
.menu-popup .menu-item span {
    font-size: 14px;
    color: #6c757d;
}
/* ====================== CONTENT ====================== */
.content-wrapper {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* ====================== PRODUCT CONTAINER ====================== */
.product-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
}
.product-content {
    grid-column: span 4;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
}
.product-item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 5px;
    border-radius: 5px;
    box-shadow: 0 2px 5px -1px rgba(50, 50, 93, 0.25), 0 1px 3px -1px rgba(0, 0, 0, 0.3);
    border: 1px solid #ccc;
    background: #fff;
}
/* ====================== PRODUCT CARD ====================== */
.product-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
}
.product-img img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 5px 5px 0 0;
    transition: transform 0.3s;
}
.order-status {
    position: absolute;
    top: 0;
    left: 0;
    padding: 5px;
    font-size: 0.8em;
}
.status-pending {
    background: var(--yellow);
}
.status-shipping {
    background: #007bff;
    color: #fff;
}
.status-failed {
    background-color: #dc3545;
    color: #fff;
}
.status-confirmed {
    background-color: #17a2b8;
    color: #fff;
}
.status-completed {
    background: var(--success);
    color: #fff;
}
.product-title {
    font-size: 1em;
    font-weight: 400;
    color: #000;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 5px;
    padding: 5px;
}
.product-info img {
    border-radius: 5px;
    width: 20px;
}
.product-piece {
    background: rgba(208, 1, 27, .08);
    align-items: center;
    color: var(--orange);
    cursor: default;
    display: flex;
    padding: 3px 7px;
    position: relative;
    gap: 5px;
}
.product-ship {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    text-overflow: ellipsis;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}
.social-percentage {
    background: var(--orange);
    border-radius: 5px;
    color: var(--white);
    font-weight: 700;
    padding: 0 4px;
    width: max-content;
    font-family: Arial, sans-serif;
}
.wow-percentage {
    background: #28a745;
    border-radius: 5px;
    color: var(--white);
    font-weight: 700;
    padding: 0 4px;
    width: max-content;
}
.order-meta {
    display: flex;
    flex-direction: column;
}
/* ====================== HỦY ĐƠN ====================== */
.cancel-order {
    background: var(--red);
    font-size: 0.9em;
    color: #fff;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
    cursor: pointer;
}
.cancel-confirm {
    display: flex;
    flex-direction: column;
}
/* ====================== MEDIA QUERIES ====================== */
@media (max-width: 767px) {
    .shops-container { grid-column: span 4; }
    .product-container { grid-template-columns: 1fr; }
    .product-content { grid-column: span 1; }
}

@media (min-width: 768px) and (max-width: 1599px) {
    .product-list { grid-template-columns: repeat(4, 1fr); }
    .product-container { grid-template-columns: repeat(5, 1fr); }
    .product-content { grid-column: span 5; }
}
@media (min-width: 1600px) {
    .header-wrapper {
        grid-template-columns: repeat(6, 1fr);
    }
    .shops-container {
        grid-column: span 5;
    }
    .product-list { grid-template-columns: repeat(5, 1fr); }
}