/* 
   UI Styles from ShopCf 
   Optimized for ShopHuyKhung
*/

.max-w-3xl {
    max-width: 1200px !important;
}

/* Grid & Section Header */
.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(239, 68, 68, 0.5);
    padding-bottom: 10px;
    gap: 15px;
}

.section-title {
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    border-left: 4px solid #f97316;
    padding-left: 12px;
    margin: 0;
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

/* ItemHL Card Styles */
.posts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .posts {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

.itemHL {
    background: #0f172abf;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.itemHL:hover {
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
    transform: translateY(-5px);
}

.card-media {
    position: relative;
    padding-top: 86.25%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.card-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.itemHL:hover .card-media img {
    transform: scale(1.1);
}

.ms-ribbon {
    position: absolute;
    top: 10px;
    left: -5px;
    /* background: linear-gradient(90deg, #ef4444, #f97316); */
    background: #ba3448;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px 4px 15px;
    clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%);
    z-index: 10;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.price-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: red;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.itemHL-body {
    padding: 12px;
    flex-grow: 1;
}

.itemHL-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.itemHL-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-stat {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
}

.info-stat strong {
    color: #e2e8f0;
}

.itemHL-bottom {
    display: flex;
    padding: 10px;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btnHL-buy,
.btnHL-view {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 800;
    border-radius: 6px;
    text-transform: uppercase;
    transition: 0.2s;
}

.btnHL-buy {
    /* background: linear-gradient(90deg, #ef4444, #f97316); */
    background: #346dba;
    color: #fff;
}

.btnHL-buy.sold {
    background: #475569;
    cursor: not-allowed;
}

.btnHL-view {
    background: white;
    color: red;
    border: 1px solid red;
}

.btnHL-buy:hover:not(.sold) {
    filter: brightness(1.2);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btnHL-view:hover {
    background: #346dba;
    color: #fff;
}

.sold-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.sold-text {
    /* background: #ef4444; */
    color: #fff;
    padding: 5px 15px;
    font-weight: 900;
    transform: rotate(-15deg);
    border: 2px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Gallery & Lightbox Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: #f97316;
}

.gallery-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* GLightbox Customization */
.glightbox-container .thumb-strip {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    left: 50%;
    max-width: 90vw;
    overflow-x: auto;
    padding: 8px;
    position: absolute;
    scrollbar-width: none;
    transform: translateX(-50%);
    z-index: 1000001;
}

.glightbox-container .thumb-strip::-webkit-scrollbar {
    display: none;
}

.glightbox-container .thumb {
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
}

.glightbox-container .thumb.active {
    border-color: #f97316;
}

.glightbox-container .thumb img {
    height: 60px;
    width: 90px;
    object-fit: cover;
    display: block;
}