body {
    font-family: "Josefin Sans", sans-serif;
    margin: 0;
    background-color: #F1EFEC;
    color: #333;
    padding-top: 70px; 
}

.pd-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    gap: 1vh;
    align-items: flex-start;
}

.pd-gallery {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: auto;
    flex: 1 1 50%;
    padding-left: 20px;
    padding-right: 20px;
}

.pd-main-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px; /* Controla el ancho máximo */
    height: 600px; /* Altura fija */
    margin: 0 auto; /* Centrado horizontal solo si se necesita */
    padding: 10px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    background-color: #f0f0f0;
}

.pd-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.6);
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
}

.pd-gallery-nav.prev {
  left: 10px;
}

.pd-gallery-nav.next {
  right: 10px;
}

.pd-zoom-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
}

.pd-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 600px;
  overflow-y: auto;
  order: 2;
}

.pd-thumbnail {
    width: 70px;
    height: 85px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0.5;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.pd-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-thumbnail.active,
.pd-thumbnail:hover {
    border-color: #555;
    opacity: 1;
}

.pd-main-image {
    width: 100%;
    aspect-ratio: 1 / 1.15;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    background-color: #f0f0f0;
}

.pd-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(30, 30, 30, 0.4);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: background-color 0.2s ease;
    z-index: 5;
}
.pd-gallery-nav:hover {
    background-color: rgba(0, 0, 0, 0.6);
}
.pd-gallery-nav.prev {
    left: 15px;
}
.pd-gallery-nav.next {
    right: 15px;
}
.pd-gallery-nav svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.pd-zoom-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(73, 73, 73, 0.6);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px;
  cursor: pointer;
  z-index: 1;
  transition: background 0.3s;
}

.pd-zoom-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.pd-zoom-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.pd-info {
    flex: 1 1 40%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pd-meta {
    font-size: 0.85em;
    color: #D4C9BE;
    margin-bottom: 5px;
}
.pd-meta span {
    margin-right: 10px;
}

.pd-title {
    font-size: 1.8em;
    font-weight: 600;
    color: #4B352A;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.pd-price {
    font-size: 1.2em;
    color: #4B352A;
    margin-bottom: 10px;
}

.pd-reviews {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #4B352A;
    margin-bottom: 15px;
}
.pd-stars svg {
    width: 18px;
    height: 18px;
    fill: #f5c518;
}

.pd-ask-link {
    font-size: 0.95em;
    color: #D4C9BE;
    text-decoration: underline;
    font-weight: 500;
    margin-bottom: 20px;
}
.pd-ask-link:hover {
    color: #D4C9BE;
}

.pd-size-selector, .pd-quantity-selector {
    margin-bottom: 20px;
}
.pd-size-selector p, .pd-quantity-selector p {
    font-size: 0.9em;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}
.pd-size-options, .pd-quantity-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}
.pd-size-options button {
    font-family: "Josefin Sans", sans-serif;
    padding: 8px 15px;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, scale 0.3s;
}

.pd-size-options button:hover {
    background-color: #EAE3D2;
    border-color: #D4C9BE;
}

.pd-size-options button:active{
    scale: 0.90;
}

.pd-size-options button.btn-activate{
    background-color: #EAE3D2;
    border-color: #D4C9BE;
}

.pd-quantity-wrapper button {
    background-color: #7c91ba; 
    border: 1px solid #7c91ba;
    width: 35px;
    height: 35px;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 4px;
}
.pd-quantity-wrapper input[type="number"] {
    width: 50px;
    height: 35px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    font-family: "Josefin Sans", sans-serif;
    font-size: 1em;
}
.pd-quantity-wrapper input[type="number"]::-webkit-outer-spin-button,
.pd-quantity-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pd-add-to-cart-btn {
    font-family: "Josefin Sans", sans-serif;
    background-color: #123458;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: background-color 0.2s ease;
}
.pd-add-to-cart-btn:hover {
    background-color: #304b80;
}
.pd-add-to-cart-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.pd-accordions {
    margin-top: 30px;
    width: 100%;
}
.pd-accordion-item {
    background-color: #EAE3D2;
    margin-bottom: 10px;
    border-radius: 4px;
}
.pd-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #444;
    position: relative;
}
.pd-accordion-header .pd-accordion-title-text {
    flex-grow: 1;
    margin-right: 10px;
}
.pd-accordion-header .pd-accordion-icon {
    width: 24px;
    height: 24px;
    background-color: #D4C9BE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.2s ease;
    flex-shrink: 0;
}
.pd-accordion-header:hover .pd-accordion-icon {
    background-color: #D4C9BE;
}
.pd-accordion-header .pd-accordion-icon svg {
    width: 14px;
    height: 14px;
    fill: #F1EFEC;
    transition: transform 0.3s ease;
}
.pd-accordion-header.active .pd-accordion-icon svg {
    transform: rotate(45deg);
}

/* Contenedor cerrado */
.pd-accordion-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease, padding 0.3s ease, margin 0.3s ease;
    padding: 0 1.5rem;
    box-sizing: border-box;
    margin-bottom: 0;
}

.pd-accordion-content.open {
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem; /* Espacio debajo del acordeón */
}

.pd-accordion-content p,
.pd-accordion-content div {
    text-align: justify;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

#customZoomModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    padding: 20px;
}

#customZoomModal.hidden {
    display: none;
}

#zoomedImage {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Botón de cerrar */
.custom-zoom-close {
    top: 40px; /* Baja la X */
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
}

.custom-zoom-close svg {
    width: 24px;
    height: 24px;
    fill: white;
}


.custom-zoom-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Botones de navegación */
.zoom-nav-prev,
.zoom-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 3rem;
    cursor: pointer;
    padding: 0 15px;
    z-index: 10000;
}

.zoom-nav-prev {
    left: 20px;
}

.zoom-nav-next {
    right: 20px;
}

#customZoomModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#customZoomModal img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#customZoomModal.hidden {
    display: none;
}

@media (max-width: 1024px) {
    .pd-container {
        flex-direction: column;
        padding: 15px;
        align-items: center;
    }

    .pd-gallery {
        align-items: center;
        width: 100%;
        padding: 0 30px;
    }

    .pd-main-image-wrapper {
        width: 100%;
        max-width: 500px;
        height: auto;
        aspect-ratio: 1 / 1.1;
        margin: 20px auto;
        padding: 15px; 
        box-sizing: border-box;
    }

    .pd-main-image {
        object-fit: contain;
        width: 100%;
        height: auto;
        border-radius: 6px;
    }

    .pd-thumbnails {
        flex-direction: row;
        overflow-x: auto;
        max-height: none;
        margin-top: 15px;
        justify-content: center;
        width: 100%;
    }

    .pd-thumbnail {
        flex: 0 0 auto;
    }

    .pd-info {
        width: 100%;
    }
}

@media (min-width: 600px) and (max-width: 768px) {
  .pd-main-image-wrapper {
    padding: 20px;
    margin: 30px auto;
    max-width: 400px;
    aspect-ratio: 1 / 1.15;
  }

  .pd-gallery {
    padding: 0 40px;
  }
}


@media (max-width: 768px) {
    .pd-container {
        padding: 10px;
    }

    .pd-title {
        font-size: 1.4em;
    }

    .pd-price {
        font-size: 1.2em;
    }

    .pd-gallery {
        flex-direction: column;
        align-items: center;
    }

    .pd-add-to-cart-btn {
        font-size: 0.95em;
    }

    .pd-size-options,
    .pd-quantity-wrapper {
        flex-wrap: wrap;
    }

    .pd-gallery-nav {
        width: 36px;
        height: 36px;
    }

    .pd-gallery-nav svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .pd-main-image-wrapper {
        height: auto;
    }

    .pd-add-to-cart-btn {
        flex-direction: column;
        gap: 8px;
        font-size: 0.85em;
        padding: 10px;
    }

    .pd-size-options button {
        flex: 1 1 45%;
        text-align: center;
    }

    .pd-quantity-wrapper {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pd-thumbnail {
        width: 60px;
        height: 75px;
    }

    .pd-thumbnails {
        gap: 8px;
    }
}