/* cards-custom.css */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Long+Cang&family=Oooh+Baby&display=swap');

/* Custom variables */
:root {
  --primary: #00609D;
  --secondary: #FF5A5E;
  --tertiary: #001A2E;
  --logo: #002d6e;
  --background: #EFEFEF;
  --text-light: #FFFFFF;
  --text-grey: #999999;

  --primary-200: #99d8ff;
  --primary-300: #66c4ff;
  --primary-400: #33b1ff;
  --primary-500: #009dff;
  --primary-600: #007ecc;
  --primary-700: #005e99;
  --primary-800: #003f66;
  --secondary-200: #ff999b;
  --secondary-300: #ff6669;
  --secondary-400: #ff3336;
  --secondary-500: #ff0004;
  --secondary-600: #cc0003;
  --secondary-700: #990003;
  --secondary-800: #660002;
  --tertiary-200: #99d3ff;
  --tertiary-300: #66bdff;
  --tertiary-400: #33a7ff;
  --tertiary-500: #0091ff;
  --tertiary-600: #0074cc;
  --tertiary-700: #005799;
  --tertiary-800: #003a66;
  
  --pico-font-family: 'Inter', system-ui, -apple-system, "Segoe UI", "Ubuntu", "Cantarell", "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-family-decorative: 'Oooh Baby', cursive;
  --font-family-numeric: 'DM Mono', monospace;
  --font-family-handwritten: 'Long Cang', cursive;
  --border-width: 12px;
  --border-color: #E0E0E0;
  --spacing: 1rem;
}
.test-frame{
  border: #FF5A5E dotted 1px;
}
.test-helper{
  display: block;
  position: absolute;
  color: var(--text-grey);
  font-size: 0.75rem;
}
body {
  width: 100%;
  /*max-width: 1200px;*/
  margin: 0 auto;
  padding-top: 128px;
  height: 100%;
  overflow-y: auto;
}
body > header {
  padding-block: 0;
}

body > main {
  padding-top: 1rem;
  background-color: var(--primary);
}

/* Hidden Elements */
.hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}
em.no-break {
  white-space: nowrap;
  font-style: normal;
}
.no-break {
  white-space: nowrap;
}



/*******************
********************
** Navigation bar **
********************
*******************/
.nav {
  background-color: var(--tertiary);
  height: 128px;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.nav .nav-logo strong {
  font-weight: bold;
}

label.nav-toggle, input.nav-checkbox { 
  display: none;
}

.nav-menu, nav ul:last-of-type {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 100%;
  margin-left: auto;
}

.nav-menu li { 
  display: block;
  margin: 0 15px;
}

.nav-menu li a {
  color: var(--text-light);
  text-decoration: none;
}

.nav-menu .nav-submenu {
  display: none;
  position: absolute;
  background-color: #ffffff;
  padding: 10px;
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
  z-index: 1;
  top: var(--block-spacing-vertical);
  right: 10%;
  flex-direction: column;
}

.nav-menu .nav-submenu li {
  padding: 8px 16px;
}

.nav-menu > li:hover .nav-submenu {
  display: flex;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo a {
  display: flex;
  align-items: center;
  color: var(--text-light);
  font-weight: bold;
  text-decoration: none;
  font-size: 1.5rem;
}

.nav-logo a::before {
  content: "";
  background-image: url('../assets/IMG_4937.PNG');
  background-size: contain;
  width: 80px;
  height: 80px;
  margin-right: 10px;
}

/* Hero Section */
main.container-fluid:has(> section.hero-message) {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
}

main.container-fluid > section.hero-message {
  margin: 0;
}

.hero-message {
  width: 100%;
  margin-top: 0;
  padding: 1rem 0;
  background-color: var(--background);
}
.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-message p {
  text-align: center;
  font-size: 1.25rem;
  /* DELETEME: font-weight: bold;*/
  position: relative;
  margin-bottom: 0;
}

#hero-heading h1{
  text-align: center;
}



/***********************
************************
** Home Page Content **
************************
***********************/



main#home button.primary {
  background-color: var(--secondary);
  color: var(--text-light);
  border-color: var(--secondary);
  border-radius: 0.6rem;
  font-size: 1.25rem;
  padding: initial;
  height: 3rem;
  width: 10rem;
}
main#home button.primary:hover {
  background-color: var(--secondary-300);
}
main#home button.outline {
  color: var(--text-light);
  border: var(--text-light) solid 2px;
  border-radius: 0.6rem;
  font-size: 1.25rem;
  padding: initial;
  height: 3rem;
  width: 10rem;
}
main#home button.outline:hover {
  background-color: var(--primary-600);
}

/* Hero Section */
section#hero {
  margin-bottom: 0;
}

div#main-hero-img {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

div#main-hero-img figure {
  margin: 0;
  display: flex;
  align-items: flex-end;
  height: 100%;
}
div#main-hero {
  padding: 6rem 0.5rem 4rem 0;
}
#main-hero .counter-container {
  text-align: right;
  margin-bottom: 1rem;
  color: var(--text-light);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.125rem;
}

#main-hero #counter-value {
  font-family: var(--font-family-numeric);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 1.75rem;
}

.counter-label {
  white-space: nowrap;
}

/* Rolling digits styles */
.digit-roller {
  display: inline-block;
  height: 1.75rem;
  overflow: hidden;
  position: relative;
  width: 0.625rem;
  line-height: 1.75rem;
  text-align: center;
}

.digit-strip {
  position: relative;
}

.digit-comma {
  margin: 0;
}
div#main-hero h1 {
  color: var(--text-light);
  font-size: 3rem;
  font-weight: 800;
  text-align: end;
}
div#main-hero h1 span.cursive-title {
  font-family: var(--font-family-decorative);
  font-weight: bold;
  font-size: 4rem;
}
div#main-hero p {
  color: var(--text-light);
  font-size: 1.25rem;
  text-align: end;
  margin-top: 1rem;
  margin-bottom: 2.25rem;
}

div#main-hero-btns {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem; 
}
/* Home - Categories Section */
section#home-categories {
  background-color: var(--tertiary);
  color: var(--text-light);
  margin: 0;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

section#home-categories h2 {
  font-size: 2rem;
  color: var(--text-light);
  text-align: center;
}
section#home-categories p {
  font-size: 1rem;
  margin-bottom: 1rem;
}
div#home-categories-title {
  padding: 3rem 0 1rem;
}
swiper-container {
  width: 100%;
  height: 100%;
}

swiper-slide {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
div#home-categories-swiper article{
  background-color: var(--primary);
  padding: 0;
  border: var(--tertiary-800) solid 1px;
  border-radius: 1.5rem;
  /* DELETEME: box-shadow: 4px 4px 4px var(--tertiary-800);*/
}
div#home-categories-swiper article a {
  text-decoration: none;
}
div#home-categories-swiper article a img {
  margin: 0;
  padding: 0;
  width: 100%;
  border-radius: 0.75rem 0.75rem 0 0;
}
div#home-categories-swiper article a header {
  padding: 0;
  color: var(--text-light);
}
div#home-categories-swiper article a h3 {
  display: grid;
  align-items: center;
  height: 4.5rem;
  line-height: 1.5rem;
  color: var(--text-light);
  text-align: center;
  padding: 1rem 0.25rem;
  margin: 0;
  font-size: 1.5rem;
}
div#home-categories-btns {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}
div#home-categories-btns p {
  color: var(--text-light);
  font-style: italic;
  display: inline-block;
  margin: 0.5rem;
}
div#home-categories-text {
  margin: 2rem auto 0;
}
div#home-categories-text p {
  color: var(--text-light);
  font-size: 1.5rem;
  text-align: center;
}

/* Home - How It Works Section */
section#home-how-it-works {
  margin-bottom: 0;
  padding: 4rem 0 3rem;
  background-color: var(--pico-background-color);
}
div#home-how-it-works-title h2 {
  color: var(--tertiary);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0;
}
div#home-how-it-works-title span {
  color: var(--primary);
  font-family: var(--font-family-decorative);
  font-weight: bold;
  font-size: 3rem;
}
section#home-how-it-works p {
  font-size: 1.5rem;
  text-align: center;
} 
div#home-how-it-works-img figure {
  position: absolute;
  z-index: 1;
  margin: 2rem 10rem 0 10rem;
}
div#home-how-it-works-caption {
  margin: 1rem 4rem;
  background-image: url("../assets/how-it-works-line.png");
  background-size: 70%;
  background-position: center;
  background-position-y: 3rem;
}
figure.home-how-it-works-img-small {
  display: block;
  max-width: 6rem;
  margin: 0 auto 1rem;
  z-index: 2;
}
div#home-how-it-works-caption h3{
  display: grid;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0.5rem;
}
div#home-how-it-works-caption p {
  /*DELETEME: color: var(--text-light);*/
  font-size: 1rem;
  text-align: center;
  max-width: 15rem;
  margin: auto auto 0.5rem;
}
div#home-how-it-works-summary {
  padding: 0 5rem;
}
div#home-how-it-works-summary p:nth-child(2) {
  font-size: 1rem;
}

/* Home - Best Cards Section */
section#home-best-cards {
  background-color: var(--tertiary);
  padding: 4rem 3rem 2rem;
  color: var(--text-light);
  margin-bottom: 0;
}
#home-best-cards-title-small {
  display: none;
}
#home-best-cards-title-small h2, #home-best-cards-title-small p {
  color: var(--text-light);
}
#home-best-cards-img {
  padding: 0 2rem 2rem;
  
}
#home-best-cards-img figure {
  background-image: url("../assets/postcard-envelope-bkg.png");
  background-size: contain;
}
#home-best-cards-img .glide {
  padding-top: 6%;
}
#home-best-cards-img .glide__slide {
  padding-left: 1.5rem;
}
#home-best-cards-img ul li.glide__slide {
  list-style: none;
}
#home-best-cards-msg {
  padding: 2rem 2rem 0 0;
}
#home-best-cards-msg h2 {
  color: var(--text-light);
  font-size: 2.5rem;
}
#home-best-cards-msg p {
  color: var(--text-light);
  max-width: 23rem;
}
#home-best-cards-msg button {
  margin-top: 1.5rem;
}

/* Home - Real Pen Section */
section#home-real-pen {
  padding: 1rem 3rem 3rem;
  background-color: var(--tertiary);
  margin-bottom: 0;
}
section#home-real-pen div.grid {
  margin: 0 2rem;
}

div#home-real-pen-title h2 {
  color: var(--text-light);
  font-size: 2.5rem;
  text-align: left;
}
section#home-real-pen p {
  color: var(--text-light);
  text-align: left;
  padding-right: 1rem;
  max-width: 26rem;
} 
#home-real-pen-msg button {
  margin-top: 1.5rem;
}
#home-real-pen-msg-small {
  margin-top: 1rem;
  display: none;
}

/* Home - Partners Section */
section#home-partners {
  padding: 3rem 0;
  background-color: var(--text-light);
  margin-bottom: 0;
}
#home-partner-title h2 {
  font-size: 1.5rem;
  font-weight: normal;
  text-align: center;
  color: var(--primary);
  margin: 0;
}
#home-partner-img figure {
  width:30rem;
  max-width: 65%;
  align-content: center;
  margin: -1rem auto -2rem;
}

/* Home - Gift Cards Section */
section#home-gift-cards {
  margin-bottom: 0;
  padding: 5rem 0;
  background-color: var(--tertiary);
}
#home-gift-cards-title h2 {
  color: var(--text-light);
  text-align: center;
  margin: 0 0 1rem;
  font-size: 2.5rem;
}
#home-gift-cards-title p {
  color: var(--text-light);
  text-align: center;
}
#home-gift-cards-img {
  width: 65%;
  margin: 3rem auto 1rem;
}
.gift-card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem !important;
  justify-content: center;
  max-width: 50rem;
  margin: auto;
}
.gift-card-grid figure:nth-child(-n+3) {
  grid-column: span 2;
}
.gift-card-grid figure:nth-child(4) {
  grid-column: 2 / span 2;
}
.gift-card-grid figure:nth-child(5) {
  grid-column: 4 / span 2;
}
.gift-card-grid figure img {
  width: 15rem;
  height: auto;
  object-fit: cover;
}

/* Home - Testimonials Section */
section#home-testimonials {
  padding: 4rem 0 3rem;
  background-color: var(--primary);
  margin-bottom: 0;
}
#home-testimonials-title h2 {
  color: var(--text-light);
  text-align: center;
  margin: 1rem 0 -1rem;
  font-size: 2.5rem;
}
div.home-testimonials-carousel {
  margin: 3rem 5rem 1rem;
}
.home-testimonials-carousel ul li.glide__slide {
  list-style: none;
}
.testimonial {
  width: 65%;
  min-width: 300px;
  margin: 0 auto;
  padding: 1rem;
  text-align: center;
}
.testimonial figure img {
  width: 10rem;
  height: auto;
  max-width: 50%;
  margin: 0 auto 1rem;
}
.testimonial-msg {
  font-weight: bold;
  font-size: 1.25rem;
  color: var(--text-light);
  margin: 1rem 0;
}
.testimonial-profile {
  display: flex;
  align-items: center;
  justify-content: center;
}
.testimonial-profile figure {
  padding-right: 0;
}
.testimonial-profile figure img {
  width: 100px;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  margin: auto -0.5rem;
}
.testimonial-user {
  text-align: left;
  color: var(--text-light);
}
.testimonial-username {
  font-weight: bold;
  color: var(--text-light);
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}
.testimonial-usercity {
  color: var(--text-light);
  font-size: 0.75rem;
  margin: 0;
  padding-left: 0.75rem;
}
.testimonial-usercity {
  display: flex;
  align-items: center;
}
.glide__bullets {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
}
.glide__bullet {
  width: 0.875rem;
  height: 0.875rem;
  background-color: var(--border-color);
  border: none;
  border-radius: 50%;
  margin: 0 5px;
  padding: 0;
  opacity: 0.5;
  cursor: pointer;
  transition: all 0.3s ease;
}
.glide__bullet:hover,
.glide__bullet:focus {
  opacity: 1;
  border: none;
}
.glide__bullet:target {
  border: none
}
.glide__bullet--active {
  background-color: var(--secondary);
  opacity: 1;
  border: none;
}
/* Home - AI Features Section */
section#home-ai-features {
  padding: 5rem 0;
  background-color: var(--text-light);
  margin-bottom: 0;
}
#home-ai-features-title h2 {
  color: var(--tertiary);
  text-align: center;
  margin: 0 0 1rem;
  font-size: 2.5rem;
}
#home-ai-features-msg {
  color: var(--tertiary);
  text-align: center;
  margin: 0 0 1rem;
  font-size: 1.5rem;
}
#home-ai-features-msg span {
  font-family: var(--font-family-decorative);
  font-weight: bold;
  font-size: 1.75rem;
  margin: 1rem auto 1.5rem;
  display: inline-block;
}
#home-ai-features-btn {
  margin: 1rem auto 0;
  display: flex;
  justify-content: center;
}

/* Home - Contact Section */
section#home-contact {
  padding: 4rem 0;
  background-color: var(--tertiary);
  margin-bottom: 0;
}
#home-contact-title h2 {
  color: var(--text-light);
  text-align: center;
  margin: 0 0 1rem;
  font-size: 2.5rem;
}
#home-contact-msg p {
  color: var(--text-light);  
  text-align: center;
  margin: 0 3rem 0.5rem;
  font-size: 1.25rem;
}
#home-contact-btn {
  margin: 3rem auto 0;
  display: flex;
  justify-content: center;
}
#home-contact-btn button.outline {
  color: var(--text-light);
  border-radius: 1rem;
  border: var(--text-light) solid 2px;
}
#contact-form-container {
  margin: 1rem 6rem;
}
#contact-form-container label, #contact-form-container h3 {
  color: var(--text-light);
}
#contact-form-container textarea {
  min-height: 9rem;  
}


/* Home - FAQ Section */
section#home-faq {
  padding: 3rem 0;
  background-color: var(--primary);
  margin-bottom: 0;
}
#home-faq-title h2 {
  color: var(--text-light);
  text-align: center;
  margin: 0 0 1rem;
  font-size: 2.5rem;
}
#home-faq-accordion {
  margin: 0 3rem 0;
}
#home-faq-accordion summary {
  color: var(--text-light);
}
#home-faq-accordion p {
  color: var(--text-light);
  padding-left: 1rem;
}

/* User Profile Dialog */
.user-profile-dialog {
  position: fixed;
  top: 128px;
  right: 0;
  width: 20rem;
  height: auto;
  padding: 1rem;
  border: none;
  border-radius: 0.5rem 0 0 0.5rem;
  background-color: var(--tertiary);
  transform: translateX(20rem);
  transition: transform 0.3s ease-in-out;
  margin: 0;
}

.user-profile-dialog.dialog-visible {
  transform: translateX(0);
}

.dialog-content {
  color: var(--text-light);
}

.dialog-content h2 {
  color: var(--text-light);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.dialog-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dialog-option {
  color: var(--text-light);
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
}

.dialog-option:hover {
  background-color: var(--primary);
}

/* Home - Footer Section */
footer#home-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  background-color: var(--tertiary);
}
#home-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  margin-bottom: 1rem;
}
footer#home-footer nav ul li {
  margin: 0 0.5rem;
}
#home-footer a{
  color: var(--text-light);
}
#home-footer p {
  color: var(--text-light);
}





/*************************
**************************
 ** Card Selection Page **
**************************
*************************/
#card-selection {
  background-color: var(--tertiary);
}

#card-selection-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 2rem 1rem;
}

#card-selection-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

#card-selection-title h1 {
  color: var(--text-light);
  font-size: 2rem;
  margin-bottom: 2rem;
  line-height: 1.4;
}

#card-selection-title span {
  color: var(--primary);
}

#card-selection-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

#card-selection-buttons button.primary {
  background-color: var(--secondary);
  color: var(--text-light);
  border-color: var(--secondary);
  border-radius: 0.6rem;
  font-size: 1.25rem;
  padding: initial;
  height: 3rem;
  width: 10rem;
}
#card-selection-buttons button.primary:hover {
  background-color: var(--secondary-300);
}

.or-divider {
  color: var(--text-light);
  font-weight: 500;
}

#card-selection-preview {
  width: 100%;
  height: 300px;
  background-color: var(--background-alt);
  border-radius: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
}








/***********************
************************
 ** Card Detail Page **
************************
***********************/


/* Card Detail Section */
.card-detail {
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto;
  background-color: var(--tertiary);
  padding: 2rem;
  border-radius: 10px;
}

.card-detail .container {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 2rem;
}

.card-info {
  color: var(--text-light);
}

.card-info h1 {
  color: var(--text-light);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card-info p {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.card-info .category {
  font-size: 0.9rem;
  opacity: 0.8;
}

.write-note {
  background-color: var(--secondary);
  color: var(--text-light);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
  height: 3.75rem;
  /*margin-bottom: 0.75rem;*/
}
.write-note:hover {
  background-color: #ff7a7d;
}

.card-images {
  flex: flex;
  flex-direction: column;
}

.main-image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}
figure#main-image {
  margin-bottom: 1rem;
}

figure#main-image img {
  width: 100%;
  aspect-ratio: 7 / 5;
  object-fit: cover;
  border-radius: 10px;
/*  margin-bottom: 1rem;*/
}
.thumbnails {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.thumbnails img {
  width: 100%;
  aspect-ratio: 7 / 5;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.3 ease;
}

.thumbnails img:hover {
  opacity: 0.8;
}

/* Write Note Options */
.write-note-options {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 2rem 0;
}

.write-note-options h2 {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.write-note-options p {
  color: var(--text-light);
  margin-bottom: 2.5rem;
}

.write-note-options .grid {
  gap: 1rem;
}

.write-note-options button.primary, .write-note-section button.primary {
  background-color: var(--secondary);
  color: var(--text-light);
}

.write-note-options button.outline {
  color: var(--text-light);
  border-color: var(--text-light);
}

/* Ai Note Section */
.ai-note-section {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 2rem 0;
  transition: 
    opacity 0.3s ease,
    max-height 0.3s ease,
    margin 0.3s ease,
    padding 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
.ai-note-section.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}
button.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.ai-note-section.visible {
  max-height: 2000px;
  opacity: 1;
  padding: 2rem 0;
  overflow: visible;
}

.ai-note-section h2 {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.ai-note-section p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.ai-note-section textarea {
  width: 100%;
  height: 150px;
  margin-bottom: 1rem;
}

.ai-note-section #ai-generated-note {
  height: 300px;
}

.ai-note-section .helper-text {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.ai-note-section button.primary {
  background-color: var(--secondary);
  color: var(--text-light);
  margin-top: 0.5rem;
  margin-bottom: 3rem;
}

.ai-note-section button.primary:hover {
  background-color: #ff7a7d;
}

/* Write Note Section */
.write-note-section {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 2rem 0;
  transition: 
    opacity 0.3s ease,
    max-height 0.3s ease,
    margin 0.3s ease,
    padding 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.write-note-section.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.write-note-section.visible {
  max-height: 2000px;
  opacity: 1;
  overflow: visible;
}

.write-note-section h2 {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.write-note-section p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.write-note-section textarea {
  width: 100%;
  height: 450px;
  margin-bottom: 1rem;
}

.helper-text {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Mailing Info Button */
.mailing-info-section {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 2rem 0;
  transition: 
    opacity 0.3s ease,
    max-height 0.3s ease,
    margin 0.3s ease,
    padding 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
.mailing-info-section.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.mailing-info-section.visible {
  max-height: 2000px;
  opacity: 1;
  overflow: visible;
}

.mailing-info-section button.primary {
  background-color: var(--secondary);
  color: var(--text-light);
  margin-top: 0.5rem;
  margin-bottom: 3rem;
}

.mailing-info-section button.primary:hover {
  background-color: #ff7a7d;
}

/* Mailing Info Modal Styles */
dialog#mailing-info-modal article {
  max-width: 1200px;
  width: 67%;
  border-radius: 10px;
  border: none;
}

#mailing-info-modal button.primary {
  background-color: var(--secondary);
    color: var(--text-light);
}

#mailing-info-modal button.primary:hover {
  background-color: #ff7a7d;
}

#mailing-info-modal .saved-addresses-container {
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
}
#mailing-info-modal .saved-addresses-container select {
  margin-bottom: 0;
}
/* Address carousel styles */
#mailing-info-modal .saved-addresses {
  margin: 0.5rem 3%;
  padding: 0.5rem 0;
  width: 94%;
  border-bottom: 1px solid var(--border-color);
}
.saved-address-buttons { /* TODO: check if this is needed */
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.address-btn { /* TODO: check if this is needed */
  background-color: #e9ecef;
  color: #212529;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 2.5rem;
}
.address-btn:hover { /* TODO: check if this is needed */
  background-color: #dee2e6;
  border-color: #adb5bd;
}
.address-btn.active { /* TODO: check if this is needed */
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}
.save-address-container { /* TODO: check if this is needed */
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
}
/* Address card styles */
#mailing-info-modal .address-card {
  width: 250px;
  padding: 1rem;
  margin-right: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}
#mailing-info-modal .address-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
#mailing-info-modal .address-alias {
  font-weight: bold;
  margin-bottom: 0.375rem;
}
#mailing-info-modal .address-card p {
  margin-bottom: 0.175rem;
}
#mailing-info-modal .no-addresses {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
}




/***********************
************************
** Cards Gallery Page **
************************
***********************/

#cards-gallery { 
  background-color: var(--tertiary);
}

/* Hero Heading */
main.container-fluid:has(> section#hero-heading) {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
}

/* Card Gallery Styles */
.card-gallery {
  background-color: var(--tertiary);
  padding: 2rem 0;
}
.card-gallery h1 {
  color: var(--text-light);
  text-align: center;
}
.card-gallery h3 {
  text-align: center;
  color: var(--text-light)
}
.card-gallery a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}
.card-gallery a:hover {
  color: var(--secondary);
}
.card-gallery article footer a {
  font-weight: bold;
  display: block;
}
.card-gallery article footer a:not(:last-child) {
  margin-bottom: var(--pico-typography-spacing-vertical);
}
.card-gallery article footer a:hover {
  text-decoration: underline;
}
.search-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}
.search-bar input {
  width: 100%;
  max-width: 600px;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
}
.search-bar .search-icon {
  background: none;
  border: none;
  font-size: 1.2rem;
  margin-left: -40px;
  cursor: pointer;
}
.card-gallery article, .card-gallery article footer {
  background-color: var(--primary);
}
.card-gallery article footer p, .card-gallery article footer a {
  color: var(--text-light);
}
section.card-gallery div.grid:not(:first-child) {
  margin-top: 1rem;
}
.card-gallery article {
  margin-bottom: 1.5rem;
  height: 100%;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
}
.card-gallery article header {
  padding: 0.06125rem;
  margin-left: 0;
  margin-right: 0;
}
.card-gallery article header img {
  width: 100%;
}
.card-gallery article h3 {
  margin-top: 1rem;
}
.card-gallery article footer {
  margin-left: 0;
  margin-right: 0;
}

.request-category {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 2rem 0;
  text-align: center;
}
.request-category h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}
.request-category p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}
.request-btn {
  background-color: var(--secondary);
  color: var(--text-light);
  border: none;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.request-btn:hover {
  background-color: #ff7a7d;
}

/*** Cards Gallery Page end ***/




/***********************
************************
** Cards Category Page **
************************
***********************/

#cards-category-page {
  background-color: var(--tertiary);
}
.card-category {
  background-color: var(--primary);
  padding: 2rem 0 1rem;
}
.card-category h1, .card-category h2 {
  color: var(--text-light);
  text-align: center;
  padding-bottom: 1rem;
}
.card-category h2 {
  font-weight: 400;
}

/* Cards Category Page - Category Search Bar */
.card-category-search-bar {
  background-color: var(--tertiary);
  padding: 2rem 3rem;
}
.card-category-search-bar input {
  border-radius: 0.5rem;
}

/* Cards Category Page - Category Search Actions */
.card-category-search-actions {
  display: flex;
  justify-content: flex-end;
}
.card-category-search-actions button {
  padding-top: 0;
  padding-bottom: 0;
  margin-top: -1rem;
  background-color: var(--tertiary);
  border: none;
  box-shadow: none;
}
.card-category-search-actions span {
  font-size: small;
  display: block;
}

/* Cards Category Page - Cards */
#cards-grid .grid {
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
}

article.card {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 0;
  border-radius: 0.5rem;
}
article.card header.card-image {
  padding: 0;
  margin: 0;
  border-bottom: none;
  border-radius: 0.5rem;
}
article.card header.card-image img {
  width: 100%;
  height: auto;
}
article.card h5 {
  color: var(--text-light);
  text-align: center;
  padding-top: 1rem;
  margin: 0;
}
article.card div.card-actions {
  display: flex;
  justify-content: center;
  background-color: var(--primary);
  margin-bottom: 0.5rem;
}
article.card footer.card-content {
  padding: 0;
  margin: 0;
  border: none;
}
article.card div.card-actions button {
  background-color: var(--primary);
  border: none;
  padding: 0.5rem;
  box-shadow: none;
}
article.card div.card-actions button img {
  width: 1.125rem;
}
/*** Cards Category Page - Cards end ****/




/************************/
/************************/
/*** Custom Card Page ***/
/************************/
/************************/
/* Target card-detail container only on custom-image-card page */
body[data-page="custom-image-card"] .card-detail .container {
  grid-template-columns: 1fr 2fr;
}
/* Styles for custom-card-heading-section (copied from card-studio.css) */
#custom-card-heading-section {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
  border-radius: 0;
}

#custom-card-heading-section h1 {
  color: var(--text-light);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

#custom-card-heading-section p {
  color: var(--text-light);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.card-studio-content {
  margin: 0 auto;
}

#custom-card-heading-section .grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 0 auto;
  max-width: 1100px;
}

#custom-card-heading-section button.primary {
  background-color: var(--secondary);
  color: var(--text-light);
  border-color: var(--secondary);
  border-radius: 0.6rem;
  font-size: 1.25rem;
  padding: initial;
  height: 3rem;
  width: 100%;
  max-width: 20rem;
}
#custom-card-heading-section button.primary:hover {
  background-color: var(--secondary-300);
}
#custom-card-heading-section button.outline {
  color: var(--text-light);
  border: var(--text-light) solid 2px;
  border-radius: 0.6rem;
  font-size: 1.25rem;
  padding: initial;
  height: 3rem;
  width: 100%;
  max-width: 20rem;
}
#custom-card-heading-section button.outline:hover {
  background-color: var(--primary-600);
}

.card-detail h4, .card-detail {
  color: var(--text-light);
}
.custom-file-upload {
  width: 100%;
  height: auto;
  aspect-ratio: 7 / 5;  
  display: flex;
  flex-direction: column;
  gap: 20px;
  cursor: pointer;
  justify-content: center;
  border: 2px dashed #cacaca;
  background-color: rgba(255, 255, 255, 1);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0px 48px 35px -48px rgba(0,0,0,0.1);
}

.custom-file-upload .icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-file-upload .icon svg {
  height: 80px;
  fill: rgba(75, 85, 99, 1);
}

.custom-file-upload .text, .custom-file-upload small {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tertiary);
}
div#customCardImagePreviewContainer {
  width: 100%;
  height: auto;
  aspect-ratio: 7 / 5;  
  display: flex;
}

.custom-file-upload .text span {
  font-weight: 400;
  color: var(--tertiary);
}

.custom-file-upload input {
  display: none;
}


.custom-file-uploaded button.primary {
  background-color: var(--secondary);
  color: var(--text-light);
}
.custom-file-uploaded button.primary:hover {
  background-color: #ff7a7d;
}
.custom-file-uploaded button.outline {
  color: var(--text-light);
  border-color: var(--text-light);
}
.custom-file-uploaded button.outline:hover {
  color: var(--tertiary-200);
  border-color: var(--tertiary-200);
}
#customCardImagePreviewContainer {
  margin: 1.5rem 0;
}



/*******************/
/*******************/
/*** Preview Page ***/
/*******************/
/*******************/


.preview-card {
  background-color: var(--primary);
  color: #fff;
}
.preview-card h1, .preview-card h2, .preview-card h5,
.preview-card h3, .preview-card p, .preview-card span, .preview-card details[open]>summary:not([role]):not(:focus), .preview-card details summary:not([role]), .preview-card details summary:focus:not([role]) {
  color: #fff;
}
.preview-card h5 {
  font-weight: normal;
}
.preview-card header {
  margin-bottom: 3rem;
}
#preview-sender-recipient-info article {
  background: var(--tertiary);
}
#preview-sender-recipient-info article h3 {
  margin-top: 1rem;
}
.preview-card .swiper {
  width: 100%;
  max-width: 1000px;
  height: auto;
  aspect-ratio: 7/5;
  padding: 2.5rem;
}
.preview-card .swiper-slide {
  background-position: center;
  background-size: cover;
  
}
.preview-card .swiper-slide img {
  display: block;
  width: 100%;
}
.preview-card .swiper-button-next, .preview-card .swiper-button-prev {
  background-color: inherit;
  border: none;
}
.preview-card .swiper-button-next:focus, .preview-card .swiper-button-prev:focus {
 --pico-box-shadow: none; 
}
.preview-card details#card-preview-2 summary::after {
  display: none;
}
.preview-card #card-preview-2 summary h3 {
  display: flex;
  align-items: center;
}
.preview-card #card-preview-2 svg {
  margin-left: 1rem;
  margin-top: -0.25rem;
}
.preview-card #card-preview-2 article {
  padding: 0;
}
.preview-card #card-preview-2 article img {
  border-radius: var(--pico-border-radius);
}
.preview-card article#htmlPreviewContainer-2 {
  width: 100%;
  aspect-ratio: 7/5;
}
.swiper-slide .card-message {
  border: 1px solid var(--tertiary);
  aspect-ratio: 7/5;
  width: 100%;
}

.card-message {
  font-family: var(--font-family-handwritten);
  color: var(--primary-700);
  font-size: 1.5rem;
  padding: 1.5rem;
}

.card-message textarea {
  width: 100%;
  aspect-ratio: 7/4.5;
  font-family: var(--font-family-handwritten);
  color: var(--primary-700);
  font-size: 1.5rem;
  background: transparent;
  border: none;
  resize: none;
  overflow: hidden;
  text-align: left;
}

.card-message textarea:disabled {
  opacity: 1;
  cursor: default;
  background: transparent;
  -webkit-text-fill-color: var(--primary-700);
}
.preview-card button.primary {
  background-color: var(--secondary);
  color: var(--text-light);
  border-radius: 0.5rem;
}
.preview-card button.primary:hover {
  background-color: var(--secondary-200);
}
.preview-card button.secondary {
  background-color: var(--tertiary);
  color: var(--text-light);
  border-radius: 0.5rem;
}
.preview-card button.secondary:hover {
  background-color: var(--tertiary-800);
}




/************************/
/************************/
/***** Payment Page *****/
/************************/
/************************/

body[data-page="payment"] {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body[data-page="payment"] > main {
  flex: 1 0 auto;
}
body[data-page="payment"] footer#home-footer {
  flex-shrink: 0;
  width: 100%;
}
body[data-page="payment"] {
  background-color: var(--primary);
}
#payment-page h1, #payment-page label, #payment-page h3, #payment-page h6, #payment-page span {
  color: #fff;
}
/* Gift Cards on Payment page */
#gift-card-option {
  display: none;
}
#gift-card-selection h3{
  margin-top: calc( var(--spacing) * 2);
}
input[type='radio'].hidden-radio {
  display: none;
}
input[type='radio'].hidden-radio:checked + label {
  border: 2px solid #2c6e01; /* Add a red border to the selected gift card image */
}
#gift-card-selection {
  margin: 1.5rem auto;
}
.gift-card-container {
  display: flex;
  align-items: center;
}
.gift-card-scroll-container {
  overflow-x: auto;
  scrollbar-width: none;  /* For Firefox */
    -ms-overflow-style: none;  /* For Internet Explorer and Edge */
  flex-grow: 1;
}
.gift-card-scroll-container::-webkit-scrollbar {
  display: none;  /* For Chrome, Safari and Opera */
}
.gift-card-scroll-container label {
  flex: 0 0 auto;
}
.gift-card-store-selection {
  display: flex;
  white-space: nowrap;
}
.scroll-arrow {
  position: sticky;
  width: 30px; /* adjust as needed */
  height: 30px; /* adjust as needed */
}
#gift-card-value-selection {
  margin: 1.5rem auto;
}
#payment-summary {
  margin: 1.5rem auto;
}

.promo-group {
border: 1px solid var(--form-element-border-color);
margin: calc(var(--spacing) * 3);
padding: 0 var(--spacing);
margin-bottom: calc(var(--spacing) * 1.5);
}
.promo-group h6 {
margin-top: 0.5rem;
margin-bottom: 0.25rem;
}

#payment-summary button#checkoutButton, button#mailButton {
margin-left: calc(var(--spacing) * 3);
width: calc(100% - var(--spacing) * 6);
margin-top: calc(var(--spacing) * 2);
}
#payment-summary tbody td {
height: calc(var(--spacing) * 5);
vertical-align: top;
padding-top: var(--spacing);
border: none;
}
.input-with-icon {
position: relative;
display: flex;
align-items: center;
}
.input-with-icon img {
position: absolute;
left: 10px;
top: var(--spacing);
}
.input-with-icon input {
padding-left: calc(var(--spacing) * 2);
}
#promo-code-message {
margin-top: calc(var(--spacing) * -0.5);
margin-bottom: calc(var(--spacing) * 0.5);
}
button#apply-promo-button {
  background-color: var(--secondary);
}
button#apply-promo-button:hover {
  background-color: var(--secondary-300);
}
button#checkoutButton {
  background-color: var(--tertiary);
}
button#checkoutButton:hover {
  background-color: var(--logo);
}








/*********************/
/*********************/
/*** Media Queries ****/
/*********************/
/*********************/

@media screen and (min-width: 1439px) {
  /* Home Page Content */
  #home-best-cards-msg {
    margin-left: 2rem;
  }
    
  #home-best-cards-title {
    margin-top: 1.5rem;
  }
  #home-real-pen-msg {
    margin-top: 3rem;
    margin-left: 2rem;
  }
}
  




@media screen and (max-width: 1279px) {
  
  /*** Home Page Content ***/
  /* Hero Message */
  div#hero-message p {
    font-size: 1rem;
  }
  /* Hero Section */
  div#main-hero {
    padding: 5.5rem 0.5rem 0 0;
  }
  div#main-hero h1 {
    font-size: 2rem;
  }
  div#main-hero h1 span.cursive-title {
    font-size: 3rem;
  }
  div#main-hero p {
    font-size: 1rem;
    margin-top: 1rem;
  }
  div#main-hero-btns {
    margin-top: 1.5rem;
  }

  /* Categories Section */
  section#home-categories h2 {
    font-size: 1.75rem;
  }
  div#home-categories-swiper article a h3 {
    font-size: 1rem;
  }
  
  /* How It Works Section */
  div#home-how-it-works-img figure {
    margin: 2rem 8rem 0 8rem;
  }
  div#home-how-it-works-caption h3{
    height: 2.5rem;
    line-height: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
  }
  div#home-how-it-works-caption p {
    font-size: 1rem;
    margin: auto auto 0.5rem;
  }

  /* Best Cards Section */
  #home-best-cards-msg {
    padding: 2rem 1rem 0 0;
  }

}





@media screen and (max-width: 1023px) {
  /* Navigation bar */
  .nav {
    border-bottom: 1px solid var(--primary);
    background-color: var(--tertiary);
  }
  label.nav-toggle {
    display: block;
    padding: 0.5em var(--nav-element-spacing-horizontal);
  }
  .nav-toggle {
    position: absolute;
    cursor: pointer;
    right: 2.5%;
  }
  .nav-toggle svg {
    width: 1.5rem;
    fill: var(--primary);
  }
  .nav-toggle .close {
    display: none;
  }
  .nav-toggle .menu {
    margin-top: 0.25rem;
  }
  .nav-checkbox {
    display: none;
  }
  .nav .nav-checkbox:checked ~ .nav-menu {
    background-color: var(--tertiary);
    height: auto;
    width: 100%;
    margin-top: 31rem;
    margin-right: 0;
  }
  .nav-menu, nav ul:last-of-type {
    flex-direction: column;
    margin-top: 3rem;
    margin-right: 5rem;
    min-width: 155px;
  }
  .nav-logo {
    width: 1px;
    overflow-y: visible;
  }
  .nav-logo li:first-child {
    margin-bottom: auto;
  }
  .nav-menu li {
    display: none;
  }
  .nav-menu li a {
    font-size: 1.5rem;
  }
  #nav-checkbox:checked ~ ul.nav-menu li {
    display: block;
  }
  #nav-checkbox:checked ~ label.nav-toggle .close {
    display: block;
  }
  #nav-checkbox:checked ~ label.nav-toggle .menu {
    display: none;
  }
  .nav-menu .nav-submenu {
    display: flex;
    position: static;
    background-color: transparent;
    padding: 0;
    box-shadow: none;
  }
  .nav-submenu li {
    display: none;
    padding: 0;
  }
  #nav-checkbox:checked ~ ul.nav-menu li ul.nav-submenu li {
    display: block;
  }
  
  /*** Home Page Content ***/
  /* Hero Message */
  div#hero-message p {
    font-size: 0.875rem;
  }
  /* Hero Section */
  div#main-hero {
    margin-bottom: 2rem;
    padding: 4rem 0.5rem 0 0;
  }
  div#main-hero h1 {
    font-size: 2rem;
  }
  div#main-hero h1 span.cursive-title {
    font-size: 2.5rem;
  }
  div#main-hero p {
    font-size: 0.875rem;
    margin-top: 1rem;
  }
  div#main-hero-btns {
    margin-top: 1.5rem;
  }
  /* Categories Section */
  section#home-categories {
    padding-bottom: 3.5rem;
  }
  section#home-categories p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }
  div#home-categories-title {
    padding: 2.5rem 0 0.75rem;
  }
  div#home-categories-swiper article a h3 {
    padding: 0.75rem 0.25rem;
    font-size: 0.875rem;
  }
  div#home-categories-btns {
    gap: 1.5rem;
    margin-top: 2rem;
  }
  div#home-categories-btns p {
    margin: 0.5rem;
  }

  /* How It Works Section */
  div#home-how-it-works-img figure {
    margin: 2rem 8rem 0 8rem;
  }
  div#home-how-it-works-caption h3{
    font-size: 1.25rem;
    height: 2.5rem;
    line-height: 1.5rem;
  }
  div#home-how-it-works-caption p {
    font-size: 0.875rem;
  }
  div#home-how-it-works-summary {
    padding: 0 2rem;
  }

  /* Best Cards Section */

  section#home-best-cards {
    padding: 2rem 2rem 2rem;
  }
  #home-best-cards-img {
    padding: 2rem 1rem 2rem;
  }
  #home-best-cards-msg h2 {
    font-size: 2rem;
  }
  #home-best-cards-msg p {
    font-size: 0.875rem;
  }
  #home-best-cards-msg button {
    margin-top: 1rem;
  }

  /* Home - Real Pen Section */
  section#home-real-pen div.grid {
    margin: 0 1rem;
  }
  div#home-real-pen-title h2 {
    font-size: 2rem;
  }
  section#home-real-pen p {
    font-size: 0.875rem;
  }

  /* Home - Testimonials Section */
  #home-testimonials-title h2 {
    font-size: 2rem;
  }
  #home-testimonials-msg p {
    font-size: 0.875rem;
  }

  /* Home - Contact Section */
  #home-contact-title h2 {
    font-size: 2rem;
  }
  #home-contact-msg p {
    font-size: 0.875rem;
  }

  /* Mailing Info Modal Styles */
  dialog#mailing-info-modal article {
    width: 75%;
  }

  /* Preview - Card View */
  .preview-card .swiper {
    max-width: 650px;
  }

  /* Custom Image Card Page - Card Detail Section */
  .card-detail {
    padding: 1rem;
  }
  .card-detail .container {
    gap: 1rem;
    margin: 0.5rem auto;
  }
  .card-info h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }
  .card-info p {
    font-size: 0.875rem;
  }
  
  
}


@media screen and (max-width: 767px) {

  /* hero-message */
  .hero-message p {
    font-size: 1rem;
  }
  
  /* Custom Card Heading Section */
  #custom-card-heading-section {
    padding: 4rem 1rem;
  }
  
  #custom-card-heading-section h1 {
    font-size: 2rem;
  }
  
  #custom-card-heading-section p {
    font-size: 1rem;
  }

  /*** Home Page Content ***/
  /* Hero Message */
  div#hero-message p {
    font-size: 0.875rem;
  }
  /* Home- Hero Section */
  section#hero .grid {
    display: flex;
    flex-direction: column-reverse;
  }
  div#main-hero-img {
    display: block;
    margin-top: -3rem;
    text-align: center;
  }
  div#main-hero-img figure {
    margin: 0 auto;
    max-width: 100%;
  }
  div#main-hero {
    padding: 3rem 0.5rem 2.5rem 0;
    align-items: center;
  }
  #main-hero .counter-container {
    justify-content: center; /*flex-end;*/
  }
  div#main-hero h1 {
    font-size: 2rem;
    text-align: center;
    line-height: 2.75rem;
    margin-bottom: 0;
  }
  div#main-hero h1 span.cursive-title {
    display: inline-block;
    font-size: 2.5rem;
  }
  div#main-hero p {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    text-align: center;
  }
  div#main-hero-btns {
    margin-top: 1.5rem;
    justify-content: center;

  }

  /* Categories Section */
  div#home-categories-swiper article a h3 {
    line-height: 1rem;
    font-size: 0.75rem;
    height: 3rem;
  }  
  /* How It Works Section */
  div#home-how-it-works-caption {
    background-image: none;
  }
  
  div#home-how-it-works-caption h3{
    margin-top: 0;
    height: 1.5rem;
    line-height: 1rem;
  }
  section#home-how-it-works p {
    font-size: 1rem;
  } 
  figure.home-how-it-works-img-small {
    display: block;
  }

  /* Best Cards Section */
  #home-best-cards-title-small {
    display: block;
  }
  #home-best-cards-title {
    display: none;
  }
  #home-best-cards-img {
    padding: 1rem;
  }
  #home-best-cards-msg {
    padding: 1rem 0.5rem;
  }
  /* Home - Real Pen Section */
  section#home-real-pen {
    padding: 0 3rem 3rem;
  }
  section#home-real-pen div.grid {
    margin: 0;
  }
  #home-real-pen-msg button {
    display: none;
  }
  #home-real-pen-img {
    z-index: 0;
  }
  #home-real-pen-msg-small {
    display: block;
  }

  /* Home - Gift Cards Section */
  section#home-gift-cards {
    padding: 4rem 0;
  }

  /* Home - Testimonials Section */
  #home-testimonials-carousel {
    margin: 3rem 3rem 1rem;
  }

  /* Home - Contact Form */
  #contact-form-container {
    margin: 2rem 3rem 1rem;
  }

  /* Home - Footer Section */
  #home-footer {
    padding: 1rem 2rem 1rem;
  }
  #home-footer nav ul:last-of-type {
    margin: inherit;
  }

  #home-footer nav li {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  #home-footer p {
    margin-top: 1rem;
  }
  
  /*** Cards Gallery Page ***/
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

  /* Mailing Info Modal Styles */
  dialog#mailing-info-modal article {
    width: 95%;
  }

  /* Custom Image Card Page - Card Detail Section */
  .card-detail {
    padding: 1rem;
  }
  .card-detail .container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem auto;
  }
  .card-info h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }
  .card-info p {
    font-size: 0.875rem;
  }
  .card-detail h4, .card-detail {
    margin-bottom: 0;
  }
  .write-note-options {
    margin: 0.75rem;
  }

  /* Address card styles */
}


@media screen and (max-width: 479px) {
  /* Hero Message  Section */
  .hero-message p {
    font-size: 0.75rem;
  }
  
  /* Custom Card Heading Section */
  #custom-card-heading-section h1 {
    font-size: 1.75rem;
  }
  
  #custom-card-heading-section p {
    font-size: 0.9rem;
  }
  
  #custom-card-heading-section .grid {
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
  }
  
  #custom-card-heading-section button.primary,
  #custom-card-heading-section button.outline {
    width: 100%;
    max-width: 16rem;
    margin: 0 auto;
  }
  /* Hero Section */
  div#main-hero {
    margin-bottom: 1rem;
  }
  div#main-hero-img figure {
    max-width: 90%;
  }
  div#main-hero-img img {
    max-width: 100%;
    height: auto;
  }
  /* unstacking buttons for dev only 
  div#main-hero-btns {
    display: grid; 
  }*/
  /* Categories Section */
  section#home-categories {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  section#home-categories h2 {
    font-size: 1.5rem;
  }
  section#home-categories p {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
  div#home-categories-title {
    padding: 1.75rem 0 0.5rem;
  }
  div#home-categories-swiper article a h3 {
    padding: 0.5rem 0.125rem;
    font-size: 0.675rem;
    height: 3rem;
    line-height: 0.75rem;
  }
  div#home-categories-btns {
    gap: 0.5rem;
    margin-top: 1rem;
  }
  div#home-categories-btns p {
    margin: 0.5rem;
  }

  /* How It Works Section */
  section#home-how-it-works p {
    font-size: 0.875rem;
  } 

  /* Home - Best Cards Section */
  section#home-best-cards {
    padding: 2rem var(--pico-spacing) 2rem;
  }
  #home-best-cards-msg {
    padding: 0 0 1rem;
  }

  /* Home - Partners Section */
  #home-partner-title h2 {
    font-size: 1.125rem;
    margin-top: -0.5rem;
  }  
  /* Home - Real Pen Section */
  section#home-real-pen {
    padding: 0 var(--pico-spacing) 2rem;
  }

  /* Home - Gift Cards Section */
  #home-gift-cards-img {
    width: 85%;
  }

  /* Home - Testimonials Section */
  div.home-testimonials-carousel {
    margin: 3rem 0rem 1rem;
  }
  .testimonial {
    width: 90%;
  }

  /* Home - AI Features Section */  
  section#home-ai-features {
    padding: 3rem 0;
  }
  #home-ai-features-title h2 {
    font-size: 1.5rem;
  }
  #home-ai-features-msg {
    margin-bottom: 0.75rem;
    font-size: 1rem;
  }
  #home-ai-features-msg span {
    font-size: 1.25rem;
    margin: 1rem auto 1.25rem;
  }

  /* Home - Contact Form */
  section#home-contact {
    padding: 3rem 0;
  }
  #contact-form-container {
    margin: 2rem 1rem 0;
  }
  
  /* Custom Image Card Page - Card Detail Section */
  .card-info p {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}
}




/*************************************
**************************************
*           MEDIA QUERIES            *
* Responsive Styles for Preview Card * 
**************************************
*************************************/

/* 1. Mobile (extra-small) */
@media only screen and (max-width: 350px) {
  .preview-card .swiper {
    padding: 0.5rem;
  }
  .swiper-button-next, .swiper-button-prev {
    zoom:0.5;
  }
  .swiper-button-prev {
    left: -1.5rem;
  }
  .swiper-button-next {
    right: -1.5rem;
  }
  .card-message {
    padding: 0;
  }
  #htmlPreviewContainer textarea {
    font-size: 8px !important;
    min-height: 10px !important;
  }
}
/* 1. Mobile (small) */
@media only screen and (min-width: 351px) and (max-width: 397px) {
  .preview-card .swiper {
    padding: 0.5rem;
  }
  .swiper-button-next, .swiper-button-prev {
    zoom:0.5;
  }
  .swiper-button-prev {
    left: -1.5rem;
  }
  .swiper-button-next {
    right: -1.5rem;
  }
  .card-message {
    padding: 0;
  }
  #htmlPreviewContainer textarea {
    font-size: 10px !important;
    min-height: 12px !important;
  }
}
/* 1. Mobile (medium) */
@media only screen and (min-width: 398px) and (max-width: 477px) {
  .preview-card .swiper {
    padding: 0.5rem;
  }
  .swiper-button-next, .swiper-button-prev {
    zoom:0.5;
  }
  .swiper-button-prev {
    left: -1.5rem;
  }
  .swiper-button-next {
    right: -1.5rem;
  }
  .card-message {
    padding: 0;
  }
  #htmlPreviewContainer textarea {
    font-size: 12px !important;
    min-height: 14px !important;
  }
}
/* 1. Mobile (large) */
@media only screen and (min-width: 478px) and (max-width: 576px) {
  .preview-card .swiper {
    padding: 0.5rem;
  }
  .swiper-button-next, .swiper-button-prev {
    zoom:0.5;
  }
  .swiper-button-prev {
    left: -1.5rem;
  }
  .swiper-button-next {
    right: -1.5rem;
  }
  .card-message {
    padding: 0;
  }
  #htmlPreviewContainer textarea {
    font-size: 14px !important;
    min-height: 16px !important;
  }
}

/* 2. Mobile (landscape) */
@media only screen and (min-width: 577px) and (max-width: 768px) {
  .preview-card .swiper {
    padding: 0.5rem;
  }
  .swiper-button-next, .swiper-button-prev {
    zoom:0.5;
  }
  .swiper-button-prev {
    left: -1.5rem;
  }
  .swiper-button-next {
    right: -1.5rem;
  }
  .card-message {
    padding: 0;
  }
  #htmlPreviewContainer textarea {
    font-size: 16px !important;
    min-height: 20px !important;
  }
}

/* 3. Tablet */
@media only screen and (min-width: 769px) and (max-width: 992px) {
  .preview-card .swiper {
    padding: 0.75rem;
  }
  .swiper-button-next, .swiper-button-prev {
    zoom:0.75;
  }
  .swiper-button-prev {
    left: -1.5rem;
  }
  .swiper-button-next {
    right: -1.5rem;
  }
  .card-message {
    padding: 0;
  }
  #htmlPreviewContainer textarea {
    font-size: 20px !important;
    min-height: 24px !important;
  }
}

/* 4. Desktop (small) */
@media only screen and (min-width: 993px) and (max-width: 1023px) {
  .preview-card .swiper {
    padding: 0.75rem;
  }
  .swiper-button-next, .swiper-button-prev {
    zoom:0.75;
  }
  .swiper-button-prev {
    left: -1.5rem;
  }
  .swiper-button-next {
    right: -1.5rem;
  }
  .card-message {
    padding: 0;
  }
  #htmlPreviewContainer textarea {
    font-size: 20px !important;
    min-height: 24px !important;
  }
}

/* 5. Desktop (medium) */
@media only screen and (min-width: 1024px) {
  .preview-card .swiper {
    padding: 0.75rem;
  }
  .swiper-button-next, .swiper-button-prev {
    zoom:0.75;
  }
  .swiper-button-prev {
    left: -1.5rem;
  }
  .swiper-button-next {
    right: -1.5rem;
  }
  .card-message {
    padding: 0;
  }
  
}




/*************************************
**************************************
*           MEDIA QUERIES            *
*         Dark Theme Styles          *
**************************************
*************************************/

@media screen and (prefers-color-scheme: dark) {
  /* Home Page */
  .hero-content p {
    color: var(--tertiary);
  }
  section#home-how-it-works {
    background-color: var(--background);
  }
  section#home-how-it-works h3, section#home-how-it-works p {
    color: var(--tertiary);
  }
  #home-ai-features p {
    color: var(--tertiary);
  }
  .write-note-section textarea::placeholder, .ai-note-section textarea::placeholder {
    color: var(--tertiary-200);
  }
  #home-faq hr {
    border-top: 1px solid var(--background);
  }
  /* END - Home Page */

  /* Category-Gallery Page */
  section.card-gallery div.grid article>header {
    background-color: var(--background);
  }
  .card-gallery article footer {
    border-top-color: var(--background);
  }
  /* END - Category-Gallery Page */
}



/*************************************
**************************************
*           MEDIA QUERIES            *
*        iOS Devices Styles          *
**************************************
*************************************/
/* iOS-specific fix for padding-bottom issues */
@supports (-webkit-touch-callout: none) {
  /* last resort fix if needed */
}







/*************************************
**************************************
*        CHARACTER COUNTER STYLES     *
**************************************
*************************************/

/* Character counter container */
.character-counter {
  font-size: 0.8rem;
  color: var(--primary-200);
  margin: 0.25rem 0 0.5rem;
  display: flex;
  justify-content: flex-end;
  font-family: var(--font-family-numeric);
}

/* Character count status */
.char-limit-status {
  border-radius: 0.25rem;
  padding: 0.125rem 0.5rem;
  background-color: var(--primary);
  transition: color 0.3s ease;
}

/* Warning state - approaching limit */
.text-warning {
  color: var(--secondary-200);
  font-weight: 500;
  background-color: var(--primary-800);
}

/* Error state - exceeded limit */
.text-error {
  color: var(--secondary-400);
  font-weight: 500;
  background-color: var(--primary-400);
}
