/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global styles */
body {
    overflow-x: hidden;
}

/* Responsive typography */
h1 {
    color: #63863;
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
}

/* Card images */
.card-img-top {
    height: 0;
    padding-bottom: 100%; /* Creates a square aspect ratio */
    position: relative;
    overflow: hidden;
}

.card-img-top img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Container adjustments */
.container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Text wrapping for product descriptions */
.text-center.w-50.mx-auto {
    width: 90% !important;
    margin: 1rem auto;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Card adjustments */
.card {
    height: auto;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
}

.card-body {
    flex: 1;
    padding: 1rem;
}

.card-text {
    font-size: 0.9rem;
    white-space: normal;
}

/* Modal adjustments */
.modal-body {
    padding: 1rem;
    display: flex;
    align-items: center;
}

.modalDeskripsi p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Modal image adjustments */
.modalImage img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

/* Modal responsiveness */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }
    
    .modalImage {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .modalImage img {
        max-width: 80%;
        margin: 0 auto;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Media queries for mobile */
@media (max-width: 576px) {
    .gx-4 {
        --bs-gutter-x: 1rem;
    }
    
    .p-4 {
        padding: 1rem !important;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .harga {
        font-size: 0.9rem;
    }
}

/* Navbar adjustments */
@media (max-width: 991px) {
    .navbar-nav {
        margin-top: 1rem;
    }
}

/* Navbar styling */
.sticky-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Adjust main content when navbar is sticky */
.nav-padding {
    padding-top: 80px;
}
