:root {
  --primary: #2E3192; /* your navbar blue */
}

.error {
  font-weight: bold;
  color: #FF0000;
}
body {
  color: #000957;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  background-color: #b0b0b0;
  /* subtle paper-like texture using layered gradients */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.35) 1px, transparent 0),
    radial-gradient(circle at 3px 3px, rgba(0,0,0,0.04) 1px, transparent 0);
  background-size: 12px 12px;
  background-repeat: repeat;
  margin: 0;            /* no extra gap at top */
  padding-top: 60px;    /* space for the fixed navbar */
}

/* body tag we open in page_structure.php */
/* .site-body {
  background-color: #b0b0b0;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  color: #000957;
  margin: 0;
  padding-top: 48px; /* try 48; then tweak up/down if needed */
/*} */

.bgimage {
	max-width:450px;
	height:auto;
}


a:link {
	color:#000957;
	
}

a:visited {
	color:#36C;
}

a:hover {
	color:#6E2EA7;
}

.header {
  color:#000957;
}
.login {
  font-style: italic;
}

a {
	color: #000975;
	font-weight: bold;
}

.title {
  color:#000957;
  font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
  background-color:#b0b0b0;
  font-size:32px;
}

.nav {
  border: 1px solid;
  border-collapse:collapse;
  border-color: #2E3192;
  font-weight: bold;
  font-size: 18px;
  vertical-align: top;
  padding: 5px;
  text-align:right;
  width: 100%;
  overflow:hidden;
  position:fixed;
  top:0;
  left:0;
  z-index:1000;
}

.footer {
    color:#000957;
	
}
.pagetitle {
  color:#FFFFFF;
  font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
  background-color:black;
  font-size:18px;
}
.displaydb {
  color:#FFFFFF;
  font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
  background-color:black;
  font-size:10px;
}
.commenttitle {
  color:#FFFFFF;
  font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
  background-color:black;
  font-size:18px;
}

/* Navbar container */
.navbar {
  
  background-color: #2E3192;
  font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
  font-weight: bold;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  z-index:1000;
  overflow: visible;
}

/* Links inside the navbar */
.navbar a {
  float: left;
  font-size: 16px;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  background-color: inherit;
  border: none;
  outline: none;
  cursor: pointer;
}

/* The dropdown container */
.dropdown {
  float: left;
  overflow: visible;
  position: relative;
}

/* Dropdown button */
.dropdown .dropbtn {
  font-size: 16px;
  border: none;
  outline: none;
  color: white;
  padding: 14px 16px;
  background-color: inherit;
  font-weight: bold;
  font-family: inherit; /* Important for vertical align on mobile phones */
  margin: 0; /* Important for vertical align on mobile phones */
}

/* Add a red background color to navbar links on hover */
.navbar a:hover, .dropdown:hover .dropbtn {
  background-color:#662D91;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
  display: none;
  position: absolute;
  background-color:#662D91;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 2000;
}

/* Links inside the dropdown */
.dropdown-content a {
  float: none;
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

/* Add a grey background color to dropdown links on hover */
.dropdown-content a:hover {
  background-color: #2E3192;
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

.home-gallery {
    display: flex;
    align-items: stretch;
    gap: 10px;              
    overflow: hidden;
    height: 250px;      
    border: 0;    
  }
  .home-gallery img {
    height: 100%;
    width: auto;              
    border: 2px solid #000957;
    box-sizing: border-box;
    flex: 0 0 auto;          
  }
  
  /* Show the dropdown menu on hover (desktop) */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Show the dropdown menu on tap/focus (mobile Safari) */
.dropdown:focus-within .dropdown-content {
  display: block;
}

/* Make sure dropdown button can receive focus on tap */
.dropdown .dropbtn {
  cursor: pointer;
}



* { box-sizing: border-box; }

.container { max-width:1000px; margin:0 auto; padding:18px; }
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap:16px; }
.card .p { padding:12px; }
.price { color:var(--primary); font-weight:700; }
.btn { display:inline-block; padding:10px 14px; border-radius:10px; border:1px solid var(--primary); background:#fff; cursor:pointer; }
.btn.primary { background:var(--primary); color:#fff; border-color:var(--primary); }
.btn[disabled] { opacity:.5; cursor:not-allowed; }
.form-group { margin-bottom:12px; }
input[type="text"], input[type="number"], input[type="email"], textarea { width:100%; padding:8px 10px; border:1px solid #ddd; border-radius:8px; }

.notice { background:#eef6ff; border:1px solid #cfe1ff; color:#10305a; padding:10px 12px; border-radius:10px; }



/* A central wrapper for the main content area */
.main-content {
  max-width: 1100px;
  margin: 40px auto 60px;
  padding: 0 16px;
}

/* Style the art listing tables a bit more modern */
.main-content table {
  width: 100%;
  border-collapse: collapse;
  background: #d0d0d0; /* slightly darker gray to separate artwork */
  border-radius: 8px;
  overflow: hidden;
  color: #000957; /* your existing font color */
}

/* Header row — left aligned + darker background */
.main-content table th {
  text-align: left;         /* ← requested */
  padding: 12px 14px;
  background: #c0c0c0;      /* a bit darker than row color */
  font-weight: bold;
  font-size: 1.1em;
  border-bottom: 2px solid #a8a8a8;
}

/* Data cells */
.main-content table td {
  padding: 10px 12px;
  border-bottom: 1px solid #b8b8b8;
}

/* Zebra striping — darker but gentle */
.main-content table tr:nth-child(even) td {
  background-color: #c7c7c7;  /* muted mid-gray */
}

.main-content table tr:nth-child(odd) td {
  background-color: #d7d7d7;  /* slightly lighter */
}

/* Layout inside navbar */
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.nav-brand {
  color: white;
  font-weight: bold;
  font-size: 18px;
  text-decoration: none;
  padding: 14px 16px;
}

/* Hide the checkbox itself */
.nav-toggle {
  display: none;
}

/* Hamburger icon */
.nav-toggle-label {
  display: none; /* hidden on desktop */
  margin-left: auto;
  cursor: pointer;
  padding: 12px 10px;
}

.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 3px;
  background: white;
  margin: 4px 0;
}

/* Container for the links */
.nav-links {
  display: flex;
  margin-left: auto;
}

/* ------------ Mobile styles ------------ */
@media (max-width: 768px) {
  .nav-inner {
    flex-wrap: wrap;
  }

  /* Brand stays on the left, hamburger on the right */
  .nav-brand {
    padding: 12px 0;
  }

  .nav-toggle-label {
    display: block;
  }

  /* Stack links vertically on mobile */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .navbar a {
    float: none;
    text-align: left;
    width: 100%;
  }

  .dropdown {
    width: 100%;
  }

  .dropdown .dropbtn {
    width: 100%;
    text-align: left;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    min-width: 100%;
  }

  /* When hamburger is checked, show nav-links */
  .nav-toggle:checked ~ .nav-toggle-label + .nav-links {
    display: flex;
  }
   .nav-brand {
    padding: 10px 0;
    font-size: 16px;
    max-width: 150px; /* <-- keeps brand from hogging the line */
    overflow: hidden;
    white-space: nowrap;
  }

  .nav-toggle-label {
    padding: 10px 0;
  }
}

/* === Home page layout === */

.home-page {
  text-align: left;
}

/* Hero area */
.home-hero {
  background: #d7d7d7;              /* softer gray instead of white */
  border-radius: 12px;
  padding: 24px 24px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); /* lighter shadow, less “cardy” */
  margin-bottom: 24px;
}

.home-hero-text {
  max-width: 800px;
  margin: 0 auto;
}

.home-hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin: 0 0 8px;
  color: #334155;
}

.home-hero-title {
  font-size: 1.9rem;
  margin: 0 0 10px;
  color: #000957;
}

.home-hero-body {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 18px;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Reuse your existing .btn / .btn.primary styles */

/* Sections under hero */
.home-section {
  background: #cccccc;              /* closer to your table grays */
  border-radius: 10px;
  padding: 18px 18px 20px;
  margin-bottom: 20px;
}

.home-section-muted {
  background: #c2c2c2;              /* just a hair darker */
}

.home-section-title {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

/* Feature cards (Paintings / Drawings / Photography) */
.home-feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-feature-card {
  background: #e3e3e3;              /* soft gray, not white */
  border-radius: 8px;
  padding: 14px 14px 16px;
  border: 1px solid #b8b8b8;
}

.home-feature-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.home-feature-card p {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.home-link {
  font-weight: bold;
  text-decoration: none;
}

/* About text spacing */
.home-about-text {
  margin: 0 0 10px;
  font-size: 0.98rem;
  line-height: 1.6;
}

.page-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 15px;
}

/* Main page wrapper – replaces old table layout */
.page-body {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 20px 16px;
}

/* Optional header image container */
.header-image {
  text-align: center;
  margin-bottom: 20px;
}

/* Inner content wrapper – where each page's main content lives */
.page-inner {
  /* works nicely with .main-content; you can keep both */
}

/* If you want all main-content to never touch edges on mobile */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0 20px;
}

/* Home: “Explore the collection” layout */
.home-section {
  margin-top: 40px;
}

.home-section-title {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

/* Grid so cards share the same width in each row */
.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* Cards with a soft gray background instead of stark white */
.home-feature-card {
  background: #d8d8d8;          /* softer gray box */
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.home-feature-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.home-feature-card p {
  margin-top: 0;
  margin-bottom: 12px;
  line-height: 1.4;
}

.home-feature-card a {
  display: inline-block;
  font-weight: bold;
}

/* Subtle lift on cards */
.home-feature-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.18);
}

/* Layout for hero section: text + image */
.home-hero-layout {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Text block */
.home-hero-text {
  flex: 1 1 260px;
  max-width: 600px;
}

/* Image block */
.home-hero-image {
  flex: 0 0 260px;
  text-align: right;
}

.home-hero-image img {
  max-height: 320px;   /* controls how tall it gets */
  width: auto;         /* keep proportions */
  height: auto;
  border-radius: 12px;
  border: 2px solid #000957;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  object-fit: contain; /* ensures no distortion */
}

/* Stack nicely on phones */
@media (max-width: 768px) {
  .home-hero-layout {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-hero-image {
    text-align: left;
    max-width: 260px;
  }
}

/* Button hover feedback */
.btn {
  transition: background-color 0.15s ease, color 0.15s ease,
              box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}

.featured-img {
  height: 180px;          /* FIXED HEIGHT */
  width: auto;            /* NATURAL WIDTH */
  border: 2px solid #000957;
  object-fit: contain;    /* NEVER distort the artwork */
  box-shadow: 0 2px 4px rgba(0,0,0,0.22);
  border-radius: 10px;
}

.home-gallery img {
  margin-right: 10px;
}

.home-gallery img:last-child {
  margin-right: 0;
}

.home-featured-block {
  padding: 18px 24px 24px;
}

.art-filter {
  background: #d0d0d0;
  border-radius: 10px;
  padding: 12px 14px 10px;
  margin: 20px auto;
  max-width: 1100px;
  font-size: 0.95rem;
}

.art-filter-option {
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 6px;
  white-space: nowrap;
}

.art-filter-actions {
  margin-top: 8px;
}

.btn.small {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.price {
  color: #2E3192;
  font-weight: 700;
  font-size: 1.1em;
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #2E3192;
  background: #d7d7d7;
  color: #000957;
  font-weight: bold;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease,
              box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  background: #c7c7c7;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}

.btn.primary {
  background: #2E3192;
  color: #fff;
  border-color: #2E3192;
}

.btn.primary:hover {
  background: #662D91;
  border-color: #662D91;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.small {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* ----- Forms ----- */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: bold;
  color: #000957;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #b8b8b8;
  border-radius: 8px;
  background: #e8e8e8;
  color: #000957;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  font-size: 1em;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2E3192;
  background: #f0f0f0;
}

input[type="file"] {
  padding: 8px 0;
}

input[type="checkbox"] {
  margin-right: 6px;
}

small {
  display: block;
  margin-top: 4px;
  font-size: 0.85em;
  color: #666;
}

/* ----- Tables ----- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #d7d7d7;
  border-radius: 10px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #b8b8b8;
}

.table th {
  background: #c0c0c0;
  font-weight: bold;
  color: #000957;
}

.table tr:nth-child(even) td {
  background: #ccc;
}

.table tr:hover td {
  background: #c7c7c7;
}

.table tfoot td {
  background: #c0c0c0;
  font-weight: bold;
}

/* ----- Notices & Alerts ----- */
.notice {
  background: #d0e0f0;
  border: 1px solid #a0c0e0;
  color: #000957;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.notice.error,
.alert.error {
  background: #f0d0d0;
  border-color: #e0a0a0;
  color: #800;
}

.notice.success,
.alert.success {
  background: #d0f0d0;
  border-color: #a0e0a0;
  color: #060;
}

/* ----- Admin Layout ----- */
.admin.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ----- Dimension Input Grid ----- */
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .dimension-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ----- Packaging Details Card ----- */
.packaging-card {
  background: #c8d8e8;
  border: 1px solid #a0b8d0;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.packaging-card.warning {
  background: #e8e0c8;
  border-color: #d0c8a0;
}

.packaging-card.success {
  background: #c8e8d0;
  border-color: #a0d0b0;
}

.packaging-card h3 {
  margin: 0 0 16px 0;
  color: #000957;
  font-size: 1.1em;
}

.packaging-card h4 {
  margin: 16px 0 8px;
  font-size: 0.95em;
  color: #000957;
}

/* ----- Calculation Display Grid ----- */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.calc-item {
  background: #d7d7d7;
  border: 1px solid #b8b8b8;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

.calc-item .label {
  font-size: 0.75em;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calc-item .value {
  font-size: 1.3em;
  font-weight: bold;
  color: #000957;
  margin-top: 4px;
}

.calc-item .formula {
  font-size: 0.7em;
  color: #888;
  margin-top: 2px;
}

/* ----- Shipping Tier Comparison Table ----- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  margin-top: 12px;
  background: #d7d7d7;
  border-radius: 8px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #b8b8b8;
}

.comparison-table th {
  background: #c0c0c0;
  font-weight: 600;
  color: #000957;
}

.comparison-table tr.match {
  background: #b8e0c0;
}

.comparison-table tr.match td {
  background: #b8e0c0;
}

.comparison-table tr.no-match {
  opacity: 0.5;
}

.comparison-table .check {
  color: #060;
  font-weight: bold;
}

.comparison-table .x {
  color: #900;
}

/* ----- Shipping Result Box ----- */
.shipping-result {
  background: #2E3192;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1.1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.shipping-result.error {
  background: #996633;
}

.shipping-result .tier-name {
  opacity: 0.9;
  font-size: 0.9em;
  margin-left: 8px;
}

/* ----- Settings Grid (Admin Shipping Page) ----- */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

/* ----- Admin Cards ----- */
.admin-card {
  background: #d7d7d7;
  border: 1px solid #b8b8b8;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.admin-card h2 {
  margin: 0 0 12px 0;
  font-size: 1.2em;
  color: #000957;
  border-bottom: 1px solid #b8b8b8;
  padding-bottom: 8px;
}

/* ----- Tier Form Row ----- */
.tier-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  align-items: end;
}

.tier-row {
  background: #c8c8c8;
  border: 1px solid #b0b0b0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.tier-row.inactive {
  opacity: 0.5;
}

.tier-row input[type="text"],
.tier-row input[type="number"] {
  padding: 6px 8px;
  font-size: 0.9em;
}

/* ----- No Dimensions Message ----- */
.no-dimensions {
  color: #666;
  font-style: italic;
  padding: 20px;
  text-align: center;
}

/* ----- Checkout Form ----- */
.checkout-form {
  max-width: 500px;
}

.checkout-form h2 {
  color: #000957;
  font-size: 1.2em;
  margin: 24px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #b8b8b8;
}

.checkout-form h2:first-of-type {
  margin-top: 0;
}

.checkout-form label {
  display: block;
  margin: 12px 0 4px 0;
  font-weight: bold;
  color: #000957;
}

/* ----- Cart Shipping Info ----- */
.cart-shipping-note {
  font-size: 0.85em;
  color: #666;
}

.cart-shipping-tier {
  color: #666;
  font-size: 0.85em;
}

/* ----- Test Mode Banner ----- */
.test-mode-banner {
  background: #e8e0c8;
  color: #665500;
  padding: 6px 12px;
  border: 1px solid #d0c8a0;
  border-radius: 6px;
  display: inline-block;
  font-weight: bold;
  font-size: 0.85em;
  margin-bottom: 12px;
}

/* ----- Responsive Adjustments ----- */
@media (max-width: 768px) {
  .tier-form {
    grid-template-columns: 1fr 1fr;
  }
  
  .calc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .shipping-result {
    flex-direction: column;
    text-align: center;
  }
  
  .comparison-table {
    font-size: 0.8em;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 6px 4px;
  }
}

/* =====================================================
   STOREFRONT STYLES
   Add this to the bottom of your main style.css
   Uses your existing color palette and design language
   ===================================================== */

/* ----- Shop Sub-Navigation ----- */
.shop-subnav {
  margin-bottom: 20px;
  padding: 10px 0;
  border-bottom: 1px solid #b8b8b8;
}

.shop-subnav a {
  margin-right: 15px;
  font-weight: normal;
}

.shop-subnav a:hover {
  color: #662D91;
}

/* ----- Base Storefront Layout ----- */
.shop-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ----- Product Grid (Shop Page) ----- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  background: #d7d7d7;
  border: 1px solid #b8b8b8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.18);
}

.card a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #404040;
  height: 200px;
  overflow: hidden;
}

.card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.card .p {
  padding: 12px;
}

.price {
  color: #2E3192;
  font-weight: 700;
  font-size: 1.1em;
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #2E3192;
  background: #d7d7d7;
  color: #000957;
  font-weight: bold;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease,
              box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  background: #c7c7c7;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}

.btn.primary {
  background: #2E3192;
  color: #fff;
  border-color: #2E3192;
}

.btn.primary:hover {
  background: #662D91;
  border-color: #662D91;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.small {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* ----- Forms ----- */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: bold;
  color: #000957;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #b8b8b8;
  border-radius: 8px;
  background: #e8e8e8;
  color: #000957;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  font-size: 1em;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2E3192;
  background: #f0f0f0;
}

input[type="file"] {
  padding: 8px 0;
}

input[type="checkbox"] {
  margin-right: 6px;
}

small {
  display: block;
  margin-top: 4px;
  font-size: 0.85em;
  color: #666;
}

/* ----- Tables ----- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #d7d7d7;
  border-radius: 10px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #b8b8b8;
}

.table th {
  background: #c0c0c0;
  font-weight: bold;
  color: #000957;
}

.table tr:nth-child(even) td {
  background: #ccc;
}

.table tr:hover td {
  background: #c7c7c7;
}

.table tfoot td {
  background: #c0c0c0;
  font-weight: bold;
}

/* ----- Notices & Alerts ----- */
.notice {
  background: #d0e0f0;
  border: 1px solid #a0c0e0;
  color: #000957;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.notice.error,
.alert.error {
  background: #f0d0d0;
  border-color: #e0a0a0;
  color: #800;
}

.notice.success,
.alert.success {
  background: #d0f0d0;
  border-color: #a0e0a0;
  color: #060;
}

/* ----- Admin Layout ----- */
.admin.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ----- Dimension Input Grid ----- */
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .dimension-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ----- Packaging Details Card ----- */
.packaging-card {
  background: #c8d8e8;
  border: 1px solid #a0b8d0;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.packaging-card.warning {
  background: #e8e0c8;
  border-color: #d0c8a0;
}

.packaging-card.success {
  background: #c8e8d0;
  border-color: #a0d0b0;
}

.packaging-card h3 {
  margin: 0 0 16px 0;
  color: #000957;
  font-size: 1.1em;
}

.packaging-card h4 {
  margin: 16px 0 8px;
  font-size: 0.95em;
  color: #000957;
}

/* ----- Calculation Display Grid ----- */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.calc-item {
  background: #d7d7d7;
  border: 1px solid #b8b8b8;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

.calc-item .label {
  font-size: 0.75em;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calc-item .value {
  font-size: 1.3em;
  font-weight: bold;
  color: #000957;
  margin-top: 4px;
}

.calc-item .formula {
  font-size: 0.7em;
  color: #888;
  margin-top: 2px;
}

/* ----- Shipping Tier Comparison Table ----- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  margin-top: 12px;
  background: #d7d7d7;
  border-radius: 8px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #b8b8b8;
}

.comparison-table th {
  background: #c0c0c0;
  font-weight: 600;
  color: #000957;
}

.comparison-table tr.match {
  background: #b8e0c0;
}

.comparison-table tr.match td {
  background: #b8e0c0;
}

.comparison-table tr.no-match {
  opacity: 0.5;
}

.comparison-table .check {
  color: #060;
  font-weight: bold;
}

.comparison-table .x {
  color: #900;
}

/* ----- Shipping Result Box ----- */
.shipping-result {
  background: #2E3192;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1.1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.shipping-result.error {
  background: #996633;
}

.shipping-result .tier-name {
  opacity: 0.9;
  font-size: 0.9em;
  margin-left: 8px;
}

/* ----- Settings Grid (Admin Shipping Page) ----- */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

/* ----- Admin Cards ----- */
.admin-card {
  background: #d7d7d7;
  border: 1px solid #b8b8b8;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.admin-card h2 {
  margin: 0 0 12px 0;
  font-size: 1.2em;
  color: #000957;
  border-bottom: 1px solid #b8b8b8;
  padding-bottom: 8px;
}

/* ----- Tier Form Row ----- */
.tier-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  align-items: end;
}

.tier-row {
  background: #c8c8c8;
  border: 1px solid #b0b0b0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.tier-row.inactive {
  opacity: 0.5;
}

.tier-row input[type="text"],
.tier-row input[type="number"] {
  padding: 6px 8px;
  font-size: 0.9em;
}

/* ----- No Dimensions Message ----- */
.no-dimensions {
  color: #666;
  font-style: italic;
  padding: 20px;
  text-align: center;
}

/* ----- Checkout Form ----- */
.checkout-form {
  max-width: 500px;
}

.checkout-form h2 {
  color: #000957;
  font-size: 1.2em;
  margin: 24px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #b8b8b8;
}

.checkout-form h2:first-of-type {
  margin-top: 0;
}

.checkout-form label {
  display: block;
  margin: 12px 0 4px 0;
  font-weight: bold;
  color: #000957;
}

/* ----- Cart Shipping Info ----- */
.cart-shipping-note {
  font-size: 0.85em;
  color: #666;
}

.cart-shipping-tier {
  color: #666;
  font-size: 0.85em;
}

/* ----- Test Mode Banner ----- */
.test-mode-banner {
  background: #e8e0c8;
  color: #665500;
  padding: 6px 12px;
  border: 1px solid #d0c8a0;
  border-radius: 6px;
  display: inline-block;
  font-weight: bold;
  font-size: 0.85em;
  margin-bottom: 12px;
}

/* ----- Admin Order Detail Styles ----- */
.order-detail { 
  display: grid; 
  grid-template-columns: 2fr 1fr; 
  gap: 20px; 
}

.order-section { 
  background: #d7d7d7; 
  border: 1px solid #b8b8b8; 
  border-radius: 10px; 
  padding: 16px; 
  margin-bottom: 16px; 
}

.order-section h3 { 
  margin: 0 0 12px 0; 
  color: #000957; 
  border-bottom: 1px solid #b8b8b8; 
  padding-bottom: 8px; 
}

.status-badge { 
  display: inline-block; 
  padding: 4px 10px; 
  border-radius: 6px; 
  font-size: 0.85em; 
  font-weight: bold; 
  text-transform: uppercase; 
}

.status-paid { background: #c8e8d0; color: #166534; }
.status-shipped { background: #bfdbfe; color: #1e40af; }
.status-delivered { background: #d4edda; color: #155724; }
.status-cancelled { background: #f0d0d0; color: #800; }

.item-row { 
  display: flex; 
  gap: 12px; 
  padding: 10px 0; 
  border-bottom: 1px solid #b8b8b8; 
}

.item-row:last-child { 
  border-bottom: none; 
}

.item-image { 
  width: 60px; 
  height: 60px; 
  object-fit: cover; 
  border-radius: 6px; 
}

.item-details { 
  flex: 1; 
}

.tracking-icon { 
  color: #666; 
  font-size: 0.85em; 
}

/* ----- Responsive Adjustments ----- */
@media (max-width: 768px) {
  .tier-form {
    grid-template-columns: 1fr 1fr;
  }
  
  .calc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .shipping-result {
    flex-direction: column;
    text-align: center;
  }
  
  .comparison-table {
    font-size: 0.8em;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 6px 4px;
  }
}