/* =======================
   RESET
======================= */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f8f8f8;
    padding-bottom: 70px;
}

/* =======================
   LOADER
======================= */
#loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: black;
    color: white;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    z-index: 9999;
    transition: transform 1s ease;
}

#loader h1 {
    font-size: 28px;
    letter-spacing: 2px;
    animation: fadeText 1.2s infinite alternate;
}

@keyframes fadeText {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

#loader.hide {
    transform: translateY(-100%);
}

/* =======================
   NAVBAR (DESKTOP)
======================= */
.navbar {
    display: flex;
    justify-content: space-between;
    padding: 15px 30px;
    background: white;
}

/* =======================
   HERO
======================= */
.hero {
    height: 60vh;
    background: url("images/hero.jpg") center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-text {
    color: white;
    text-align: center;
}

.hero-text h2 {
    font-size: 40px;
}

/* =======================
   PRODUCTS
======================= */
.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 25px;
}

.product {
    background: white;
    border-radius: 12px;
    padding: 10px;
    transition: 0.3s;
}

.product:hover {
    transform: translateY(-5px);
}

.product img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
}

.product h3 {
    font-size: 15px;
}

.product p {
    color: #444;
}

button {
    width: 100%;
    padding: 10px;
    border: none;
    background: black;
    color: white;
    border-radius: 8px;
}

/* =======================
   CART (CLEAN + BIG)
======================= */
.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    background: white;
    padding: 18px;
    border-radius: 14px;
    position: relative;
}

/* IMAGE */
.cart-item img {
    width: 140px;
    height: 140px;
    min-width: 140px;
    object-fit: contain;
    background: #f5f5f5;
    border-radius: 10px;
}

/* INFO */
.cart-info {
    flex: 1;
}

.cart-info .name {
    font-size: 18px;
    font-weight: 600;
}

.cart-info .price {
    font-size: 16px;
}

/* QUANTITY */
.qty {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

/* SQUARE BUTTONS */
.qty button {
    width: 40px;
    height: 40px;
    font-size: 20px;
    border-radius: 8px;
    background: black;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qty span {
    font-size: 18px;
    font-weight: bold;
}

/* REMOVE BUTTON */
.remove {
    position: absolute;
    top: 12px;
    right: 12px;

    width: 36px;
    height: 36px;

    font-size: 18px;
    border-radius: 50%;
    background: black;
    color: white;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* EMPTY */
.empty-cart {
    text-align: center;
    margin-top: 40px;
}

/* =======================
   FOOTER
======================= */
.footer {
    text-align: center;
    padding: 30px;
    background: black;
    color: white;
}

/* =======================
   MOBILE NAV
======================= */
.mobile-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-nav a {
    text-decoration: none;
    color: black;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-nav span {
    font-size: 11px;
}

/* =======================
   MOBILE VIEW
======================= */
@media (max-width: 768px) {

    /* HIDE TOP NAV */
    .navbar {
        display: none;
    }

    /* PRODUCTS */
    .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 15px;
    }

    /* HERO TEXT */
    .hero-text h2 {
        font-size: 28px;
    }

    /* CART BIGGER */
    .cart-item {
        padding: 20px;
        gap: 18px;
    }

    .cart-item img {
        width: 160px;
        height: 160px;
        min-width: 160px;
    }

    .cart-info .name {
        font-size: 19px;
    }

    .cart-info .price {
        font-size: 17px;
    }

    .qty button {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .qty span {
        font-size: 20px;
    }

    .remove {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}


/* =========================
   📱 MOBILE CART (SQUARE STYLE)
========================= */
@media (max-width: 768px) {

    .cart-item {
        flex-direction: column;   /* 🔥 THIS IS THE MAIN FIX */
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    /* BIG IMAGE ON TOP */
    .cart-item img {
        width: 100%;
        max-width: 250px;
        height: 250px;
        object-fit: contain;
        margin-bottom: 15px;
    }

    /* TEXT */
    .cart-info {
        width: 100%;
    }

    .cart-info .name {
        font-size: 18px;
    }

    .cart-info .price {
        font-size: 16px;
        margin-bottom: 10px;
    }

    /* QUANTITY CENTERED */
    .qty {
        justify-content: center;
    }

    .qty button {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .qty span {
        font-size: 18px;
    }

    /* REMOVE BUTTON BELOW */
    .remove {
        position: static;
        margin-top: 10px;
        width: 40px;
        height: 40px;
    }
}

/* CART PAGE WIDTH FIX */
.cart-container {
    max-width: 900px;
    margin: auto;
    padding: 20px;
}
/* TOTAL TEXT */
h2 {
    font-size: 22px;
    text-align: center;
    margin-top: 15px;
}
/* CHECKOUT FORM */
.checkout-form {
    background: white;
    padding: 20px;
    margin: 20px;
    border-radius: 12px;
}

.checkout-form h3 {
    margin-bottom: 15px;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.checkout-form textarea {
    height: 80px;
}
/* CHECKOUT BUTTONS FIX */
.checkout-btn {
    display: block;
    width: 90%;
    max-width: 400px;
    margin: 15px auto;   /* spacing between buttons */

    padding: 14px;
    border-radius: 10px;

    font-size: 16px;
    font-weight: 600;

    text-align: center;
}
/* =========================
   📱 MOBILE PRODUCT GRID (LIKE SCREENSHOT)
========================= */
@media (max-width: 768px) {

  .products {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 items per row */
    gap: 20px;
    padding: 15px;
  }

  .product {
    text-align: left;
  }

  /* IMAGE STYLE */
  .product img {
    width: 100%;
    height: 160px;              /* 🔥 controls size */
    object-fit: contain;        /* no stretching */
    background: #f5f5f5;        /* clean background like brands */
    border-radius: 8px;
  }

  /* PRODUCT NAME */
  .product h3 {
    font-size: 14px;
    margin: 8px 0 4px;
    font-weight: 500;
  }

  /* PRICE */
  .product p {
    font-size: 13px;
    margin-bottom: 8px;
  }

  /* BUTTON */
  .product button {
    width: 100%;
    padding: 10px;
    font-size: 13px;
    border-radius: 6px;
  }
}

.hero-text h2 {
    color: black !important;
}
.hero-text p {
    color: black !important;
}

