/**
 * Motif/Product Detail Page Styles
 */

.motif-page {
    padding-top: 80px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1.5rem 0;
    background-color: var(--background);
    border-bottom: 1px solid #eee;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--text-light);
}

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

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

.breadcrumb .current {
    color: var(--primary);
}

/* Product Detail */
.product-detail {
    padding: 3rem 0;
    background-color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

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

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

.main-image {
    aspect-ratio: 1;
    background-color: var(--background);
    margin-bottom: 1rem;
    overflow: hidden;
}

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

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.thumbnail-list {
    display: flex;
    gap: 0.75rem;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

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

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

/* Product Info */
.product-info {
    padding-top: 1rem;
}

.product-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-price {
    margin-bottom: 1.5rem;
}

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

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

.price-original {
    font-size: 1.125rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 0.75rem;
}

.product-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.product-description p {
    margin-bottom: 1rem;
}

/* Product Actions */
.product-actions {
    margin-bottom: 2rem;
}

.quantity-selector {
    margin-bottom: 1.5rem;
}

.quantity-selector label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.quantity-input {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--primary);
    transition: background-color 0.3s ease;
}

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

.quantity-input input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    -moz-appearance: textfield;
}

.quantity-input input::-webkit-outer-spin-button,
.quantity-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-add-cart {
    width: 100%;
    padding: 1.25rem;
    font-size: 1rem;
}

/* Product Meta */
.product-meta {
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.meta-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.meta-label {
    color: var(--text-light);
}

.meta-value {
    color: var(--primary);
    font-weight: 500;
}

.meta-value.in-stock {
    color: var(--success);
}

.meta-value.out-of-stock {
    color: var(--error);
}

/* Related Products */
.related-products {
    padding: 4rem 0 6rem;
    background-color: var(--background);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.product-card {
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-card .product-image {
    aspect-ratio: 1;
    overflow: hidden;
    background-color: var(--background);
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.product-card .product-info {
    padding: 1.25rem;
}

.product-card .product-name {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--primary);
    line-height: 1.4;
}

.product-card .product-price {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary);
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .product-images {
        position: static;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
