/* ==================================================
   Latest Products Section
================================================== */

.latest-products-section {
    width: 100%;
    padding: 18px;
    /* background: #ffffff; */
    border-radius: 16px;
}

/* ==================================================
   Header
================================================== */

.latest-products-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-bottom: 20px;
}

.latest-products-title {
    width: 100%;
    margin: 0;
    color: var(--web-primary, #04d5df);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    /* text-align: center; */
}

.latest-products-view-all {
    position: absolute;
    top: 50%;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--web-primary, #04d5df);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transform: translateY(-50%);
    transition: transform 0.25s ease;
}

.latest-products-view-all:hover {
    color: var(--web-primary, #04d5df);
    text-decoration: none;
    transform: translateY(-50%) translateX(3px);
}

.latest-products-view-all i {
    font-size: 11px;
}

/* ==================================================
   Grid
================================================== */

.latest-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.latest-products-grid-item {
    min-width: 0;
    width: 100%;
    height: 100%;
}

/* ==================================================
   Main Cyan Product Card
================================================== */

.latest-custom-product-card {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 3px;
    background: var(--web-secondary);
    border: 1px solid var(--web-secondary);
    border-radius: 22px;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.latest-custom-product-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 5px 0 rgba(0, 164, 175, 0.3),
        0 16px 30px rgba(0, 0, 0, 0.17);
}

/* Remove old wrapper styles */
.latest-custom-product-card>div,
.latest-custom-product-card .product-single-hover,
.latest-custom-product-card .card,
.latest-custom-product-card .inline_product,
.latest-custom-product-card .product-card {
    width: 100% !important;
    height: 100%;
    margin: 0 !important;
    overflow: hidden;
    background: #ffffff !important;
    border: 0 !important;
    border-radius: 18px !important;
    box-shadow: none !important;
}

/* Prevent inner card from moving separately */
.latest-custom-product-card .product-single-hover:hover,
.latest-custom-product-card .card:hover,
.latest-custom-product-card .inline_product:hover,
.latest-custom-product-card .product-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ==================================================
   Product Image
================================================== */

.latest-custom-product-card .product-image,
.latest-custom-product-card .product-image-wrapper,
.latest-custom-product-card .product-card-image,
.latest-custom-product-card .image-wrapper,
.latest-custom-product-card .position-relative {
    overflow: hidden;
}

.latest-custom-product-card img {
    display: block;
    max-width: 100%;
}

/* Product main image */
.latest-custom-product-card .product-image img,
.latest-custom-product-card .product-card-image img,
.latest-custom-product-card .product-single-hover>a img,
.latest-custom-product-card .card-img-top,
.latest-custom-product-card a.d-block img {
    width: 100% !important;
    height: 210px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 17px 17px 0 0 !important;
    transition: transform 0.4s ease;
}

.latest-custom-product-card:hover .product-image img,
.latest-custom-product-card:hover .product-card-image img,
.latest-custom-product-card:hover .product-single-hover>a img,
.latest-custom-product-card:hover .card-img-top,
.latest-custom-product-card:hover a.d-block img {
    transform: scale(1.05);
}

/* ==================================================
   Product Information Area
================================================== */

.latest-custom-product-card .card-body,
.latest-custom-product-card .product-details,
.latest-custom-product-card .product-info,
.latest-custom-product-card .product-content,
.latest-custom-product-card .p-2,
.latest-custom-product-card .p-3 {
    padding: 12px !important;
}

/* Product title */
.latest-custom-product-card .product-title,
.latest-custom-product-card .product-title a,
.latest-custom-product-card .product-name,
.latest-custom-product-card .product-name a,
.latest-custom-product-card h3,
.latest-custom-product-card h4,
.latest-custom-product-card h5 {
    display: -webkit-box;
    min-height: 38px;
    margin: 0 0 7px;
    overflow: hidden;
    color: #222222 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 19px !important;
    text-decoration: none !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Category, brand and small information */
.latest-custom-product-card .text-muted,
.latest-custom-product-card .product-category,
.latest-custom-product-card .product-brand {
    color: #747474 !important;
    font-size: 11px !important;
}

/* Product price */
.latest-custom-product-card .product-price,
.latest-custom-product-card .unit-price,
.latest-custom-product-card .current-price,
.latest-custom-product-card .text-accent,
.latest-custom-product-card .text-primary {

    font-size: 16px !important;
    font-weight: 800 !important;
}

/* Old price */
.latest-custom-product-card del,
.latest-custom-product-card .old-price,
.latest-custom-product-card .strike-price {
    color: #999999 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

/* ==================================================
   Rating
================================================== */

.latest-custom-product-card .rating-show,
.latest-custom-product-card .rating,
.latest-custom-product-card .star-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 5px;
    font-size: 11px;
}

/* ==================================================
   Discount Badge
================================================== */

.latest-custom-product-card .discount-badge,
.latest-custom-product-card .badge-danger,
.latest-custom-product-card .product-discount,
.latest-custom-product-card .discount-label {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 5;
    padding: 5px 8px;
    color: #ffffff !important;
    background: #ff4d5a !important;
    border-radius: 20px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
}

/* ==================================================
   Wishlist Button
================================================== */

.latest-custom-product-card .wishlist-button,
.latest-custom-product-card .btn-wishlist,
.latest-custom-product-card .add-to-wishlist,
.latest-custom-product-card [data-wishlist] {
    border-radius: 50% !important;
}

/* ==================================================
   Cart and Action Buttons
================================================== */

.latest-custom-product-card .btn-primary,
.latest-custom-product-card .add-to-cart,
.latest-custom-product-card .btn-cart,
.latest-custom-product-card button[type="button"],
.latest-custom-product-card button[type="submit"] {
    border-color: #08d6df !important;
    background: #08d6df !important;
    color: #ffffff !important;
    border-radius: 9px !important;
    font-size: 12px;
    font-weight: 700;
}

.latest-custom-product-card .btn-primary:hover,
.latest-custom-product-card .add-to-cart:hover,
.latest-custom-product-card .btn-cart:hover {
    border-color: #00b9c3 !important;
    background: #00b9c3 !important;
}

/* ==================================================
   Cyan Footer Effect
================================================== */

.latest-custom-product-card::after {
    content: "";
    display: block;
    width: 100%;
    height: 8px;
    background: #08d6df;
    border-radius: 0 0 17px 17px;
}

/* ==================================================
   Empty State
================================================== */

.latest-products-empty {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #777777;
    text-align: center;
    background: #fafafa;
    border: 1px dashed #dddddd;
    border-radius: 14px;
}

.latest-products-empty i {
    margin-bottom: 12px;
    color: var(--web-primary, #08d6df);
    font-size: 40px;
}

.latest-products-empty p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}

/* ==================================================
   RTL
================================================== */

html[dir="rtl"] .latest-products-view-all {
    right: auto;
    left: 0;
}

html[dir="rtl"] .latest-products-view-all:hover {
    transform: translateY(-50%) translateX(-3px);
}

html[dir="rtl"] .latest-custom-product-card .discount-badge,
html[dir="rtl"] .latest-custom-product-card .badge-danger,
html[dir="rtl"] .latest-custom-product-card .product-discount,
html[dir="rtl"] .latest-custom-product-card .discount-label {
    right: 9px;
    left: auto;
}

/* ==================================================
   Laptop
================================================== */

@media (max-width: 1199px) {
    .latest-products-section {
        padding: 16px;
    }

    .latest-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 15px;
    }

    .latest-custom-product-card .product-image img,
    .latest-custom-product-card .product-card-image img,
    .latest-custom-product-card .product-single-hover>a img,
    .latest-custom-product-card .card-img-top,
    .latest-custom-product-card a.d-block img {
        height: 200px !important;
    }
}

/* ==================================================
   Tablet
================================================== */

@media (max-width: 991px) {
    .latest-products-section {
        padding: 14px;
    }

    .latest-products-header {
        margin-bottom: 15px;
    }

    .latest-products-title {
        font-size: 20px;
    }

    .latest-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .latest-custom-product-card .product-image img,
    .latest-custom-product-card .product-card-image img,
    .latest-custom-product-card .product-single-hover>a img,
    .latest-custom-product-card .card-img-top,
    .latest-custom-product-card a.d-block img {
        height: 210px !important;
    }
}

/* ==================================================
   Mobile
================================================== */

@media (max-width: 767px) {
    .latest-products-section {
        padding: 8px;
        border-radius: 10px;
    }

    .latest-products-header {
        min-height: 36px;
        margin-bottom: 10px;
        padding: 0 4px;
    }

    .latest-products-title {
        padding: 0 68px;
        font-size: 17px;
    }

    .latest-products-view-all {
        font-size: 11px;
    }

    .latest-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .latest-custom-product-card {
        padding: 2px;
        border-radius: 16px;
    }

    .latest-custom-product-card>div,
    .latest-custom-product-card .product-single-hover,
    .latest-custom-product-card .card,
    .latest-custom-product-card .inline_product,
    .latest-custom-product-card .product-card {
        border-radius: 13px !important;
    }

    .latest-custom-product-card .product-image img,
    .latest-custom-product-card .product-card-image img,
    .latest-custom-product-card .product-single-hover>a img,
    .latest-custom-product-card .card-img-top,
    .latest-custom-product-card a.d-block img {
        height: 165px !important;
        border-radius: 12px 12px 0 0 !important;
    }

    .latest-custom-product-card .card-body,
    .latest-custom-product-card .product-details,
    .latest-custom-product-card .product-info,
    .latest-custom-product-card .product-content,
    .latest-custom-product-card .p-2,
    .latest-custom-product-card .p-3 {
        padding: 9px !important;
    }

    .latest-custom-product-card .product-title,
    .latest-custom-product-card .product-title a,
    .latest-custom-product-card .product-name,
    .latest-custom-product-card .product-name a,
    .latest-custom-product-card h3,
    .latest-custom-product-card h4,
    .latest-custom-product-card h5 {
        min-height: 34px;
        font-size: 12px !important;
        line-height: 17px !important;
    }

    .latest-custom-product-card .product-price,
    .latest-custom-product-card .unit-price,
    .latest-custom-product-card .current-price,
    .latest-custom-product-card .text-accent,
    .latest-custom-product-card .text-primary {
        font-size: 14px !important;
    }
}

/* ==================================================
   Small Mobile
================================================== */

@media (max-width: 380px) {
    .latest-products-grid {
        gap: 7px;
    }

    .latest-products-title {
        padding: 0 58px;
        font-size: 15px;
    }

    .latest-custom-product-card .product-image img,
    .latest-custom-product-card .product-card-image img,
    .latest-custom-product-card .product-single-hover>a img,
    .latest-custom-product-card .card-img-top,
    .latest-custom-product-card a.d-block img {
        height: 145px !important;
    }
}