/* Product Detail Styles */

/* Reuse variables from style.css and marketplace.css */

:root {
    /* Brand Colors */
    --mk-bg: #f0ebe3;        /* --c-beige */
    --mk-white: #ffffff;
    --mk-dark: #707400;      /* --c-green-dark */
    --mk-mid: #828b37;       /* --c-green-mid */
    --mk-accent: #c7986c;    /* --c-brown */
    --mk-text: #707400;      /* --c-green-dark */
    
    --ease-luxury: cubic-bezier(0.165, 0.84, 0.44, 1);
}

body {
    background-color: var(--mk-bg) !important;
    color: #707400; /* --mk-text from marketplace.css to ensure text visibility */
}


.pd-container {
    max-width: 1200px;
    margin: 15px auto 30px; /* Highly compressed */
    padding: 0 20px;
}

.pd-breadcrumb {
    margin-bottom: 15px;
    font-family: var(--f-body);
    font-size: 0.9rem;
    color: var(--c-brown);
    opacity: 0.7;
}

.pd-breadcrumb a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

.pd-breadcrumb a:hover {
    opacity: 1;
}

.pd-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Image Section */
.pd-image-section {
    background-color: #ffffff; /* Restored white background per user request */
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column; /* Stack image and thumbnails */
    justify-content: center;
    align-items: center;
    min-height: 350px;
    gap: 15px;
}

.pd-main-image {
    width: 100%;
    height: 250px; /* Fixed height for main image container */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Prevent leaking */
}

.pd-main-image img {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
    transition: opacity 0.2s ease, transform 0.1s ease-out;
}

/* Thumbnails */
.pd-thumbnails {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.pd-thumb {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 5px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    background: #fff;
}

.pd-thumb:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.pd-thumb.active {
    opacity: 1;
    border-color: var(--c-green-dark);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Info Section */
.pd-info-section {
    padding-top: 20px;
}

.pd-title {
    font-family: var(--f-title);
    font-size: 2.2rem;
    color: var(--c-green-dark);
    margin-bottom: 10px;
    font-weight: 500;
}

.pd-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.pd-rating {
    color: #d4af37; /* Gold */
    font-size: 1.1rem;
}

.pd-reviews {
    font-family: var(--f-body);
    font-size: 0.9rem;
    color: #888;
}

.pd-price-wrap {
    font-family: var(--f-title);
    color: var(--c-green-dark);
    margin-bottom: 15px;
    font-size: 1.6rem;
}

.pd-description {
    font-family: var(--f-body);
    line-height: 1.5;
    color: #555;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Options & Actions */
.pd-options {
    margin-bottom: 20px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.pd-option-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pd-option-row label {
    font-family: var(--f-body);
    font-weight: 500;
    color: var(--c-green-dark);
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 5px 10px;
}

.qty-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    color: var(--c-green-dark);
    border-radius: 50%; /* Optional: make them circular hover effect */
    transition: background 0.2s ease;
}

.qty-btn:hover {
    background-color: rgba(0,0,0,0.05);
}

#qty-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-family: var(--f-body);
    font-size: 1rem;
    color: var(--c-green-dark);
}

#qty-input:focus {
    outline: none;
}

.pd-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.pd-btn-cart, .pd-btn-buy {
    flex: 1;
    padding: 12px;
    border-radius: 30px;
    font-family: var(--f-body);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-luxury);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pd-btn-cart {
    background-color: transparent;
    border: 1px solid var(--c-green-dark);
    color: var(--c-green-dark);
}

.pd-btn-cart:hover {
    background-color: var(--c-green-dark);
    color: #fff;
}

.pd-btn-buy {
    background-color: var(--c-green-dark);
    border: 1px solid var(--c-green-dark);
    color: #fff;
}

.pd-btn-buy:hover {
    background-color: var(--c-green-mid);
    border-color: var(--c-green-mid);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Extra Info */
.pd-extra-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--f-body);
    color: #666;
    font-size: 0.9rem;
}

.info-item i {
    color: var(--c-green-mid);
    width: 20px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .pd-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .pd-image-section {
        padding: 20px;
        min-height: auto;
    }
    
    .pd-main-image {
        height: 200px;
    }

    .pd-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .pd-price-wrap {
        text-align: center;
    }
    
    .pd-description {
        text-align: center;
    }

    .pd-actions {
        flex-direction: column;
    }
}
@media (max-width: 480px) {
    .pd-title {
        font-size: 1.6rem;
    }
    
    .pd-price-wrap {
        font-size: 1.3rem;
    }
    
    .pd-container {
        padding: 0 20px; /* Standardized to 20px */
        margin-top: 10px;
    }

    .pd-main-image {
        height: 180px;
    }

    .pd-btn-cart, .pd-btn-buy {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .pd-image-section {
        padding: 15px;
    }
}

/* ========================================================
   EMPTY STATE (PRODUCTO NO ENCONTRADO)
   ======================================================== */
.mk-empty-state-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 10px 20px;
  animation: fadeUp 0.8s var(--ease-luxury) forwards;
}

.mk-empty-state-content {
  background: var(--mk-bg);
  border-radius: 24px;
  padding: 30px;
  max-width: 800px;
  width: 100%;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(112, 116, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mk-empty-state-img {
  max-width: 150px;
  margin-bottom: 15px;
  border-radius: 100px 100px 0 0;
}

.mk-empty-state-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
}

.mk-empty-state-title {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  color: var(--mk-dark);
  margin: 0 0 5px 0;
  font-weight: 500;
}

.mk-empty-heart {
  font-size: 1.2rem;
  color: var(--mk-accent);
  opacity: 0.8;
}

.mk-empty-state-desc {
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  color: var(--mk-dark);
  opacity: 0.8;
  line-height: 1.5;
  margin-bottom: 15px;
  max-width: 500px;
}

.mk-empty-state-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.mk-empty-state-actions .mk-btn-primary {
  background: var(--mk-mid);
  color: var(--mk-white);
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mk-empty-state-actions .mk-btn-primary:hover {
  background: var(--mk-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(112, 116, 0, 0.2);
}

.mk-empty-state-actions .mk-btn-outline {
  background: transparent;
  color: var(--mk-dark);
  border: 1px solid var(--mk-dark);
  padding: 12px 25px;
  border-radius: 30px;
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mk-empty-state-actions .mk-btn-outline:hover {
  background: rgba(112, 116, 0, 0.05);
  transform: translateY(-2px);
}

.mk-empty-state-diamond-divider {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  max-width: 700px;
  margin-bottom: 20px;
}

.mk-empty-state-diamond-divider span {
  height: 1px;
  background: rgba(112, 116, 0, 0.1);
  flex-grow: 1;
}

.mk-empty-state-diamond-divider .diamond-icon {
  color: var(--mk-accent);
  font-size: 0.8rem;
  transform: rotate(45deg) scale(0.8);
}

.mk-empty-state-search-section {
  width: 100%;
  max-width: 700px;
  margin-bottom: 20px;
}

.mk-empty-search-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  background: transparent;
  padding: 0;
}

.mk-empty-search-label {
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  color: var(--mk-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.mk-empty-search-bar {
  display: flex;
  align-items: center;
  flex-grow: 1;
  background: var(--mk-white);
  border-radius: 8px;
  padding: 5px 15px;
  border: 1px solid rgba(112, 116, 0, 0.1);
  box-shadow: inset 0 2px 4px rgba(112, 116, 0, 0.02);
}

.mk-empty-search-bar input {
  flex-grow: 1;
  border: none;
  background: transparent;
  padding: 10px;
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  color: var(--mk-dark);
  outline: none;
}

.mk-empty-search-bar input::placeholder {
  color: rgba(112, 116, 0, 0.4);
}

.mk-empty-search-btn {
  background: transparent;
  border: none;
  color: var(--mk-dark);
  cursor: pointer;
  padding: 5px;
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.mk-empty-search-btn:hover {
  transform: scale(1.1);
}

.mk-empty-state-suggestions {
  width: 100%;
}

.mk-empty-state-suggestions p {
  font-family: "Sora", sans-serif;
  font-size: 0.9rem;
  color: var(--mk-dark);
  margin-bottom: 10px;
}

.mk-empty-categories {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mk-empty-cat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  background: var(--mk-white);
  border: 1px solid rgba(112, 116, 0, 0.1);
  border-radius: 8px;
  color: var(--mk-dark);
  text-decoration: none;
  font-family: "Sora", sans-serif;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.mk-empty-cat-btn:hover {
  background: rgba(112, 116, 0, 0.03);
  border-color: var(--mk-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(112, 116, 0, 0.05);
}

@media (max-width: 768px) {
  .mk-empty-search-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  .mk-empty-search-label {
    margin-bottom: 10px;
    justify-content: center;
  }
  .mk-empty-search-bar {
    width: 100%;
  }
  .mk-empty-state-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
  .mk-empty-state-content {
    padding: 30px 20px;
  }
  .mk-empty-state-title {
    font-size: 1.8rem;
  }
  .mk-empty-cat-btn {
    width: calc(50% - 10px);
    justify-content: center;
  }
}

/* --- REVIEWS SECTION --- */
.pd-reviews-section {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.pd-reviews-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.pd-reviews-title {
    font-family: var(--f-title, serif);
    font-size: 2rem;
    color: var(--mk-dark);
    margin-bottom: 15px;
    font-weight: 400;
}

.pd-reviews-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pd-reviews-score {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--c-brown);
    line-height: 1;
}

.pd-reviews-stars {
    color: var(--c-brown);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.pd-reviews-count {
    font-size: 0.9rem;
    color: #888;
    font-family: var(--f-body);
}

.pd-reviews-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

/* Review Form */
.pd-review-form-container {
    background: var(--mk-bg);
    padding: 30px;
    border-radius: 15px;
    height: fit-content;
}

.pd-form-title {
    font-family: var(--f-title, serif);
    font-size: 1.4rem;
    color: var(--mk-dark);
    margin-bottom: 20px;
    font-weight: 500;
}

.pd-form-group {
    margin-bottom: 20px;
}

.pd-review-form input[type="text"],
.pd-review-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    font-family: var(--f-body);
    font-size: 0.95rem;
    color: var(--mk-text);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.pd-review-form input[type="text"]:focus,
.pd-review-form textarea:focus {
    outline: none;
    border-color: var(--c-brown);
    box-shadow: 0 0 0 2px rgba(199, 152, 108, 0.2);
}

.pd-rating-input {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pd-rating-input label {
    font-size: 0.95rem;
    color: var(--mk-text);
    font-weight: 500;
}

.pd-interactive-stars {
    color: #ccc;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    gap: 4px;
}

.pd-interactive-stars i {
    transition: color 0.2s, transform 0.2s;
}

.pd-interactive-stars i:hover,
.pd-interactive-stars i.active,
.pd-interactive-stars i.hover-active {
    color: var(--c-brown);
}

.pd-interactive-stars i:hover {
    transform: scale(1.1);
}

.pd-btn-submit-review {
    width: 100%;
    background-color: var(--mk-dark);
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-family: var(--f-body);
}

.pd-btn-submit-review:hover {
    background-color: var(--c-brown);
    transform: translateY(-2px);
}

/* Reviews List */
.pd-reviews-list-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.pd-review-item {
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
    animation: fadeIn 0.5s ease-out;
}

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

.pd-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.pd-review-author {
    font-weight: 600;
    color: var(--mk-dark);
    font-size: 1.05rem;
}

.pd-review-date {
    font-size: 0.85rem;
    color: #999;
}

.pd-review-item-stars {
    color: var(--c-brown);
    font-size: 0.9rem;
    margin-top: 4px;
}

.pd-review-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}

/* Responsive */
@media (max-width: 992px) {
    .pd-reviews-layout {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .pd-reviews-section {
        padding: 25px 20px;
    }
    .pd-review-form-container {
        padding: 20px;
    }
}
