/* Marvel Inspired CSS */
:root {
  --marvel-red: #ed1d24;
  --marvel-yellow: #f7df1e;
  --marvel-blue: #0070dd;
  --dark-bg: #ffffff;
  --light-text: #1a1a1a;
  --medium-gray: #f0f0f0;
  --dark-gray: #dddddd;
  --card-bg: #f9f9f9;
  --accent-hover: #d32f2f;
  --radius: 8px;
  --transition-speed: 0.3s;
  --font-primary: "Roboto Condensed", sans-serif;
  --font-secondary: "Roboto", sans-serif;
  --accent-light-blue: #0056b3;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: 65px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFD700' stroke='%23F0C000' stroke-width='1' d='M12 2 L15.09 8.26 L22 9.27 L17 14.14 L18.18 21.02 L12 17.77 L5.82 21.02 L7 14.14 L2 9.27 L8.91 8.26 Z'/%3E%3C/svg%3E")
      12 12,
    auto !important;
}

body {
  background-color: var(--dark-bg);
  color: var(--light-text);
  font-family: var(--font-secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

body.light-theme {
  background-color: var(--dark-bg);
  color: var(--light-text);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--marvel-blue);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
  cursor: pointer !important;
}

a:hover {
  color: var(--marvel-red);
}

body.light-theme a {
  color: var(--marvel-blue);
}

body.light-theme a:hover {
  color: var(--accent-light-blue);
}

/* Navigation */
.main-nav {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  /* padding: 0.5rem 0; */
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.light-theme .main-nav {
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo img {
  height: 60px; /* Made logo bigger */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother transition */
  cursor: pointer;
}

.nav-logo:hover img {
  transform: scale(1.1); /* Animation on hover */
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--light-text);
}

.light-theme .nav-links a {
  color: var(--light-text);
}

.nav-links a:hover {
  color: var(--marvel-red);
}

.right-buttons {
  display: flex;
  gap: 25px;
}

/* Hero Section */
.hero-section {
  display: flex;
  margin-top: 60px;
  background-color: var(--medium-gray);
  padding: 2rem;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
}

.hero-comic-split {
  flex: 1 1 30%;
  max-width: 400px;
  position: relative;
  border-radius: var(--radius);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  cursor: pointer;
}

.hero-bg-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.hero-comic-split:hover .hero-bg-img {
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0) 60%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero-comic-split:hover .hero-overlay {
  opacity: 1;
}

.hero-comic-split h2 {
  font-family: var(--font-primary);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: #fff;
  margin-bottom: 1rem;
  text-transform: uppercase;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
  transform: translateY(15px);
  transition: transform 0.4s ease 0.1s;
}

.hero-comic-split:hover h2 {
  transform: translateY(0);
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  transform: translateY(15px);
  transition: transform 0.4s ease 0.2s;
}

.hero-comic-split:hover .hero-buttons {
  transform: translateY(0);
}

.hero-buttons .btn {
  flex-grow: 0;
}

/* Buttons */
.btn {
  font-family: var(--font-primary);
  padding: 0.65em 1.3em;
  border: 2px solid var(--marvel-red);
  border-radius: var(--radius);
  background-color: var(--marvel-red);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  cursor: pointer !important;
  transition: background-color var(--transition-speed) ease,
    color var(--transition-speed) ease, transform 0.2s ease,
    box-shadow 0.2s ease;
  display: inline-block;
  text-align: center;
  letter-spacing: 0.5px;
}

.btn:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.light-theme .btn {
  background-color: var(--marvel-red);
  border-color: var(--marvel-red);
  color: #fff;
  white-space: nowrap;
}

.light-theme .btn:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.btn-detail {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: var(--light-text);
  color: var(--light-text);
}

.btn-detail:hover {
  background-color: rgba(0, 0, 0, 0.1);
  border-color: var(--marvel-blue);
  color: var(--marvel-blue);
}

.light-theme .btn-detail {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: var(--light-text);
  color: var(--light-text);
}

.light-theme .btn-detail:hover {
  background-color: rgba(0, 0, 0, 0.1);
  border-color: var(--marvel-blue);
  color: var(--marvel-blue);
}

.btn-lg {
  padding: 0.8em 1.8em;
  font-size: 1rem;
}

/* Comic Detail Section */
.comic-detail-section {
  padding: 4rem 1rem 5rem; /* Added more bottom padding */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* Ensure stacking context */
  z-index: 2; /* Above lightning */
}

.light-theme .comic-detail-section {
  background-color: var(--dark-bg);
}

.comic-detail-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.05; /* Very low opacity */
  z-index: -1;
}

.light-theme .comic-detail-section::before {
  opacity: 0.05;
}

.section-deya {
  background: linear-gradient(135deg, #fce4ec, #f8bbd0);
  --current-accent: #f76dc1;
}
.section-deya::before {
  background-image: url("../assets/deya/deya-title.webp");
}

.section-ukrman {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  --current-accent: #34c4ff;
}
.section-ukrman::before {
  background-image: url("../assets/ukrman/ukrman-title.webp");
}

.section-pidpal {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  --current-accent: #ff8400;
}
.section-pidpal::before {
  background-image: url("../assets/pidpal/pidpal-title.webp");
}

.comic-detail-container {
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem; /* Increased gap */
  align-items: flex-start; /* Align items to the top */
  background-color: rgba(255, 255, 255, 0.6);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.comic-slider-container {
  width: 100%;
  margin: 0 auto;
  align-self: stretch; /* Make slider container take full height of its grid cell */
}

.slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  height: 100%; /* Make slider take full height of its container */
  min-height: 450px; /* Ensure a minimum height */
  aspect-ratio: unset; /* Remove fixed aspect ratio to allow full height */
}

.slider-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

.slider-track img {
  width: 100%;
  flex-shrink: 0;
  object-fit: cover;
  aspect-ratio: 3 / 4.5; /* Adjust aspect ratio for taller images if needed */
  object-position: top center; /* For Ken Burns, often top or center focus is good */
  border-radius: var(--radius); /* if images don't have own radius */
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem; /* Adjusted for icon size */
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer !important;
  transition: background-color var(--transition-speed),
    color var(--transition-speed);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background-color: var(--marvel-blue);
  color: #fff;
}

.slider-btn.prev {
  left: 0.75rem;
}

.slider-btn.next {
  right: 0.75rem;
}

.slider-btn i {
  line-height: 1; /* Helps center Font Awesome icons */
}

.comic-info h2 {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--light-text);
}

.light-theme .comic-info h2 {
  color: var(--light-text);
}

.comic-description {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: #555;
  line-height: 1.7;
}

.comic-params {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
  font-size: 0.85rem; /* Made smaller */
  column-count: 2; /* Two columns */
  column-gap: 1.5rem;
  color: #666;
}

.comic-params li {
  margin-bottom: 0.6rem;
  break-inside: avoid-column; /* Prevent items from breaking across columns */
}

.comic-params strong {
  color: var(--light-text);
  font-weight: 700;
}

.comic-price {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--current-accent);
  margin-bottom: 1.5rem;
}

/* Bundle Offer Section */
.bundle-offer-section {
  padding: 4rem 1rem; /* Increased padding */
  background-color: var(--dark-gray);
  text-align: center;
  position: relative;
  z-index: 2;
}

.bundle-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex; /* Use flexbox for layout */
  flex-direction: column; /* Stack items vertically */
  align-items: center; /* Center items horizontally */
}

.bundle-container h2 {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 5vw, 2.8rem); /* Slightly larger, responsive */
  color: var(--light-text);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.bundle-container p {
  font-size: clamp(0.95rem, 2vw, 1.1rem); /* Responsive font size */
  margin-bottom: 2rem; /* Increased space before images */
  max-width: 650px; /* Constrain width for better readability */
  color: var(--light-text);
}

.bundle-images {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

.bundle-images a {
  flex-basis: 30%;
  max-width: 250px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bundle-images img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition-speed) ease, box-shadow 0.3s ease;
}

.bundle-images a:hover img {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(237, 29, 36, 0.3);
}

/* Grouping text and button more compactly if needed, though flex column on container handles it well */
/* If further compaction is needed for text + button: */
.bundle-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem; /* Space between last text item (if any) and button */
}

.bundle-offer-section .btn-buy {
  padding: 0.8em 2em; /* Adjust padding for a prominent button */
  font-size: 1.1rem;
}

/* Footer - User Specified Layout */
.main-footer {
  background-color: var(--medium-gray);
  padding: 3rem 1rem 1.5rem;
  border-top: 1px solid var(--dark-gray);
  color: var(--light-text);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.footer-main-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column {
  flex: 1;
}

.footer-column-center {
  text-align: center;
}

.footer-column-contact {
  text-align: right;
}

.footer-tagline {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.footer-tagline p {
  font-family: system-ui, Segoe UI Emoji, Arial, sans-serif;
}

.footer-social-title {
  font-family: var(--font-primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.footer-social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-social-icons a {
  color: var(--light-text);
  font-size: 1.6rem;
  transition: color var(--transition-speed) ease,
    transform var(--transition-speed) ease;
}

.footer-social-icons a:hover {
  color: var(--marvel-blue);
  transform: translateY(-3px);
}

.footer-legal-links a {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--marvel-blue);
  text-decoration: none;
}
.footer-legal-links a:hover {
  text-decoration: underline;
}

.contact-text {
  margin-bottom: 0.35rem;
}

.contact-email {
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
}

.contact-phone {
  font-weight: bold;
}

.footer-bottom-text {
  text-align: center;
  border-top: 1px solid var(--dark-gray);
}

.footer-copyright {
  font-size: 0.85rem;
  color: #6c6c6c;
}

/* Styles for Terms and Conditions Page */
.terms-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--light-bg);
  border-radius: var(--radius);
  color: var(--dark-text);
  line-height: 1.7;
  border: 1px solid var(--medium-light-gray);
}

.light-theme .terms-container {
  background-color: var(--light-bg);
  color: var(--dark-text);
  border: 1px solid var(--medium-light-gray);
}

.terms-container h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.terms-container h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #34495e;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.3rem;
}

.terms-container h3 {
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  color: #7f8c8d;
}

.terms-container p,
.terms-container ul {
  margin-bottom: 1rem;
}

.terms-container ul {
  padding-left: 20px;
}

.terms-container ul li {
  margin-bottom: 0.5rem;
}

.seller-details p {
  margin-bottom: 0.3rem;
}

.last-updated {
  text-align: right;
  font-size: 0.9em;
  color: #777;
  margin-bottom: 2rem;
}

.terms-container .seller-details a {
  color: var(--marvel-blue);
  text-decoration: underline; /* Optional: make it look more like a classic link */
}

.terms-container .seller-details a:hover {
  color: var(--marvel-red); /* Or a darker shade of blue */
}

/* New Footer Styles */
.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-main-content {
  display: flex;
  justify-content: center; /* Center the group of columns */
  align-items: flex-start; /* Align items at the top of their respective spaces */
  width: 100%;
  max-width: none; /* Ensure no maximum width constraint */
  gap: 2rem; /* Gap between columns */
  margin-bottom: 1rem; /* Space before copyright/tagline */
}

.footer-column {
  flex: 1 1 calc(50% - 1rem); /* Grow and shrink, with a basis accounting for half the gap */
  max-width: 350px; /* Prevent columns from getting too wide individually */
  padding: 0 0.5rem; /* Add a little padding inside columns if text is near edge */
}

/* Specific styling for links column */
.footer-links-column a {
  display: inline-block; /* Changed from block to allow text-align:center to work directly */
  color: var(--dark-text);
  text-decoration: underline;
  font-size: 0.9rem;
  transition: color var(--transition-speed) ease;
  /* margin-bottom removed, as there's typically only one link here.
     If multiple, they'd be separate <p> or <a> tags */
}

.footer-links-column a:hover {
  color: var(--marvel-yellow);
}

/* Specific styling for contact column */
.footer-contact-column .contact-text {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--dark-text);
}

.footer-contact-column .contact-email {
  display: inline-block; /* To respect text-align:center */
  color: var(--marvel-yellow);
  text-decoration: underline;
  font-size: 0.95rem;
  font-weight: bold;
  transition: color var(--transition-speed) ease;
}

.footer-contact-column .contact-email:hover {
  color: var(--accent-light-blue);
}

/* Copyright and Tagline */
.footer-copyright {
  font-size: 0.8rem;
  color: #6c6c6c;
  margin: 0;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--light-text);
  margin: 0;
  margin-bottom: 1rem;
}

/* Responsive adjustments for footer columns */
@media (max-width: 600px) {
  .footer-main-content {
    flex-direction: column; /* Stack columns */
    align-items: center; /* Center items when stacked */
    gap: 1.5rem; /* Gap between stacked column items */
  }
  .footer-column {
    flex-basis: auto; /* Reset basis when stacked */
    width: 100%; /* Take full width when stacked */
    max-width: 400px; /* Max width for a stacked column's content */
    padding: 0; /* Reset padding for stacked columns if needed */
  }
  .footer-contact-column {
    margin-top: 0.5rem; /* Add a bit of space when stacked and contact is below link */
  }
}

@media (max-width: 768px) {
  .footer-main-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
  }
  .footer-column-contact {
    text-align: center;
  }
  .footer-social-icons {
    justify-content: center;
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-speed) ease,
    visibility 0s var(--transition-speed) linear;
  z-index: 2000;
  padding: 1rem; /* Add padding for small screens */
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.modal-content {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  transform: scale(0.92);
  transition: transform var(--transition-speed) ease-out;
  display: flex;
}

.modal-layout-container {
  display: flex;
  gap: 2.5rem;
  width: 100%;
  align-items: flex-start;
}

.modal-image-display-area {
  flex: 3;
}

.modal-form-container {
  flex: 4;
}

.modal-bundle-grid {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 450px;
}

.modal-bundle-grid img {
  position: absolute;
  width: 60%;
  border-radius: var(--radius);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-bundle-grid img:nth-of-type(1) {
  transform: translateX(-20%) rotate(-10deg);
  z-index: 1;
}

.modal-bundle-grid img:nth-of-type(2) {
  transform: translateY(-5%) translateX(0) scale(1.05);
  z-index: 2;
}

.modal-bundle-grid img:nth-of-type(3) {
  transform: translateX(35%) rotate(10deg);
  z-index: 1;
}

.modal-bundle-grid:hover img:nth-of-type(1) {
  transform: translateX(-20%) rotate(-15deg) scale(1.02);
}

.modal-bundle-grid:hover img:nth-of-type(2) {
  transform: translateY(-5%) translateX(0) scale(1.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.modal-bundle-grid:hover img:nth-of-type(3) {
  transform: translateX(35%) rotate(15deg) scale(1.02);
}

.light-theme .modal-content {
  background-color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.close-modal-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--light-text);
  font-size: 1.8rem;
  cursor: pointer !important;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.3s;
}

.light-theme .close-modal-btn {
  color: var(--light-text);
}

.close-modal-btn:hover {
  color: var(--marvel-red);
}

.modal-comic-info {
  text-align: center;
  margin-top: 1rem; /* Added top margin */
  margin-bottom: 1.5rem;
}

.modal-comic-info img {
  width: 120px;
  height: auto;
  border-radius: var(--radius);
  margin: 0 auto 0.8rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.modal-comic-info h3 {
  font-family: var(--font-primary);
  color: var(--marvel-blue);
  font-size: 2.2rem;
}

.modal-comic-info .comic-price {
  font-size: 1.4rem;
}

.light-theme .modal-comic-info h3 {
  color: var(--marvel-blue);
}

#checkout-form input[type="text"],
#checkout-form input[type="tel"],
#checkout-form input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--dark-gray);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#checkout-form input:focus {
  outline: none;
  border-color: var(--marvel-blue);
  box-shadow: 0 0 0 3px rgba(0, 112, 221, 0.2);
}

#checkout-form {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  gap: 0.75rem 1.25rem; /* Row gap and Column gap */
  align-items: start; /* Align items at the start of their grid cell */
}

#checkout-form .form-group {
  margin-bottom: 0.5rem; /* Reduced bottom margin as gap handles spacing */
  /* By default, each form-group will take one cell */
}

/* Specific field placement */
#checkout-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--light-text);
  font-size: 1rem;
}

.light-theme #checkout-form .form-group label {
  color: var(--light-text);
}

/* Spanning rules for form fields for 2-column layout */
#checkout-form div.form-group:nth-of-type(1), /* Name */
#checkout-form div.form-group:nth-of-type(4) /* Address */ {
  grid-column: 1 / -1;
}

#checkout-form input[type="number"] {
  width: 60px;
}

/* Submit button spanning */
.btn-submit-order {
  width: 100%;
  margin-top: 1rem;
  grid-column: 1 / -1;
}

.btn-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-content-wrapper img {
  height: 1.2em;
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: green;
  color: #fff;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.toast.show {
  bottom: 1.5rem;
  opacity: 1;
  visibility: visible;
}

/* Ken Burns Effect */
@keyframes kenBurnsAnimation {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 1;
  }
  50% {
    transform: scale(1.15) translate(-2%, 2%);
    opacity: 1;
  }
  100% {
    transform: scale(1.15) translate(-2%, 2%); /* Hold the end state */
    opacity: 1;
  }
}

.ken-burns-active {
  animation: kenBurnsAnimation 12s infinite alternate ease-in-out;
  transform-origin: center center; /* Or adjust based on image content e.g. top center */
}

.cart-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.cart-modal.open {
  display: flex;
}

.cart-content {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  transform: scale(0.92);
  transition: transform var(--transition-speed) ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cart-content h2 {
  color: #0070dd;
  font-size: 35px;
}
.cart-item {
  font-size: 16px;
  font-weight: 700;

  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.cart-thumb {
  width: 60px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.cart-item-right {
  flex: 1;
}

.cart-title {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.cart-price {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #444;
}

.qty-minus,
.qty-plus {
  background-color: unset;
  border: none;
  font-size: 25px;
  font-weight: 600;
  padding: 10px;
}
.cart-qty-input {
  padding: 0.5rem;
  width: 100%;
  max-width: 60px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;

  border-radius: 5px;
  background-color: #f2f2f2;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.quantity-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 15px;

  border-radius: 5px;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#cart-total {
  font-size: 20px;
  font-weight: 500;
}

.close-cart-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--light-text);
  font-size: 1.8rem;
  cursor: pointer !important;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.3s;
}

.remove-item-btn {
  background: transparent;
  border: none;
  color: var(--light-text);
  font-size: 14px;
  cursor: pointer !important;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.3s;
  font-weight: 600;
}

.remove-item-btn:hover {
  transform: scale(10.25rem);
}

#checkout-btn {
  width: 100%;
  background-color: #0070dd;
  border-color: #0070dd;
  color: #fff;
  font-weight: 700;
  padding: 0.8em 1.8em;
  font-size: 1rem;
  margin-top: 1rem;
  border-radius: var(--radius);
  text-transform: uppercase;
  cursor: pointer !important;
  transition: background-color var(--transition-speed) ease,
    color var(--transition-speed) ease, transform 0.2s ease,
    box-shadow 0.2s ease;
  display: inline-block;
  text-align: center;
  letter-spacing: 0.8px;
}

#checkout-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.toast {
  cursor: pointer;
}
.toast:hover {
  background-color: #c40000; /* або інший колір для ефекту */
  transform: translateX(-50%) scale(1.1);
}

#open-cart-btn {
  border: none;
  background-color: transparent;
  font-size: 18px;
  display: flex;
  align-items: center;
  position: relative;
  line-height: 20px;
}

#cart-count {
  display: none;
  font-size: 13px;
  padding: 4px;
  color: #fff;
  background-color: #0070dd;
  border-radius: 100px;

  width: auto;
  min-width: 20px;
  height: 20px;
  line-height: 100%;
  position: absolute;
  bottom: 12px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  /* --- HERO & BUNDLE --- */
  .hero-section {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-comic-split {
    flex-basis: 45%;
    min-width: 320px;
  }
  .bundle-images a {
    flex-basis: 32%;
    max-width: 300px;
  }

  /* --- COMIC DETAIL PAGE --- */
  .comic-detail-container {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .comic-detail-section .comic-description {
    font-size: 14px;
    line-height: 1.6;
  }
  .comic-info h2 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
  }

  /* --- MODAL --- */
  .modal-content {
    max-width: 750px; /* More appropriate max-width for single column */
    width: 95vw;
    padding: 1.5rem;
  }
  .modal-layout-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  .modal-image-display-area,
  .modal-form-container {
    flex-basis: auto;
    max-width: 100%;
    width: 100%;
  }
  .modal-comic-info {
    text-align: center;
  }
  .modal-comic-info h3 {
    font-size: 1.8rem; /* Correct size for the title */
  }

  .modal-bundle-grid img {
    width: 40%;
  }

  .modal-bundle-grid img:nth-of-type(2) {
    transform: translateY(-5%) translateX(0) scale(1.05);
  }
  .modal-bundle-grid img:nth-of-type(3) {
    transform: translateX(35%) rotate(10deg);
  }

  .modal-bundle-grid img:nth-of-type(1) {
    transform: translateX(-35%) rotate(-10deg);
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 60px;
  }

  .nav-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
  }

  /* .nav-logo img {
    height: 45px;
  } */

  .nav-links {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin: 0;
    padding: 0;
  }

  .nav-links a {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .hero-section {
    flex-direction: column;
    height: auto;
  }

  .hero-comic-split {
    min-height: 60vh;
    flex-basis: auto;
    text-align: center;
  }

  .hero-comic-split:hover {
    flex-grow: 0;
  }

  .hero-buttons {
    flex-direction: column;
    max-width: 250px;
    margin: 0 auto; /* Center buttons */
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .comic-detail-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .comic-params {
    column-count: 2;
    column-gap: 2rem;
    font-size: 14px; /* Ensure readable font size */
    text-align: left;
    max-width: 500px;
    margin: 0 auto 1.5rem;
  }

  .slider {
    min-height: 350px;
    aspect-ratio: 4/5;
    margin: 0 auto;
  }

  .slider-track img {
    aspect-ratio: 4/5;
  }

  .bundle-container h2 {
    font-size: clamp(1.8rem, 4.5vw, 2.4rem);
  }

  /* Modal adjustments for mobile */
  .modal-layout-container {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
  }

  .modal-image-display-area {
    display: none;
  }

  .modal-form-container {
    flex-basis: 100%;
    max-width: 100%;
    width: 100%;
  }

  .modal-comic-info {
    text-align: center;
  }

  .modal-main-image {
    max-height: 300px;
    margin: 0 auto;
  }

  .modal-bundle-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
  }

  #checkout-form {
    max-width: 400px;
    margin: 0 auto;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  #checkout-form .form-group {
    grid-column: 1 / -1; /* Force all items to span the full single column */
  }

  .modal-content {
    padding: 1.25rem;
  }

  .modal-comic-info h3 {
    font-size: 1.3rem;
  }

  #checkout-form input[type="text"],
  #checkout-form input[type="tel"],
  #checkout-form input[type="email"] {
    font-size: 0.9rem;
    padding: 0.65rem;
    width: 100%;
  }

  .btn-lg {
    padding: 0.8em 1.5em;
    font-size: 0.95rem;
  }

  .comic-info-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    margin: 0;
    border-radius: 0;
    position: sticky;
    top: 60px;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .comic-info-mobile .comic-title {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    flex: 1;
    text-align: left;
    padding-right: 1rem;
  }

  .comic-info-mobile .btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
  }

  .comic-info-mobile .btn {
    padding: 0.6em 1.2em; /* Larger padding for bigger button */
    font-size: 0.95rem; /* Larger font size */
  }

  .comic-info-mobile .btn {
    flex: 1;
  }

  .mobile-price {
    font-size: 1.1rem;
    color: #fff;
    display: flex;
    align-items: center;
  }

  .footer-main-content {
    align-items: center;
  }
}

/* Hide comic-info-mobile by default (non-mobile) */
.comic-info-mobile {
  display: none;
}

/* HIDE NAV MENU LABEL ON MOBILE */
@media (max-width: 768px) {
  .nav-menu-label-item {
    display: none;
  }

  .right-buttons {
    width: 50%;
    /* flex: 1 1 calc(50% - 1rem); */
  }
}

/* Comet Trail Effect */
#comet-trail-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.comet-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 223, 107, 0.8) 0%,
    rgba(255, 223, 107, 0) 65%
  );
  display: none; /* Hidden by default */
  width: 12px;
  height: 12px;
}

.comet-particle--active {
  display: block;
  animation: fade-and-shrink 0.7s cubic-bezier(0.1, 0.7, 1, 0.1) forwards;
}

@keyframes fade-and-shrink {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0);
    opacity: 0;
  }
}

/* Success Modal Styles */
.success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.success-modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  margin: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.success-modal h2 {
  color: #2c5aa0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.success-modal p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.success-close-btn {
  background: #2c5aa0;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.success-close-btn:hover {
  background: #1e3d6f;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0.5rem;
  }

  .right-buttons {
    width: 65%;
    justify-content: space-between;
  }

  .btn-cart {
    padding: 10px;
  }

  /* .nav-logo img {
    height: 40px;
  } */

  .nav-links {
  }

  .nav-links a {
  }
  .hero-overlay {
    opacity: unset;
    background: none;
  }

  #cart-count {
    bottom: 23px;
  }

  .hero-buttons {
    margin-bottom: 12px;
  }

  .hero-comic-split {
    min-height: unset;
  }

  .light-theme .btn-detail:hover 
  {background-color:unset;
    border-color:unset;
    color: unset;
  }
}
