body { margin: 0; font-family: Arial, sans-serif; background-color: #f5f5f5;}
header {
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(90deg,#003366,#0055aa);
color: white;
padding: 20px 40px;
}
nav a { color: white; text-decoration: none; margin-right: 20px;}
main { padding: 40px;}
h2 { color: darkblue; }
.hero {text-align: center; padding: 60px;}
.hero input {width: 300px; padding: 10px; font-size: 16px; }
.hero button {padding: 10px 20px; background-color: darkblue; color: white; border: none; cursor: pointer;}
.logo { font-size: 28px; font-weight: bold;}
.books {padding: 40px;}
.book-card {
width: 260px;
background: white;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 4px 12px rgba(0,0,0,.12);
transition: .3s ease;
text-align: center;
padding: 20px; }
.book-card:hover {
transform: translateY(-6px); }
.book-card img {
width: 100%;
height: 280px;
object-fit: cover;
border-radius: 8px; }
.book-card h3{ margin-top: 15px; color: darkblue;}
.book-card p { margin: 6px 0;}
.price { color:green; font-size:22px; font-weight:bold;}
.book-card button { margin-top:10px; width:48%;  color:white; border:none; border-radius:6px; padding:10px;  cursor:pointer;}
.book-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
gap: 30px;
padding: 40px; }

.logo img { width:200px; height: auto;}
.cart-section { width: 90%; max-width: 700px; margin: 50px auto; padding: 25px; background-color: #f5f5f5; border-radius: 10px; }
#cart-items > div { background-color: white; padding: 15px; margin-bottom: 15px; border-radius: 8px; }
.quantity-controls { display: flex; align-items: center; gap: 15px; margin: 10px 0; }
.quantity-controls button { width: 35px; height: 35px; font-size: 20px; cursor: pointer; }
.remove-button { padding: 8px 15px; cursor: pointer; }
#cart-items h3 { text-align: right; font-size: 22px; margin-top: 20px; }
.search-section {
 text-align: center;
 margin-bottom: 30px; }
#search-input {
 width: 60%;
 max-width: 500px;
 padding: 15px;
 border: 2px solid darkblue;
 border-radius: 30px;
 font-size: 16px;
 outline: none; }
#category-buttons {
 display: flex;
 justify-content: center;
 flex-wrap: wrap;
 gap: 15px;
 margin-bottom: 40px;
}

.category-button {
 background: white;
 border: 2px solid darkblue;
 color: darkblue;
 padding: 10px 18px;
 border-radius: 25px;
 cursor: pointer;
 transition: .3s;
}

.category-button:hover {
 background: darkblue;
 color: white; }
 .edit-button{

background:orange;

color:white;

border:none;

padding:10px;

margin-right:4px;

cursor:pointer;

width:48%;

}

.delete-button{

background:crimson;

color:white;

border:none;

padding:10px;

margin-top:10px;

cursor:pointer;

width:48%; }
.add-to-cart{

background: darkblue;

color: white;

border: none;

padding: 10px;

border-radius: 6px;

cursor: pointer;

width: 100%;

}

.add-to-cart-button:hover{

background: #003b8e;

}

/* ================================
LIBRARY PAGE
================================ */

.library-container {
max-width: 1100px;
margin: 40px auto;
padding: 20px;
}

.library-box {
background: white;
padding: 30px;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.library-box h2 {
margin-bottom: 10px;
}

#library-message {
margin-bottom: 25px;
}

#library-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 25px;
}

.library-book {
padding: 20px;
border: 1px solid #ddd;
border-radius: 10px;
background: #fafafa;
}

.library-book img {
width: 100%;
height: 280px;
object-fit: cover;
border-radius: 8px;
display: block;
margin-bottom: 15px;
}

.library-book h3 {
margin-bottom: 12px;
}

.library-book p {
margin: 8px 0;
}

.read-book-button {
margin-top: 12px;
padding: 10px 16px;
border: none;
border-radius: 6px;
cursor: pointer;
}

#back-to-store {
margin-top: 25px;
padding: 10px 18px;
border: none;
border-radius: 6px;
cursor: pointer;
}

#reading-progress-container {
margin: 20px 0;
}

#reading-progress-text {
font-weight: bold;
margin-bottom: 8px;
}

#reading-progress-bar-background {
width: 100%;
height: 16px;
background-color: #ddd;
border-radius: 8px;
overflow: hidden;
}

#reading-progress-bar {
width: 0%;
height: 100%;
background-color: #2e7d32;
transition: width 0.4s ease;
}

.order-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

.order-summary dt {
    font-weight: bold;
}

.confirmation-item {
    margin: 1rem 0;
    text-align: left;
}

.confirmation-item p {
    margin: 0.25rem 0;
}

.error-message {
    color: #b00020;
    font-weight: bold;
}


