@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/************ CSS Variables ************/
:root {
  --highlight-blue: #1739FD;
  --base-grey: #dddddd;
  --dark-border: #d6d6d6;
  --background-white: #fff;

  /************ Typography ************/
  --primary-font: "Poppins", sans-serif;
  --secondary-font: "Open Sans", sans-serif;
}

/* Asterisk wildcard selector to override default styles added by the browser */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--primary-font);
  background-color: var(--background-white);
  overflow-x: hidden;
}

.bg-white {
    background-color: #ffffff !important;
}

.bg-offwhite {
    background-color: #eeeeee !important;
}

.product-grid .card {
    background-color: white;
    border: none;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.product-grid .card-body {
    padding: 1rem;
}

.product-grid .card-footer {
    background-color: white;
}

.product-card {
  width: 100%;
  max-width: 360px;
  padding: 20px;
  margin: 0 auto;
}

.product-card-image {
    max-width: 320px;
    margin: 0 auto;
}

.product-card-padding {
    padding: 20px;
}

.image-swap-wrapper {
  position: relative;
  overflow: hidden;
}

.product-image {
  transition: opacity 0.4s ease;
  display: block;
}

.product-image.back {
  opacity: 0;
  z-index: 1;
}

.image-swap-wrapper:hover .product-image.back {
  opacity: 1;
}

.image-swap-wrapper:hover .product-image.front {
  opacity: 0;
}

.keyline {
  height: 32px;
  background-color: var(--highlight-blue);
}

.main-content {
  margin-top: 155px;
  min-height: calc(100vh - 155px - 32px - 400px);
}

.max-width-1600 {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.hero-section {
  background-image: url("/static/images/fitsix-banner.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 400px;
  width: 100vw;
  margin: 0;
  position: relative;
  padding-left: 3rem;
  padding-right: 3rem;
  z-index: 1;
}

.hero-inner {
  max-width: 1600px;
  margin: 0 auto;
}

.hero-section .btn {
  position: relative;
  z-index: 2;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

.hero-section > .container {
  position: relative;
  z-index: 2;
}

.custom-hero-padding {
  padding-left: 2rem; /* mobile */
}

@media (min-width: 768px) {
  .custom-hero-padding {
    padding-left: 4rem; /* tablet and up */
  }
}

@media (min-width: 1200px) {
  .custom-hero-padding {
    padding-left: 4rem; /* large screens */
  }
}

/* Category Tiles */

.category-tile {
  height: 438px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
}

/* .category-tile:hover {
  transform: scale(1.03);
} */

.category-tile .overlay {
  background-color: rgba(0, 0, 0, 0.2);
  height: 100%;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
  transition: background-color 0.3s ease;
}

.category-tile:hover .overlay {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Individual Background Images */
.apparel-tile {
  background-image: url('../images/fitsix-apparel.webp');
}

.supplements-tile {
  background-image: url('../images/fitsix-supplements.webp');
}

.accessories-tile {
  background-image: url('../images/fitsix-accessories.webp');
}

.classes-tile {
  background-image: url('../images/fitsix-classes.webp');
}

/* Products Grid */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  padding: 0;
  margin: 0;
  list-style: none;
  max-width: 100%;
  overflow-x: hidden;
}

/* Optional: Fix for consistent card height & layout polish */
.product-grid .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}


/* Footer */

.category-nav-wrapper {
  pointer-events: none;
}

.category-nav-wrapper ul {
  pointer-events: auto;
}



.newsletter-signup {
  background-color: var(--base-grey);
}

.newsletter-signup input[type="email"] {
  border-radius: 0;
}

.newsletter-signup .btn-primary {
  background-color: var(--highlight-blue);
  border: none;
}

.btn-narrow {
  width: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.btn-blue {
  background-color: var(--highlight-blue);
  color: white !important;
  border: none;
  border-radius: 4px;
  text-transform: uppercase;
}

.btn-blue:hover {
  background-color: #00118a;
}

.product-image-border {
  border: 1px solid var(--dark-border);
  border-radius: 4px;
  padding: 2px;
  background-color: var(--background-white);
}

.btt-button {
  height: 42px;
  width: 42px;
  position: fixed;
  bottom: 10px;
  right: 10px;
}

.btt-link,
.update-link,
.remove-item {
  cursor: pointer;
}

.btn-outline-black {
  background: white;
  color: black !important;
  border: 1px solid black;
}

.btn-outline-black:hover,
.btn-outline-black:active,
.btn-outline-black:focus {
  background: black;
  color: white !important;
}

.btn-grey {
  background-color: #6c757d;
  color: white;
  border: none;
}

.btn-grey:hover {
  background-color: #5a6268;
}

.badge {
  font-size: 0.75rem;
  padding: 4px 6px;
  z-index: 1000;
}

.filename-display {
    font-style: italic;
}

.btn-file {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn-file input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    font-size: 100px;
    text-align: right;
    opacity: 0;
    cursor: pointer;
    display: block;
}



/* footer */

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--highlight-blue);
  color: white;
  border-radius: 50%;
  font-size: 1.7rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none;
}

.social-icon:hover {
  background-color: #003399; /* Optional: Slightly darker blue */
  transform: scale(1.1);
}

.footer-logo {
  height: 120px;
  width: auto;
}

.footer-header {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--background-white);
}

.navlink,
.copyright-text {
  text-decoration: none;
  color: var(--background-white);
}

.navlink:hover,
.copyright-text:hover {
  color: var(--highlight-blue) !important;
}

.copyright-text {
  font-size: 14px;
  color: var(--background-white);
}

/* ------------------------------- bootstrap toasts */

.message-container {
  position: fixed;
  top: 72px;
  right: 15px;
  z-index: 99999999999;
}

.custom-toast {
  overflow: visible;
}

.toast-capper {
  height: 2px;
}

.arrow-up {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 10px solid black;
  position: absolute;
  top: -10px;
  right: 36px;
}

/* Toast arrow color variants */
.arrow-primary { border-bottom-color: #007bff !important; }
.arrow-secondary { border-bottom-color: #6c757d !important; }
.arrow-success { border-bottom-color: #28a745 !important; }
.arrow-danger { border-bottom-color: #dc3545 !important; }
.arrow-warning { border-bottom-color: #ffc107 !important; }
.arrow-info { border-bottom-color: #17a2b8 !important; }
.arrow-light { border-bottom-color: #f8f9fa !important; }
.arrow-dark { border-bottom-color: #343a40 !important; }

.bag-notification-wrapper {
  height: 100px;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ------------------- Allauth Form Styling (Fit Six Style) ------------------- */

.allauth-form-inner-content {
  font-family: var(--primary-font);
}

.allauth-form-inner-content p {
  margin-top: 1.5rem;
  color: #6c757d; /* Bootstrap's text-muted */
  font-size: 1rem;
  font-family: var(--secondary-font);
}

.allauth-form-inner-content input {
  border: 1px solid var(--dark-border);
  border-radius: 0;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-family: var(--primary-font);
}

.allauth-form-inner-content input::placeholder {
  color: #aab7c4;
}

.allauth-form-inner-content label:not([for='id_remember']) {
  display: none;
}

.allauth-form-inner-content label[for='id_remember'] {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: #333;
}

/* Fit Six Highlight Blue Buttons for Allauth */

.allauth-form-inner-content .button,
.allauth-form-inner-content a.button,
.allauth-form-inner-content .btn,
.allauth-form-inner-content [type="button"],
.allauth-form-inner-content [type="submit"],
.allauth-form-inner-content .element-button,
.allauth-form-inner-content .btn-primary,
.allauth-form-inner-content button {
  background-color: var(--highlight-blue);
  color: white !important;
  border: none;
  border-radius: 4px;
  font-family: var(--primary-font);
  font-weight: 500;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  display: inline-block;
  transition: background-color 0.2s ease-in-out;
}

.allauth-form-inner-content button:hover,
.allauth-form-inner-content input[type='submit']:hover,
.allauth-form-inner-content .btn:hover,
.allauth-form-inner-content .btn-primary:hover,
.allauth-form-inner-content a.button:hover {
  background-color: #00118a;
  color: white !important;
}

.allauth-form-inner-content .button:focus,
.allauth-form-inner-content a.button:focus,
.allauth-form-inner-content .btn:focus {
  outline: none;
  box-shadow: none;
}

/* Product Form */

.input-group-prepend .btn,
.input-group-append .btn {
    border: 1px solid var(--highlight-blue);
    background-color: var(--highlight-blue);
    color: white;
}

.btn-file {
    position: relative;
    overflow: hidden;
}

.btn-file input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    opacity: 0;
    cursor: pointer;
}

.custom-checkbox .custom-control-label::before {
    border-radius: 0;
    border-color: #dc3545;
}

.custom-checkbox .custom-control-input:checked~.custom-control-label::before {
    background-color: #dc3545;
    border-color: #dc3545;
    border-radius: 0;
}


/* 980px and up: 4 columns */
@media (min-width: 980px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Between 768px and 979px: 2 columns */
@media (min-width: 768px) and (max-width: 979px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Below 768px: 1 column (mobile) */
@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}


@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .mobile-bag-img {
    max-width: 120px;
    height: auto;
    display: block;
  }
}

@media (min-width: 768px) and (max-width: 992px) {
  .category-tile .overlay h3 {
    font-size: 0.9rem;
  }
}

@media (max-width: 430px) {
  .category-tile .overlay h3 {
    font-size: 1rem;
  }
}

@media (max-width: 575px) {
  .category-tile {
    height: 300px;
  }
}

@media (max-width: 430px) {
  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-section p {
    font-size: 1rem;       /* ~16px */
  }

  .hero-section .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 1110px) {
  .hero-inner h1 {
    font-size: 2.2rem;
    max-width: 18ch;
  }

  .hero-inner p.lead {
    font-size: 1rem;
    max-width: 26ch;
  }
}

@media (max-width: 430px) {
  .hero-inner {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 992px) {
  .hero-section {
    padding-top: 2rem !important; /* reduce from py-5 (3rem) if used */
    margin-top: -1.5rem; /* compensate for nav height visually */
  }
}
