/* ============================================================
   Maillots.top — Product Detail Styles (40/60 Layout)
   ============================================================ */

.pd-wrap {
    max-width: var(--page-w);
    margin: 0 auto;
    padding: 24px 20px;
}

/* Breadcrumb */
.pd-breadcrumb {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 20px;
}
.pd-breadcrumb a {
    color: var(--gray-500);
}
.pd-breadcrumb a:hover {
    color: var(--accent);
}
.pd-breadcrumb .sep {
    margin: 0 6px;
    color: var(--gray-300);
}
.pd-breadcrumb .current {
    color: var(--ink);
    font-weight: 600;
}

/* Main Layout: 40/60 */
.pd-layout {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
}

/* 40% - Image Gallery */
.pd-images {
    width: 40%;
    flex-shrink: 0;
}

.pd-main-image {
    position: relative;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pd-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.pd-main-image .placeholder {
    font-size: 4rem;
    color: var(--gray-300);
}

.pd-thumbnails {
    display: flex;
    gap: 8px;
}
.pd-thumb {
    width: 64px;
    height: 64px;
    border: 2px solid var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
    background: var(--white);
}
.pd-thumb:hover {
    border-color: var(--gray-400);
}
.pd-thumb.active {
    border-color: var(--accent);
}
.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 60% - Product Info */
.pd-info {
    width: 60%;
    flex-shrink: 0;
}

.pd-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
    line-height: 1.3;
}

.pd-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}
.pd-meta-item {
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}
.pd-meta-item strong {
    color: var(--ink);
}

/* Tags Container */
.pd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

/* Individual Tag */
.pd-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.6;
}
.pd-tag-home {
    background: #16a34a;
}
.pd-tag-away {
    background: #2563eb;
}
.pd-tag-third {
    background: #dc2626;
}
.pd-tag-gk {
    background: #6b7280;
}
.pd-tag-year {
    background: var(--accent);
}
.pd-tag-cat {
    background: var(--gray-500);
}

/* Yupoo Source Reference */
.pd-yupoo-ref {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pd-yupoo-ref .ref-label {
    color: var(--gray-500);
}
.pd-yupoo-ref a {
    color: var(--accent);
    text-decoration: underline;
}
.pd-yupoo-ref a:hover {
    color: var(--accent2);
}

/* Divider */
.pd-divider {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 16px 0;
}

/* Field Container */
.pd-field {
    margin-bottom: 16px;
}

/* Field Label */
.pd-field-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink);
    margin-bottom: 8px;
    display: block;
}

/* Size Selection */
.pd-section {
    margin-bottom: 20px;
}
.pd-section-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pd-section-label .pd-size-guide {
    font-size: 0.8rem;
    color: var(--accent);
    cursor: pointer;
    font-weight: 400;
}

.pd-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Size Group */
.pd-size-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pd-size-btn {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    transition: all var(--transition);
    min-width: 48px;
    text-align: center;
}
.pd-size-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.pd-size-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--white);
}

/* Quantity Controls */
.pd-qty-group {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}
.pd-qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--ink);
    transition: background var(--transition);
}
.pd-qty-btn:hover {
    background: var(--gray-200);
}
.pd-qty-input {
    width: 48px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    -moz-appearance: textfield;
}
.pd-qty-input::-webkit-outer-spin-button,
.pd-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Quantity label — "pieces of X size" */
.pd-qty-label {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--gray-500);
    text-align: center;
}
.pd-qty-label #pd-qty-size-label {
    font-weight: 600;
    color: var(--accent2);
}

/* Customization Container */
.pd-customization {
    margin-bottom: 16px;
}

/* Customization Grid */
.pd-custom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.pd-custom-field {
    display: flex;
    flex-direction: column;
}
.pd-custom-field label {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 4px;
    font-weight: 500;
}
.pd-custom-field input {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color var(--transition);
}
.pd-custom-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}
.pd-custom-field.full-width {
    grid-column: 1 / -1;
}

/* Custom Input */
.pd-custom-input {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color var(--transition);
}
.pd-custom-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

/* Patch Group */
.pd-patch-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

/* Patch Option */
.pd-patch-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
}

/* Patch Checkbox */
.pd-patch-cb {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Cart Preview */
.pd-cart-preview {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pd-cart-preview .preview-label {
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
}
.pd-cart-preview .preview-text {
    color: var(--ink);
}

/* Action Buttons */
.pd-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}
.pd-actions .sg-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 1rem;
}

/* Add to Cart Button */
.pd-btn-add-cart {
    background: #dc2626 !important;
    color: var(--white) !important;
    border-color: #dc2626 !important;
}
.pd-btn-add-cart:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
}

/* Request Quote Button */
.pd-btn-quote {
    background: #2563eb !important;
    color: var(--white) !important;
    border-color: #2563eb !important;
}
.pd-btn-quote:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

/* No Image Placeholder */
.pd-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-300);
    font-size: 4rem;
}

/* Size Chart Tabs */
.pd-size-chart {
    margin-top: 32px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
}
.pd-chart-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}
.chart-tab {
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}
.chart-tab:hover {
    color: var(--ink);
}
.chart-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.chart-panel {
    padding: 16px 20px;
    display: none;
    overflow-x: auto;
}
.chart-panel.active {
    display: block;
}
.chart-panel table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.chart-panel th,
.chart-panel td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid var(--gray-200);
}
.chart-panel th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--ink);
}

/* Responsive */
@media (max-width: 768px) {
    .pd-layout {
        flex-direction: column;
        gap: 20px;
    }
    .pd-images {
        width: 100%;
    }
    .pd-info {
        width: 100%;
    }
    .pd-title {
        font-size: 1.2rem;
    }
    .pd-custom-grid {
        grid-template-columns: 1fr;
    }
    .pd-actions {
        flex-direction: column;
    }
    .pd-wrap {
        padding: 16px 12px;
    }
    .pd-thumb {
        width: 48px;
        height: 48px;
    }
}
