/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    text-align: center;
}

header {
    background-color: #333;
    color: white;
    padding: 20px 0;
}

/* New styles for header logo and title alignment */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header-logo {
    max-height: 60px; /* Adjust height as needed */
    width: auto;
}

header h1 {
    margin: 0;
}

/* Product Grid (Home Page) */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 250px;
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
}

/* Individual Product Page Styles */
.product-detail {
    background: white;
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-detail img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.price {
    font-size: 1.5em;
    color: #27ae60;
    font-weight: bold;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
}

.btn:hover {
    background-color: #0056b3;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #555;
    text-decoration: underline;
}

/* --- Slideshow Styles --- */
.slideshow-container {
  max-width: 600px;
  position: relative;
  margin: auto;
}

.mySlides {
  display: none;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0,0,0,0.3);
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev {
  left: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}


/* --- New Navigation Bar Styles --- */
nav {
    background-color: #222; /* Slightly darker than header */
    padding: 10px 0;
    margin-top: 15px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 10px;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #007bff;
}

/* Update header padding to account for the navigation bar */
header p {
    margin-top: 15px; /* Add space below the navigation bar */
}


/* --- New Contact Form Styles --- */
.contact-form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-align: left;
}

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

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding doesn't affect the overall width */
}

.form-group textarea {
    resize: vertical; /* Allows user to resize vertically */
}

/* Style the submit button to use the existing .btn style */
.contact-form .btn {
    width: 100%;
    margin-top: 10px;
    text-align: center;
    border: none;
    cursor: pointer;
}

/* --- New Contact Form Styles --- */
.contact-form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-align: left;
}

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

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding doesn't affect the overall width */
}

.form-group textarea {
    resize: vertical; /* Allows user to resize vertically */
}

/* Style the submit button to use the existing .btn style */
.contact-form .btn {
    width: 100%;
    margin-top: 10px;
    text-align: center;
    border: none;
    cursor: pointer;
}


/* --- New Cart Page Styles --- */
.cart-container {
    max-width: 90%;
    margin: 20px auto;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: white;
}

.cart-table th, .cart-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.cart-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.cart-table tfoot td {
    font-size: 1.1em;
    padding: 15px;
    border-top: 3px solid #333;
}

.total-label {
    text-align: right;
    font-weight: bold;
}

.final-total {
    color: #c0392b; /* Red color for emphasis */
    font-weight: bold;
}

.remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.remove-btn:hover {
    background: #c0392b;
}

.checkout-btn {
    background-color: #27ae60; /* Green checkout button */
}

.checkout-btn:hover {
    background-color: #1e8449;
}


/* --- New Quantity Input Style --- */
.quantity-input {
    width: 60px; /* Make the input box small */
    padding: 5px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}


/* ======================================= */
/* --- CART / CHECKOUT PAGE LAYOUT --- */
/* ======================================= */

.checkout-form-container {
    display: flex;
    flex-wrap: wrap; /* Allows sections to wrap on mobile */
    gap: 30px;
    margin: 30px auto;
    max-width: 900px;
    padding: 0 20px;
}

.cart-summary-section, 
.shipping-info-section {
    flex: 1; /* Makes both sections take equal space */
    min-width: 300px; /* Ensures minimum width for wrapping */
}

/* Restyle the Cart Table for the summary (simpler version) */
.cart-summary-section .cart-table th, 
.cart-summary-section .cart-table td {
    padding: 10px;
}

.cart-summary-section .cart-table th:last-child,
.cart-summary-section .cart-table td:last-child {
    text-align: right;
}

/* Remove Quantity-specific styling (since we removed the input box) */
.cart-summary-section .cart-table th:nth-child(2),
.cart-summary-section .cart-table td:nth-child(2) {
    text-align: center;
}

/* Ensure form styling is clean */
.shipping-info-section .form-group {
    background: none;
    border: none;
    padding: 0;
}

.shipping-info-section h3 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* --- Responsive Layout for Checkout --- */
@media screen and (max-width: 768px) {
    .checkout-form-container {
        /* Stack the summary and shipping info vertically on tablets/mobiles */
        flex-direction: column;
        max-width: 95%;
    }
}
