body {
      font-family: Arial, sans-serif;
      margin: 0;
      background: #f6f6f6;
}

    h1 { text-align: center; margin-bottom: 40px; }

    .grid {
        padding: 80px 30px !important;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
    }

    @media (max-width: 768px) {
      .grid { grid-template-columns: 1fr; }
    }

    #closeCart{
        color: #4A80C6;
    }

    .product-title {
        font-size: 18px;
        margin: 10px 0;
    }

    .product {
      background: #fff;
      padding: 20px;
      border-radius: 8px;
      text-align: center;
    }

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

    .qty {
      width: 60px;
      padding: 5px;
      margin: 10px 0;
    }

    button {
      padding: 10px 20px;
      background: #4A80C6;
      color: #fff;
      border: none;
      cursor: pointer;
      border-radius: 5px;
    }

    /* CART SIDEBAR */
    .cart-sidebar {
      position: fixed;
      top: 0;
      right: -350px;
      width: 350px;
      height: 100%;
      background: #fff;
      box-shadow: -2px 0 10px rgba(0,0,0,0.2);
      transition: right 0.3s ease;
      z-index: 9999;
      display: flex;
      flex-direction: column;
    }

    
/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
    .navbar .navbar-collapse.menu-opened .close-mobile-menu{
        opacity: 0 !important;
    }
    /* Cart Icon closer to edge */
    .header .cart-icon {
        right: 50px !important;
        z-index: 1 !important;
    }

    /* Sidebar width reduced */
    .cart-sidebar {
        width: 90%;
        right: -100%; /* hide initially */
    }

    /* Product grid: single column */
    .grid {
        grid-template-columns: 1fr;
        padding: 40px 15px !important;
    }

    /* Buttons & inputs larger touch-friendly */
    .product button,
    .qty {
        width: 100%;
        box-sizing: border-box;
    }

    /* Reduce padding on product card */
    .product {
        padding: 15px;
    }
}

    .cart-sidebar.open { right: 0; }

    .cart-header {
      padding: 20px;
      border-bottom: 1px solid #ddd;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .cart-header h3 { margin: 0; }

    .cart-header button {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
    }

    .cart-items {
      flex: 1;
      overflow-y: auto;
      padding: 20px;
    }

    .cart-item {
      display: flex;
      justify-content: space-between;
      margin-bottom: 15px;
      align-items: center;
    }

    .cart-item img {
      width: 50px;
      height: 50px;
      object-fit: cover;
    }

    .cart-item-details {
      flex: 1;
      margin-left: 10px;
    }

    .cart-item-controls {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .cart-footer {
      padding: 20px;
      border-top: 1px solid #ddd;
    }
.header .cart-icon {
    position: absolute;  /* position relative to header */
    /* top: 35px; */
    right: 250px !important;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .header .cart-icon {
        right: 60px !important;
    }
}

.header .cart-icon span {
    background: #4A80C6;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    top: -10px;
    right: -10px;
}
