/* ============================================================
 * tagDiv Product Slide — base styles
 *
 * Block kita pakai class .td_block_slide juga di wrapper, jadi
 * struktural CSS (height, position, .entry-thumb, .td-slide-meta
 * dll) datang dari tagDiv Newspaper theme. File ini hanya tambah
 * styling product-specific + mobile fine-tuning.
 * ============================================================ */

/* ----- Wrapper ----- */
.td_block_product_slide {
    position: relative;
    margin-bottom: 32px;
}

/* Default slider container baseline (kalau CSS slide bawaan tidak ter-load,
   minimal layout-nya tetap masuk akal) */
.td_block_product_slide .td-theme-slider {
    position: relative;
    overflow: hidden;
}

.td_block_product_slide .td-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.td_block_product_slide .td_module_slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    float: left;
}

/* Image background */
.td_block_product_slide .td-module-thumb {
    position: absolute;
    inset: 0;
    margin: 0;
    z-index: 0;
}

.td_block_product_slide .td-module-thumb .td-image-wrap {
    display: block;
    width: 100%;
    height: 100%;
}

.td_block_product_slide .entry-thumb {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    transition: filter 0.4s ease, transform 0.6s ease;
}

/* Gradient overlay default (dapat di-override via param 'overlay') */
.td_block_product_slide .td-image-gradient {
    position: relative;
}
.td_block_product_slide .td-image-gradient:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 60%);
    z-index: 1;
    pointer-events: none;
}

/* ----- Meta overlay ----- */
.td_block_product_slide .td-slide-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 24px 28px;
    color: #fff;
}

/* Title */
.td_block_product_slide .entry-title {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.18;
    font-weight: 700;
    color: #fff;
}
.td_block_product_slide .entry-title a {
    color: inherit;
    text-decoration: none;
}
.td_block_product_slide .entry-title a:hover {
    opacity: 0.88;
}

/* ----- Sale badge (replaces post category in slide block) ----- */
.td_block_product_slide .tdps-sale-badge {
    display: inline-block;
    background: #e63946;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 4px 10px;
    margin-bottom: 10px;
    line-height: 1.5;
    border-radius: 2px;
}

/* ----- Price ----- */
.td_block_product_slide .tdps-price {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.td_block_product_slide .tdps-price .amount {
    color: inherit;
}
.td_block_product_slide .tdps-price ins {
    text-decoration: none;
    background: transparent;
    color: inherit;
}
.td_block_product_slide .tdps-price del {
    opacity: 0.6;
    margin-right: 6px;
    font-weight: 500;
}

/* ----- Short description ----- */
.td_block_product_slide .tdps-excerpt {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.6;
    color: inherit;
    opacity: 0.92;
    max-width: 560px;
}

/* ----- Add to Cart button ----- */
.td_block_product_slide .tdps-cart .tdps-cart-button {
    display: inline-block;
    background: #ffffff;
    color: #111111;
    padding: 10px 22px;
    border-radius: 3px;
    font-weight: 700;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: 0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.td_block_product_slide .tdps-cart .tdps-cart-button:hover {
    background: #111111;
    color: #ffffff;
    transform: translateY(-1px);
}
.td_block_product_slide .tdps-cart .tdps-cart-button.added {
    opacity: 0.7;
}
.td_block_product_slide .tdps-cart .added_to_cart {
    color: #fff;
    margin-left: 10px;
    text-decoration: underline;
    font-size: 12px;
}

/* ----- Slide nav (arrows) ----- */
.td_block_product_slide .td-slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 18px;
    color: #fff;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
    line-height: 1;
}
.td_block_product_slide .td-theme-slider:hover .td-slide-nav {
    opacity: 1;
}
.td_block_product_slide .prevButton {
    left: 4px;
}
.td_block_product_slide .nextButton {
    right: 4px;
}

/* ----- Block title wrap ----- */
.td_block_product_slide > .td-block-title-wrap:empty {
    display: none;
}

/* ============================================================
 * RESPONSIVE
 * ============================================================ */

/* Tablet besar */
@media (max-width: 1018px) {
    .td_block_product_slide .td-slide-meta {
        padding: 20px 24px;
    }
    .td_block_product_slide .entry-title {
        font-size: 22px;
    }
    .td_block_product_slide .tdps-price {
        font-size: 17px;
    }
}

/* Tablet kecil & mobile besar */
@media (max-width: 767px) {
    .td_block_product_slide .td-slide-meta {
        padding: 16px 18px;
    }
    .td_block_product_slide .entry-title {
        font-size: 18px;
        margin-bottom: 6px;
    }
    .td_block_product_slide .tdps-price {
        font-size: 15px;
        margin-bottom: 8px;
    }
    .td_block_product_slide .tdps-excerpt {
        display: none;
    }
    .td_block_product_slide .tdps-sale-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    .td_block_product_slide .tdps-cart .tdps-cart-button {
        padding: 8px 16px;
        font-size: 11px;
    }
    .td_block_product_slide .td-slide-nav {
        opacity: 0.7;
        padding: 12px;
    }
}

/* Phone */
@media (max-width: 500px) {
    .td_block_product_slide .td-slide-meta {
        padding: 12px 14px;
    }
    .td_block_product_slide .entry-title {
        font-size: 16px;
    }
    .td_block_product_slide .tdps-price {
        font-size: 14px;
    }
    .td_block_product_slide .tdps-sale-badge {
        margin-bottom: 6px;
    }
    .td_block_product_slide .prevButton { left: 0; }
    .td_block_product_slide .nextButton { right: 0; }
}

/* ============================================================
 * Mobile: vertical-stacking option
 * Kalau meta_info_vert dipakai (overlay full-cover), jaga readability
 * ============================================================ */

@media (max-width: 767px) {
    /* Pastikan overlay gradient lebih kuat di mobile karena teks lebih kecil */
    .td_block_product_slide .td-image-gradient:before {
        background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.1) 70%);
    }
}

/* ============================================================
 * Touch device — arrows always visible
 * ============================================================ */

@media (hover: none) {
    .td_block_product_slide .td-slide-nav {
        opacity: 0.85;
    }
}
