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 is my info edit section */

.genre{
    margin-left: 120px;
    border-bottom: 1px solid #7A2E2E;
    padding-bottom: 10px;
    margin-right: 200px;
    padding-top: 80px;
}
.tit{
    margin-top: 50px;
    display:flex;
}
.tit span{
    margin-top: 16px;
    padding-left: 7px;
    padding-right: 7px;
}
.about-book{
    display: flex;
    gap: 80px;
}

.card1 img{
    height: 450px;
    margin-top: 20px;
}

.about-book1 a{
    color:  #7a2e2e;
}
.about-book1 p{
    margin-top: -10px;
    color:  #7a2e2e;
}
.price{
    font-size: 40px;
    margin-top: 10px;
    color:  #7a2e2e;
    margin-bottom: 20px;
}
.add button{
    padding-bottom: 13px;
    margin-top: 18px;
    margin-bottom: 18px;
    padding-top: 13px;
    padding-left: 25px;
    padding-right: 25px;
    background: #7A2E2E;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
hort-story{
    margin-top: 18px;
    padding-right: 100px;
    padding-bottom:15px;
    
}
.short-story p{
    color: black;
    padding-bottom:30px;
    border-bottom: 1px solid #7A2E2E;
}
.pages-language{
    display: flex;
    gap: 200px;
}
.pages-language h4{
    margin-top: -10px;
}
.pages-language p{
    color: rgb(98, 97, 97);
}
.published-size{
    margin-top: 20px;
    display: flex;
    gap: 155px;
}
.published-size h4{
     margin-top: -10px;
}
.published-size p{
    color: rgb(98, 97, 97);    
}


/* this is my review section */

.review{
    margin-left: 120px;
    border-bottom: 1px solid #7A2E2E;
    padding-bottom: 10px;
    margin-right: 200px;
}

.star-picker {
  display: flex;
  gap: 20px;
  font-size: 26px;
  margin-top: -10px;
}
.star-picker span {
  cursor: pointer;
  color: #ccc;
  transition: 0.1s;
}
.star-picker span.filled {
  color: gold;
}
.write button{
    margin-top: 30px;
     padding-bottom: 15px;
    padding-top: 15px;
    padding-left: 25px;
    padding-right: 25px;
    background: white;
    color: black;
    border: 1px solid rgb(204, 202, 200);
    border-radius: 5px;
    box-shadow: 1 5px 10px rgba(0, 10, 10, 10);
}
.write button:hover{
    background-color: #7A2E2E;
    color: white;
}
.star-name{
    display: flex;
    margin-top: 30px;
}
.star{
    font-size: 10px;
    margin-top: 3px;
}
.namely{
    margin-left: 10px;
    font-size: 13px;
    margin-top: 1px;
    font-weight: 700;
}
.the-review{
    padding-right:370px;
}


/* other option edit section */

.month{
    padding-left: 120px;
    font-size: 20px;
    display: flex;
    gap: 700px;
}

.all{
    display: flex;
    flex-wrap: wrap;
}
.card{
    padding-left: 120px;
    padding-top: 10px;
    margin-right: -130px;
}
.card img{
    width: 240px;
    height: 290px;
}
.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;
}
.all-down{
    display: flex;
}

/* this is my footer edit section */

.footer{
    margin-top: 10px;
    display: flex;
    gap: 140px;
    background-color: #f1ebdd;
    padding-left: 120px;
}
.footer h1{
    padding-top: 30px;
    font-size: 25px;
}
.footer h2{
    padding-top: 40px;
    font-size: 18px;
}
.footer p{
    margin-top: -7px;
    font-size: 16px;
    color: rgb(93, 92, 92);
}
.footer a{
    text-decoration: none;
}
.flex input{
    height: 35px;
    width: 200px;
    border-radius: 8px;
    background-color: #F1EBDD;
    border: 1px solid #beaf8d;
}
.flex button{
    padding-bottom: 10px;
    padding-top: 10px;
    padding-left: 15px;
    padding-right: 15px;
    background: #7A2E2E;
    color: white;
    border: none;
    border-radius: 5px;
}

@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;
    }

    /* ---------- book details ---------- */
    .genre{
        margin: 0 16px;
        padding: 0 0 20px;
    }

    /* breadcrumb: Store / Category / Title, wraps if the title is long */
    .tit{
        flex-wrap: wrap;
        align-items: baseline;
        margin-top: 16px;
        font-size: 14px;
    }
    .tit p{
        margin: 0;
    }
    .tit span{
        margin-top: 0;
        padding: 0 6px;
    }

    /* cover on top, details below */
    .about-book{
        flex-direction: column;
        gap: 20px;
    }
    .card1{
        width: 220px !important; /* overrides the inline width:18rem */
        margin: 16px auto 0;
    }
    .card1 img{
        width: 100% !important;  /* overrides the inline image size */
        height: 310px !important;
        margin-top: 0;
        border-radius: 8px;
    }

    .about-book1 h1{
        margin: 0 0 6px;
        font-size: 26px;
        line-height: 1.2;
    }
    .about-book1 p{
        margin: 0;
    }
    .price{
        margin: 14px 0 0;
        font-size: 32px;
    }
    .add button{
        width: 100%;
        margin: 14px 0;
        padding: 14px 20px;
        font-size: 16px;
    }

    .short-story{
        margin-top: 8px;
        padding: 0;
    }
    .short-story p{
        margin: 0;
        padding-bottom: 20px;
        line-height: 1.55;
    }

    .pages-language,
    .published-size{
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-top: 16px;
    }
    .pages-language p,
    .published-size p{
        margin: 0 0 4px;
        font-size: 14px;
    }
    .pages-language h4,
    .published-size h4{
        margin: 0;
    }

    /* ---------- reviews ---------- */
    .review{
        margin: 0 16px;
        padding: 20px 0 16px;
    }
    .reader-review h2{
        margin: 0 0 4px;
        font-size: 20px;
    }
    .reader-review h3{
        margin: 0 0 12px;
        font-size: 16px;
    }
    .review input[type="text"],
    .review textarea{
        display: block;
        width: 100%;
        margin-bottom: 12px;
        padding: 10px 12px;
        font-size: 16px; /* stops iOS zooming in on focus */
        border: 1px solid #beaf8d;
        border-radius: 8px;
        background: #F1EBDD;
    }
    .review textarea{
        min-height: 110px;
    }
    .star-picker{
        gap: 6px;
        margin: 0 0 12px;
        font-size: 30px;
    }
    .star-picker span{
        padding: 4px 6px; /* bigger tap target */
    }
    .write button{
        width: 100%;
        margin-top: 8px;
        padding: 14px 20px;
    }
    .star-name{
        margin-top: 20px;
    }
    .the-review{
        padding-right: 0;
    }
    .the-review p{
        margin: 6px 0 0;
        line-height: 1.5;
    }

    /* ---------- readers also bought (swipe row) ---------- */
    .other-options{
        padding-top: 20px;
    }
    .month{
        padding: 0 16px;
        gap: 0;
    }
    .month h2{
        margin: 0 0 8px;
        font-size: 20px;
    }
    .all{
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 14px;
        padding: 0 16px 12px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .all::-webkit-scrollbar{ display: none; }
    .card{
        flex-shrink: 0;
        width: 150px !important; /* overrides the inline width:18rem */
        padding: 0;
        margin: 0;
        scroll-snap-align: start;
        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;
    }

    /* ---------- footer ---------- */
    .footer{
        flex-wrap: wrap;
        gap: 0 24px;
        margin: 10px 0 0;
        padding: 0 16px 24px;
    }
    .footer br{
        display: none;
    }
    .me{
        width: 100%;
    }
    .shop-foot,
    .support-foot{
        width: calc(50% - 12px);
    }
    .stay-foot{
        width: 100%;
    }
    .flex{
        display: flex;
        gap: 8px;
    }
    .flex input{
        flex: 1;
        min-width: 0;
        font-size: 16px;
        padding: 0 10px;
    }
}

/* ---------- very small phones ---------- */
@media (max-width: 380px){
    body{
        padding-top: 156px;
    }
    .card{
        width: 138px !important;
    }
    .card img{
        height: 190px;
    }
}