:root {
    --bg: #f4f1ee;
    --ink: #1f1a16;
    --gold: #c5a059;
    --brown: #3d2b1f;
    --card: #fffdfa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background:
        radial-gradient(circle at 15% 0%, rgba(197, 160, 89, 0.16), transparent 30%),
        radial-gradient(circle at 95% 10%, rgba(61, 43, 31, 0.08), transparent 35%),
        var(--bg);
    color: var(--ink);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(61, 43, 31, 0.15);
}

.brand img {
    height: 34px;
}

.back-link {
    color: var(--brown);
    text-decoration: none;
    font-weight: 600;
}

.polo-page {
    width: min(1180px, 94%);
    margin: 24px auto 50px;
    display: grid;
    gap: 22px;
}

.hero-panel,
.config-panel,
.contact-panel {
    background: var(--card);
    border: 1px solid rgba(61, 43, 31, 0.12);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(37, 27, 19, 0.08);
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 18px;
    padding: 18px;
}

.hero-media img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.hero-media {
    display: grid;
    gap: 14px;
}

.hero-visual {
    position: relative;
}

.hero-description {
    border: 1px solid rgba(61, 43, 31, 0.15);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.75);
}

.hero-description h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3d2b1f;
}

.hero-description p {
    margin: 0;
    line-height: 1.6;
    color: #49392e;
}

.hero-config-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 14px;
}

.hero-copy h1 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
}

.hero-copy p {
    line-height: 1.65;
    color: #49392e;
}

.action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.color-block {
    margin-top: 14px;
}

.base-price-line {
    margin: 12px 0;
}

.price-card {
    border: 1px solid rgba(197, 160, 89, 0.35);
    background: rgba(197, 160, 89, 0.08);
    border-radius: 12px;
    padding: 14px;
    line-height: 1.8;
    margin-top: 12px;
}

.price-card h2 {
    margin: 0 0 8px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.config-panel,
.contact-panel {
    padding: 18px;
}

.config-panel h2,
.contact-panel h2 {
    margin-top: 0;
    font-family: 'Playfair Display', serif;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field-block label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.color-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
}

.color-dot.active {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}

.qty-control {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    gap: 8px;
}

.qty-control button,
.qty-control input,
select,
.contact-form input,
.contact-form textarea,
.upload-area input {
    padding: 10px;
    border-radius: 9px;
    border: 1px solid rgba(61, 43, 31, 0.22);
    font-family: inherit;
}

.sizes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.sizes-grid label {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: none;
    margin: 0;
}

.sizes-grid input {
    width: 100%;
    margin-top: 6px;
    padding: 8px;
}

.upload-area {
    margin-top: 16px;
}

.placement-overlay {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    pointer-events: none;
}

.placement-toolbar {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
    pointer-events: auto;
}

.mark-chip {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    background: rgba(29, 22, 18, 0.72);
    color: #fff;
    font-weight: 700;
}

.mark-chip.is-active {
    background: rgba(197, 160, 89, 0.96);
    color: #2b1f15;
    border-color: rgba(197, 160, 89, 0.96);
}

.mark-chip-embroidery {
    letter-spacing: 0.06em;
    text-shadow: 0 1px 0 rgba(255,255,255,0.18), 0 0 1px rgba(0,0,0,0.28);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.mark-chip-print {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
}

.placement-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(61, 43, 31, 0.45);
    background: rgba(255, 255, 255, 0.88);
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    pointer-events: auto;
    z-index: 2;
}

.placement-hotspot.active {
    background: rgba(197, 160, 89, 0.95);
    border-color: rgba(197, 160, 89, 0.95);
}

.field-note {
    margin: 8px 0 0;
    color: #594536;
    font-size: 0.86rem;
}

.logo-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-status.is-success {
    color: #256029;
    font-weight: 700;
}

.logo-status .status-check {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: #2e8b57;
    color: #fff;
    font-size: 0.72rem;
    flex: 0 0 auto;
}

.btn {
    border: 0;
    border-radius: 10px;
    padding: 11px 14px;
    font-weight: 700;
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(25%);
}

.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-wrapper[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f1a16;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 7px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.tooltip-wrapper[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f1a16;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.tooltip-wrapper[data-tooltip]:hover::after,
.tooltip-wrapper[data-tooltip]:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--brown);
    color: #fff;
}

.btn-confirm {
    width: auto;
    justify-self: center;
    align-self: start;
    background: #2e8b57;
    color: #fff;
    padding: 11px 18px;
    font-size: 0.92rem;
}

.btn-secondary {
    background: rgba(61, 43, 31, 0.1);
    color: var(--brown);
    border: 1px solid rgba(61, 43, 31, 0.25);
}

.btn-ghost {
    margin-top: 8px;
    width: 100%;
    background: rgba(197, 160, 89, 0.2);
    color: #241a13;
    border: 1px solid rgba(197, 160, 89, 0.5);
}

.contact-form {
    display: grid;
    gap: 10px;
}

.status-message {
    display: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
}

.status-success {
    display: block;
    background: #edf7ec;
    border: 1px solid #9acb96;
}

.status-error {
    display: block;
    background: #fdecec;
    border: 1px solid #e6aaaa;
}

.status-info {
    display: block;
    background: #f8f1e6;
    border: 1px solid #d9c09a;
}

.polo-footer {
    margin-top: 8px;
    padding: 28px 18px 24px;
    border-radius: 18px;
    border: 1px solid rgba(61, 43, 31, 0.12);
    text-align: center;
    color: #f3e5cb;
    background:
        radial-gradient(circle at 20% 10%, rgba(197, 160, 89, 0.25), transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(197, 160, 89, 0.18), transparent 45%),
        linear-gradient(135deg, #1a1a1a 0%, #2a1f17 55%, #3d2b1f 100%);
}

.polo-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.polo-social-links a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #f8edd8;
    text-decoration: none;
    border: 1px solid rgba(197, 160, 89, 0.45);
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.polo-social-links a:hover {
    transform: translateY(-3px);
    background: rgba(197, 160, 89, 0.25);
    border-color: rgba(197, 160, 89, 0.85);
}

.polo-footer p {
    margin: 0;
    font-size: 0.84rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.95;
}

.serigraphie-color-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.serigraphie-color-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 10px 6px;
    cursor: pointer;
    background: rgba(61, 43, 31, 0.04);
    transition: border-color 0.2s, background 0.2s;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1f1a16;
}

.serigraphie-color-btn:hover {
    background: rgba(197, 160, 89, 0.12);
    border-color: rgba(197, 160, 89, 0.5);
}

.serigraphie-color-btn.is-selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}

.serigraphie-color-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

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

.model-modal {
    position: fixed;
    inset: 0;
    background: rgba(17, 13, 9, 0.72);
    display: grid;
    place-items: center;
    z-index: 60;
}

.model-modal-content {
    width: min(860px, 94%);
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    position: relative;
}

.summary-modal-content {
    width: min(680px, 94%);
}

.warning-modal-content {
    width: min(540px, 92%);
}

.summary-copy {
    color: #5b4739;
    line-height: 1.6;
}

.summary-details {
    margin: 16px 0;
    padding: 14px;
    border-radius: 12px;
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.28);
    color: #34271d;
    line-height: 1.8;
    white-space: pre-line;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.custom-col-upload {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed rgba(61, 43, 31, 0.2);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.custom-col-label {
    margin: 0;
    font-size: 0.88rem;
    color: #594536;
    flex: 1 1 100%;
}

.custom-col-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed rgba(61, 43, 31, 0.3);
    border-radius: 10px;
    background: rgba(197, 160, 89, 0.05);
    padding: 12px 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 140px;
}

.custom-col-card:hover {
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.12);
}

.custom-col-card.has-file {
    border-color: #2e8b57;
    background: rgba(46, 139, 87, 0.07);
}

.custom-col-icon {
    font-size: 1.8rem;
    color: var(--gold);
}

.model-item {
    border: 1px solid rgba(61, 43, 31, 0.2);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.model-item.is-selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.25);
}

.model-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.model-item div {
    padding: 10px;
}

.close-modal {
    position: absolute;
    right: 8px;
    top: 6px;
    border: 0;
    font-size: 1.6rem;
    background: transparent;
    cursor: pointer;
}

.price-old {
    text-decoration: line-through;
    opacity: 0.75;
}

.price-new {
    color: #c62828;
    font-weight: 800;
}

@media (max-width: 900px) {
    .hero-panel,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .placement-toolbar {
        flex-wrap: wrap;
        width: calc(100% - 24px);
        justify-content: center;
    }

    .sizes-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .model-grid {
        grid-template-columns: 1fr;
    }
}
