body{
    background-color: #faf6ef;
}



.page-loader{
  position:fixed; inset:0;
  background:#fff;
  display:none; align-items:center; justify-content:center;
  z-index:200;
}
.page-loader.show{ display:flex; }

.buffer-spinner{
  position:relative;
  width:44px; height:44px;
}
.buffer-spinner .dash{
  position:absolute;
  top:50%; left:50%;
  width:3px; height:11px;
  border-radius:2px;
  background:#7A2E2E;
  opacity:0.2;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-18px);
  animation: bufferFade 1s linear infinite;
}
.buffer-spinner .dash:nth-child(1){ --angle:0deg;   animation-delay:0s; }
.buffer-spinner .dash:nth-child(2){ --angle:45deg;  animation-delay:0.125s; }
.buffer-spinner .dash:nth-child(3){ --angle:90deg;  animation-delay:0.25s; }
.buffer-spinner .dash:nth-child(4){ --angle:135deg; animation-delay:0.375s; }
.buffer-spinner .dash:nth-child(5){ --angle:180deg; animation-delay:0.5s; }
.buffer-spinner .dash:nth-child(6){ --angle:225deg; animation-delay:0.625s; }
.buffer-spinner .dash:nth-child(7){ --angle:270deg; animation-delay:0.75s; }
.buffer-spinner .dash:nth-child(8){ --angle:315deg; animation-delay:0.875s; }

@keyframes bufferFade{
  0%   { opacity:1; }
  100% { opacity:0.2; }
}





.bar{
    display: flex;
    padding-bottom: 20px;
    border-bottom: 1px solid #E3DCC9;
    background-color: #faf6ef;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
}
.name{
    font-size: 20px;
    margin-top: -5px;
    margin-left: 30px;
}
.search{
    margin-left: 100px;
}
.search input{
    margin-top: 20px;
    height: 35px;
    width: 250px;
    border-radius: 8px;
    background-color: #F1EBDD;
    border: 1px solid #beaf8d;
}
.search button{
    font-size: 20px;
    background-color: #F1EBDD;
}
.button{
    margin-left: 100px;
    margin-top: 15px;
  display:flex;
  gap:4px;
  background: #F1EBDD;
  border:1px solid  #E3DCC9;
  border-radius:8px;
  padding:10px;
  padding-top: 7px;
  padding-bottom: -40px;
  margin-bottom: 0px;
}
.button button{
    padding:8px 16px;
  background:transparent;
  border-radius:5px;
  font-size:13.5px;
  color:#5C584F;
  font-weight:500;
  border: none;
  cursor: pointer;
}
.button button:hover{
    background:#211f1c;
  color:#faf6ef;
}
.cart{
    padding-top: 25px;
    margin-left: 140px;
    position: relative;
    display: inline-block;
}


.cart-count {
    position: absolute;
    top: 20px;
    right: -8px;
    background: #7A2E2E;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sign{
    margin-left: 70px;
    margin-top: 25px;
}
.sign button{
    padding-bottom: 10px;
    padding-top: 10px;
    padding-left: 15px;
    padding-right: 15px;
    background: #7A2E2E;
    color: white;
    border: none;
    border-radius: 5px;
    text-decoration: none;
}
.user-chip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.user-icon {
    font-size: 20px;
}
.user-name {
    font-size: 18px;
    font-weight: 500;
}
.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #E3DCC9;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    min-width: 120px;
    overflow: hidden;
    z-index: 50;
}
.user-dropdown.open {
    display: block;
}
.user-dropdown a {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    color: #5C584F;
    text-decoration: none;
}
.user-dropdown a:hover {
    background: #F1EBDD;
}


/* this the categories edit section */

.part{
    margin-left: 120px;
    margin-top: 20px;
    font-size: 20px;
    padding-top: 80px;
}
.total-all{
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
}
.card{
    padding-left: 120px;
    padding-top: 10px;
    margin-right: -130px;
}
.card img{
    width: 250px;
    height: 350px;
}
.card-title{
    margin-top: 10px;
    font-size: 20px;
}
.card-text{
    margin-top: -30px;
    font-size: 15px;
    color: rgb(139, 138, 138);
}
.list-group{
    margin-top: -10px;
    list-style: none;
    margin-left: -40px;
    color: #b8923f;
}

@media (max-width: 768px){

    html, body{
        overflow-x: hidden;
        width: 100%;
    }
    *, *::before, *::after{
        box-sizing: border-box;
    }
    /* header is fixed, so push the page down by its height */
    body{
        padding-top: 150px;
    }

    /* ---------- header (same as the other pages) ---------- */
    .bar{
        display: grid;
        grid-template-columns: 1fr auto auto;
        grid-template-areas:
            "name   cart   sign"
            "search search search"
            "menu   menu   menu";
        align-items: center;
        column-gap: 14px;
        row-gap: 8px;
        padding: 8px 14px 10px;
    }
    .bar > a:first-child{ grid-area: name; }
    .bar > a.nav-link{ grid-area: cart; }
    .search{ grid-area: search; margin: 0; }
    .button{ grid-area: menu; }
    .sign{ grid-area: sign; }

    .name{
        margin: 0;
        font-size: 18px;
    }
    .name h3{
        margin: 0;
    }

    .search .container-fluid{
        padding: 0;
    }
    .search form{
        margin: 0;
    }
    .search input{
        display: block;
        width: 100%;
        margin: 0;
        height: 38px;
        padding: 0 12px;
        font-size: 16px; /* stops iOS zooming in on focus */
    }

    .button{
        width: 100%;
        margin: 0;
        padding: 4px;
        justify-content: space-between;
        gap: 2px;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .button::-webkit-scrollbar{ display: none; }
    .button a{
        flex: 1;
    }
    .button button{
        width: 100%;
        padding: 8px 6px;
        font-size: 13px;
        white-space: nowrap;
    }

    .cart{
        margin: 0;
        padding: 6px 0 0;
    }
    .cart-count{
        top: -4px;
        right: -8px;
    }
    .sign{
        margin: 0;
    }
    .sign button{
        padding: 8px 12px;
        font-size: 13px;
    }
    .user-name{
        font-size: 14px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .user-icon{
        font-size: 18px;
    }

    /* ---------- all books ---------- */
    .part{
        margin: 0;
        padding: 20px 16px 0;
        font-size: 24px;
        font-weight: 700;
    }

    /* two books per row; wraps to more rows as the shelf grows */
    .total-all{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 14px;
        margin: 0;
        padding: 16px 16px 30px;
    }
    .total-all > a{
        display: block;
        min-width: 0; /* lets long titles truncate inside the column */
    }
    .card{
        width: 100% !important; /* overrides the inline width:18rem */
        padding: 0;
        margin: 0;
        color: #211f1c;
    }
    .card img{
        width: 100%;
        height: 210px;
        object-fit: cover;
        border-radius: 8px;
    }
    .card-body{
        padding: 8px 0 0;
    }
    .card-title{
        margin: 0 0 4px;
        font-size: 15px;
        line-height: 1.25;
    }
    .card-text{
        margin: 0;
        font-size: 13px;
    }
    .list-group{
        margin: 6px 0 0;
        padding: 0;
        font-size: 13px;
    }
    .list-group-item{
        list-style: none;
    }
}

/* ---------- very small phones ---------- */
@media (max-width: 380px){
    body{
        padding-top: 156px;
    }
    .card img{
        height: 190px;
    }
}