/* -------------------------------
   General Reset
--------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #fafafa;
  color: #333;
  min-height: 100vh;
}

/* -------------------------------
   Header & Navigation
--------------------------------- */
header {
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.8rem;
  color: #d4a373;
}

nav a {
  margin: 0 10px;
  color: #555;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #b98b58;
}

button {
  background: #d4a373;
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.3s ease;
}

button:hover {
  background: #b98b58;
}

/* -------------------------------
   Product Grid
--------------------------------- */
main {
  padding: 30px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.product {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  text-align: center;
  padding: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.product img {
  width: 100%;
  border-radius: 12px;
}

.product h3 {
  margin-top: 10px;
  font-size: 1.2rem;
  color: #333;
}

.product p {
  margin-top: 5px;
  font-size: 1rem;
  color: #555;
}

/* -------------------------------
   Footer
--------------------------------- */
footer {
  text-align: center;
  padding: 20px 0;
  background: #fff;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.05);
  margin-top: 50px;
  font-size: 0.9rem;
  color: #777;
}

/* -------------------------------
   Hidden Class
--------------------------------- */
.hidden {
  display: none !important;
}

/* -------------------------------
   Cart Modal
--------------------------------- */
.cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  /* Hidden by default will be applied via JS class */
}

.cart-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.cart-content h2 {
  margin-bottom: 15px;
  color: #d4a373;
}

.cart-content ul {
  list-style: none;
  margin: 15px 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

.cart-content li {
  margin: 10px 0;
  text-align: left;
  font-size: 1rem;
  color: #333;
}

.cart-content p {
  margin-top: 15px;
  font-weight: bold;
  font-size: 1.1rem;
}

/* -------------------------------
   Cart Modal Buttons
--------------------------------- */
#close-cart {
  background: #555;
  margin-top: 15px;
}

#close-cart:hover {
  background: #333;
}

/* -------------------------------
   Animations
--------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------
   Responsive
--------------------------------- */
@media screen and (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    margin-top: 10px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}
.product img {
  width: 100%;       /* fill the container width */
  height: auto;      /* maintain aspect ratio */
  object-fit: cover; /* crop/fit nicely */
  border-radius: 10px;
}

.product img {
  width: 100%;          /* make image fill the container width */
  height: 250px;        /* fixed height for all images */
  object-fit: cover;    /* crop image to fit nicely */
  border-radius: 10px;
  display: block;
}

#cart-items {
  list-style: none; /* remove default bullets */
  padding: 0;
  margin-bottom: 1rem;
}

#cart-items li {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid #e5e5e5;

  /* 🔥 VISIBILITY FIX */
  color: #1a1a1a;              /* dark readable text */
  background-color: #f9f9f9;   /* light contrast */
  font-size: 0.95rem;
}

.qty-btn, .remove-btn {
  padding: 4px 8px;
  cursor: pointer;
  border: none;
  background: #ddd;
  border-radius: 6px;
}

.qty-btn:hover, .remove-btn:hover {
  background: #bbb;
}

.checkout-modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000;
}

.checkout-modal.hidden { display: none; }

.checkout-content {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.checkout-content form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkout-content input,
.checkout-content textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
}

.confirm-btn {
  background: #2c7a7b;
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 0.5rem;
  cursor: pointer;
}



.cancel-btn {
  background: #ccc;
  border: none;
  padding: 0.8rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.orders-section {
  padding: 2rem;
}

#orders-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

#orders-table th,
#orders-table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
}

#orders-table th {
  background: #2c7a7b;
  color: #fff;
}

#orders-table tr:nth-child(even) {
  background: #f9f9f9;
}
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal:not(.hidden) {
  display: flex;
}
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
}
.close {
  float: right;
  cursor: pointer;
  font-size: 1.5rem;
}
.btn-primary {
  background-color: #000;
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
}

.media-wrapper {
  width: 100%;
  height: 250px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.product-img,
.product-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.product-video {
  opacity: 0;   /* start hidden */
}
.product-card:hover .product-video {
  opacity: 1;   /* fade in the video */
}
.product-card:hover .product-img {
  opacity: 0;   /* fade out the image */
}


/* -------------------------------
   Global Styles
--------------------------------- */
body {
  margin: 0;
  font-family: "Arial", sans-serif;
  background-color: #0a0a0a; /* Dark background */
  color: #f5f5f5; /* Light text for contrast */
}

a {
  color: #f5f5f5;
  text-decoration: none;
}

a:hover {
  color: #d4a373;
}

/* -------------------------------
   Header & Navigation
--------------------------------- */
header {
  background: #111;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.1);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.8rem;
  color: #d4a373;
}

nav a {
  margin: 0 10px;
  color: #f5f5f5;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #d4a373;
}

/* -------------------------------
   Buttons
--------------------------------- */
button {
  background: #d4a373;
  border: none;
  color: #111;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.3s ease, color 0.3s ease;
}

button:hover {
  background: #b98b58;
  color: #fff;
}

/* -------------------------------
   Product Grid
--------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  padding: 30px;
}

/* -------------------------------
   Product Card
--------------------------------- */
.product-card {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  padding: 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: transform 0.2s, box-shadow 0.3s;
}

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

/* Media wrapper for hover video */
.media-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Square ratio */
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 10px;
}

.product-img,
.product-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* preserve image/video ratio */
  transition: opacity 0.3s ease;
}

.product-video {
  opacity: 0; /* hidden by default */
  z-index: 2;
}

.product-card:hover .product-video {
  opacity: 1;
}

.product-card:hover .product-img {
  opacity: 0;
}

/* -------------------------------
   Product Info
--------------------------------- */
.product-card h3 {
  margin: 10px 0 5px;
  font-size: 1.1rem;
  color: #f5f5f5;
}

.product-card p {
  margin: 0 0 10px;
  font-weight: bold;
  color: #d4a373;
}

/* -------------------------------
   Cart Modal
--------------------------------- */
#checkout-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

#checkout-modal.hidden {
  display: none;
}

.cart-content {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  color: #f5f5f5;
}

/* -------------------------------
   Table for Orders (Admin)
--------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  color: #f5f5f5;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #333;
  text-align: left;
}

th {
  background: #222;
}

tr:hover {
  background: #2a2a2a;
}

/* Buttons inside tables */
table button {
  background: #d4a373;
  color: #111;
  padding: 5px 8px;
  font-size: 0.9rem;
}

table button:hover {
  background: #b98b58;
  color: #fff;
}

/* ---------------- Checkout Modal Form Elements ---------------- */



.cart-summary {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Form Inputs & Selects */
.checkout-content input,
.checkout-content select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  margin: 0.5rem 0 1rem 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-content input:focus,
.checkout-content select:focus {
  border-color: #007BFF;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
  outline: none;
}

/* Labels */
.checkout-content label {
  font-weight: 600;
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  color: #333;
}

/* Payment info box */
.payment-info-box {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #555;
  border: 1px solid #e0e0e0;
}

/* File input */
#payment-proof {
  font-size: 0.9rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  cursor: pointer;
  margin-bottom: 1rem;
}

/* Selects */
.checkout-content select {
  appearance: none; /* remove default arrow */
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23333' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 8px;
  padding-right: 2rem;
}

/* Buttons spacing in form */
.checkout-content .confirm-btn,
.checkout-content .cancel-btn {
  margin-top: 0.5rem;
  margin-right: 0.5rem;
  min-width: 120px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .checkout-content input,
  .checkout-content select {
    font-size: 0.95rem;
    padding: 0.5rem 0.6rem;
  }
  .payment-info-box {
    font-size: 0.85rem;
  }
}

/* Cart summary styling */
.cart-summary {
  font-size: 1.1rem;            /* slightly larger for emphasis */
  font-weight: 600;              /* bold text */
  color: #333;                   /* dark gray for readability */
  margin: 0.75rem 0 1.25rem 0;   /* spacing above and below */
  display: flex;                 /* align text and total neatly */
  justify-content: space-between; /* push label and amount to sides */
  align-items: center;
  padding: 0.5rem 0;             /* vertical padding */
  border-top: 1px solid #ddd;    /* subtle top border to separate from items */
  border-bottom: 1px solid #ddd; /* subtle bottom border */
  background-color: #f9f9f9;     /* light background for emphasis */
  border-radius: 6px;            /* rounded corners */
}

.cart-summary strong {
  font-weight: 700;              /* ensure "Total:" is bold */
}

#cart-total {
  font-size: 1.2rem;             /* make total amount slightly bigger */
  color: #007BFF;                /* highlight total in blue */
}

/* Checkout modal heading */
.checkout-content h2 {
  font-size: 1.8rem;           /* large, prominent heading */
  font-weight: 700;            /* bold */
  color: #333;                 /* dark gray */
  margin-bottom: 1rem;         /* spacing below heading */
  text-align: center;          /* center heading in modal */
  letter-spacing: 0.5px;       /* subtle spacing for elegance */
}

.checkout-content h3 {
  font-size: 1.3rem;           /* slightly smaller for subsections */
  font-weight: 600;
  color: #444;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.view-btn {
  display: inline-block;
  padding: 10px 18px;
  background: #007BFF;               /* main blue color */
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.25s ease, transform 0.2s ease;
}

/* Hover effect */
.view-btn:hover {
  background: #005fcc;               /* darker blue on hover */
  transform: translateY(-2px);       /* slight lift */
}

/* Active / click effect */
.view-btn:active {
  transform: scale(0.97);
}

/* Optional full-width for mobile inside cards */
.view-btn.full {
  width: 100%;
}


/* Payment Proof Modal */
#proof-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

#proof-modal.show {
  opacity: 1;
  visibility: visible;
}

.proof-content {
  background: #111;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
}

#close-proof {
  position: absolute;
  top: 12px;
  right: 15px;
  background: #d4a373;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

#close-proof:hover {
  background: #b98b58;
}

/* Proof media */
#proof-media img,
#proof-media video {
  width: 100%;
  border-radius: 10px;
  display: block;
}
