/* Product Customization Popup — Minimal Scandinavian Theme */

/* ── Overlay ─────────────────────────────────────────────── */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(46, 13, 20, 0.55);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    overflow-y: auto;
}

/* ── Container ───────────────────────────────────────────── */
.popup-container {
    background: #fff;
    border-radius: 5px;
    width: 95%;
    max-width: 1600px;
    max-height: 96vh;
    overflow: hidden;
    position: relative;
}

/* ── Close Button ────────────────────────────────────────── */
.close-popup {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    z-index: 100;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    padding: 0;
}

.close-popup:hover {
    background: rgba(255,255,255,0.25);
}

/* ── Layout ──────────────────────────────────────────────── */
.popup-layout {
    display: flex;
    gap: 0;
    height: 96vh;
}

.popup-main {
    flex: 1;
    padding: 32px 42px;
    overflow-y: auto;
    background: #fdf0e4;
}

.popup-sidebar {
    width: 300px;
    background: #fff;
    border-left: 1px solid #d6c9bc;
    padding: 20px 18px;
    overflow-y: auto;
    flex-shrink: 0;
}

/* ── Main Title ──────────────────────────────────────────── */
.popup-main-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: #2E0D14;
    letter-spacing: -0.3px;
}

/* ── Patch Carousel ──────────────────────────────────────── */
.patch-carousel {
    position: relative;
    margin-bottom: 28px;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #d6c9bc;
    border-radius: 5px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 16px;
    color: #2E0D14;
}

.carousel-arrow.left { left: -8px; }
.carousel-arrow.right { right: -8px; }
.carousel-arrow:hover { background: #f5ede6; }

.patch-types-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-behavior: smooth;
}

.patch-types-scroll::-webkit-scrollbar { height: 4px; }
.patch-types-scroll::-webkit-scrollbar-track { background: #ede3da; border-radius: 2px; }
.patch-types-scroll::-webkit-scrollbar-thumb { background: #b0a09a; border-radius: 2px; }

/* ── Patch Card ──────────────────────────────────────────── */
.patch-card {
    min-width: 150px;
    background: #fff;
    border-radius: 5px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border: 1.5px solid #d6c9bc;
    position: relative;
    flex-shrink: 0;
}

.patch-card:hover { border-color: #2E0D14; background: #faf7f4; }

.patch-card.active {
    border-color: #2E0D14;
    background: #faf7f4;
}

.patch-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 8px;
}

.patch-card p {
    font-size: 12px;
    font-weight: 600;
    color: #2E0D14;
    margin: 0;
    line-height: 1.3;
}

.patch-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0;
    height: 18px;
}

.check {
    background: #2E0D14;
    color: #fdf0e4;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.arrow { font-size: 14px; color: #2E0D14; }

/* ── Badges ──────────────────────────────────────────────── */
.tpproduct__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge-hot,
.badge-pop,
.badge-new {
    position: relative;
    top: unset;
    left: unset;
    background: #2E0D14;
    color: #fdf0e4;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-pop { background: #4a1528; }
.badge-new { background: #6b3040; }

.customize-text {
    font-size: 14px;
    color: #7a6e67;
    text-align: center;
    margin: 16px 0;
}

/* ── Step Section ────────────────────────────────────────── */
.step-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #d6c9bc;
}

.step-section.disabled {
    opacity: 0.3;
    pointer-events: none;
    user-select: none;
}

.step-section:last-child { border-bottom: none; }

.step-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2E0D14;
}

.step-num { color: #2E0D14; font-weight: 700; }

.step-desc {
    font-size: 13px;
    color: #7a6e67;
    line-height: 1.6;
    margin-bottom: 18px;
}

/* ── Options Grid ────────────────────────────────────────── */
.options-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.options-grid.two-col   { grid-template-columns: repeat(2, 1fr); }
.options-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.options-grid.four-col  { grid-template-columns: repeat(4, 1fr); }
.options-grid.five-col  { grid-template-columns: repeat(5, 1fr); }

/* ── Option Card ─────────────────────────────────────────── */
.option-card {
    background: #fff;
    border: 1.5px solid #d6c9bc;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.option-card:hover { border-color: #2E0D14; background: #faf7f4; }

.option-card.selected {
    border-color: #2E0D14;
    background: #faf7f4;
}

.option-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 8px;
}

.option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #2E0D14;
    font-weight: 600;
    margin-bottom: 4px;
}

.option-label input { cursor: pointer; }

.price-label {
    font-size: 11px;
    color: #7a6e67;
    font-weight: 600;
    margin: 4px 0 0;
}

.badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 700;
    color: #fdf0e4;
    background: #2E0D14;
    text-transform: uppercase;
}

.badge-popular { background: #4a1528; }

/* ── Size Inputs ─────────────────────────────────────────── */
.size-inputs-row {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.size-input,
.size-select {
    flex: 1;
    padding: 11px 13px;
    border: 1px solid #d6c9bc;
    border-radius: 5px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    color: #2E0D14;
}

.size-input:focus,
.size-select:focus { outline: none; border-color: #2E0D14; }

.size-select:disabled { background: #f5ede6; cursor: not-allowed; color: #9c8880; }

/* ── Upload & Comments ───────────────────────────────────── */
.upload-comments-wrapper {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.upload-section-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-option {
    background: #faf7f4;
    padding: 18px;
    border-radius: 5px;
    border: 1px solid #d6c9bc;
}

.upload-option label {
    font-size: 13px;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    color: #2E0D14;
}

.note-text { font-size: 11px; color: #7a6e67; margin: 8px 0; }

.upload-icon { font-size: 40px; text-align: center; margin: 12px 0; }

.browse-button {
    background: #2E0D14;
    color: #fdf0e4;
    border: none;
    padding: 9px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: block;
    margin: 0 auto;
}

.browse-button:hover { background: #3d1520; }

.file-limit { font-size: 11px; color: #9c8880; text-align: center; margin-top: 8px; }

.comments-section-right { flex: 1; }

.comments-section-right h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #2E0D14;
}

.intended-use-section p {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2E0D14;
}

.tag-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.tag-btn {
    padding: 5px 12px;
    background: #fff;
    border: 1px solid #d6c9bc;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    color: #2E0D14;
}

.tag-btn:hover { background: #2E0D14; color: #fdf0e4; border-color: #2E0D14; }

.comments-textarea {
    width: 100%;
    min-height: 90px;
    padding: 11px 13px;
    border: 1px solid #d6c9bc;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    color: #2E0D14;
    background: #fff;
}

.comments-textarea:focus { outline: none; border-color: #2E0D14; }

/* ── Quantity Input ──────────────────────────────────────── */
.quantity-input-field {
    width: 100%;
    max-width: 380px;
    padding: 11px 13px;
    border: 1px solid #d6c9bc;
    border-radius: 5px;
    font-size: 15px;
    margin-bottom: 18px;
    color: #2E0D14;
    background: #fff;
}

.quantity-input-field:focus { outline: none; border-color: #2E0D14; }

/* ── Turnaround ──────────────────────────────────────────── */
.turnaround-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 26px;
}

.turnaround-option {
    padding: 18px;
    border-radius: 5px;
    cursor: pointer;
    border: 1.5px solid #d6c9bc;
    background: #fff;
}

.turnaround-option:hover { border-color: #2E0D14; background: #faf7f4; }

.turnaround-option.selected { border-color: #2E0D14; background: #faf7f4; }

.turnaround-option label {
    font-weight: 700;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
    color: #2E0D14;
}

.turnaround-option p { font-size: 12px; line-height: 1.5; margin: 0; color: #7a6e67; }

/* ── Final Summary ───────────────────────────────────────── */
.final-summary-center {
    max-width: 560px;
    margin: 32px auto;
    border: 1px solid #d6c9bc;
    border-radius: 5px;
    overflow: hidden;
}

.summary-image { width: 100%; height: 220px; object-fit: cover; }

.summary-content { padding: 22px; }

.summary-content h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 18px;
    text-align: center;
    color: #2E0D14;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar-image {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
    border: 1px solid #d6c9bc;
}

.summary-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2E0D14;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.summary-table {
    width: 100%;
    margin-bottom: 6px;
    border-collapse: collapse;
    border-radius: 5px;
    overflow: hidden;
}

.summary-table tr { border-bottom: 1px solid #f5ede6; }
.summary-table tr:last-child { border-bottom: none; }

.summary-table td {
    padding: 5px 8px;
    font-size: 10px;
    color: #7a6e67;
    vertical-align: middle;
    line-height: 1.3;
}

.summary-table td:first-child {
    font-weight: 700;
    color: #2E0D14;
    width: 38%;
    padding-right: 6px;
}

.summary-value {
    font-weight: 700;
    color: #2E0D14;
    text-align: left;
    font-size: 10px;
    width: 47%;
}

.edit-btn {
    background: #faf7f4;
    border: 1px solid #d6c9bc;
    color: #7a6e67;
    font-size: 9px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 5px;
    white-space: nowrap;
}

.edit-btn:hover { background: #2E0D14; color: #fdf0e4; border-color: #2E0D14; }

.view-more-btn {
    background: none;
    border: none;
    color: #2E0D14;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    width: 100%;
    text-align: center;
    border-top: 1px solid #f5ede6;
    border-bottom: 1px solid #f5ede6;
    margin: 6px 0;
}

.view-more-btn:hover { color: #4a1528; }

.price-section { margin-top: 6px; }

.currency-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 10px;
    border-top: 1px solid #f5ede6;
    margin-top: 4px;
}

.currency-section span { font-weight: 600; color: #2E0D14; }

.currency-select {
    padding: 3px 6px;
    border: 1px solid #d6c9bc;
    border-radius: 5px;
    font-size: 9px;
    background: #fff;
    cursor: pointer;
    color: #2E0D14;
}

.currency-select:focus { outline: none; border-color: #2E0D14; }

.total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-top: 2px solid #2E0D14;
    margin-top: 8px;
    background: #faf7f4;
    border-radius: 5px;
}

.total-label {
    font-size: 10px;
    font-weight: 700;
    color: #2E0D14;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.total-amount {
    font-size: 20px;
    font-weight: 800;
    color: #2E0D14;
}

.free-badges {
    display: flex;
    justify-content: space-around;
    margin: 8px 0;
    gap: 6px;
}

.badge-free {
    font-size: 9px;
    color: #2E0D14;
    font-weight: 700;
    padding: 4px 6px;
    background: #fdf0e4;
    border-radius: 5px;
    flex: 1;
    text-align: center;
    border: 1px solid #d6c9bc;
}

/* ── Sidebar Buttons ─────────────────────────────────────── */
.btn-submit-inquiry,
.btn-add-cart {
    width: 100%;
    padding: 11px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.btn-submit-inquiry {
    background: #2E0D14;
    color: #fdf0e4;
}

.btn-submit-inquiry:hover { background: #3d1520; }

.btn-add-cart {
    background: #fff;
    color: #2E0D14;
    border: 1.5px solid #2E0D14;
}

.btn-add-cart:hover { background: #f5ede6; }

/* ── Nav Buttons ─────────────────────────────────────────── */
.next-step-btn {
    background: #2E0D14;
    color: #fdf0e4;
    border: none;
    padding: 11px 30px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 18px;
}

.next-step-btn:hover { background: #3d1520; }

.step-navigation-bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #d6c9bc;
}

.nav-prev,
.nav-next {
    padding: 10px 26px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid #2E0D14;
    background: #fff;
    color: #2E0D14;
}

.nav-prev:hover,
.nav-next:hover { background: #2E0D14; color: #fdf0e4; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .popup-layout { flex-direction: column; height: auto; }
    .popup-sidebar { width: 100%; border-left: none; border-top: 1px solid #d6c9bc; }
    .popup-main { max-height: 70vh; }
    .options-grid.five-col { grid-template-columns: repeat(3, 1fr); }
    .options-grid.four-col { grid-template-columns: repeat(3, 1fr); }
    .turnaround-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .popup-main { padding: 20px; }
    .options-grid.three-col,
    .options-grid.four-col,
    .options-grid.five-col { grid-template-columns: repeat(2, 1fr); }
    .options-grid.two-col { grid-template-columns: 1fr; }
    .size-inputs-row { flex-direction: column; }
    .upload-comments-wrapper { flex-direction: column; }
}
