/* ============================================================
   ARTFRAMES — UNIFIED MASTER STYLESHEET 2025
   Supports both Catalog (grid) & Product (stacked) layouts
   ============================================================ */

/* ---------- GLOBAL BASE ---------- */
@charset "UTF-8";

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: #222;
  background-color: #fff;
}

h1, h2, h3 {
  text-align: center;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  color: #222;
}

p {
  text-align: center;
  margin: 0.4rem auto 0.8rem;
  max-width: 800px;
}

/* Center all headers and navigation */
header, footer {
  text-align: center;
  margin: 0 auto;
  max-width: 1100px;
}

header img {
  max-width: 260px;
  height: auto;
  margin: 0.5rem auto;
  display: block;
}

nav {
  font-size: 0.95rem;
  margin: 0.5rem 0;
}
nav a {
  color: #000;
  text-decoration: none;
  margin: 0 6px;
}
nav a:hover {
  text-decoration: underline;
}

/* ---------- VIEW CART BUTTON ---------- */
.view-cart {
  display: inline-block;
  background-color: #d4af37; /* gold */
  color: #000;
  padding: 10px 22px;
  margin: 1.5rem auto;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  transition: all 0.25s ease;
  text-align: center;
}
.view-cart:hover {
  background-color: #e3c04d;
  transform: scale(1.05);
}

/* ---------- CATALOG GRID (for Plein Air, Classic, Modern pages) ---------- */
body.pleinair-page main,
body.classic-page main,
body.modern-page main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto;
  width: 100%;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  justify-content: center;
  justify-items: center;
  align-items: start;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 10px;
}

.catalog-item {
  width: 220px;
  text-align: center;
}

.catalog-item img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 6px;
  padding: 4px;
  margin-bottom: 10px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.catalog-item img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.catalog-item h3 {
  font-size: 1rem;
  margin: 8px 0 4px;
  font-weight: 600;
}
.catalog-item p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.3;
}

/* ---------- PRODUCT PAGE (like wyethgold2, firenze2, etc.) ---------- */
body.product-page main {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 1rem;
}

/* Product intro text */
body.product-page .intro-text {
  line-height: 1.45;
  margin: 0.5rem auto 1.2rem;
  font-size: 1rem;
}

/* Delivery note */
body.product-page .delivery-text {
  font-style: italic;
  font-size: 0.95rem;
  color: #333;
}

/* Product gallery (main image) */
body.product-page .product-gallery img.main-frame {
  max-width: 600px;
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem auto;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Corner sample variants */
.variant-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin: 2rem auto;
}

.variant {
  width: 280px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1.2rem;
  background-color: #fafafa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.variant:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.variant h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.variant img.corner-sample {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin-bottom: 0.8rem;
  transition: transform 0.25s ease;
}
.variant img.corner-sample:hover {
  transform: scale(1.06);
}

/* --- Form controls --- */
.variant form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.variant input[type="text"],
.variant select {
  font-size: 0.9rem;
  padding: 6px;
  width: 180px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.variant select {
  margin-top: -2px; /* fine-tune upward alignment */
  margin-bottom: 4px;
}

.variant label {
  font-size: 0.9rem;
  line-height: 1.2;
}

.variant .add-to-cart {
  background-color: #d4af37;
  color: #000;
  font-weight: bold;
  padding: 8px 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 0.3rem; /* tighter alignment */
}
.variant .add-to-cart:hover {
  background-color: #e3c04d;
  transform: scale(1.05);
}

/* --- Custom size note link --- */
.variant .custom-size-note {
  font-size: 0.85rem;
  color: #333;
  text-decoration: none;
}
.variant .custom-size-note:hover {
  text-decoration: underline;
}

/* --- Related links --- */
.related {
  margin: 2rem auto;
  font-size: 0.95rem;
}

/* --- Footer --- */
footer p {
  font-size: 0.9rem;
  color: #333;
  margin: 0.4rem auto;
  line-height: 1.4;
}

/* ---------- RESPONSIVE BEHAVIOR ---------- */
@media (max-width: 1024px) {
  .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .variant-section {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .variant-section {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
  .variant {
    width: 95%;
  }
  header img {
    max-width: 200px;
  }
}

.view-cart {
  background-color: #d4af37 !important;  /* gold */
  color: #000 !important;                 /* black text */
  border: none !important;
  text-decoration: none !important;
}
.view-cart:hover {
  background-color: #e3c04d !important;
  color: #000 !important;
}

/* === LEGACY PAGE ALIGNMENT FIX (for older frame pages) === */
.gridContainer,
#LayoutDiv1,
#LayoutDiv2,
#LayoutDiv3,
#LayoutDiv4,
#LayoutDiv5,
#LayoutDiv6,
#LayoutDiv7 {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.gridContainer img {
  display: block;
  margin: 0.5rem auto;
}

/* ============================================================
   LEGACY PAGE SUPPORT (for old .gridContainer layouts)
   Keeps older frame pages centered like before
   ============================================================ */

.gridContainer,
.clearfix,
#LayoutDiv1,
#LayoutDiv2,
#LayoutDiv3,
#LayoutDiv4,
#LayoutDiv5,
#LayoutDiv6,
#LayoutDiv7 {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.gridContainer p,
.gridContainer h1,
.gridContainer h2,
.gridContainer h3,
.gridContainer h4 {
  text-align: center;
  margin: 0.4rem auto;
}

.gridContainer img {
  display: block;
  margin: 0.5rem auto;
  max-width: 95%;
  height: auto;
}

.gridContainer form {
  text-align: center;
  margin: 0.5rem auto;
}

.gridContainer input[type="text"],
.gridContainer select {
  font-size: 0.9rem;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin: 0.3rem 0;
}

.gridContainer input[type="submit"] {
  background-color: #d4af37;
  color: #000;
  font-weight: bold;
  padding: 8px 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.gridContainer input[type="submit"]:hover {
  background-color: #e3c04d;
  transform: scale(1.05);
}

/* ============================================================
   UNIVERSAL PAGE ALIGNMENT FIX
   Ensures all frame pages (new or old) stay centered
   ============================================================ */

body[class*="-page"] main,
body[class*="-page"] section,
body[class*="-page"] .variant-section {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

body[class*="-page"] .variant {
  display: inline-block;
  vertical-align: top;
  margin: 0 1rem 2rem;
  text-align: center;
}

body[class*="-page"] img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

