/* ======================================================================= */
/* MOBILE-FIRST STYLES (Default)                                         */
/* ======================================================================= */

.container.my-4 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.product-hero {
    position: relative;
    height: 250px; /* Sedikit dipendekkan karena judul pindah */
    background-size: cover;
    background-position: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 80%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* PERUBAHAN: .hero-title tidak lagi digunakan di mobile, hapus/sesuaikan */
.hero-title {
    display: none; /* Sembunyikan di mobile */
}

.back-button {
    opacity: 0.9;
}

.product-content {
    background-color: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    margin-top: -20px;
    position: relative;
    z-index: 2;
    padding: 1.5rem 1.5rem 100px 1.5rem;
}

/* PENAMBAHAN: Gaya untuk header (judul & kategori) di mobile */
.product-header-mobile {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.product-title-mobile {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    margin: 0;
    /* PERUBAHAN: Membatasi judul mobile menjadi 2 baris */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Gaya untuk judul bagian (Deskripsi, dll) */
.content-section-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: #343a40;
    margin-bottom: 1rem;
}

/* PERUBAHAN: Menambahkan gaya card pada bagian deskripsi */
.description-section-mobile {
    margin-top: 2rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
}

.description-section-mobile .content-section-title {
    margin-top: 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}


.info-card {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    height: 100%;
}

.info-card-title {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.info-card-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.info-card-value.price {
    color: #ee4d2d;
    font-weight: 700;
}

.product-actions-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 0.75rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1031;
}

.product-actions-footer .btn {
    padding: 0.75rem;
    font-size: 1.1rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 15px rgba(238, 77, 45, 0.2);
}

.product-actions-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 77, 45, 0.3);
}

.honeypot-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}


@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* ======================================================================= */
/* DESKTOP STYLES (min-width: 992px)                                     */
/* ======================================================================= */
@media (min-width: 992px) {
    .container.my-4 {
        margin-top: 3rem !important;
        margin-bottom: 3rem !important;
        padding-left: var(--bs-gutter-x, 0.75rem) !important;
        padding-right: var(--bs-gutter-x, 0.75rem) !important;
    }

    .product-actions-footer {
        display: none;
    }
    
    .desktop-product-image-container {
        position: relative;
        width: 100%; 
        aspect-ratio: 3 / 2; 
    }

    .desktop-product-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
        transition: transform 0.3s ease;
    }

    .desktop-product-image-container img:hover {
        transform: scale(1.03);
    }
    
    .back-button-desktop {
        position: absolute;
        top: 1.5rem;
        left: 1.5rem;
        background-color: rgba(255,255,255,0.8);
        backdrop-filter: blur(5px);
        border: none;
        z-index: 10;
    }

    .desktop-title {
        font-size: 2.2rem; 
        font-weight: 700;
        line-height: 1.3;
        color: #2c3e50;
        /* PERUBAHAN: Membatasi judul menjadi 2 baris */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2; /* PERBAIKAN: Menambahkan properti standar */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 2.6em; /* Memberi ruang agar layout tidak bergeser */
    }
    
    .info-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.08);
        border-color: #ee4d2d;
    }

    .info-card-title {
        min-height: 2.1em;
    }

    .info-card-value {
        text-align: left;
    }

    .product-main-card {
        background-color: #f8f9fa;
        padding: 2.5rem;
        border-radius: 16px;
        border: 1px solid #e9ecef;
    }

    .description-container {
        background-color: #fff;
        padding: 2rem;
        border-radius: 12px;
        border: 1px solid #e9ecef;
    }
    
    .product-main-card .d-grid .btn:hover {
        box-shadow: 0 4px 15px rgba(238, 77, 45, 0.3);
        transform: translateY(-2px);
    }

    .btn-primary {
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(238, 77, 45, 0.3);
    }

    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 7px 20px rgba(238, 77, 45, 0.4);
    }
    
    /* PERUBAHAN: Pastikan .hero-title ditampilkan di desktop */
    .hero-title {
        display: block;
    }
}
