/* ========================================
   TIDE CLEANERS - MAIN STYLESHEET
   ======================================== */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  --primary-color: #00269a;
  --secondary-color: #f04d24;
  --background-color: #f8f7f6;
  --text-color: #333;
  --border-radius: 7.5px;
  --transition-duration: 0.3s;
  --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}


/* ========================================
   GLOBAL STYLES
   ======================================== */
body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

/* General link styles */
a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
}

/* General button styles */
.button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: var(--border-radius);
  font-weight: bold;
  text-decoration: none;
  transition: background-color var(--transition-duration);
}

.button--primary {
  background-color: var(--primary-color);
  color: white;
  font-size: 24px;
}

.button--location {
  width: 175px;
  margin: 5px 0;
}

/* General image styles */
img {
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  display: block;
}

/* General container styles */
.container {
  position: relative;
  width: 100%;
  text-align: center;
  padding-top: 50px;
}

.grey-text {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.5rem;
}


/* ========================================
   APP STORE BUTTON STYLES
   ======================================== */
/* App store link container */
.app-store-link {
  margin-top: 30px;
  margin-bottom: 30px;
  text-align: center;
  display: flex;
  justify-content: center;
}

/* App store button links */
.app-store-link a {
  margin: 0 10px;
  display: inline-block;
}


/* ========================================
   INDEX PAGE STYLES
   ======================================== */
/* Main index page - centered layout */
body:not(.pricelist-page):not(.coupons-page) .container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 50px;
}

/* Main index page logo - 2x larger */
body:not(.pricelist-page):not(.coupons-page) .container > img {
  width: 650px;
  height: auto;
  max-width: 80%;
}

/* Main index page app store spacing */
body:not(.pricelist-page):not(.coupons-page) .app-store-link {
  margin-top: 25px;
}

/* Main index page location spacing */
body:not(.pricelist-page):not(.coupons-page) .location-links {
  margin-top: 5px;
}

.location-links {
  margin-top: 20px;
  font-size: clamp(18px, 4vw, 21px);
  font-weight: bold;
}

/* Make location links inline on desktop */
.location-links div {
  display: inline-block;
}


/* ========================================
   COUPONS PAGE STYLES
   ======================================== */
/* Coupons page body */
body.coupons-page {
  padding: 2rem;
}

h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.header-section {
  text-align: center;
  margin-bottom: 2rem;
}

.back-link {
  text-decoration: none;
}

.top-logo {
  margin: 0 auto 0.5rem;
  width: 300px;
}

/* Coupons grid */
.coupons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Individual coupon */
.coupon {
  border: 2px dashed #000;
  background: white;
  padding: 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  min-height: 200px;
}

.coupon-image {
  width: 240px;
  height: 240px;
  margin-left: 0.625rem;
  margin-right: 1.5rem;
  margin-top: -0.625rem;
  margin-bottom: -0.625rem;
  flex-shrink: 0;
  object-fit: contain;
}

.coupon-content {
  flex: 1;
}

.coupon .logo {
  font-weight: bold;
  font-size: 1.5rem;
  color: #0d4ba0;
}

.coupon .logo img {
  max-width: 100%;
  height: auto;
  width: 200px;
  margin: 0 auto;
  display: block;
}

.discount {
  color: #f04d24;
  font-size: 1.8rem;
  font-weight: bold;
  margin-top: 1rem;
}

.title {
  font-weight: bold;
  margin: 0.5rem 0;
}

.barcode {
  margin: 0.75rem auto;
  background-color: #eee;
  height: 60px;
  width: 180px;
  padding: 0 4px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  color: #888;
  overflow: hidden;
}

.barcode img {
  width: calc(100% - 8px);
  max-height: 100%;
  object-fit: contain;
}

.expires {
  font-size: 0.75rem;
  color: #888;
}

.fine-print {
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* Special coupon style */
.coupon.special {
  background-color: #fff0ec;
  border-color: #f04d24;
}

/* Coupons footer */
body.coupons-page .footer-section {
  margin: 2rem 0;
  text-align: center;
  color: #000;
  font-weight: normal;
  font-size: 0.8rem;
}


/* ========================================
   PRICELIST PAGE STYLES
   ======================================== */
.pricelist-page .logo {
  width: 250px;
  margin: 0 auto;
}

.logo-container {
  text-align: center;
}

body.pricelist-page {
  color: var(--primary-color);
}

.pricelist-container {
  max-width: 300px;
  margin: 2rem auto;
  padding: 1rem 1.5rem;
  background-color: #fff;
}

.pricelist-container h1 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.pricelist-table {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 1rem;
}

.pricelist-table td {
  padding: 0.5rem 0;
  border-bottom: 1px dotted #000;
  vertical-align: top;
}

.pricelist-table tr:last-child td {
  border-bottom: none;
  padding-top: 1.5rem;
}

.pricelist-table tr:nth-last-child(2) td {
  border-bottom: none;
}

.pricelist-item {
  text-align: left;
}

.pricelist-price {
  text-align: right;
  white-space: nowrap;
}

.pricelist-last-row {
  text-align: center;
}

.pricelist-no-border {
  border-bottom: none;
}

.pricelist-footer {
  height: 120px;
  background-color: #f04d24;
  text-align: center;
  color: white;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pricelist-footer a {
  color: white;
  text-decoration: underline;
}

.pricelist-footer a.footer-small {
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: normal;
}


/* ========================================
   LOCATION PAGE STYLES
   ======================================== */

/* Location page logo - only for location pages */
.container img[src*="../images/tide-stacked.png"] {
  margin: 0 auto;
  width: 350px !important;
  height: 350px !important;
}

.links {
  margin-top: 15px;
  text-align: center;
}

.links a {
  margin: 0 10px;
  font-size: 20px;
}

.buttons {
  margin-top: 15px;
  text-align: center;
}

.buttons a {
  margin: 0 10px;
  font-size: 20px;
}

.separator {
  color: #0d4ba0;
  font-size: 20px;
  font-weight: bold;
}

/* Location page text links - keep inline on desktop */
.text-links div {
  display: inline-block;
  margin: 0 5px;
}

/* Button styles - now handled by .button--location class */

.container .yelp-button {
  vertical-align: middle;
  height: 54px;
  width: 235px;
  display: inline-block;
}


/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Mobile styles for root index page */
@media (max-width: 768px) {
  .location-links {
    margin-left: 20px;
    margin-right: 20px;
  }
}

/* Mobile styles for all pages */
@media (max-width: 768px) {
  .app-store-link img {
    width: 126px;
    height: 37px;
  }
  
  /* Stack location links on mobile */
  .location-links div {
    display: block;
    margin: 5px 0;
  }
  
  /* Mobile coupon layout */
  .coupon {
    flex-direction: column;
    min-height: auto;
    padding: 1rem;
  }
  
  .coupon-image {
    width: 265px;
    height: 265px;
    margin: 0 auto 1rem;
  }
  
  .coupons {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }
  
  /* Hide separator on mobile for all pages */
  .separator {
    display: none !important;
  }
  
  /* Yelp button mobile styling */
  .container .yelp-button {
    height: 54px;
    width: 235px;
    display: inline-block;
  }

  /* Alternative approach - add margin to Yelp button */
  .container .yelp-button {
    margin-bottom: 30px !important;
  }
  
  /* Stack text links on mobile location pages */
  .text-links div {
    display: block;
    margin: 5px 0;
  }
}

/* Desktop styles for all pages */
@media (min-width: 769px) {
  .app-store-link img {
    width: 126px;
    height: 37px;
  }
  
  /* Add space between Yelp button and text links on desktop */
  .buttons + .text-links {
    margin-top: 25px;
  }
}
