/**
 * ========================================
 * PRODUCT DETAIL PAGE STYLES
 * ========================================
 */

/* Breadcrumb */
.breadcrumb-container {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb-separator {
    margin: 0 10px;
    color: var(--text-muted);
}

/* Product Detail Container */
.product-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 60vh;
}

/* Loading State */
.product-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-muted);
}

.product-loading .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error State */
.product-error {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.product-error h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 10px;
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Product Detail Layout */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Product Images */
.product-images {
    position: sticky;
    top: 100px;
}

.main-image-container {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
}

.main-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.3s ease;
}

.main-image-container:hover .main-image {
    transform: scale(1.02);
}

.zoom-hint {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image-container:hover .zoom-hint {
    opacity: 1;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--accent);
}

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

/* Product Info */
.product-info-detail {
    padding: 20px 0;
}

.product-header {
    margin-bottom: 30px;
}

.product-category-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.product-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 10px;
}

.product-sku-detail {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.product-sku-detail span:first-child {
    margin-right: 5px;
}

/* Pricing Section */
.pricing-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.price-main {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
}

.price-currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

.price-dollars {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.price-cents {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

.price-unit-label {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.price-per-unit {
    color: var(--text-muted);
    font-size: 1rem;
}

.units-per-case {
    color: var(--text-muted);
    opacity: 0.8;
}

/* Stock Status */
.stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.stock-status.in-stock {
    color: #4ade80;
}

.stock-status.in-stock svg {
    stroke: #4ade80;
}

.stock-status.out-of-stock {
    color: #f87171;
}

/* Purchase Section */
.purchase-section {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 40px;
}

.quantity-section {
    flex-shrink: 0;
}

.quantity-section label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 45px;
    height: 50px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--accent);
    color: var(--bg);
}

.qty-input {
    width: 60px;
    height: 50px;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    color: var(--text);
    font-size: 1.1rem;
    text-align: center;
    font-family: var(--font-body);
}

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

/* Hide number input spinners */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Add to Cart Button */
.add-to-cart-large {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 50px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: var(--bg);
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-large:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 109, 0, 0.3);
}

.add-to-cart-large.added {
    background: #4ade80;
}

/* Description Section */
.description-section,
.features-section {
    padding: 25px 0;
    border-top: 1px solid var(--border);
}

.description-section h2,
.features-section h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 15px;
}

.description-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    position: relative;
    padding-left: 25px;
    padding-bottom: 10px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.features-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

/* Zoom Modal */
.zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.zoom-modal.active {
    display: flex;
}

.zoom-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.zoom-close:hover {
    color: var(--accent);
}

.zoom-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 30px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-images {
        position: relative;
        top: 0;
    }

    .product-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .product-detail-container {
        padding: 20px 15px;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .price-dollars {
        font-size: 2.5rem;
    }

    .purchase-section {
        flex-direction: column;
        gap: 15px;
    }

    .quantity-section {
        width: 100%;
    }

    .quantity-controls {
        width: 100%;
        justify-content: center;
    }

    .add-to-cart-large {
        width: 100%;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .pricing-section {
        padding: 20px 15px;
    }

    .product-category-badge {
        font-size: 0.7rem;
        padding: 4px 12px;
    }
}
