body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #222;
    background-color: #fdfdfd;
    padding-top: 80px;
}
.container {
    max-width: 600px;
    margin: auto;
    padding: 20px;
}
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
    position: fixed; /* Makes the header stay in place */
    top: 0;          /* Aligns it to the top of the viewport */
    width: 100%;     /* Makes it span the full width */
    z-index: 1000;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header img {
    height: 50px;
}
.header nav {
    display: flex;
    gap: 25px; /* Adds space between menu items */
}
.header nav a {
    text-decoration: none;
    color: #444;
}
.header nav a:hover {
    color: #a62525;
}
.hero {
    background: linear-gradient(to right, #a62525, #922020);
    color: white;
    text-align: center;
    padding: 60px 20px;
}
.hero h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}
.btn-primary {
    background-color: #ffffff;
    color: #a62525;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}
.btn-primary:hover {
    background-color: #fbeaea;
}
.info {
    padding: 40px 20px;
}
.info.alt {
    background-color: #f5f5f5;
}
.info h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
}
.info ul {
    list-style: none;
    padding-left: 0;
}
.info ul li::before {
    content: "\2714";
    margin-right: 10px;
    color: #a62525;
}
.info-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}
.info-column {
    flex: 1;
    min-width: 300px;
}
.banner {
    width: 100%;
    display: block;
}
.cta {
    background-color: #a62525;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    min-height: 300px;
    padding: 20px;
}
.cta h3 {
    font-size: 2.5em;
    margin-bottom: 20px;
}
.btn-secondary {
    background-color: white;
    color: #a62525;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}
.btn-secondary:hover {
    background-color: #fbeaea;
}
.footer {
    text-align: center;
    padding: 20px 10px;
    font-size: 0.9em;
    background-color: #fafafa;
    border-top: 1px solid #eee;
}
.footer a {
    color: #a62525;
    text-decoration: none;
}
/* --- Science Page --- */
.page-content {
    padding: 40px 0;
}
.paper {
    border-bottom: 1px solid #eee;
    padding-bottom: 25px;
    margin-bottom: 25px;
}
.paper:last-child {
    border-bottom: none;
}
.paper-title {
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 10px;
}
.paper-title a {
    color: #a62525;
    text-decoration: none;
}
.paper-title a:hover {
    text-decoration: underline;
}
.paper-abstract {
    line-height: 1.6;
    color: #555;
}
/* --- My account Page --- */
.page-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

.login-card {
  background-color: #ffffff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-card h1 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 30px;
  font-size: 1.8em;
  color: #333;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #555;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box; /* Important for padding and width */
  font-size: 1em;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 0.9em;
}

.remember-me {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #666;
}

.remember-me input {
  margin-right: 8px;
}

.forgot-password {
  color: #a62525;
  text-decoration: none;
}

.forgot-password:hover {
  text-decoration: underline;
}

.login-card .btn-primary {
  width: 100%;
  padding: 15px;
  font-size: 1.1em;
}

/* Dashboard */
.status-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  border: 1px solid #eee;
  margin: 20px 0;
}

.status-stepper {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  position: relative;
}

.step {
  font-size: 0.8em;
  color: #ccc;
  text-align: center;
  flex: 1;
}

.step.completed { color: #2ecc71; font-weight: bold; }
.step.active { color: #a62525; font-weight: bold; text-decoration: underline; }

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.action-card {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
}

.btn-logout {
  background: none;
  border: 1px solid #ccc;
  padding: 10px 20px;
  margin-top: 30px;
  cursor: pointer;
  color: #666;
}

/* --- Shop Page --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.product-image {
    width: 100%;
    height: 200px;
    background-color: #f9f9f9;
    object-fit: cover;
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.25em;
    color: #222;
}

.product-price {
    font-size: 1.4em;
    font-weight: bold;
    color: #a62525;
    margin-bottom: 15px;
}

.stock-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.stock-badge.in-stock {
    background-color: #e6f9ed;
    color: #2ecc71;
}

.stock-badge.out-of-stock {
    background-color: #f5f5f5;
    color: #999;
}

.btn-add-cart {
    background-color: #a62525;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.btn-add-cart:hover {
    background-color: #922020;
}

.btn-add-cart:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* --- Cart Page --- */
.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info h4 {
    margin: 0 0 5px 0;
}

.cart-item-price {
    color: #a62525;
    font-weight: bold;
}

.btn-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.85em;
}

.btn-remove:hover {
    color: #a62525;
}

.cart-summary {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 1.2em;
    font-weight: bold;
}

/* Out of Stock in Cart */
.cart-item.out-of-stock {
    opacity: 0.6;
    background-color: #fffafa;
}

.stock-warning {
    color: #a62525;
    font-size: 0.8em;
    font-weight: bold;
    display: block;
    margin-top: 5px;
}

.cart-badge {
    background-color: #a62525;
    color: white;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    vertical-align: middle;
    font-weight: bold;
}

/* Quantity Selector UI */
.qty-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    border: 1px solid #a62525;
    border-radius: 6px;
    overflow: hidden;
    height: 45px; /* Match button height */
}

.qty-btn {
    background: #a62525;
    color: white;
    border: none;
    width: 40px;
    height: 100%;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    transition: background 0.2s;
}

.qty-btn:hover { background: #922020; }
.qty-btn:disabled { background: #ccc; cursor: not-allowed; }

.qty-number {
    font-weight: bold;
    color: #222;
    padding: 0 15px;
}

/* Ensure the cart page items also look consistent */
.cart-item-qty-area {
    margin-top: 10px;
    width: 120px;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff; /* White part of the spinner */
    animation: spin 0.8s linear infinite;
    margin-right: 12px; /* Space between spinner and "Preparing..." text */
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 2. Specific Checkout Button Styling */
#checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px; /* Prevents button height jump when spinner appears */
    transition: all 0.3s ease;
}

/* 3. Visual Feedback for Clicked/Disabled State */
#checkout-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    filter: saturate(0.5); /* Desaturates the red slightly to look "inactive" */
}

#checkout-btn:active {
    transform: scale(0.98); /* Slight "push-in" effect when clicked */
}