/* ========================================================
   BASE STYLES
======================================================== */
html, body {
  height: 100%;
  margin: 0;
  padding-top: 30px;
  font-family: Quicksand;
  line-height: 1.6;
  background-color: #1e1c26;
  color: #ded9c8;
  text-align: left;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 2rem;
}

h1, h2, h3 {
  color: #fff;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 2rem;
  text-align: center;
}

h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid #3d3b46;
  padding-bottom: 0.5rem;
}

header h1 {
  font-size: 2rem;
  color: #ffa1b7;
}


/* =====================================================
   NAVIGATION
===================================================== */

nav,
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #14121C;
  padding: 0 1.8rem;
  height: 75px;
  z-index: 1003;  
  transition: all 0.3s ease;
}

.nav-links {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 2rem;
  align-items: center;
}

ul.nav-links {
  margin-right: 7rem;
}

nav a,
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 1.5rem 0;
}

nav a:hover,
.nav-links a:hover {
  color: #fff;
  text-shadow: 0 0 15px #FF5AF7;
}

/* ----------------------------
   Logo
---------------------------- */

.logo {
  position: relative;
  padding-left: 15px;
  margin-top: 40px;
  z-index: 1005;
}

.logo img {
  max-width: 250px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 3px #FF5AF7);
}

.icon {
  max-width: 50px;
}

/* ----------------------------
   Dropdown
---------------------------- */

.dropdown {
  position: relative;
}

.dropdown-content li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-toggle {
  color: #fff !important;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 1.5rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.dropdown-toggle::after {
  content: "▾";
  font-size: 1.2em;
  color: #FF5AF7;
  margin-left: 0.3rem;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(255, 90, 247, 0.7);
}

.dropdown-toggle:hover::after {
  text-shadow: 0 0 10px rgba(255, 90, 247, 0.9);
}

.dropdown.active .dropdown-toggle::after {
  transform: rotate(180deg);
  text-shadow: 0 0 12px rgba(255, 90, 247, 1);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1E1A2B;
  min-width: 200px;
  padding: 1rem 0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.dropdown-content a {
  color: #E2D9FF !important;
  padding: 0.75rem 1.5rem;
  display: block;
  transition: all 0.2s ease;
}

.dropdown-content a:hover {
  background-color: rgba(255, 90, 247, 0.1);
  text-shadow: none;
  padding-left: 1.75rem;
}

.dropdown.active .dropdown-content {
  display: block;
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem; /
  margin-left: auto; 
  z-index: 1001;
  order: 2; 
}

.hamburger-inner {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #E2D9FF;
  position: relative;
  transition: transform 0.3s ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: '';
  width: 24px;
  height: 2px;
  background-color: #E2D9FF;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease;
}

.hamburger-inner::before {
  top: -8px;
}

.hamburger-inner::after {
  top: 8px;
}

.hamburger.active .hamburger-inner {
  transform: rotate(45deg);
}

.hamburger.active .hamburger-inner::before {
  transform: rotate(90deg);
  top: 0;
}

.hamburger.active .hamburger-inner::after {
  transform: rotate(90deg);
  top: 0;
}

.hamburger:hover .hamburger-inner,
.hamburger:hover .hamburger-inner::before,
.hamburger:hover .hamburger-inner::after {
  background-color: #FF5AF7;
}
  /* initially hide the mobile one */
  .cart-link-mobile {
    display: none;
  }
/* === MOBILE NAVIGATION === */
@media (max-width: 992px) {

.dropdown-toggle {
    width: 100%;
    text-align: center;
    padding: 1rem !important; /* Add consistent padding */
    justify-content: center; /* Center the text and arrow */
  }


    nav, .main-nav {
    padding: 0 1.5rem; /* Consistent padding on both sides */
    justify-content: space-between; /* Ensures proper spacing */
  }

  .hamburger {
    display: block;
    padding: 0.5rem 1.5rem; /* Ensure consistent padding */
  }

  .nav-links {

    width: 100%;
    display: flex;
    justify-content: ;
    left: 50%;
    right: 0;
    transform: translateX(-50%) translateY(-200%);
    position: fixed;
    top: 75px;
    background-color: #14121C;
    flex-direction: column;
    gap: 1rem;
    padding: 2.2rem;
    transform: translateY(-200%);
    transition: transform 0.3s ease;
    z-index: 1003 !important;
  }

  .nav-links.active {
    transform: translateX(-50%) translateY(0);
  }

  .nav-links a,
  .dropdown-toggle {
    padding: 1rem 0;
    font-size: 1.2rem;
    text-align: center;
    width: 100%;
  }
  /* hide the desktop icon on mobile */
  .cart-link {
    display: none;
  }

  .dropdown-content {
    position: static;
    display: none;
    padding-left: 1rem;
    box-shadow: none;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }
    .nav-links ul, 
  .nav-links li {
    /* ensure children stack and center properly */
    width: 100%;
    text-align: center;
  }
    .cart-link-mobile {
    display: block;
    position: absolute;
    top:.2rem;   
    left: 17rem;   
    z-index: 1004;   
  }
}

@media (max-width: 700px) {

  .cart-link-mobile {
    display: block;
    position: absolute;
    top:.2rem;   
    left: 8.9rem;   
    z-index: 1004;   
  }
}


/* ===== TIP JAR ===== */

.tip-jar {
  position: relative;
  display: inline-block;
}

.tip-jar-toggle {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.tip-options {
  display: none;
  position: absolute;
  background-color: #1e1c26;
  border: 1px solid #2d2b36;
  border-radius: 8px;
  padding: 1rem;
  z-index: 100;
  right: 0;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tip-options.show {
  display: block;
}

.tip-amount {
  display: block;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #2d2b36;
  border-radius: 4px;
  text-align: center;
  transition: all 0.2s ease;
}

.tip-amount:hover {
  background: #3d3b46;
}

.tip-message {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: #aaa;
}
/* ----------------------------------
   Center tip-jar panel under its button
----------------------------------- */
@media (max-width: 992px) {
  .tip-jar {
    /* relative to viewport so centering works */
    position: static;
    text-align: center;
  }

  .tip-options {
    /* override absolute right-alignment */
    position: static;
    margin: 1rem auto 0;
    display: none;
    /* remove right and use auto margins */
    right: auto;
    left: auto;
    transform: none;
    width: calc(100% - 2rem);  /* give it some breathing room */
    box-sizing: border-box;
  }

  .tip-options.show {
    display: block;
  }
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background-color: #14141e;
  color: #b8b4a5;
  font-size: 0.9rem;
  border-top: 1px solid #2d2b36;
}

footer a {
  color: #e55eff;
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #ffa1b7;
  text-shadow: 0 0 8px rgba(255, 161, 183, 0.5);
}


/* ===== HEADER & HERO ===== */
header {
  color: #ded9c8;
  text-align: center;
}

.home-hero {
  position: relative;
  height: 85vh;
  max-height: 1050px;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  width: 95%;
  color: white;
  size: 2em;
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  padding: 20px;
}

@media (max-width: 768px) {
  .home-hero {
    height: 77vh;
    min-height: 555px;
  }

  .hero-bg-video {
    object-position: 80% center;
  }
}

/* ===== BUTTONS ===== */
.cta-button {
  background-color: #e55eff;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-size: 1.1rem;
  margin: 0 0.5rem;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.cta-button:hover {
  background-color: #ffa1b7;
}

.cta-button.secondary {
  background-color: transparent;
  border: 2px solid white;
}

.cta-button.secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.painting-actions {
  display: flex;
  justify-content: center;
  padding: 0 1.5rem 1.5rem;
}


/* ===== GRID SYSTEMS ===== */
.category-grid,
.paintings-grid,
.products-grid,
.accessory-grid,
.package-grid {
  display: grid;
  gap: 2rem;
  width: 100%;
  margin: 0 auto;
}

.category-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-top: 2rem;
}

.paintings-grid {
  grid-template-columns: repeat(3, minmax(250px, 1fr));
}

.products-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.accessory-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.package-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Responsive Grid Adjustments */
@media (max-width: 1200px) {
  .paintings-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .category-grid,
  .paintings-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .category-image,
  .painting-image,
  .product-image {
    height: 180px;
  }
}

/* ===== CARD WRAPPERS ===== */
.category-card,
.painting-card,
.product-card,
.accessory-item,
.package-item {
  background-color: #2d2e4c;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #ded9c8;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover,
.painting-card:hover,
.product-card:hover,
.accessory-item:hover,
.package-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* ===== IMAGE WRAPPERS ===== */
.category-image,
.painting-image,
.product-image {
  position: relative;
  height: 280px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.painting-image img,
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* ===== CARD INFO ===== */
.category-info,
.painting-info,
.product-info {
  padding: 1.5rem;
}

.category-info h3,
.painting-info h3,
.product-info h3 {
  color: #ffa1b7;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.category-info p,
.painting-meta,
.product-meta {
  color: #b8b4a5;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.painting-price,
.product-price {
  color: #e55eff;
  font-weight: bold;
  font-size: 1.2rem;
  margin: 1rem 0;
}


/* ===== WORK CATEGORIES ===== */
.work-categories {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.work-categories h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #e55eff;
  position: relative;
  padding-bottom: 1rem;
}

.work-categories h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, #e55eff, #ffa1b7);
}

/* ===== PAINTINGS GALLERY ===== */
.paintings-gallery {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.gallery-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-intro p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ===== ABOUT SECTION ===== */
.about-preview {
  background-color: #2d2e4c;
  padding: 4rem 2rem;
}

.about-preview .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-content {
  text-align: center;
}

.about-image img {
  width: 100%;
  max-width: 200px;
  border-radius: 50%;
  border: 4px solid #e55eff;
  margin: 0 auto;
  display: block;
}

/* Responsive layout for about */
@media (min-width: 768px) {
  .about-preview .container {
    flex-direction: row;
    align-items: center;
  }

  .about-content {
    text-align: left;
    flex: 1;
  }

  .about-image {
    flex: 1;
    text-align: center;
  }
}

  /*Quantity Styling*/
  .sticker-quantity{
    color:#b8b4a5;
    font-size: 1.1em;
    margin: 1em 0;
  }
  .stock-quantity {
    color: #333;
    font-size: 1.1em;
    margin: 1em 0;
  }
  
  .low-stock-warning {
    color: #d62b1f;
    font-weight: bold;
  }

/* ===== AVATAR SHOP & CTA SECTION ===== */
.avatar-showcase,
.accessories,
.discount-packages,
.cta-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.avatar-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background-color: #2d2e4c;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.avatar-image {
  max-width: 300px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.avatar-info {
  text-align: center;
  max-width: 600px;
}

@media (min-width: 992px) {
  .avatar-details {
    flex-direction: row;
    text-align: left;
  }

  .avatar-info {
    text-align: left;
  }
}

.cta-section {
  text-align: center;
  padding: 3rem 1rem;
  background-color: #2d2e4c;
  border-radius: 10px;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
/* ===== DETAILS PAGE WRAPPERS ===== */
.painting-details,
.product-details {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.painting-container,
.product-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (min-width: 992px) {
  .painting-container,
  .product-container {
    flex-direction: row;
  }
}

/* ===== IMAGE WRAPPERS ===== */
.painting-gallery,
.product-gallery {
  flex: 1;
}

.main-image {
  background: #2d2e4c;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
}

.main-image img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

/* ===== THUMBNAILS ===== */
.thumbnails {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding: 1rem 0;
}

.thumbnails img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 5px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.thumbnails img:hover {
  border-color: #e55eff;
  transform: scale(1.05);
}

.thumbnails img.active {
  border-color: #e55eff !important;
  transform: scale(1.1);
}

/* ===== PRODUCT INFO ===== */
.painting-info,
.product-info {
  flex: 1;
  background: #2d2e4c;
  padding: 2rem;
  border-radius: 10px;
}

.painting-info h1,
.product-info h1 {
  color: #ffa1b7;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.painting-meta,
.product-meta {
  margin-bottom: 2rem;
  color: #b8b4a5;
}

.painting-meta p,
.product-meta p {
  margin-bottom: 0.5rem;
}

.painting-description,
.product-description {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}
.thumbnail {
  cursor: pointer;
  transition: opacity 0.2s;
  opacity: 0.7;
  pointer-events: auto;
}
.thumbnail:hover, 
.thumbnail.active {
  opacity: 1;
  outline: 2px solid var(--accent-color);
}
.thumbnail img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: bold;
}

.status-badge.available {
  background-color: #4CAF50;
  color: white;
}

.status-badge.sold {
  background: #14141e;
  color: #ded9c8;
}

.status-badge.reserved {
  background: #ffa502;
  color: #1e1c26;
}

/* ===== PRICE STYLES ===== */
.painting-price,
.product-price {
  font-size: 1.8rem;
  color: #e55eff;
  font-weight: bold;
  margin-bottom: 2rem;
}

.original-price {
  text-decoration: line-through;
  color: #888;
  font-size: 1rem;
  margin-left: 0.5rem;
}

.sale-price {
  color: #d32f2f;
  font-weight: bold;
}

/* ===== ACTIONS ===== */
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-selector select {
  background: #1e1c26;
  color: #ded9c8;
  border: 1px solid #514183;
  border-radius: 5px;
  padding: 0.5rem;
}

/* ===== RELATED SECTION ===== */
.related-paintings,
.related-products {
  margin-top: 4rem;
}

.related-paintings h2,
.related-products h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #e55eff;
}

/* ===== CUSTOM ORDER FORM ===== */
.custom-order-form {
  max-width: 1140px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #2d2e4c;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: #ded9c8;
}

.custom-order-form h2 {
  text-align: center;
  color: #e55eff;
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.custom-order-form fieldset {
  border: 1px solid #514183;
  border-radius: 8px;
  padding: 0;
  margin-bottom: 1.5rem;
  position: relative;
  background-color: rgba(30, 28, 38, 0.5);
  transition: all 0.3s ease;
}

.custom-order-form legend {
  padding: 1rem 1.5rem;
  font-weight: bold;
  color: #ffa1b7;
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
}

/* Collapsible sections */
.collapsible {
  transition: all 0.3s ease;
}

.collapsible .collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 1rem;
}

.collapsible.active .collapsible-content {
  max-height: 2000px;
  padding: 0 1rem 1rem;
}

.collapsible legend {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem 1rem;
}

.collapsible .toggle-button {
  background: none;
  border: none;
  font-size: 1.2rem;
  margin-right: 0.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  color: #e55eff;
}

.collapsible.active .toggle-button {
  transform: rotate(45deg);
}

/* Form Fields */
.custom-order-form label {
  display: block;
  margin: 1rem 0 0.5rem;
  color: #b8b4a5;
  font-size: 0.95rem;
}

.custom-order-form input,
.custom-order-form textarea,
.custom-order-form select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #514183;
  border-radius: 6px;
  background-color: #1e1c26;
  color: #ded9c8;
  font-family: Quicksand;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-order-form input:focus,
.custom-order-form textarea:focus,
.custom-order-form select:focus {
  border-color: #e55eff;
  box-shadow: 0 0 0 2px rgba(229, 94, 255, 0.3);
  outline: none;
}

.custom-order-form textarea {
  min-height: 100px;
  resize: vertical;
}

.custom-order-form input[type="file"] {
  padding: 0.5rem;
  background-color: transparent;
  border: 1px dashed #514183;
}

/*Form Row & Group Helpers*/
.form-row {
  margin-bottom: 1rem;
}

.form-row.columns {
  display: flex;
  gap: 1rem;
}

.form-row.columns .form-group {
  flex: 1;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #d1d1d1;
}


/* Submit Button */
.custom-order-form button[type="submit"] {
  background-color: #e55eff;
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.custom-order-form button[type="submit"]:hover {
  background-color: #ffa1b7;
  transform: translateY(-2px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInOut {
  0%   { opacity: 0; transform: translateY(20px); }
  10%  { opacity: 1; transform: translateY(0); }
  90%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(20px); }
}

@keyframes loading {
  0%   { width: 0%; left: 0; }
  50%  { width: 100%; left: 0; }
  100% { width: 0%; left: 100%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== UTILITIES ===== */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #6d6b76, #3d3b46);
  z-index: 1000;
  animation: loading 2s linear infinite;
  display: none;
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 0.5em;
  vertical-align: middle;
}

body.modal-open {
  overflow: hidden; /* Prevent scrolling when modal is open */
}
.secondary-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: #6d6b76;
  border: 1px solid #6d6b76;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-button:hover {
  background: rgba(109, 107, 118, 0.1);
  color: #fff;
  border-color: #7d7b86;
}

.international-shipping-cta {
  background: rgba(109, 107, 118, 0.1);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  text-align: center;
  border: 1px dashed #6d6b76;
}

.international-shipping-cta p {
  margin: 0 0 1rem 0;
  color: #d1d1d1;
  font-size: 0.95rem;
}

/* ===== STATUS & FEEDBACK ===== */
.success-message {
  color: #28a745;
  margin: 1rem 0;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.error-message {
  text-align: center;
  padding: 2rem;
  background: #1e1c26;
  border-radius: 12px;
  border: 1px solid #ff3b30;
  color: #ff6b6b;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.error-message p {
  margin-bottom: 1.5rem;
}

.empty-cart {
  text-align: center;
  padding: 2rem;
  color: #a5a3ad;
  background: #1e1c26;
  border-radius: 12px;
  border: 1px solid #2d2b36;
}

.loading-message {
  text-align: center;
  padding: 2rem;
  color: #a5a3ad;
}

/* ===== RESPONSIVE FORM FIELDS ===== */
@media (max-width: 768px) {
  .custom-order-form {
    padding: 1.5rem;
    margin: 1rem;
    width: calc(100% - 3rem); /* Account for margin */
    box-sizing: border-box;
  }

  /* Ensure form inputs don't overflow */
  .custom-order-form input,
  .custom-order-form textarea,
  .custom-order-form select {
    width: 100%;
    box-sizing: border-box; /* Include padding in width calculation */
  }

  /* Adjust fieldset padding */
  .custom-order-form fieldset {
    margin-left: 0;
    margin-right: 0;
  }

  /* Make file input more mobile-friendly */
  .custom-order-form input[type="file"] {
    padding: 0.8rem 0;
  }

  /* Adjust button size */
  .custom-order-form button[type="submit"] {
    padding: 0.8rem;
    font-size: 1rem;
  }
}

/* Additional mobile-specific fixes */
@media (max-width: 480px) {
  /* Make date input more visible */
  input[type="date"] {
    min-height: 44px; /* Better touch target */
  }

  /* Prevent textarea from being too tall */
  .custom-order-form textarea {
    min-height: 80px;
  }

  /* Adjust collapsible sections */
  .collapsible legend {
    padding: 0.8rem 0.5rem;
    font-size: 0.95rem;
  }

  .collapsible .toggle-button {
    font-size: 1rem;
  }
}
/* ===== RESPONSIVE TOUCHES ===== */
@media (max-width: 768px) {
  .payment-options {
    flex-direction: column;
  }

  .form-row.columns {
    flex-direction: column;
    gap: 0;
  }

.cart-item {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

  .cart-item-image {
    max-width: 100%;
    width: 100%;
}
  .painting-details {
    padding: 0 0.5rem !important;
  }
  
  .painting-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 0;
  }
  
  .painting-gallery, 
  .painting-info {
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
  }
  
  .main-image-container {
    margin: 0 -0.5rem; /* Remove side padding */
    width: calc(100% + 1rem); /* Compensate for negative margin */
  }
  
  .painting-info {
    padding: 1rem 0.5rem !important;
  }
  
  .painting-info h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }
  
  .painting-meta p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
  }
  
  .painting-description {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  .painting-actions {
    padding: 0 !important;
  }
  
  .cta-button {
    width: 100%;
    text-align: center;
    margin: 0.5rem 0 !important;
  }
  
  .thumbnails {
    padding: 0.5rem 0;
    gap: 0.5rem;
  }
  
  .thumbnails img {
    width: 60px;
    height: 60px;
  }
  
  .zoom-controls {
    bottom: 10px;
    right: 10px;
  }
  
  .zoom-controls button {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
    .cta-button.secondary {
    width: auto; /* Remove full width */
    display: inline-block; /* Keep it inline */
    padding: 0.75rem 1.25rem; /* Slightly smaller padding */
    margin: 0.5rem 0 !important;
    box-sizing: border-box; /* Include padding in width calculation */
    white-space: nowrap; /* Prevent text wrapping */
  }
  .painting-actions {
    text-align: center;
  }
}


/*Cart Modal & Toast Confirmation*/
#cart-modal {
  display: none;
  position: fixed;
  z-index: 1004;
  background: rgba(0,0,0,0.5);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.modal-content {
  background: #2d2e4c;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  z-index: 1002;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #ded9c8;
}

.cart-confirmation {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #4CAF50;
  color: white;
  padding: 15px;
  border-radius: 5px;
  z-index: 1000;
  animation: fadeInOut 2s ease-in-out;
}


/*Cart Quantity Controls (Utility Buttons)*/
.quantity-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #3d3b46;
  background: #2d2b36;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.2s ease;
}

.quantity-btn:hover:not(:disabled) {
  background: #3d3b46;
  border-color: #4d4b56;
}

.quantity-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #2d2b36 !important;
  border-color: #2d2b36 !important;
}

.quantity-input {
  width: 60px;
  height: 36px;
  text-align: center;
  border: 1px solid #3d3b46;
  border-radius: 6px;
  background: #2d2b36;
  color: #fff;
  font-weight: bold;
}

.quantity-input:focus {
  outline: none;
  border-color: #6d6b76;
}


/*Responsive*/
@media (max-width: 768px) {
  /* Hero adjustments */
  .home-hero {
    height: 77vh;
    min-height: 555px;
  }

  .hero-bg-video {
    object-position: 80% center;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1.2rem;
  }

  /* Grid layout adjustments */
  .category-grid,
  .paintings-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .category-image,
  .painting-image,
  .product-image {
    height: 180px;
  }

  /* About section layout */
  .about-preview .container {
    flex-direction: column;
  }

  .about-content {
    text-align: center;
  }

  /* Avatar layout */
  .avatar-details {
    text-align: center;
  }

  .avatar-image {
    max-width: 200px;
  }

  /* Custom form adjustments */
  .custom-order-form {
    padding: 1.5rem;
  }

  .custom-order-form h2 {
    font-size: 1.8rem;
  }

  .custom-order-form legend {
    padding: 0.8rem 1rem;
  }

  /* Payment section layout */
  .payment-options {
    flex-direction: column;
  }

  .form-row.columns {
    flex-direction: column;
    gap: 0;
  }
}


/* ========== CART LAYOUT ========== */
.cart-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .cart-container {
    flex-direction: row;
    align-items: flex-start;
  }

  .cart-items {
    flex: 2;
  }

  .cart-summary {
    flex: 1;
    position: sticky;
    top: 1rem;
  }
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #2d2e4c;
  border-radius: 8px;
  border: 1px solid #514183;
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.remove-item {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fff;
  transition: color 0.2s ease;
  padding: 0.5rem;
  line-height: 1;
}

.remove-item:hover {
  color: #ff3b30;
}

.cart-item-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: #fff;
}

.cart-item-price {
  font-weight: bold;
  margin-bottom: 1rem;
  color: #fff;
  font-size: 1.1rem;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.quantity-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #3d3b46;
  background: #2d2b36;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.2s ease;
}

.quantity-btn:hover:not(:disabled) {
  background: #3d3b46;
  border-color: #4d4b56;
}

.quantity-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #2d2b36 !important;
  border-color: #2d2b36 !important;
}

.quantity-input {
  width: 60px;
  height: 36px;
  text-align: center;
  border: 1px solid #3d3b46;
  border-radius: 6px;
  background: #2d2b36;
  color: #fff;
  font-weight: bold;
}

.quantity-input:disabled {
  opacity: 0.7;
  background: #2d2b36;
}

.quantity-input:focus {
  outline: none;
  border-color: #6d6b76;
}

.cart-summary {
  padding: 1.5rem;
  background: #1e1c26;
  border-radius: 12px;
  border: 1px solid #2d2b36;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #2d2b36;
  color: #fff;
}

.summary-row.total {
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #2d2b36;
}

/* ========== CHECKOUT PAGE ========== */
.checkout-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  color: #fff;
}

.checkout-page h1 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.checkout-page h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid #3d3b46;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

/* ========== CHECKOUT CONTAINER LAYOUT ========== */
.checkout-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 992px) {
  .checkout-container {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .order-summary {
    flex: 1;
    min-width: 300px;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .customer-details {
    flex: 2;
    min-width: 400px;
  }

  .payment-methods {
    flex: 1;
    min-width: 300px;
    position: sticky;
    top: 1rem;
  }
}

/* ========== PANEL STYLING ========== */
.order-summary,
.payment-methods,
.customer-details {
  background: #1e1c26;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #2d2b36;
}

/* ========== MINI CART INSIDE CHECKOUT ========== */
.cart-item {
  position: relative; /* <-- REQUIRED for absolute positioning to work */
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #2d2e4c;
  border-radius: 8px;
  border: 1px solid #514183;
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  padding: 5px;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-summary .cart-item-image{
      width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  padding: 5px;
}

.cart-item-image:hover img {
  transform: scale(1.05);
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}

.cart-item-price,
.cart-item-quantity {
  font-size: 0.9rem;
  color: #a5a3ad;
}

/* ========== ORDER TOTALS ========== */
.order-totals {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #2d2b36;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  color: #fff;
}

.summary-row.total {
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #2d2b36;
}

/* ========== PAYMENT OPTIONS ========== */
.payment-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.payment-option {
  flex: 1;
}

.payment-option input {
  display: none;
}

.payment-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid #2d2b36;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.payment-option input:checked + label {
  border-color: #6d6b76;
  background: rgba(109, 107, 118, 0.1);
}

.payment-icon {
  width: 24px;
  height: 24px;
}

.payment-icon svg {
  width: 100%;
  height: 100%;
}

.payment-instructions {
  padding: 1.5rem;
  background: #2d2b36;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.payment-instructions p {
  margin: 0 0 0.5rem 0;
}

.payment-confirmation {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #2d2b36;
  border-radius: 8px;
}

.payment-confirmation label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* ========== FORM STYLES ========== */
.form-row {
  margin-bottom: 1rem;
}

.form-row.columns {
  display: flex;
  gap: 1rem;
}

.form-row.columns .form-group {
  flex: 1;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #d1d1d1;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid #3d3b46;
  background: #2d2b36;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a5a3ad' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #6d6b76;
  box-shadow: 0 0 0 2px rgba(109, 107, 118, 0.2);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* ========== PLACE ORDER BUTTON ========== */
#place-order-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  margin-top: 1rem;
  background: #4a8af4;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#place-order-btn:hover {
  background: #5a9aff;
}