/* Original styles.css content - Base Layout */
body {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  background: #f8f8f8;
}

.main-header {
  background: #f0c420;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo-title {
  display: flex;
  align-items: center;
}
.logo {
  width: 50px;
  margin-left: 10px;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
}
.nav-links li a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
}
.user-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-panel input {
  padding: 5px 10px;
  border-radius: 5px;
  border: none;
}

..hero-banner {
    display: none;
}

}

}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.product-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
}

.product-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.btn {
  display: inline-block;
  background: #f0c420;
  color: black;
  padding: 10px;
  margin: 5px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}
.btn.alt {
  background: #ddd;
}
.stars {
  margin: 5px 0;
  color: #ffbb00;
}

.nav-links { /* This block might be a duplicate in original, but harmless */
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.nav-links li a { /* This block might be a duplicate in original, but harmless */
  text-decoration: none;
  color: #000;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #ffffff;
}

#login-form-container {
  max-width: 400px;
  margin: 100px auto;
  padding: 30px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  text-align: center;
}

#login-form-container input {
  width: 80%;
  padding: 10px;
  margin: 15px 0;
  border-radius: 5px;
  border: 1px solid #ccc;
}

#login-form-container button {
  padding: 10px 20px;
  background-color: #f0c420;
  border: none;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
}

/* Admin Panel Styles */
.admin-container {
  max-width: 900px;
  margin: 50px auto;
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.admin-container h2 {
  text-align: center;
  margin-bottom: 20px;
}
.admin-container form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}
.admin-container form input,
.admin-container form select,
.admin-container form textarea { /* Added textarea */
  flex: 1 1 200px;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
}
.admin-container form button {
  padding: 8px 16px;
  background-color: #f0c420;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.admin-container ul {
  list-style: none;
  padding: 0;
}
.admin-container ul li {
  background: #f8f8f8;
  margin-bottom: 5px;
  padding: 8px;
  border-radius: 5px;
}

.admin-link {
  background-color: #444;
  color: #fff;
  padding: 6px 10px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9em;
}

/* Order Management Styles */
.order-card {
  background: #f8f8f8;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.order-card p {
  margin: 5px 0;
}

.order-status-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.order-status-control select {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.order-status-control button {
  padding: 6px 12px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* --- Cart Specific Styles --- */
.cart-link {
    background-color: #4CAF50;
    color: white;
    padding: 6px 10px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    margin-right: 10px;
    white-space: nowrap;
}

.cart-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: right;
}

.cart-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.cart-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #f9f9f9;
    flex-wrap: wrap;
    gap: 15px;
}

.cart-item-card img {
    width: 80px;
    min-width: 80px;
    height: 80px;
    border-radius: 5px;
    margin-left: 15px;
    object-fit: cover;
}

.cart-item-card .item-details {
    flex-grow: 1;
    text-align: right;
    min-width: 150px;
}

.cart-item-card .item-details h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1em;
}

.cart-item-card .item-details p {
    margin: 0;
    color: #666;
    font-size: 0.95em;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 10px;
    flex-shrink: 0;
}

.quantity-control button {
    background-color: #ddd;
    border: 1px solid #ccc;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1em;
    margin: 0 5px;
    min-width: 30px;
}

.quantity-control span {
    font-weight: bold;
    font-size: 1.1em;
    display: inline-block;
    min-width: 25px;
    text-align: center;
}

.remove-item-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    margin-right: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Adjustments for wrapping behavior on very small screens */
@media all {
  .hero-banner {
    display: none !important;
  }
}


    .cart-item-card img {
        margin-left: 0;
        margin-bottom: 10px;
    }

    .cart-item-card .item-details {
        width: 100%;
        min-width: unset;
    }

    .quantity-control {
        justify-content: flex-start;
        width: 100%;
        margin-top: 5px;
    }

    .remove-item-btn {
        width: 100%;
        margin-top: 10px;
        margin-right: 0;
    }
}


.cart-summary {
    border-top: 2px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
    text-align: left;
}

.cart-summary p {
    font-size: 1.1em;
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

.cart-summary h3 {
    font-size: 1.5em;
    margin: 15px 0;
    color: #f0c420;
    display: flex;
    justify-content: space-between;
}

.cart-summary .btn {
    width: auto;
    padding: 10px 20px;
    display: inline-block;
    margin-top: 15px;
    text-align: center;
}

.cart-summary .btn:last-child {
    margin-right: 10px;
}

/* Shipping Options Styles */
.shipping-options {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fcfcfc;
    text-align: right;
}

.shipping-options h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #555;
}

.shipping-options label {
    display: block;
    margin-bottom: 8px;
    font-size: 1em;
    color: #444;
    cursor: pointer;
}

.shipping-options input[type="radio"] {
    margin-left: 8px;
    vertical-align: middle;
}

/* Discount Section Styles */
.discount-section {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fcfcfc;
    text-align: right;
}

.discount-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #555;
}

.discount-section input[type="text"] {
    width: calc(100% - 100px);
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-left: 10px;
    box-sizing: border-box;
    vertical-align: middle;
}

.discount-section .btn.alt {
    padding: 8px 15px;
    font-size: 0.9em;
    vertical-align: middle;
}

/* Admin Form Specific Adjustments (existing code from previous replies) */
#add-discount-form input,
#add-discount-form select {
    flex: 1 1 150px;
}

/* Checkout Page Styles (New) */
.checkout-container {
    max-width: 700px; /* Slightly narrower than cart container */
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: right;
}

.checkout-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.order-summary-checkout {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    background-color: #fcfcfc;
}

.order-summary-checkout h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    color: #f0c420;
    font-size: 1.3em;
}

.order-summary-checkout p {
    font-size: 1.05em;
    margin: 6px 0;
    display: flex;
    justify-content: space-between;
    padding-bottom: 5px;
    border-bottom: 1px dotted #eee;
}

.order-summary-checkout p:last-of-type {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.15em;
    color: #333;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid #eee;
}

/* Customer Info Section Styles */
.customer-info-section {
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: right;
    margin-bottom: 25px;
}

.customer-info-section h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3em;
}

.customer-info-section form input[type="text"],
.customer-info-section form input[type="tel"],
.customer-info-section form input[type="email"],
.customer-info-section form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Include padding and border in element's total width */
    font-size: 1em;
    text-align: right; /* RTL */
}

.customer-info-section form textarea {
    resize: vertical; /* Allow vertical resizing */
}

.payment-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee; /* Added border-top here */
    text-align: center;
}

.payment-options h4 {
    margin-bottom: 20px;
    color: #333;
}

/* Styles for PayPal buttons containers (modified for uniform width) */
#credit-card-button-container,
#paypal-button-container {
    max-width: 300px; /* Consistent max-width for both PayPal generated buttons */
    margin: 0 auto 10px auto; /* Center and add consistent bottom margin */
    direction: ltr; /* Ensure PayPal buttons render LTR */
}

/* Styles for COD and Back to Cart buttons (reused .btn class for consistency) */
.payment-options .btn {
    display: block; /* Make buttons stack vertically */
    width: 100%;
    max-width: 300px; /* Consistent max-width for these buttons */
    margin: 10px auto; /* Center and add consistent vertical spacing */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    text-align: center; /* Center button text */
    font-size: 1.1em; /* Slightly larger font */
    padding: 10px 20px; /* Ensure consistent padding */
}

.payment-options .back-to-cart-btn {
    background-color: #6c757d;
    color: white;
}

/* General responsive adjustments for forms and overall layout */
@media (max-width: 768px) {
  .products {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    padding: 10px;
    gap: 15px;
  }
  .main-header {
    padding: 10px;
  }
  .nav-links {
    gap: 10px;
  }
}

@media (max-width: 480px) {
    .products {
        grid-template-columns: 1fr;
    }
    .admin-container form input,
    .admin-container form select,
    .admin-container form textarea {
      flex: 1 1 100%;
    }
    .discount-section input[type="text"],
    .discount-section .btn.alt {
        width: 100%;
        margin-left: 0;
        margin-bottom: 10px;
        display: block;
    }
    .checkout-container, .cart-container, .admin-container, #login-form-container {
        margin: 15px auto;
        padding: 15px;
        border-radius: 8px;
    }
    .user-panel {
        flex-wrap: wrap;
        justify-content: center;
    }
    .user-panel input {
        width: 100%;
        margin-bottom: 10px;
    }
    .user-panel a, .user-panel button {
        flex-grow: 1;
        text-align: center;
        margin-bottom: 5px;
    }
    .payment-options .btn {
        max-width: unset; /* Allow full width on very small screens */
    }
    #paypal-button-container,
    #credit-card-button-container { /* Also apply to credit card container */
        max-width: unset; /* Allow full width for PayPal buttons */
    }
}
.payment-options-modern {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.payment-options-modern input[type="radio"] {
  accent-color: #ffc107;
}
.payment-options-modern label {
  font-weight: bold;
  margin-right: 8px;
}
