html {
  background-color: #f4f4f4; /* Match body background */
  scroll-behavior: smooth;
}
body {
  font-family: sans-serif;
  margin: 5px;
  background-color: #f4f4f4;
  color: #333;
}

/* Ensure consistent row visibility */
@media screen and (min-width: 769px) {
  body {
    overflow-y: scroll;
  }

  /* Add minimal padding to ensure last row is fully visible */
  .table-responsive-wrapper::after {
    content: "";
    display: block;
    height: 20px; /* Reduced from 120px */
  }
}
/* Specific styling for main title */
h1.main-title {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 30px;
  font-size: 25px;
}

/* General h1 styling for any future h1 elements */
h1 {
  color: #2c3e50;
}
.search-container {
  text-align: center;
  margin-bottom: 30px;
}
.search-container input[type="text"] {
  padding: 10px;
  font-size: 16px;
  border: 2px solid #333;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  padding-right: 30px;
}
.search-container input[type="submit"] {
  padding: 10px 15px;
  border: 2px solid #333;
  background-color: #4caf50;
  color: white;
  cursor: pointer;
  border-radius: 0 5px 5px 0;
  transition: background-color 0.3s ease;
}
.search-container input[type="submit"]:hover {
  background-color: #45a049;
}
.search-input-wrapper {
  position: relative;
  display: inline-block;
  width: 90%;
  max-width: 500px;
  margin-bottom: 10px;
}
.clear-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #999;
  font-size: 44px;
  display: none;
  line-height: 1;
}
.clear-search-btn:hover {
  color: #333;
}
.clear-search-btn.active {
  display: block;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 5px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  table-layout: fixed;
}

tbody tr {
  height: 80px; /* Reduced from 120px */
  vertical-align: middle;
}
th,
td {
  border: 1px solid #ddd;
  padding: 12px 15px;
  text-align: center;
  word-break: break-word;
  overflow: hidden;
  vertical-align: middle;
}
th {
  background-color: #4caf50;
  color: white;
  cursor: pointer;
  position: sticky;
  top: -1px; /* Adjusted for 1px border to prevent gap */
  z-index: 100;
  user-select: none;
  transition: background-color 0.2s ease;
}
th:hover {
  background-color: #45a049;
}
th[data-sort-key] {
  background-color: #4caf50;
  position: sticky;
  top: -1px; /* Adjusted for 1px border to prevent gap */
  z-index: 100;
}
th[data-sort-key]:hover {
  background-color: #45a049;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}
th[data-sort-key]:hover::after {
  content: "Click to sort";
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
}
th .sort-arrow {
  font-size: 1.2em;
  margin-left: 8px;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  opacity: 0.7; /* Default opacity for sort arrows */
}
th .sort-arrow.active-sort {
  opacity: 1; /* Active sort arrow opacity */
}
tr:nth-child(even) {
  background-color: #f9f9f9;
}
tr:hover {
  background-color: #f1f1f1;
}
a {
  color: #3e22a2;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.product-image {
  max-width: 100px;
  max-height: 100px;
  object-fit: contain;
}
.price {
  font-weight: bold;
  color: #27ae60;
}
.rating {
  color: #f39c12;
}
.title-cell {
  max-width: 300px;
  word-wrap: break-word;
  text-align: left;
}

td:nth-child(4) {
  text-align: left;
}
td .medal-icon {
  height: 100px;
  width: auto;
  margin-left: 5px;
  vertical-align: middle;
}
.no-results {
  text-align: center;
  font-size: 18px;
  color: #777;
  margin-top: 30px;
}

/* Column Widths */
.th-asin {
  width: 16%;
}
.th-link {
  width: 7%;
}
.th-title {
  width: 25%;
}
.th-price {
  width: 10%;
}
.th-rating {
  width: 10%;
}
.th-review-count {
  width: 10%;
}
.th-score {
  width: 7%;
}
.th-medal {
  /* width: 5%; */ /* Remove width for medal column */
}
.th-image {
  width: 10%;
}
.th-rank {
  width: 5%;
}
td.td-product-link a {
  text-decoration: underline !important;
}
.th-score .sort-arrow {
  vertical-align: middle;
}
.score-cell,
.medal-cell {
  text-align: center;
  vertical-align: middle;
}

/* Scroll indicator - hidden by default, shown on mobile */
.scroll-indicator-mobile {
  display: none; /* Hidden on desktop */
  text-align: right;
  padding: 5px 10px;
  font-size: 0.9em;
  color: #555;
  background-color: #f0f0f0; /* Light background for visibility */
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  margin-top: 5px;
}

/* Styles for the new mobile scroll arrow - MOVED HERE */
.mobile-scroll-arrow-container {
  display: none; /* Hidden by default, shown in mobile media query */
  padding: 10px 0; /* Add some padding */
  text-align: center; /* Center the image */
}

.mobile-scroll-arrow {
  /* display: block;  Ensured by mobile-specific rule if container is block and text-align center is used */
  /* margin: 0 auto; Ensured by mobile-specific rule */
  width: 50px; /* Or whatever size is appropriate */
  height: auto;
}

/* Container for action buttons above the table */
.top-actions-container {
  margin-bottom: 15px; /* Space below the button container */
  text-align: left; /* Align button to the left */
  margin-top: 5px;
}

.action-button {
  padding: 8px 15px;
  font-size: 14px;
  background-color: #03162b; /* Example blue color */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.action-button:hover {
  background-color: #0056b3;
}

#openTop3Button {
  padding: 6px 10px; /* Reduced padding */
  font-size: 13px; /* Reduced font size */
}

.th-subtitle {
  font-size: 0.8em; /* Smaller font size for the subtitle */
  font-weight: normal; /* Ensure subtitle is not bold if header is */
  display: block; /* Ensures it takes its own line if needed */
  margin-top: 2px; /* Small space between main text and subtitle */
}

/* Responsive table for mobile */
@media screen and (max-width: 768px) {
  h1.main-title {
    font-size: 17px; /* Mobile responsive: min 18px, scales with viewport, max 24px */
  }
  .search-container {
    margin-bottom: 20px; /* Adjust margin for mobile */
  }
  /* Landing page search input and button - ensure they stack if not in header */
  body > .search-input-wrapper {
    /* More specific for landing page */
    width: 80%; /* Allow input to be wider on mobile landing */
    display: block;
    margin: 0 auto 10px auto;
  }
  body > .search-container input[type="submit"] {
    /* More specific for landing page */
    display: block;
    width: 90%; /* Match input wrapper */
    margin: 0 auto;
    font-size: 16px; /* Specific font size for mobile landing page */
  }

  .results-page-header-table {
    display: flex; /* Make the table a flex container */
    flex-direction: column; /* Stack children (td elements via tr) vertically */
    width: 100%;
  }
  .results-page-header-table tr {
    /* Make the row a flex container for its TDs */
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .results-page-header-table td {
    /* Common styles for td in header */
    width: 100% !important; /* Full width */
    text-align: center !important;
    padding: 5px 0;
    margin-bottom: 2px; /* General bottom margin for header cells */
    box-sizing: border-box; /* Ensure padding doesn't add to width */
  }

  .results-page-header-table .logo-cell {
    order: -1; /* Move logo-cell to the top */
    margin-bottom: 5px; /* Reduced bottom margin specifically for the logo cell */
  }

  .results-page-header-table .logo-cell img {
    /* Corrected selector */

    margin: 0 auto; /* Center logo */
    display: block;
  }

  .results-page-header-table .search-cell {
    order: 0; /* Search cell below logo */
  }

  .results-page-header-table .actions-cell {
    order: 1; /* Actions cell last, if it were used */
    display: none; /* Hide if empty or not needed on mobile */
  }

  /* Search bar specific layout */
  .results-page-header-table .search-cell .search-container {
    display: flex; /* Arrange input and button in a row */
    width: 100%;
    margin-bottom: 0; /* Reset margin */
  }

  .results-page-header-table .search-cell .search-input-wrapper {
    width: 85%; /* Changed from 90% */
    margin-bottom: 0;
    margin-right: 0; /* No space between input and button */
    display: flex; /* To help with vertical alignment and clear button */
    position: relative; /* For clear button positioning */
  }

  .results-page-header-table
    .search-cell
    .search-input-wrapper
    input[type="text"] {
    width: 100%;
    box-sizing: border-box;

    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px; /* Rounded corners only on the left */
  }

  .results-page-header-table .clear-search-btn {
    right: 5px; /* Adjust clear button position */
  }

  .results-page-header-table
    .search-cell
    .search-container
    input[type="submit"] {
    width: 20%; /* Changed from 10% */
    padding: 10px 2px;
    font-size: 14px; /* Slightly increased font size */
    margin-left: 0;
    box-sizing: border-box;
    border: 1px solid #5cb85c; /* Match border style of input */
    border-left: none; /* Avoid double border */
    border-radius: 0 4px 4px 0; /* Rounded corners only on the right */
    line-height: 1.2; /* Adjust line height if text is still cut off */
    overflow: hidden; /* Hide overflow text */
    text-overflow: ellipsis; /* Add ellipsis if text is too long */
    white-space: nowrap; /* Prevent text wrapping */
  }

  .results-page-header-table .actions-cell .action-button {
    width: 100%; /* Use full width */
    margin: 5px auto 0 auto;
    padding: 10px 15px; /* Adjusted padding */
    font-size: 16px; /* Adjusted font size */
  }

  .scroll-indicator-mobile {
    display: block; /* Shown on mobile */
  }
  .table-responsive-wrapper {
    overflow-x: auto; /* Enable horizontal scrolling */
    display: block;
    width: 100%;
  }

  table {
    width: auto; /* Allow table to be wider than the screen */
    /* min-width: 900px; */ /* Keep this so the overall table can be wider than viewport for scrolling */
    table-layout: fixed; /* Helps with fixed column widths */
    font-size: 12px; /* Smaller font in table for mobile */
  }
  th,
  td {
    padding: 4px 5px; /* Reduced vertical padding */
    font-size: 14px; /* <<<< MODIFIED LINE >>>> */
  }
  /* th, td { white-space: nowrap; } */ /* REMOVE this general rule */

  /* Updated rotation for Rank and Monkey Score headers */
  .th-rank,
  .th-score {
    width: 35px !important;
    min-width: 35px !important;
    height: 52px;
    position: relative;
    vertical-align: middle;
  }

  .v-text {
    display: inline-block;
    transform: translate(-50%, -50%) rotate(90deg);
    white-space: nowrap;
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: center;
    width: auto;
  }

  .th-score .v-text {
    white-space: normal;
    width: 60px;
    text-align: center;
    line-height: 1.1;
  }

  /* Specific widths for the first 5 columns on mobile */
  .th-score,
  .score-cell {
    min-width: 35px; /* Updated to match rotated header */
    padding: 5px 2px !important;
  }
  .th-medal,
  .medal-cell {
    /* min-width: 50px; */
    width: 50px;
  }
  .th-image,
  tbody tr td:nth-child(3) {
    width: 4px; /* New width: 50px image + 0px padding L/R */
    /* min-width: 4px; */ /* Consistent min-width */
    padding-left: 10px; /* Added left padding for image margin */
    padding-right: 10px; /* Added right padding for image margin */
    /* padding-top and padding-bottom will inherit the 8px from the general th, td rule */
  }
  .th-title,
  .title-cell {
    /* min-width: 100px; */
    min-width: 150px;
    white-space: normal !important; /* Allow title to wrap */
    overflow-wrap: break-word !important; /* More robust wrapping: breaks words if necessary after trying spaces */
    /* word-break: break-word; is already global but good to keep in mind */
  }
  .th-link,
  .td-product-link {
    /* min-width: 50px; */
    min-width: 50px;
  }

  /* Optional: If other cells need nowrap explicitly */
  .th-rating,
  tbody tr td:nth-child(6),
  .th-review-count,
  tbody tr td:nth-child(7),
  .th-price,
  tbody tr td:nth-child(8),
  .th-asin,
  tbody tr td:nth-child(9) {
    white-space: nowrap; /* Keep numbers/ASINs on one line if desired */
  }

  /* You might want to adjust column widths specifically for mobile here if the auto layout isn't ideal */
  /* For example, ensure the first 5 columns have a minimum width if needed */
  /* .th-score, .th-medal, .th-image, .th-title, .th-link { */
  /* Optionally set min-width here if they get too squished */
  /* } */

  .product-image {
    max-width: 50px; /* Smaller product images in table */
    max-height: 50px;
  }

  /* Selector for results page header desktop logo */
  .results-page-header-table .logo-cell .logo-desktop,
  /* Corrected selector for landing page desktop logo */
  .landing-page-logo-link > .logo-desktop {
    display: none !important;
  }

  .results-page-header-table .logo-cell .logo-mobile,
  .landing-page-logo-link > .logo-mobile {
    display: block !important;
    margin: 0 auto 10px auto; /* Center and add some bottom margin */
  }

  .results-page-header-table
    .search-cell
    .search-input-wrapper
    input[type="text"] {
    width: 100%; /* Ensure text input takes full width of its wrapper */
    box-sizing: border-box; /* Ensure padding/border are included in width */
  }
  /* Landing page mobile logo (direct child of body in its block) - This selector was too specific and incorrect for the actual HTML structure */
  /* body > .logo-mobile { ... }  REMOVING/COMMENTING OUT THIS BLOCK as it's replaced by the one above */

  /* Adjusting the max-height for the landing page mobile logo using the correct selector */
  .landing-page-logo-link > .logo-mobile {
    margin-bottom: 25px; /* Space below landing page mobile logo */
    min-height: 83px !important; /* Set max height for mobile landing page logo */
    margin: 20px 0;
  }

  .results-page-header-table .top-actions-container {
    display: none; /* Hide "Open the Medalists" button container on mobile */
  }

  td .medal-icon,
  .medal-cell img.medal-icon,
  .rank-medal-icon {
    height: 40px !important; /* Reduced from 50px */
    max-height: none !important; /* Remove any previous max-height constraint */
    width: auto; /* Maintain automatic width */
  }

  /* Ensure all intermediate containers within search-cell are full width */
  .results-page-header-table .search-cell .header-search-flex-column,
  .results-page-header-table .search-cell .search-container form,
  .results-page-header-table
    .search-cell
    .search-container
    form
    .header-search-form-flex-row {
    width: 100%;
    box-sizing: border-box; /* Important for width calculations */
  }
  /* .search-container is already set to width: 100% and display: flex */

  /* New styles for the mobile scroll arrow */

  .th-link .mobile-scroll-arrow-container {
    display: block !important;
    position: absolute !important;
    top: 2px; /* Moved closer to upper border */
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    background: transparent; /* Clean background */
  }

  .th-link .mobile-scroll-arrow {
    display: block !important;
    width: 18px; /* Appropriate size for header */
    height: auto;
    opacity: 0.65; /* Subtle but visible */
    filter: brightness(0.7) saturate(0.8); /* Darker, less saturated to match header */
    margin: 0 auto;
  }

  /* PDF link container mobile spacing */
  .pdf-link-container {
    margin-left: 10px;
    margin-right: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }
}

.results-page-header-table {
  width: 100%;
  border-collapse: collapse;
  border: none; /* Remove all borders */
  background-color: transparent; /* Ensure no background color */
  box-shadow: none; /* Remove any shadow */
}
.results-page-header-table tr, /* Target the row */
      .results-page-header-table tr:hover {
  /* Target the row on hover */
  background-color: transparent !important; /* Keep it transparent */
  box-shadow: none !important; /* Remove any shadow */
  height: auto !important; /* Override fixed row height */
}
.results-page-header-table td {
  vertical-align: middle;
  padding: 0 5px !important; /* Add a little padding to cells */
  border: none !important; /* Remove all borders */
  background-color: transparent !important; /* Ensure no background color */
  box-shadow: none !important; /* Remove any shadow */
  height: auto !important; /* Override fixed row height */
}
.results-page-header-table .search-cell {
  width: 40%; /* Adjust as needed */
  text-align: left;
}
.results-page-header-table .logo-cell {
  text-align: center;
}
.results-page-header-table .actions-cell {
  text-align: right;
}
.results-page-header-table .search-container {
  margin-bottom: 0; /* Override default margin if any */
  width: 100%; /* Make search container take full width of its cell */
}
.results-page-header-table .top-actions-container {
  margin-bottom: 0; /* Override default margin if any */
}
.logo-desktop {
  /* Desktop styles are mostly inline on the img tags */
}
.logo-mobile {
  display: none; /* Hidden by default */
}

.rank-medal-icon {
  /* New class for medals in Rank column */
  height: 93px;
  width: auto;
  vertical-align: middle;
}

/* Loading spinner styles */
.loading-container {
  display: none;
  text-align: center;
  margin: 50px 0;
}

.loading-container.active {
  display: block; /* To show the loading spinner */
}

.is-hidden {
  display: none !important;
}

.loading-text {
  font-size: 18px;
  color: #666;
  font-weight: bold;
}

.loading-spinner {
  display: inline-block;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  border: 8px solid #f3f3f3; /* Light grey */
  border-top: 8px solid #4caf50; /* Green */
  border-radius: 50%;
  -webkit-animation: spin 1s linear infinite; /* Safari */
  animation: spin 1s linear infinite;
}

/* Safari */
@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Progress bar styles */
.progress-container {
  margin-top: 20px;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background-color: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #ddd;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #45a049);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 8px;
  position: relative;
}

/* Old iOS backup animation - replaced with pure CSS progress sweep */

/* iOS Safari: CSS-only progress sweep */
@media screen and (-webkit-min-device-pixel-ratio: 1) {
  .ios-progress-fallback {
    animation: ios-progress-sweep 6s ease-out forwards;
  }
}

@keyframes ios-progress-sweep {
  0%   { width: 0%;  }
  80%  { width: 85%; }
  100% { width: 95%; }
}

.progress-text {
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  color: #4caf50;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Mobile only: Hide progress bar and percentage */
@media (max-width: 768px) {
  .progress-container {
    display: none;
  }
}

/* Styles moved from inline in index.html */
.header-search-flex-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.results-page-header-table .search-container {
  /* This targets .search-container specifically within .results-page-header-table */
  /* It reuses an existing class, so we only add specific overrides or new properties if needed */
  /* The global .search-container already has text-align: center; margin-bottom: 30px; */
  /* We need to ensure these don't conflict or add what's specific for the header */
  width: 100%; /* from inline */
  margin-bottom: 10px; /* from inline, overrides global if it was 30px */
  text-align: left; /* Assuming we want to override the global center for this specific one */
}

.header-search-form-flex-row {
  display: flex;
  align-items: center;
}

.results-page-header-table .search-input-wrapper {
  /* Similar to .search-container, .search-input-wrapper has global styles */
  /* position: relative; display: inline-block; width: 60%; max-width: 500px; */
  /* We need to add/override for the header version */
  flex-grow: 1; /* from inline */
  margin-right: 5px; /* from inline */
  width: auto; /* Override global width: 60% if it applies and is not desired */
  max-width: none; /* Override global max-width if it applies and is not desired */
  display: flex; /* to contain the input and clear button if they are flex items themselves */
}

.results-page-header-table #searchInput {
  /* #searchInput may have global styles from .search-container input[type="text"] */
  /* padding: 10px; font-size: 16px; border: 1px solid #ddd; border-radius: 4px; */
  /* width: 100%; box-sizing: border-box; padding-right: 30px; */
  /* The width: 100% from inline is likely already covered or what we want */
  width: 100%; /* Explicitly from inline */
}

.results-page-header-table .top-actions-container {
  /* Global .top-actions-container has margin-bottom: 15px; text-align: left; */
  margin-left: 0; /* from inline */
  margin-top: 0; /* from inline */
  margin-bottom: 0; /* Add this to override the global 15px if not wanted here */
}

.results-page-header-table .logo-cell a {
  text-decoration: none;
}

/* Styles for logos in header */
.results-page-header-table .logo-desktop {
  display: block;
  margin: 0 auto;
  max-height: 100px;
  cursor: pointer;
}

.results-page-header-table .logo-mobile {
  cursor: pointer;
  /* display: none; is already handled by existing media queries for .logo-mobile */
}

/* Landing page logo styles */
.landing-page-logo-link {
  text-decoration: none;
}

.landing-page-logo-desktop {
  display: block;
  margin: 0 auto 50px auto; /* Combines margin: 0 auto; and margin-bottom: 50px; */
  cursor: pointer;
  max-height: 140px; /* Assuming same max-height as header logo, adjust if different */
}

.landing-page-logo-mobile {
  cursor: pointer;
  max-height: 20px;
  /* display: none; is already handled by existing media queries for .logo-mobile */
  /* max-height might be different for landing page, adjust if needed */
}

/* No results paragraph styles */
.no-results-info {
  /* For the initial "Enter a search term..." message */
  text-align: center;
  margin-top: 15px;
  /* Retains default paragraph color unless .no-results class (color: #777) is also applied */
}

.no-results-error {
  /* For the "Error: {{ error_message }}" message */
  color: red;
  text-align: center; /* Added for consistency */
  margin-top: 15px; /* Added for consistency, assuming similar spacing to .no-results */
}

/* Export button container div */
.export-button-container {
  margin-top: 5px;
  text-align: left;
}

/* Styles for the new mobile scroll arrow */
/* THIS BLOCK SHOULD BE REMOVED as it was moved earlier in the file */
/* .mobile-scroll-arrow-container {
  display: none; 
  padding: 10px 0; 
  text-align: center; 
}

.mobile-scroll-arrow {
  width: 50px; 
  height: auto;
} */

.pdf-link-container {
  text-align: center;
  margin-top: 150px;
  font-size: 1em;
}

/* iOS Safari Performance - Lazy Loading Styles */
.lazy-load {
  opacity: 0;
  transition: opacity 0.3s ease;
  background-color: #f5f5f5;
  background-image: linear-gradient(90deg, #f5f5f5 25%, #e0e0e0 50%, #f5f5f5 75%);
  background-size: 200% 100%;
  animation: shimmer-placeholder 1.5s infinite;
}

.lazy-load[src] {
  opacity: 1;
  background: none;
  animation: none;
}

@keyframes shimmer-placeholder {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Prevent layout shift for medal icons */
.rank-medal-icon.lazy-load {
  width: 30px;
  height: 30px;
  display: inline-block;
}

/* Prevent layout shift for product images */
.product-image.lazy-load {
  width: 80px;
  height: 80px;
  display: block;
  object-fit: cover;
}

/* iOS Safari specific optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 1) {
  .lazy-load {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: opacity;
  }
  
  /* Reduce animation on iOS to prevent performance issues */
  @media (prefers-reduced-motion: reduce) {
    .lazy-load {
      animation: none;
      background: #f5f5f5;
    }
    
    .ios-progress-fallback {
      animation: none;
      width: 85%; /* Static fallback for reduced motion */
    }
  }
}


