@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lexend+Deca:wght@100..900&display=swap');

/* Design Values */
:root {
    --title: 'Lexend Deca', Arial, sans-serif;
    --body: 'Inter', Arial, sans-serif;

    --primary: #0348B0;
    --secondary: #e8f0fe;
    --text: #202124;
    --background: #ffffff;
    --border: #b6c6e6;
    --hover: #aecbda;
}

input,
select,
textarea,
button,
.btn,
img,
.form-control {
    border-radius: 0 !important;
}

/* Base */
body {
    height: 100%;
    display: flex;
    flex-direction: column;
    font-family: var(--body);
    font-weight: 500;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--title);
    margin: 0.5rem 0;
}

/* Navbar */
.navbar {
    background-color: var(--secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Navbar search */
form.d-flex .form-control {
    border-radius: 0;
}

form.d-flex .btn {
    border-radius: 0;
    border-color: var(--primary);
    color: var(--primary);
}

form.d-flex .btn:hover {
    background-color: var(--hover);
    border-color: var(--hover);
    color: var(--background);
    transition: all 0.3s ease-in-out;
}

/* BUTTONS */

/* Outline-primary button */
.btn.btn-outline-primary {
    border-radius: 0;
    border-color: var(--primary);
    color: var(--primary);
}

.btn.btn-outline-primary:hover {
    background-color: var(--hover);
    border-color: var(--hover);
    color: var(--background);
    transition: all 0.3s ease-in-out;
}

/* Keep Browsing */
.btn.btn-outline-black {
    border-radius: 0;
}

.btn.btn-outline-black:hover {
    color: var(--primary);
    transition: all 0.3s ease-in-out;
}

/* Update button */
.btn.btn-outline-warning {
    border-radius: 0;
}

.btn.btn-outline-warning:hover {

    color: var(--background);
    transition: all 0.3s ease-in-out;
}

/* Delete button */
.btn.btn-outline-danger {
    border-radius: 0;
}

.btn.btn-outline-danger:hover {
    color: var(--background);
    transition: all 0.3s ease-in-out;
}

/* Footer */
main {
    flex: 1;
}

footer {
    background-color: var(--secondary);
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    text-align: center;
    font-family: var(--title);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.social-icons {
    margin-bottom: 0.5rem;
}

.social-icon {
    font-size: 1.5rem;
    margin: 0 10px;
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}

.social-icon:hover {
    color: var(--primary);
}

/* Hero Custom Carousel*/
.custom-carousel {
    height: 400px;
    overflow: hidden;
}

.custom-carousel .carousel-inner,
.custom-carousel .carousel-item,
.custom-carousel img {
    height: 100%;
}

.custom-carousel img {
    object-fit: cover;
}

/* Carousel Arrows */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    color: var(--bs-primary);
}

/* Prev arrow */
.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
}

/* Next arrow */
.carousel-control-next-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M4.646 1.646a.5.5 0 0 0 0 .708L10.293 8l-5.647 5.646a.5.5 0 0 0 .708.708l6-6a.5.5 0 0 0 0-.708l-6-6a.5.5 0 0 0-.708 0z'/%3E%3C/svg%3E");
}

/* Prevent "Jumping" Arrow */

/* Detail page main carousel */
#productCarousel .carousel-inner {
    aspect-ratio: 4 / 3;
    height: auto;
}

#productCarousel .carousel-item {
    height: 100%;
}

#productCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* mini carousels */
.product-card .carousel-inner {
    aspect-ratio: 4 / 3;
}

.product-card .carousel-item {
    height: 100%;
}

.product-card .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card Layout */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding: 1rem;
    cursor: pointer;
}

.card {
    width: 18rem;
    flex: 1 0 calc(20% - 1rem);
    box-sizing: border-box;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: transform 0.2s;
}

.product-card .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card-link:hover .product-card {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/*Image Preview (create / edit form)*/
#image-preview {
    max-width: 200px;
    margin-top: 10px;
    display: none;
    border: 1px solid #ddd;
    padding: 2px;
    border-radius: 4px;
}

#image-preview.show {
    display: block;
}

.icon {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    height: 1.5rem;
    width: 1.5rem;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.terms-container {
    max-width: 800px;
    margin: auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.terms-container h1 {
    text-align: center;
}

.signup-card {
    background-color: var(--secondary);
    border: 1px solid var(--border);
}

.signup-title {
    color: var(--text);
    font-family: var(--title);
}

.signup-subtext {
    color: var(--text);
    font-family: var(--body);
}

.signup-link {
    color: var(--primary);
    text-decoration: underline;
}

/* Edit Item Page, Uniform Thumbs, Delete Button */
.existing-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.image-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #fff;
}

.thumb-wrap {
    width: 220px;
    height: 165px;
    border-radius: 0.5rem;
    overflow: hidden;
    flex: 0 0 auto;
    background: #f8f9fa;
}

.image-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.delete-btn {
    margin-left: auto;
    white-space: nowrap;
}

.new-image-preview {
    margin-top: 0.75rem;
    max-width: 420px;
}

#image-preview {
    width: 100%;
    height: 260px;
    object-fit: contain;
    background: #f8f9fa;
    border: 1px dashed #dcdcdc;
    border-radius: 0.5rem;
}

.text-primary {
    color: var(--primary) !important;
}

/* --- Rental bag product carousel images for Safari browser--- */

.bag-carousel-inner {
    height: 200px; 
  }
  
  .bag-carousel-inner .carousel-item {
    height: 100%;
  }
  
  .bag-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center; 
    display: block;
  }
  
  /* Fallback "no image" */
  .img-fluid.bag-carousel-img {
    height: 200px;
  }
  
  
/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
    .card {
        flex: 1 0 calc(33.33% - 1rem);
    }
}

@media (max-width: 768px) {
    .card {
        flex: 1 0 100%;
    }

    .custom-carousel,
    .custom-carousel img {
        height: 200px;
    }

    .dropdown-menu {
        border-radius: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .form-control,
    .btn {
        font-size: 0.9rem;
    }

    /* Edit page mobile */
    .image-card {
        flex-wrap: wrap;
    }

    .thumb-wrap {
        width: 100%;
        height: 200px;
    }

    .delete-btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}