/* storefront/app/static/css/item.css */
/* Product Container */
.container {
    max-width: 100%;
}
.product-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    background: var(--background-color);
    min-height: calc(100vh - 80px); /* Account for header height */
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin-bottom: 1.5rem;
    background: var(--background-color);
}

.breadcrumb-content {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    overflow-wrap: break-word;
    word-break: break-word;
}

.breadcrumb-content a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-content a:hover {
    color: var(--text-primary);
}

.breadcrumb-content .separator {
    color: var(--text-secondary);
}

.breadcrumb-content .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Product Layout */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin: 0 auto;
}

/* Gallery Section */
.gallery-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-container {
    position: relative;
    display: flex;
    gap: 1rem;
}

.main-image {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--secondary-color);
    position: relative;
    cursor: crosshair;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 1;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

/* Gallery Navigation Arrows */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0.7;
    text-shadow:
        0 0 10px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(0, 0, 0, 0.4);
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.gallery-arrow:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
    text-shadow:
        0 0 15px rgba(0, 0, 0, 0.9),
        0 0 25px rgba(0, 0, 0, 0.7),
        0 0 35px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.7));
}


.prev-arrow {
    left: 1rem;
}

.next-arrow {
    right: 1rem;
}

/* Zoom Lens */
.zoom-lens {
    position: absolute;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
    transition: opacity 0.2s ease;
    z-index: 5;
}

.main-image:hover .zoom-lens {
    opacity: 1;
}
/* Hide zoom lens when hovering over arrows */
.gallery-arrow:hover ~ .zoom-lens,
.main-image:hover .gallery-arrow:hover ~ .zoom-lens {
    opacity: 0 !important;
}

/* Zoom Result Container */
.zoom-result {
    flex: 0 0 400px;
    width: 400px;
    height: 400px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--secondary-color);
    background-repeat: no-repeat;
    background-size: 200% 200%;
    opacity: 0;
    transition: opacity 0.2s ease;
    position: sticky;
    top: 2rem;
    z-index: -1;
}

.zoom-result.active {
    opacity: 1;
    z-index: 100;
}


.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
}

.thumbnail {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.thumbnail:hover {
    border-color: var(--icy-blue);
}

.thumbnail.active {
    border-color: var(--icy-blue);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.info-header .brand {
    font-size: 1.25rem;
    color: var(--icy-blue);
    font-weight: 500;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Pricing Section */
.pricing-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.price {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stock-status {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.in-stock {
    background: rgba(0, 200, 83, 0.2);
    color: var(--success-color);
}

.out-of-stock {
    background: rgba(255, 82, 82, 0.2);
    color: var(--error-color);
}

/* Add to Cart Button */
/*.btn-add-cart {
    width: 100%;
    padding: 1rem;
    background: var(--button-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-cart:hover {
    background: var(--button-primary-hover);
    transform: translateY(-2px);
}

.btn-add-cart:disabled {
    background: var(--button-secondary);
    cursor: not-allowed;
    opacity: 0.7;
}*/

/* Details Section */
.details-section {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-group {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.detail-group h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.detail-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Specs Grid */
.specs-grid {
    display: grid;
    gap: 0.75rem;
}

.spec-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    padding: 0.5rem;
    background: var(--secondary-color);
    border-radius: var(--radius-sm);
}

.spec-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.spec-value {
    color: var(--text-primary);
}

/* Product Condition Rating Bar */
/* Product Condition Rating Bar */
.product-condition {
  margin: 1.5rem 0;
}

.product-condition h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.condition-rating {
  margin-bottom: 1rem;
}

.rating-scale {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  position: relative;
}

.rating-point {
  font-size: 0.75rem;
  color: var(--text-secondary);
  position: relative;
  text-align: center;
  flex: 1;
}

.rating-bar {
  height: 2px;
  background-color: #e0e0e0;
  position: relative;
  margin: 1rem 0;
  display: flex;
  justify-content: space-between;
}

.rating-marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #e0e0e0;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.rating-marker.active {
  width: 14px;
  height: 14px;
  background-color: black;
}

/* Position markers at evenly spaced intervals */
.rating-marker[data-condition="stained"] {
  left: 0%;
}

.rating-marker[data-condition="damaged"] {
  left: 12.5%;
}

.rating-marker[data-condition="poor"] {
  left: 25%;
}

.rating-marker[data-condition="ok"] {
  left: 37.5%;
}

.rating-marker[data-condition="good"] {
  left: 50%;
}

.rating-marker[data-condition="great"] {
  left: 62.5%;
}

.rating-marker[data-condition="excellent"] {
  left: 75%;
}

.rating-marker[data-condition="brand new without tags"] {
  left: 87.5%;
}

.rating-marker[data-condition="brand new with tags"] {
  left: 100%;
}

.condition-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Authenticity Badge */
.authenticity-badge {
  margin-top: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  position: relative;
}

.badge-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: help;
}

.badge-icon i {
  color: var(--text-primary);
  font-size: 1.25rem;
}

.badge-icon span {
  font-weight: 500;
  color: var(--text-primary);
}

.badge-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid var(--border-color);
  padding: 1rem;
  box-shadow: var(--shadow-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10;
}

.authenticity-badge:hover .badge-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Media query updates for responsiveness */
@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery-section {
        max-width: 600px;
        margin: 0 auto;
    }

    .main-image-container {
        flex-direction: column;
    }

    .zoom-result {
        display: none;
    }

    .main-image {
        cursor: default;
    }

    .zoom-lens {
        display: none;
    }

    .gallery-arrow {
        padding: 0.75rem;
        font-size: 1rem;
    }

    .prev-arrow {
        left: 0.5rem;
    }

    .next-arrow {
        right: 0.5rem;
    }
}


@media (max-width: 768px) {
    .product-container {
        padding: 1rem;
    }

    .product-layout {
        padding: 1rem;
        justify-items: center;
    }

    .info-header h1 {
        font-size: 1.5rem;
    }

    .price {
        font-size: 1.5rem;
    }

    .badge-tooltip {
      width: calc(100% - 2rem);
      left: 1rem;
    }

    .main-image {
        max-width: 88%;
    }

    .thumbnail-grid {
        max-width: 88%;
    }

    .btn-add-cart {
        max-width: 88%;
    }

    .product-info {
        width: 100%;
        max-width: 88%;
        box-sizing: border-box;
    }

    .rating-scale {
        margin-bottom: 0.25rem;
        width: 10%;
        justify-content: space-between;
        position: static;

    }

    .rating-marker.active {
        width: 10px;
        height: 10px;
    }

    .rating-point {
        font-size: 0.525rem;
        text-align: left;
        margin-right: 0.15rem;

    }

    .gallery-arrow {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

}
