/* === RESET === */
.entry-title {
  display: none !important;
}

h1 {
  padding: 0;
  margin: 0;
}

h2 {
  color: #999999;
}

body {
  font-family: "Inter", sans-serif;
  background-color: #f6f7fa;
  color: #333;
  line-height: 1.6;
}

/* === LAYOUT === */
.listing-container {
  max-width: 1200px;
  margin: 50px auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.listing-header {
  grid-column: span 2;
}

.listing-header__top {
  display: flex;
  gap: 1rem;
  align-items: anchor-center;
  flex-wrap: wrap;
}

.listing-header__title {
  font-size: 2rem;
  font-weight: 400;
  font-family: "Monstro Solid", Arial, sans-serif;
  text-transform: uppercase;
}

.listing-header__price {
  font-size: 2rem;
  font-weight: 400;
  font-family: "Monstro Solid", Arial, sans-serif;
  color: #1a5c98;
  font-weight: unset;
}

.listing-header__price-kg {
  font-size: 1rem;
  color: #666;
}

.listing-header__secondary {
  margin-top: 0.5rem;
}

.listing-header__unit-price {
  font-family: "Lato", sans-serif;
  font-size: 1.4rem;
  color: #666;
  font-weight: 500;
}

/* === GALLERY === */
.gallery {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
}

.gallery__title {
  font-size: 1rem;
  margin-bottom: 1rem;
  font-family: "Monstro Solid", Arial, sans-serif;
  text-transform: uppercase;
  color: #999999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gallery__title .material-symbols-outlined {
  font-size: 1.25rem;
  color: #999999;
}

.gallery__title .material-symbols-outlined {
  font-size: 1.25rem;
  color: #999999;
}

.gallery__main {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.gallery__main video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

/* Ganado Share Button */
.ganado-share-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ganado-share-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.ganado-share-btn .material-symbols-outlined {
  font-size: 20px;
  color: white;
}

.gallery__thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.gallery__thumbnails img {
  width: 25%;
  border-radius: 6px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.gallery__thumbnails img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery__thumbnails img.active {
  border-color: #1a5c98;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(26, 92, 152, 0.3);
}

/* Video thumbnails */
.gallery__thumbnail-video {
  width: 25%;
  height: 0;
  padding-bottom: calc(25% * 3 / 4); /* Maintain 4:3 aspect ratio */
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.gallery__thumbnail-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__thumbnail-video .video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.gallery__thumbnail-video .video-overlay .material-symbols-outlined {
  color: white;
  font-size: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery__thumbnail-video:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery__thumbnail-video:hover .video-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.gallery__thumbnail-video.active {
  border-color: #1a5c98;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(26, 92, 152, 0.3);
}

/* === LOCATION === */
.location {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
  margin-top: 1rem;
}

.location__title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-family: "Monstro Solid", Arial, sans-serif;
  text-transform: uppercase;
  color: #999999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location__title .material-symbols-outlined {
  font-size: 1.25rem;
  color: #999999;
}

.location__map {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.location__description {
  font-size: 0.9rem;
}

/* === SIDEBAR === */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
}

.card__title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  color: #999999;
  font-family: "Monstro Solid", Arial, sans-serif;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card__title .material-symbols-outlined {
  font-size: 1.25rem;
  color: #999999;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.feature {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature .material-symbols-outlined {
  font-size: 2rem;
  color: #1a5c98;
  margin-bottom: 0.25rem;
}

.feature i {
  font-size: 1.9rem;
  color: #1a5c98;
  margin-bottom: 0.25rem;
}

.feature__text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}

.contact__name {
  margin-bottom: 0.5rem;
  margin-top: 1rem;
  font-weight: 500;
  display: flex;
  gap: 0.5rem;
}

.contact__whatsapp a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(26, 92, 152, 0.1);
  color: #4d4d4d;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: 1px solid rgba(26, 92, 152, 0.15);
  width: 100%;
  text-align: center;
}

.contact__whatsapp a:hover {
  background: rgba(26, 92, 152, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(26, 92, 152, 0.2);
}

/* Ganado Share Button Mobile */
.contact__share {
  margin-top: 0.75rem;
}

.ganado-share-btn-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(108, 117, 125, 0.1);
  color: #4d4d4d;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(108, 117, 125, 0.15);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  width: 100%;
  text-align: center;
  cursor: pointer;
}

.ganado-share-btn-mobile:hover, .ganado-share-btn-mobile:focus {
  background: rgba(108, 117, 125, 0.15);
  transform: translateY(-1px);
  color: #1a5c98;
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.2);
}

.ganado-share-btn-mobile .material-symbols-outlined {
  font-size: 20px;
}

/* Mobile media share button - hidden by default */
.ganado-share-btn-mobile-media {
  display: none;
}

.gallery__thumbnail-container {
  position: relative;
}

/* === MOBILE SHARE MODAL === */
.ganado-share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ganado-share-modal-show {
  opacity: 1;
  visibility: visible;
}

.ganado-share-modal-hide {
  opacity: 0;
  transform: scale(0.9);
}

.ganado-share-modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ganado-share-modal-show .ganado-share-modal-content {
  transform: scale(1);
}

.ganado-share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e9ecef;
}

.ganado-share-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.ganado-share-modal-close {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.ganado-share-modal-close:hover {
  background: #f8f9fa;
}

.ganado-share-modal-close .material-symbols-outlined {
  font-size: 24px;
  color: #666;
}

.ganado-share-options {
  padding: 16px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ganado-share-separator {
  height: 1px;
  background: #e9ecef;
  margin: 8px 12px;
}

.ganado-share-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}

.ganado-share-option:hover {
  background: #f8f9fa;
}

.ganado-share-option:active {
  background: #e9ecef;
  transform: scale(0.98);
}

.ganado-share-option-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.ganado-share-option-whatsapp .ganado-share-option-icon {
  background: #25d366;
  color: white;
}

.ganado-share-option-email .ganado-share-option-icon {
  background: #4285f4;
  color: white;
}

.ganado-share-option-copy .ganado-share-option-icon {
  background: #6c757d;
  color: white;
}

.ganado-share-option-native .ganado-share-option-icon {
  background: #007aff;
  color: white;
}

.ganado-share-option-label {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  flex: 1;
}

/* Ensure modal appears above everything */
.ganado-share-modal {
  z-index: 999999 !important;
}

/* Modal toast for feedback */
.ganado-modal-toast {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
}

.ganado-modal-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
  .listing-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .listing-header {
    grid-column: span 1;
  }

  .listing-header__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .listing-header__title {
    font-size: 1.5rem;
  }

  .listing-header__price {
    font-size: 1.5rem;
  }

  .listing-header__unit-price {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .listing-container {
    margin: 20px auto;
    gap: 1rem;
  }

  .listing-header__title {
    font-size: 1.25rem;
  }

  .listing-header__price {
    font-size: 1.25rem;
  }

  .listing-header__unit-price {
    font-size: 0.9rem;
  }

  .gallery__main {
    height: 300px;
  }

  .gallery__thumbnails {
    flex-wrap: wrap;
  }

  .gallery__thumbnails img {
    width: calc(50% - 0.25rem);
  }

  /* Video thumbnails on tablet */
  .gallery__thumbnail-video {
    width: calc(50% - 0.25rem);
    height: auto;
    padding-bottom: calc(
      (50% - 0.25rem) * 3 / 4
    ); /* Maintain 4:3 aspect ratio for tablet */
  }

  .gallery__thumbnail-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .features {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
  }

  .feature {
    padding: 0.75rem;
  }

  .feature .material-symbols-outlined {
    font-size: 1.5rem;
  }

  .feature i {
    font-size: 1.5rem;
  }

  .feature__text {
    font-size: 0.8rem;
  }

  .card {
    padding: 0.75rem;
  }

  .card__title {
    font-size: 0.9rem;
  }

  .location__map {
    height: 250px !important;
  }
}

/* Medium screens - Improve thumbnail display between mobile and desktop */
@media (min-width: 481px) and (max-width: 768px) {
  .gallery__thumbnails {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .gallery__thumbnails img {
    width: 100%;
    min-width: unset;
    max-width: none;
    aspect-ratio: 4 / 3;
    flex: none;
  }

  .gallery__thumbnail-video {
    width: 100%;
    min-width: unset;
    max-width: none;
    padding-bottom: 75%; /* 4:3 aspect ratio = 75% */
    flex: none;
  }

  .gallery__thumbnail-container {
    width: calc(50% - 0.25rem);
    max-width: none;
    flex: 0 0 calc(50% - 0.25rem);
    display: block;
  }
}

/* Specific adjustments for smaller medium screens */
@media (min-width: 481px) and (max-width: 600px) {
  .gallery__thumbnails {
    gap: 0.4rem;
  }

  .gallery__thumbnail-container {
    width: calc(50% - 0.2rem);
    flex: 0 0 calc(50% - 0.2rem);
  }
}

@media (max-width: 480px) {
  .listing-container {
    margin: 10px auto;
  }

  .listing-header__top {
    text-align: center;
    align-items: center;
  }

  .listing-header__title {
    font-size: 1.1rem;
    text-align: center;
  }

  .listing-header__price {
    font-size: 1.1rem;
  }

  /* Hide interactive gallery on mobile */
  .gallery__main {
    display: none;
  }

  /* Hide share button on mobile since gallery is hidden */
  .ganado-share-btn {
    display: none;
  }

  /* Show all thumbnails as single column, full width */
  .gallery__thumbnails {
    flex-direction: column;
    gap: 1rem;
    margin-top: 0;
  }

  /* Thumbnail container for positioning share button */
  .gallery__thumbnail-container {
    position: relative;
    width: 100%;
  }

  /* Share button on first media in mobile */
  .ganado-share-btn-mobile-media {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .ganado-share-btn-mobile-media:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
  }

  .ganado-share-btn-mobile-media .material-symbols-outlined {
    font-size: 18px;
    color: white;
  }

  /* Adjust button position when over video to avoid controls */
  .gallery__thumbnail-container.first-media
    .gallery__thumbnail-video
    + .ganado-share-btn-mobile-media,
  .gallery__thumbnail-container.first-media .ganado-share-btn-mobile-media {
    top: 8px;
    right: 8px;
  }

  .gallery__thumbnails img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: default;
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
  }

  .gallery__thumbnails img:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .gallery__thumbnails img.active {
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
  }

  /* Video thumbnails on mobile */
  .gallery__thumbnail-video {
    width: 100%;
    height: 200px;
    padding-bottom: 0;
    cursor: default;
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
    position: relative;
  }

  .gallery__thumbnail-video:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .gallery__thumbnail-video.active {
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
  }

  .gallery__thumbnail-video video {
    position: relative;
    width: 100%;
    height: 200px;
  }

  .gallery__thumbnail-video .video-overlay {
    display: none; /* Hide overlay on mobile to allow video controls */
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .feature {
    padding: 0.5rem;
  }

  .feature .material-symbols-outlined {
    font-size: 1.75rem;
  }

  .feature__text {
    font-size: 0.75rem;
  }

  .gallery__title,
  .location__title,
  .card__title {
    font-size: 0.85rem;
  }

  .gallery__title .material-symbols-outlined,
  .location__title .material-symbols-outlined,
  .card__title .material-symbols-outlined {
    font-size: 1rem;
  }

  .contact__whatsapp a {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }

  .location__map {
    height: 200px !important;
  }

  /* Mobile share modal responsive styles */
  .ganado-share-modal-content {
    border-radius: 16px 16px 0 0;
  }

  .ganado-share-modal-header {
    padding: 16px 20px 12px;
  }

  .ganado-share-modal-title {
    font-size: 16px;
  }

  .ganado-share-options {
    padding: 12px 20px 24px;
  }

  .ganado-share-option {
    padding: 12px 8px;
  }

  .ganado-share-option-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .ganado-share-option-label {
    font-size: 15px;
  }

  /* Mobile-specific modal behavior */
  .ganado-share-modal {
    align-items: flex-end;
  }

  .ganado-share-modal-content {
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 500px;
    transform: translateY(100%);
  }

  .ganado-share-modal-show .ganado-share-modal-content {
    transform: translateY(0);
  }

  .ganado-share-modal-hide {
    opacity: 0;
    transform: translateY(100%);
  }

  .ganado-share-modal-hide .ganado-share-modal-content {
    transform: translateY(100%);
  }
}

/* Large tablets and small desktop screens - 3 images per row */
@media (min-width: 769px) and (max-width: 1024px) {
  .gallery__thumbnails {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .gallery__thumbnails img {
    width: 100%;
    flex: none;
  }

  .gallery__thumbnail-video {
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    flex: none;
  }

  .gallery__thumbnail-container {
    width: calc(33.333% - 0.334rem);
    flex: 0 0 calc(33.333% - 0.334rem);
  }
}

/* Desktop screens - keep 4 images per row but with better spacing */
@media (min-width: 1025px) {
  .gallery__thumbnails {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .gallery__thumbnails img {
    width: 100%;
    flex: none;
  }

  .gallery__thumbnail-video {
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    flex: none;
  }

  .gallery__thumbnail-container {
    width: calc(25% - 0.5625rem);
    flex: 0 0 calc(25% - 0.5625rem);
  }
}

@media (min-width: 769px) {
  .ganado-share-modal {
    align-items: center;
    justify-content: center;
  }

  .ganado-share-modal-content {
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    transform: scale(0.9);
  }

  .ganado-share-modal-show .ganado-share-modal-content {
    transform: scale(1);
  }

  .ganado-share-modal-hide {
    opacity: 0;
    transform: scale(0.9);
  }

  .ganado-share-modal-hide .ganado-share-modal-content {
    transform: scale(0.9);
  }

  .ganado-share-modal-header {
    padding: 20px 24px 16px;
  }

  .ganado-share-modal-title {
    font-size: 18px;
  }

  .ganado-share-options {
    padding: 16px 24px 24px;
  }

  .ganado-share-option {
    padding: 16px 12px;
  }

  .ganado-share-option-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .ganado-share-option-label {
    font-size: 16px;
  }
}
