/*
 * Cocoa Bean Co ~ Stylesheet
 * A tasteful tribute to early 2000s web design
 * Best viewed in 1024x768
 */

/* --- Base --- */
body {
  margin: 0;
  padding: 20px 0;
  background-color: #3a2a1a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cdefs%3E%3Cpattern id='grain' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Crect width='100' height='100' fill='%233a2a1a'/%3E%3Crect width='100' height='100' fill='%23443322' fill-opacity='0.3'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23grain)'/%3E%3C/svg%3E");
  font-family: "Georgia", "Times New Roman", Times, serif;
  font-size: 14px;
  color: #3a2a1a;
  line-height: 1.6;
}

table.page {
  background-color: #faf3e6;
  border: 3px solid #6b4a2e;
  border-collapse: separate;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.3);
}

/* --- Header --- */
table.header {
  background: linear-gradient(to bottom, #6b4a2e, #5a3a1e);
  border-bottom: 3px solid #4a2a0a;
}

table.header h1 {
  font-family: "Georgia", "Times New Roman", Times, serif;
  font-size: 36px;
  font-weight: bold;
  color: #f5deb3;
  margin: 0;
  letter-spacing: 4px;
  font-variant: small-caps;
}

.tagline {
  color: #c9a96e;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 2px;
  margin: 6px 0;
}

.subtitle {
  color: #e8d5b0;
  font-size: 11px;
  letter-spacing: 1px;
  margin: 0;
}

/* --- Navigation --- */
table.navbar {
  background-color: #4a2a0a;
  border-bottom: 2px solid #2a1a0a;
}

table.navbar td {
  border-right: 1px solid #6b4a2e;
}

table.navbar td:last-child {
  border-right: none;
}

a.navlink {
  display: block;
  padding: 6px 4px;
  color: #f5deb3;
  text-decoration: none;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 1px;
  font-variant: small-caps;
}

a.navlink:hover {
  background-color: #6b4a2e;
  color: #ffffff;
}

/* --- Marquee Bar --- */
table.marquee-bar {
  background-color: #c9a96e;
  border-bottom: 2px solid #8b6b4a;
}

table.marquee-bar marquee {
  color: #3a2a1a;
  font-weight: bold;
  font-size: 12px;
  font-family: "Georgia", serif;
}

/* --- Sidebar --- */
td.sidebar {
  background-color: #f0e4ce;
  border-right: 2px solid #d4c4a8;
  padding: 10px;
}

/* --- Content --- */
td.content {
  padding: 10px;
}

/* --- Box Component --- */
table.box {
  background-color: #fffef9;
  border: 2px solid #8b6b4a;
  border-collapse: separate;
}

td.box-header {
  background: linear-gradient(to bottom, #6b4a2e, #5a3a1e);
  color: #f5deb3;
  font-weight: bold;
  font-size: 15px;
  font-family: "Georgia", serif;
  font-variant: small-caps;
  letter-spacing: 2px;
  border-bottom: 2px solid #3a2a1a;
  padding: 8px 12px;
}

td.box-body {
  padding: 12px;
  color: #3a2a1a;
}

td.box-body p {
  margin: 0 0 8px 0;
}

td.box-body a {
  color: #6b4a2e;
  text-decoration: underline;
  font-weight: bold;
}

td.box-body a:hover {
  color: #8b4a2e;
  text-decoration: none;
  background-color: #f5deb3;
}

td.box-body hr {
  border: none;
  border-top: 1px dashed #c9a96e;
  margin: 8px 0;
}

/* --- Testimonials --- */
td.testimonials p {
  font-size: 12px;
  font-style: italic;
  margin: 4px 0;
}

/* --- Product Cards --- */
table.product-card {
  background-color: #fffef9;
  border: 1px solid #c9a96e;
  border-collapse: separate;
  margin-bottom: 10px;
  width: 100%;
}

table.product-card:hover {
  border-color: #6b4a2e;
  background-color: #fff8ef;
}

td.product-image {
  width: 100px;
  padding: 8px;
  text-align: center;
  vertical-align: top;
}

td.product-info {
  padding: 8px;
  vertical-align: top;
}

td.product-info h3 {
  margin: 0 0 4px 0;
  color: #4a2a0a;
  font-size: 16px;
  font-variant: small-caps;
}

.product-origin {
  font-size: 11px;
  color: #8b6b4a;
  font-style: italic;
}

.product-desc {
  font-size: 13px;
  margin: 6px 0;
}

.product-price {
  font-size: 18px;
  font-weight: bold;
  color: #4a2a0a;
}

.product-badge {
  display: inline-block;
  background-color: #c9a96e;
  color: #3a2a1a;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 6px;
  margin-left: 6px;
  border: 1px solid #8b6b4a;
}

.new-badge blnk {
  color: #ff4444;
  font-size: 11px;
  font-weight: bold;
  animation: blink-animation 1s steps(2, start) infinite;
}

@keyframes blink-animation {
  to { visibility: hidden; }
}

/* --- Buttons --- */
input.button, button.button, a.button {
  background: linear-gradient(to bottom, #f5deb3, #c9a96e);
  border: 2px outset #8b6b4a;
  color: #3a2a1a;
  font-family: "Georgia", serif;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 0.5px;
}

input.button:hover, button.button:hover, a.button:hover {
  background: linear-gradient(to bottom, #ffefce, #d9b97e);
  border-style: inset;
}

input.button:active, button.button:active {
  border-style: inset;
  background: #c9a96e;
}

/* --- Input Fields --- */
input.input-field, textarea.input-field, select.input-field {
  background-color: #fffef9;
  border: 2px inset #8b6b4a;
  font-family: "Georgia", serif;
  font-size: 13px;
  padding: 4px 6px;
  color: #3a2a1a;
}

input.input-field:focus, textarea.input-field:focus {
  border-color: #6b4a2e;
  outline: none;
  background-color: #fffff0;
}

/* --- Cart Items --- */
.cart-item {
  border-bottom: 1px dashed #c9a96e;
  padding: 6px 0;
}

.cart-total {
  font-size: 18px;
  font-weight: bold;
  color: #4a2a0a;
  text-align: right;
  border-top: 2px solid #6b4a2e;
  padding-top: 8px;
  margin-top: 8px;
}

/* --- Footer --- */
table.footer {
  background-color: #4a2a0a;
  border-top: 3px solid #2a1a0a;
}

table.footer p {
  margin: 4px 0;
}

table.footer a {
  color: #c9a96e;
  text-decoration: none;
}

table.footer a:hover {
  color: #f5deb3;
  text-decoration: underline;
}

.footer-text {
  color: #8b6b4a;
  font-size: 11px;
}

.footer-hr {
  border: none;
  border-top: 1px solid #6b4a2e;
  width: 60%;
}

/* --- Misc --- */
.visitor-badge {
  margin-top: 8px;
}

.visitor-badge img {
  margin: 2px 0;
}

/* Quantity controls */
.qty-btn {
  background-color: #c9a96e;
  border: 1px solid #8b6b4a;
  color: #3a2a1a;
  font-weight: bold;
  font-size: 10px;
  padding: 1px 6px;
  cursor: pointer;
  font-family: monospace;
}

.qty-btn:hover {
  background-color: #d9b97e;
}

/* Notification toast */
.toast {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background-color: #4a2a0a;
  color: #f5deb3;
  border: 2px solid #c9a96e;
  padding: 12px 20px;
  font-family: "Georgia", serif;
  font-size: 14px;
  z-index: 999;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toast.show {
  opacity: 1;
}

/* --- Payment Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  cursor: pointer;
}

table.modal-box {
  position: relative;
  z-index: 1001;
  background-color: #fffef9;
  border: 3px solid #6b4a2e;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.4);
  cursor: default;
  border-collapse: separate;
  margin: 20px;
}

td.modal-body {
  background-color: #faf3e6;
}

#card-element,
#card-number-element,
#card-expiry-element,
#card-cvc-element {
  padding: 4px 0;
  min-height: 40px;
}

.StripeElement {
  background-color: #fffef9;
  border: 2px inset #8b6b4a;
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
}

.StripeElement--focus {
  border-color: #6b4a2e;
  background-color: #fffff0;
}

.StripeElement--invalid {
  border-color: #8b0000;
}

#modal-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
