/* ==========================================================================
   Penyesuaian TiaraMart
   Dimuat SELEPAS demo11.min.css. Semua ubahsuai khusus projek diletak di
   sini supaya fail template Wolmart kekal tidak disentuh.
   ========================================================================== */

/* --- Jarak logo dalam bar header ---                       */

.header-middle .header-left .logo {
    margin-left: 2rem;
    margin-right: 2rem;
}

/* Skrin kecil: butang menu muncul di sebelah kiri logo, jadi kurangkan
   sedikit jarak supaya logo 144px tidak tersepit dengan ikon troli. */
@media (max-width: 767px) {
    .header-middle .header-left .logo {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

/* --- Sign In/Register, Track Order, Contact Us dalam bar header tengah --- */
.header-middle .signin i,
.header-middle .track-order i,
.header-middle .contact i {
    font-size: 2.6rem;
    color: inherit;
}

.header-middle .header-right > a.signin,
.header-middle .header-right > a.track-order,
.header-middle .header-right > a.contact {
    padding: 0;
}

/* Label: samakan dengan .cart-dropdown .cart-label, yang mengatasi nilai
   generik .label-down i+span (margin-top 0.3rem, letter-spacing -0.03em). */
.header-middle .signin-label,
.header-middle .track-order-label,
.header-middle .contact-label {
    margin: 0.5rem 0 0;
    font-weight: inherit;
    letter-spacing: -0.025em;
}

/* Jarak antara item dikawal oleh kelas utiliti pada markup (mr-lg-6 pada
   tiga item ini, mr-lg-2 pada Cart) - semuanya !important, jadi jangan
   tetapkan margin-right di sini atau ia jadi peraturan mati. */

/* ==========================================================================
   H03 · Seksyen Deals Wrapper (diport dari demo1)
   --------------------------------------------------------------------------
 */

/* Base .product-gallery tiada dalam demo11.min.css.  */
.deals-wrapper .product-gallery {
    display: flex;
    flex-wrap: wrap;
    position: sticky;
}

.deals-wrapper .product-gallery.product-gallery-sticky {
    top: 2rem;
}

/* Tajuk seksyen - potong dengan elipsis dan bukan balut.  [demo1.min.css] */
.deals-wrapper .title-underline {
    padding: 0 3rem 1.7rem 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Butang navigasi karusel product sisi.  [demo1.min.css] */
.deals-wrapper .widget-products .swiper-button-next,
.deals-wrapper .widget-products .swiper-button-prev {
    top: -4.5rem;
    font-size: 1.3rem;
}

.deals-wrapper .widget-products .swiper-button-prev {
    right: 0.4rem;
}

/* Kotak butiran product utama tidak melimpah.  [demo1.min.css] */
@media (min-width: 1200px) {
    .deals-wrapper .product-details {
        max-height: 40.8rem;
    }
}

@media (max-width: 1200px) and (min-width: 991px) {
    .deals-wrapper .single-product .product-gallery,
    .deals-wrapper .single-product .product-single-swiper,
    .deals-wrapper .single-product .product-single-swiper .product-image,
    .deals-wrapper .single-product .product-single-swiper img {
        min-height: 36rem;
    }

    .deals-wrapper .single-product .product-details {
        max-height: 36rem;
    }
}

/* Pemasa undur tidak pecah baris.  [demo1.min.css] */
.deals-wrapper .product-countdown-container .product-countdown,
.deals-wrapper .product-countdown-container label {
    white-space: nowrap;
}

/* "Offer Ends In:" dan pemasa pada SATU baris. */
.deals-wrapper .product-countdown-container {
    display: flex;
    align-items: center;
}

/* Garis pemisah atas borang product, kecuali borang variasi.  [demo1.min.css] */
.deals-wrapper .single-product .product-form:not(.product-variation-form) {
    border-top: 1px solid #eee;
}

/* Widget product sisi penuhi tinggi lajur.  [demo10.min.css - tiada dlm demo1] */
.deals-wrapper .widget-body .product-widget-wrap {
    height: 100%;
}

/* ==========================================================================
   H05 · Anchor dan smooth scroll untuk nav utama
   --------------------------------------------------------------------------
 */

html {
    scroll-behavior: smooth;
}

/* Hormati tetapan pengguna yang mengurangkan animasi */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

#hero,
#kategori,
#deals,
#featured {
    scroll-margin-top: 9rem;
}

/* ==========================================================================
   H04 · Seksyen Grey Section (diport dari demo5)
   --------------------------------------------------------------------------
*/

.grey-section {
    background-color: #f8f8f8;
}

.grey-section .title-link-wrapper .title {
    padding: 0.5rem 0 0.8rem;
}

.grey-section .title.title-link:before {
    background-color: #2A9CF5;
}

/* --- Sistem grid --- */

.grey-section .grid-type {
    display: grid;
    grid-template-columns: repeat(auto-fill, calc(100% / 4));
}

.grey-section .grid-item-single {
    grid-column-end: span 2;
    grid-row-end: span 2;
}

.grey-section .grid-item-widget {
    grid-column-end: span 1;
    grid-row-end: span 1;
}

@media (max-width: 1199px) {
    .grey-section .grid-type {
        grid-template-columns: repeat(auto-fill, calc(100% / 3));
    }
}

@media (max-width: 991px) {
    .grey-section .grid-type {
        grid-template-columns: repeat(auto-fill, calc(100% / 2));
    }
}

@media (max-width: 479px) {
    .grey-section .grid-item-widget {
        grid-column-end: span 2;
    }
}

/* Grid dua lajur: kad putih setinggi lajur.  [demo5.min.css] */
.grey-section .grid-type .product-single,
.grey-section .grid-type .product-widget {
    background-color: #fff;
    height: 100%;
}

.grey-section .grid-type .product-single {
    padding: 1rem;
}

@media (min-width: 768px) {
    
    .grey-section .grid-type .col-md-6:first-child {
        flex: 0 0 45.9%;
        max-width: 45.9%;
        min-height: 0;
    }

    .grey-section .grid-type .col-md-6:last-child {
        flex: 0 0 54.1%;
        max-width: 54.1%;
    }
}

/* Product tunggal besar di sebelah kiri grid.  [demo5.min.css] */
.grey-section .grid-item-single .product-gallery,
.grey-section .grid-item-single .product-image,
.grey-section .grid-item-single img {
    min-height: inherit;
}

.grey-section .grid-item-single .product-title {
    font-size: 1.8rem;
}

.grey-section .grid-item-single .product-divider {
    margin: 1.2rem 0 2rem;
}

.grey-section .grid-item-single .product-price {
    font-size: 2.4rem;
}

.grey-section .grid-item-single .product-form label {
    max-width: 3.8rem;
    flex: 0 0 3.8rem;
    font-size: 1.3rem;
}

.grey-section .grid-item-single .product-size-swatch .size {
    color: #999;
}

.grey-section .grid-item-single .product-size-swatch .size:not(:last-child) {
    margin-right: 0.5rem;
}

.grey-section .grid-item-single .product-form:not(.product-variation-form) {
    border-top: 1px solid #eee;
}

.grey-section .grid-item-single .product-qty-form {
    max-width: 13.2rem;
    flex: 0 0 13.2rem;
}

@media (min-width: 768px) {
    .grey-section .grid-item-single .product-details {
        /* Mesti sepadan tinggi sasaran kotak (2 baris widget = 35.1rem).
           Pada 35rem, kandungan butiran yang lebih panjang daripada kotak
           akan menolak kotak melebihi 35.1rem dan meregangkan baris 1-2
           semula. overflow:auto (dari demo5) menjadikannya menatal. */
        max-height: 35.1rem;
        overflow: auto;
        margin: 1rem 0;
    }
}

/* demo11 tidak menghantar keluarga utiliti */
@media (min-width: 768px) {
    .grey-section .pr-md-4 {
        padding-right: 2rem !important;
    }
}

/* --- Nav utama di tengah bar header-bottom --- */

.header-bottom .inner-wrap {
    justify-content: center;
}

.header-bottom .main-nav {
    margin-left: 0;
}

/* Template menyembunyikan .cart-label di bawah 992px. Tanpa peraturan ini,
   Cart jadi ikon tanpa label sementara tiga yang lain masih berlabel. */
@media (max-width: 991px) {
    .header-middle .signin-label,
    .header-middle .track-order-label,
    .header-middle .contact-label {
        display: none;
    }
}


/* ==========================================================================
   H07 - Halaman product: kelas yang tiada dalam demo11.min.css
   ========================================================================== */


/* --- Galeri product: butang zum dan video --------------------------------- */

.product-gallery-btn {
    position: absolute;
    padding: 1rem;
    width: 4rem;
    height: 4rem;
    right: 1.5rem;
    bottom: 1.5rem;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    border: 0;
    border-radius: 50%;
    color: #999;
    background: #fff;
    font-size: 2rem;
    line-height: 1;
    opacity: 0.7;
    -webkit-transition: opacity 0.3s, color 0.3s;
    transition: opacity 0.3s, color 0.3s;
    z-index: 1;
    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.product-gallery-btn:hover {
    opacity: 1;
    color: #333;
}

.product-tabs .product-video img {
    min-height: 20rem;
}


/* Seksyen "Kerap dibeli bersama" (.bought-together-products, 20 peraturan)
   dibuang pada H08 selepas pengguna memangkas blok itu dari markup.
   Disahkan yatim dengan menjalankan setiap pemilih terhadap halaman product
   DAN home yang dirender - sifar padanan pada kedua-duanya. */

/* --- Tab penerangan ------------------------------------------------------ */

#product-tab-description .sub-title {
    margin: 0.4rem 0 0.4rem;
    font-size: 1.4rem;
}

#product-tab-description .sub-title span {
    margin-right: 1.2rem;
}

#product-tab-description .detail {
    line-height: 1.6;
}


/* --- Tab vendor ---------------------------------------------------------- */

.vendor-logo {
    max-width: 7rem;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 7rem;
    flex: 0 0 7rem;
    margin-right: 1rem;
}

.vendor-banner {
    min-height: 18rem;
}

.vendor-banner a, .vendor-banner img {
    min-height: inherit;
}

.store-address {
    font-size: 1.3rem;
    color: #fff;
    opacity: 0.8;
    line-height: 1.8;
}

#product-tab-vendor .vendor-banner img {
    min-height: 29.5rem;
    width: 100%;
}

#product-tab-vendor .vendor-user {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-bottom: 1.7rem;
}

#product-tab-vendor .vendor-logo img {
    border: 1px solid #eee;
    border-radius: 5px;
}

#product-tab-vendor .vendor-name {
    margin: 0.3rem 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
}

#product-tab-vendor .vendor-name a {
    color: inherit;
}

#product-tab-vendor .vendor-info {
    margin-bottom: 3.1rem;
    font-size: 1.4rem;
}

#product-tab-vendor .vendor-info li {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 0.75rem 0;
}

#product-tab-vendor .vendor-info label {
    display: inline-block;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 12rem;
    flex: 0 0 12rem;
    max-width: 12rem;
    padding-right: 1rem;
    color: #333;
}

#product-tab-vendor .store-address {
    font-size: 1.4rem;
    color: #666;
    opacity: 1;
}

#product-tab-vendor .store-phone a {
    color: #333;
}

#product-tab-vendor .store-phone a:hover {
    color: #336699;
}

@media (min-width: 768px) {
    #product-tab-vendor .pl-md-6 {
        padding-left: 3rem !important;
    }
}


/* --- Seksyen product berkaitan dan product vendor -------------------------- */

.vendor-product-section {
    margin-bottom: 4.2rem;
}

.vendor-product-section .ratings-container, .related-product-section .ratings-container {
    margin-bottom: 0.3rem;
}


/* --- Bar "Add to Cart" ---*/

.product-sticky-content.fixed {
    background-color: #fff;
}


/* --- Kad "Deals Hot of The Day" ---*/

.deals-wrapper .single-product {
    background-color: #fff;
    padding: 2.6rem 1.9rem 2rem 1.8rem;
    border: 1px solid #eee;
    transition: border-color 0.3s;
}

.deals-wrapper .single-product:hover {
    border-color: #f14242;
}


/* --- Kad "Top 20 Best Seller" --- */

.deals-wrapper .widget-products .widget-body {
    background-color: #fff;
    padding: 2.6rem 2rem 2.3rem;
    transition: border-color 0.3s;
}

.deals-wrapper .widget-products.widget-products-bordered .widget-body:hover {
    border-color: #f14242;
}


/* --- Featured Products: saiz widget demo5 --- */

.grey-section .product-widget {
    padding-left: 1rem;
    padding-right: 1rem;
}

.grey-section .product-widget .product-media {
    flex: 0 0 14.8rem;
    max-width: 14.8rem;
}

.grey-section .product-widget img {
    height: 100%;
}

.grey-section .product-widget .product-name {
    margin-bottom: 0.6rem;
}

.grey-section .product-widget .ratings-container {
    margin-bottom: 0.7rem;
}

.grey-section .product-widget .product-price {
    font-size: 1.6rem;
}

@media (max-width: 767px) {
    .grey-section .product-widget .product-media {
        max-width: 50%;
        flex: 0 0 50%;
    }
}


/* --- Jarak atas bawah header-middle ---
   demo11 beri padding 3.2rem atas dan bawah (2.6/2.8rem di bawah 992px).
   Dikurangkan supaya bar header lebih rapat. */

.header-middle {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@media (max-width: 991px) {
    .header-middle {
        padding: 1.6rem 0 1.8rem;
    }
}


/* --- Jarak atas bawah blok ikon kategori ---
   Jarak atas dikuasai oleh margin blok Icon Box (5.8rem), bukan padding
   blok ini. Kedua-duanya dikurangkan supaya atas dan bawah jadi 3.5rem.
   Bawah dilaras melalui mb-10 -> mb-5 pada markup. */

.icon-box-wrapper {
    margin-bottom: 3rem;
}

.icon-category-wrapper {
    padding-top: 0.5rem;
}


/* --- Header-top: dua maklumat di tengah ---
   .header-center ialah kelas demo11 sedia ada (display:flex;align-items:center).
   .header .container sudah flex, jadi cukup dengan justify-content.
   Jarak antara dua item ikut idiom templat sendiri, sama seperti
   .header-top .header-right>*{margin-left:2rem}. */

/* demo11 beri font-size 1.1rem dan tiada padding langsung, jadi bar ini
   nipis dan teksnya halus. Dibesarkan sedikit dan diberi ruang menegak. */

.header-top {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    font-size: 1.3rem;
}

.header-top .container {
    justify-content: center;
}

.header-top .header-center > * + * {
    margin-left: 5rem;
}

.header-top .header-center i {
    margin-right: 0.8rem;
    font-size: 1.8rem;
    vertical-align: middle;
}

@media (max-width: 575px) {
    .header-top .header-center {
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-top .header-center > * + * {
        margin-left: 1.5rem;
    }
}

/* ------------------------------------------------------------------
   H11 - status stok pada halaman product

   Wolmart ada nama kelas .product-stock-status, tetapi hanya dengan
   peraturan lebar dan margin untuk jadual wishlist - tiada gaya warna
   di mana-mana. Kelas .wishlist-in-stock mereka pun tidak bergaya
   langsung. Jadi peraturan warna di bawah ialah milik kita.

   Diskop di bawah .product-details supaya ia tidak menyentuh jadual
   wishlist bila halaman itu diport nanti.
   ------------------------------------------------------------------ */
.product-details .product-stock-status {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1;
}

.product-details .product-stock-status.ada-stok {
    color: #14a44d;
}

.product-details .product-stock-status.stok-rendah {
    color: #d97706;
}

.product-details .product-stock-status.tiada-stok {
    color: #f14242;
}

/* ------------------------------------------------------------------
   H13 - imej kategori pada home

   .category-icon .category-media ialah bulatan 130px yang direka untuk
   glyph fon: padding 2.4rem 0.5rem dan font-size 5rem. Memasukkan <img>
   ke dalamnya tanpa penyesuaian akan menyorong imej ke dalam padding
   itu dan memotongnya.

   object-fit: cover, bukan contain. Imej kategori ialah foto adegan penuh
   (peranti dalam persekitaran sebenar), bukan produk berlatar telus - jadi
   ia patut mengisi bulatan sepenuhnya. contain meninggalkan foto berbentuk
   petak di tengah bingkai bulat, yang kelihatan seperti tersalah.

   padding dibuang dan overflow disembunyikan supaya imej mencecah tepi
   bulatan; border-radius pada <img> pula menjaga kes pelayar yang tidak
   mengerat anak dengan betul.
   ------------------------------------------------------------------ */
.icon-category-wrapper .category-media-img {
    padding: 0;
    overflow: hidden;
}

.icon-category-wrapper .category-media-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
