/* === Tournament items page === */
/* Auto-split from styles.css on refactor.
   File: pages/tournament.css
   NOTE: Review and adjust as needed. */

/* New styles to unify product cards and maintain bold/muted text */

/* Grid layout for all product sections */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  /* Space above and below each grid on the page */
  margin-bottom: 1rem;
}

/* Two-column grid on medium screens */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Single column on small screens */
@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* Card container */
.product-card {
  background-color: var(--surface, #fff);
  border: 2px solid var(--border, #e5e5e5);
  border-radius: var(--radius, 12px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Image area fills width and maintains aspect */
.product-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  border: 3px solid var(--border);

}

/* Details wrapper with padding */
.product-details {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Product title styling */
.product-details h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text, #222);
}

/* Quantity/description text is smaller and muted */
.quantityInfo {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-muted, #6b7280);
  margin: 0 0 0.5rem 0;
}

/* Price styling is bold and uses accent color */
.price {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.5rem 0;
  color: var(--accent, #007faf);
}

/* Product buttons container */
.product-buttons {
  margin-top: auto;
}

/* Ensure add-to-list/customize buttons inherit existing button styling */
.product-buttons .btn {
  width: 100%;
  display: inline-block;
}

/* === CUSTOM ITEMS PAGE === */
.custom-page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  padding: 32px 0;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.product-header select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

/* Use the same grid rules as for Player Packs */
.course-setup-products,
.safety-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(01, 1fr));
  gap: 1rem;
}

/* === Product Card Hover Effects === */
.product-list {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--thirdColor);
}

/* Slight zoom for images */
.product-item:hover .product-image img {
  transform: scale(1.05);
}

.product-image img {
  transition: transform 0.3s ease;
}

/* Subtle button color shift */
.product-buttons .btn:hover {
  background: var(--accentGradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 12px rgba(0, 91, 170, 0.25);
}

/* === Full Card Hover Effect === */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--thirdColor);
  box-shadow: 0 12px 24px rgba(0, 91, 170, 0.15);
}

/* Image zoom on hover (tied to card hover) */
.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* Optional: highlight text color on hover */
.product-card:hover h3 {
  color: var(--thirdColor);
  transition: color 0.3s ease;
}
/* smooth anchor jumps */
html {
  scroll-behavior: smooth;
}
/* allows Extras heading to be centered */
.product-header:has(#Extras) {
  display: block;
  text-align: center;
}

/* allows headings in seasonal section to be centerd*/
.seasonal-section .product-header {
  display: block;
  text-align: center;
}

/* allows headings in tournament section to be centerd */
.tournament-page-layout h2 {
  text-align: center;
}

/* spacing for spring tournament heading*/
.product-header:has(#spring) {
  margin-top: 4rem;
}
/* allows for spacing in between sections for seasonal events section */
.seasonal-section .product-grid {
  margin-bottom: 9rem;
}
/* offset targets so sticky header + subnav don't cover them */
.tournament-page-layout h2[id],
.tournament-page-layout h3[id] {
  scroll-margin-top: 140px; /* tune this value */
}

/* fine-tune for smaller screens if your bars get taller/shorter */
@media (max-width: 900px) {
  .tournament-page-layout h2[id],
  .tournament-page-layout h3[id] {
    scroll-margin-top: 152px;
  }
}
@media (max-width: 560px) {
  .tournament-page-layout h2[id],
  .tournament-page-layout h3[id] {
    scroll-margin-top: 168px;
  }
}

#logoutInline.btn.btn-box {
  color: var(--thirdColor) !important;
  border-color: var(--thirdColor);
  background: var(--lightgrey);
}

#logoutInline.btn.btn-box:hover {
  background: var(--thirdColor);
  color: #fff !important;
}

/* Tournament / Top strip */
.tournament-page-layout {
  display: block;
  padding-top: 16px;
}
#top {
  background: var(--thirdColor);
  padding: 10px 12px;
  border-radius: 10px;
  margin: 12px 0 8px;
}
#top label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  justify-content: flex-start;
}
#top input[type='text'],
#top input[type='search'] {
  flex: 1;
  min-width: 260px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Planning / In-page nav (consolidated) */
#planning {
  position: sticky;
  top: 64px; /* below header */
  z-index: 40;
  list-style: none;
  margin: 0 auto;
  padding: 15px 0;
  display: flex;
  justify-content: center;
  background: var(--accentGradient);
  overflow-x: auto;
  gap: 25px;
}

#planning li {
  margin: 0;
}

#planning a {
  text-decoration: none;
  font-weight: 600;
  color: var(--bg);
  padding: 8px 12px;
  transition: all 0.2s ease;
  border-radius: 2px;
  
}
#planning a:hover {
  background: var(--secondColor);
  color: var(--bg);
  transform: translateY(-7px);
  box-shadow: 0 7px 0 -2px #0052A3,
  0 15px 0 -4px #0066CC,
  0 16px 10px -3px #007AF5;
}

#planning a:active {
  transition: all 0.2s;
  transform: translateY(-5px);
  box-shadow: 0 2px 0 -2px #0052A3,
  0 8px 0 -4px #0066CC,
  0 12px 10px -3px #016f52;
}

#planning li a {
  display: block;
  color: var(--bg);
  text-align: center;
  text-decoration: none;
}

.icon img {
  width: var(--icon-size) !important;
  height: var(--icon-size) !important;
  max-width: 100%;
  max-height: 100%;
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* --- Ensure image never swallows the card --- */
.product-card {
  display: block;
} /* baseline */
.flip-front,
.flip-back {
  display: flex;
  flex-direction: column;
}

/* Constrain the image region to a predictable box */
.flip-front .product-image,
.flip-back .product-image {
  width: 100%;
  aspect-ratio: 4 / 3; /* keeps consistent tile shape */
  max-height: 180px; /* hard ceiling on tall screens */
  overflow: hidden;
  border-radius: 10px;
  margin: 0 0 0.75rem 0;
}
.flip-front .product-image img,
.flip-back .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* fill without distorting */
}

/* Details area becomes a column so the CTA can stick to the bottom */
.flip-front .product-details,
.flip-back .product-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 140px; /* space for title + price + button */
}

/* Always keep the action button visible */
.flip-front .product-details .show-details,
.flip-back .product-buttons {
  margin-top: auto; /* pin to bottom of the details column */
}

/* If you have faces without .product-details wrappers, still protect the button */
.flip-front .btn.show-details {
  margin-top: auto;
}

/* === FLIP CARD: force front/back separation & visibility === */
.product-card.flip-card {
  perspective: 1000px;
  display: flex;
  flex-direction: column;
}

.product-card.flip-card .flip-inner {
  position: relative;
  flex: 1;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  will-change: transform;
  min-height: 300px; /* ensures a visible card height */
}

.product-card.flip-card.flipped .flip-inner {
  transform: rotateY(180deg);
}

/* Take faces out of normal flow so they overlap */
.product-card.flip-card .flip-front,
.product-card.flip-card .flip-back {
  position: absolute !important; /* override any earlier layout rules */
  inset: 0 !important; /* top/right/bottom/left: 0 */
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1rem;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: auto; /* scroll if content taller than face */
}

/* Make sure only one face is visible at a time */
.product-card.flip-card .flip-front {
  transform: rotateY(0deg);
  z-index: 2;
}
.product-card.flip-card .flip-back {
  transform: rotateY(180deg);
  z-index: 1;
}

/* Keep images from swallowing the face and keep CTA visible */
.product-card.flip-card .product-image {
  width: 100%;
  aspect-ratio: 4/3;
  max-height: 180px;
  overflow: hidden;
  border-radius: 10px;
  margin: 0 0 0.75rem 0;
}
.product-card.flip-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card.flip-card .product-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 140px;
}
.product-card.flip-card .show-details,
.product-card.flip-card .product-buttons {
  margin-top: auto;
}
/* --- Match 'Back' button to Add to List style --- */
.btn.close-details {
  background: var(--lightgrey, #e5e5e5);  /* same tone used on Add to List */
  color: var(--text, #222);
  border: 1px solid var(--border, #ccc);
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn.close-details:hover {
  background: var(--thirdColor, #007faf); /* PDGA accent on hover */
  color: #fff;
  border-color: transparent;
}

/* --- Banner Fuctionality/Design --- */
.seasonal-section .product-title {
  font-family: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--secondColor);
  margin: 10px 0;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 133px;
  z-index: 100;
}

.seasonal-section .product-title h1 {
  font-size: 1.8rem;
  font-weight: normal;
  font-family: Arial, Helvetica, sans-serif;
  color: white;
  letter-spacing: 1px;
  scroll-margin-top: 140px;
}

body.logged-in #guestInfo {
  display: none !important;
}

.brand {
  font-size: 25px;
}

/* fade in */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

.site-header .search{
  padding-left: 30px;
}

.cart-logo {
  width: 25px;
  margin-left: -30px;
}

#cartCount {
  font-size: 20px;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}


.search {
  
}