/**
 * Julius Yale Web - Unit Page Styles
 */

/* Product Detail */
.product-detail {
    padding: 60px 0;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
}

.gallery-main {
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.gallery-main img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumb {
    background: var(--bg-card);
    border: 2px solid var(--border);
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.thumb:hover,
.thumb.active {
    border-color: var(--primary);
}

.thumb img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

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

.product-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
    line-height: 1.1;
}

.product-price-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

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

.product-price.sale {
    color: var(--primary);
}

.product-original {
    font-size: 1.5rem;
    color: var(--text-dim);
    text-decoration: line-through;
}

.product-discount {
    background: var(--accent);
    color: var(--bg-main);
    padding: 5px 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-description {
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.product-description br {
    display: block;
    margin: 10px 0;
}

/* Size Selector */
.size-selector {
    margin-bottom: 30px;
}

.selector-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
}

.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-btn {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.size-btn:hover:not(.disabled) {
    border-color: var(--primary);
}

.size-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
}

.size-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
}

.size-help {
    margin-top: 10px;
}

.size-help a {
    color: var(--text-muted);
    text-decoration: underline;
    font-size: 0.9rem;
}

/* Quantity */
.quantity-selector {
    margin-bottom: 30px;
}

.qty-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    width: fit-content;
}

.qty-btn {
    width: 45px;
    height: 45px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.qty-input input {
    width: 60px;
    height: 45px;
    border: none;
    background: transparent;
    color: var(--text-main);
    text-align: center;
    font-size: 1rem;
    -moz-appearance: textfield;
}

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

/* Actions */
.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1rem;
}

/* Product Meta */
.product-meta {
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

.meta-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

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

.meta-value {
    color: var(--text-main);
}

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

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

/* Accordion */
.product-details {
    padding: 60px 0;
    background: var(--bg-alt);
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-header {
    width: 100%;
    padding: 25px 0;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.accordion-header svg {
    transition: var(--transition);
}

.accordion-item.active .accordion-header svg {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    padding-bottom: 25px;
}

.accordion-content p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Size Table */
.size-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.size-table th,
.size-table td {
    padding: 15px;
    text-align: center;
    border: 1px solid var(--border);
}

.size-table th {
    background: var(--bg-card);
    font-family: var(--font-heading);
    font-weight: 400;
}

.size-table td {
    color: var(--text-muted);
}

/* Related Products */
.related-products {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    color: var(--text-muted);
    margin-top: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.related-card:hover {
    border-color: var(--primary);
}

.related-image {
    display: block;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.related-info {
    padding: 15px;
}

.related-info h3 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
    text-transform: none;
}

.related-info p {
    color: var(--primary);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .product-gallery {
        position: static;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-actions {
        flex-direction: column;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}
