/**
 * Patch Configurator - Next.js Style Match
 */

/* Outer page wrapper — ensures description sits below the grid, not beside it */
.patch-page-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Global reset for configurator */
.patch-product-container,
.patch-product-container * {
    box-sizing: border-box;
}

/* Prevent horizontal overflow on mobile */
.patch-product-container {
    overflow-x: hidden;
}

/* Container */
.patch-product-container {
    display: grid;
    grid-template-columns: 395px 1fr;
    column-gap: 32px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 32px;
    align-items: start;
}

/* Product Images - sticky column */
.patch-product-images {
    position: sticky;
    top: 140px;
    height: fit-content;
    max-height: calc(100vh - 210px);
    z-index: 10;
    padding-top: 10px;
    align-self: flex-start;
    overflow: hidden;
}

/* Gallery box: aspect-ratio 1:1, grey background, 3px border */
.patch-gallery-box {
    background-color: rgb(249,250,251);
    border: 3px solid rgb(229,231,235);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
}

/* Each slide = absolutely positioned, opacity transition */
.patch-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1);
}
.patch-slide.active {
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
}
.patch-slide img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Prev / Next arrow buttons */
.patch-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 20 !important;
    background: #295230 !important;
    border: none !important;
    border-radius: 9999px !important;
    padding: 8px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    transition: box-shadow 0.15s !important;
}
.patch-arrow:hover {
    box-shadow: 0 6px 12px -2px rgba(0,0,0,0.18) !important;
}
.patch-arrow-prev { left: 8px !important; }
.patch-arrow-next { right: 8px !important; }
.patch-arrow svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* Thumbnails row */
.patch-thumbnails {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-top: 16px;
    padding-bottom: 8px;
}
.patch-thumbnails::-webkit-scrollbar { display: none; }

/* Thumbnail buttons */
.patch-thumb {
    flex-shrink: 0 !important;
    width: 5rem !important;
    height: 80px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    border: 3px solid rgba(0,0,0,0) !important;
    cursor: pointer !important;
    padding: 0 !important;
    background: transparent !important;
    position: relative !important;
    box-shadow: none !important;
    transition: border-color 0.15s !important;
}
.patch-thumb.active {
    border-color: rgb(0,0,0) !important;
}
.patch-thumb:hover {
    border-color: rgba(0,0,0,0.5) !important;
}
.patch-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: transparent;
}

/* Mobile */
@media (max-width: 768px) {
    .patch-product-container {
        grid-template-columns: 1fr;
        gap: 24px;
        margin: 20px auto;
        padding: 0 16px;
    }
    .patch-product-images {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .patch-gallery-box {
        border-radius: 8px;
    }
}

/* Product Details */
.patch-product-details {
    max-width: 100%;
    min-width: 0;
}

/* Title */
.patch-title {
    font-size: 48px;
    line-height: 1;
    font-weight: 700;
    margin: 0 0 16px;
    color: #000000;
}

/* Reviews Row */
.patch-reviews-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.patch-stars {
    display: flex;
    gap: 2px;
}

.star-icon {
    width: 1rem;
    height: 1rem;
    color: rgb(250,204,21);
    fill: rgb(250,204,21);
    display: block;
}

.review-count {
    font-size: 14px;
    color: #666;
    margin-left: 4px;
}

.review-link {
    font-size: 14px;
    color: #00b843;
    font-weight: 500;
    margin-left: 16px;
    text-decoration: none;
}

.review-link:hover {
    text-decoration: underline;
}

/* Price Display */
.patch-price-display {
    margin-top: 20px;
    font-size: 18px;
    line-height: 28px;
    color: rgb(31,41,55);
}

.price-value {
    font-size: 24px;
    line-height: 32px;
    font-weight: 800;
}

.price-label {
    font-weight: 700;
}

/* Description (old inline — kept for safety) */
.patch-description {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.7;
    color: #666;
}

/* =============================================
   DESCRIPTION + ACCORDION — 2 column layout
   ============================================= */
.patch-description-section {
    max-width: 1280px;
    margin: 40px auto 40px;
    padding: 0 32px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Left column */
.patch-desc-left {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 36px 40px;
    box-sizing: border-box;
}

.patch-description-heading {
    font-size: 22px;
    font-weight: 700;
    color: #295230;
    margin: 0 0 20px 0;
    padding-bottom: 14px;
    border-bottom: 2px solid #e6f7ef;
}

.patch-description-body {
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
}

.patch-description-body p {
    margin: 0 0 14px;
}

.patch-description-body p:last-child {
    margin-bottom: 0;
}

.patch-description-body h2,
.patch-description-body h3,
.patch-description-body h4 {
    color: #295230;
    margin: 20px 0 10px;
}

.patch-description-body ul,
.patch-description-body ol {
    padding-left: 20px;
    margin: 0 0 14px;
}

.patch-description-body li {
    margin-bottom: 6px;
}

/* Right column — accordion */
.patch-desc-right {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Accordion item */
.patch-accordion-item {
    border-bottom: 1px solid #e5e7eb;
}

.patch-accordion-item:last-child {
    border-bottom: none;
}

/* Trigger button */
.patch-accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    text-align: left;
    gap: 12px;
    box-sizing: border-box;
    transition: background 0.15s;
    box-shadow: none;
    border-radius: 0;
    line-height: 1.4;
}

.patch-accordion-trigger:hover {
    background: #f9fafb !important;
    color: #111827 !important;
}

.patch-accordion-trigger[aria-expanded="true"] {
    color: #295230;
    background: #f0fdf7;
}

/* Icon: + becomes × when open */
.patch-acc-icon {
    flex-shrink: 0;
    transition: transform 0.25s ease;
    color: #9ca3af;
}

.patch-accordion-trigger[aria-expanded="true"] .patch-acc-icon {
    transform: rotate(45deg);
    color: #295230;
}

/* Body */
.patch-accordion-body {
    overflow: hidden;
}

.patch-accordion-body[hidden] {
    display: none;
}

.patch-accordion-content {
    padding: 4px 24px 20px;
    font-size: 14px;
    line-height: 1.75;
    color: #4b5563;
}

.patch-accordion-content p {
    margin: 0 0 10px;
}

.patch-accordion-content p:last-child {
    margin-bottom: 0;
}

.patch-accordion-content ul,
.patch-accordion-content ol {
    padding-left: 18px;
    margin: 0 0 10px;
}

.patch-accordion-content li {
    margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 900px) {
    .patch-description-section {
        grid-template-columns: 1fr;
        padding: 0 16px;
        margin: 24px auto 24px;
        gap: 20px;
    }
    .patch-desc-left {
        padding: 24px 20px;
    }
    .patch-description-heading {
        font-size: 18px;
    }
}

/* Features */
.patch-features {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    padding: 12px 0;
    border-top: 3px solid rgb(209,213,219);
    border-bottom: 3px solid rgb(209,213,219);
    font-size: 14px;
    line-height: 20px;
    flex-wrap: wrap;
    color: rgb(31,41,55);
}

.divider {
    color: #d1d5db;
}

/* Upload Loading */
.upload-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    gap: 12px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.upload-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #00b843;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Upload Preview Card */
.upload-preview-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 4px;
}

.preview-card-topbar {
    display: flex !important;
    justify-content: flex-end !important;
    margin-bottom: 8px !important;
}

.remove-upload-btn,
#remove-upload-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    border: 1px solid #fca5a5 !important;
    background: #ffffff !important;
    color: #ef4444 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s !important;
    padding: 0 !important;
    box-shadow: none !important;
    line-height: 1 !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

.remove-upload-btn:hover,
#remove-upload-btn:hover {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
}

.remove-upload-btn svg,
#remove-upload-btn svg {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    min-height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
    display: block !important;
    flex-shrink: 0 !important;
    stroke: #ef4444 !important;
    pointer-events: none !important;
}

/* Two-column grid */
.preview-card-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    align-items: start;
}

@media (max-width: 900px) {
    .preview-card-grid { grid-template-columns: 1fr; }
    .preview-pricing-table-wrap { display: none; }
}

/* Image preview side */
.preview-image-wrap {
    background: white;
    border-radius: 8px;
    padding: 8px 8px 12px;
}

/* Width ruler */
.ruler-width {
    padding: 0 20px;
    margin-bottom: 4px;
}

.ruler-line {
    position: relative;
    height: 1px;
    background: #00b843;
}

.ruler-tick {
    position: absolute;
    width: 1px;
    height: 8px;
    background: #00b843;
    top: -4px;
}

.ruler-tick.left { left: 0; }
.ruler-tick.right { right: 0; }

.ruler-label {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #00b843;
    margin-top: 3px;
    margin-bottom: 0;
}

/* Image row with height label */
.preview-img-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.ruler-label-height {
    font-size: 13px;
    font-weight: 700;
    color: #00b843;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    min-width: 20px;
    text-align: center;
}

.preview-img-box {
    flex: 1;
    border: 1px dashed #9ca3af;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 180px;
    max-height: 340px;
}

.preview-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Pricing table side */
.preview-pricing-table-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    align-self: start;
}

.preview-pricing-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
    table-layout: fixed;
}

.preview-pricing-table thead tr {
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.preview-pricing-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #1f2937;
    font-size: 11px;
}

.preview-pricing-table tbody tr {
    border-top: 1px solid #e5e7eb;
}

.preview-pricing-table td {
    padding: 6px 10px;
    color: #374151;
    font-size: 12px;
    white-space: nowrap;
}

/* Active row = current qty tier */
.preview-pricing-table tr.active-row {
    background: #e6f7ef;
    outline: 1px solid #00b843;
    outline-offset: -1px;
}

.preview-pricing-table tr.active-row td:last-child {
    color: #00b843;
    font-weight: 600;
}

/* Discount col */
.preview-pricing-table td.discount-col {
    color: #059669;
    font-weight: 600;
}

/* View all toggle row */
.preview-pricing-table tr.toggle-row td {
    padding: 5px 10px;
    background: #f3f4f6;
    color: #374151;
    font-size: 11px;
    cursor: pointer;
}

.preview-pricing-table tr.toggle-row td:hover {
    background: #e5e7eb;
}


.upload-prompt {
    height: 240px;
    border-radius: 8px;
    border: 2px dashed #295230;
    background: linear-gradient(to right bottom, #e6f7ef, #e6f7ef);
    box-shadow: #00b843 0px 0px 15px 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 24px;
    margin-bottom: 0;
}

.upload-prompt:hover {
    box-shadow: rgba(10,174,100,0.8) 0px 0px 20px 0px;
}

.upload-btn {
    background-color: #00b843 !important;
    color: rgb(255, 255, 255) !important;
    border: none !important;
    border-radius: 9999px !important;
    padding: 10px 28px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 24px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 0 8px 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    width: auto !important;
    height: auto !important;
    outline: none !important;
}

.upload-btn p {
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 24px !important;
    display: inline !important;
}

.upload-btn:hover {
    background-color: rgba(10,174,100,0.9) !important;
    box-shadow: rgba(10,174,100,0.7) 0px 0px 10px 0px !important;
    color: #fff !important;
}

.upload-icon {
    width: 20px;
    height: 20px;
    margin-left: 8px;
    display: block;
}

.upload-hint {
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: rgb(55, 65, 81);
    text-align: center;
    margin: 0;
}

.upload-note {
    font-size: 12px;
    line-height: 16px;
    color: rgb(107, 114, 128);
    text-align: center;
    margin: 0;
}

@media (max-width: 768px) {
    .upload-prompt {
        height: 200px !important;
        padding: 12px !important;
    }
    .upload-btn {
        font-size: 14px !important;
        padding: 10px 20px !important;
    }
}

/* Size & Quantity */
/* Size / Qty / Price section */
.size-qty-section {
    max-width: 576px;
    width: 100%;
    margin: 20px 0 0;
}

.sqp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-items: flex-start;
}

.sqp-field {
    display: flex;
    flex-direction: column;
}

.sqp-label {
    color: rgb(55, 65, 81);
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    display: block;
    margin-bottom: 4px;
}

.sqp-label-row {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}

.sqp-min-label {
    color: rgb(255, 87, 34);
    font-weight: 600;
    font-size: 10px;
}

.patch-product-container .sqp-stepper {
    background-color: #fff !important;
    border: 3px solid rgb(209,213,219) !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    height: 40px !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

.patch-product-container .sqp-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.25rem !important;
    min-width: 2.25rem !important;
    height: 38px !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: rgb(107, 114, 128) !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    line-height: 1 !important;
    float: none !important;
}

.patch-product-container .sqp-btn:hover {
    color: rgb(17, 24, 39) !important;
    background: transparent !important;
}

.patch-product-container .sqp-btn svg {
    display: block !important;
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
}

.patch-product-container .sqp-input {
    flex: 1 !important;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-align: center !important;
    color: rgb(17, 24, 39) !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 20px !important;
    height: 38px !important;
    padding: 0 8px !important;
    width: 100% !important;
    background: transparent !important;
    min-width: 0 !important;
    border-radius: 0 !important;
}

/* Price Summary */
.sqp-summary {
    padding-top: 12px;
    margin-top: 12px;
    text-align: center;
}

.sqp-summary-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sqp-price-line {
    color: rgb(255, 87, 34);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.sqp-original-unit {
    text-decoration: line-through;
    color: rgb(156, 163, 175);
    font-size: 14px;
    line-height: 20px;
    margin-right: 4px;
}

.sqp-total-line {
    color: rgb(17, 24, 39);
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.sqp-original-total {
    text-decoration: line-through;
    color: rgb(156, 163, 175);
    font-size: 14px;
    line-height: 20px;
    margin-right: 4px;
}

.sqp-total-price {
    color: rgb(17, 24, 39);
}

.sqp-discount-badge {
    color: rgb(5, 150, 105);
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    margin-left: 4px;
}

.sqp-details {
    color: rgb(107, 114, 128);
    font-size: 12px;
    line-height: 16px;
    margin-top: 8px;
}



/* Design Notes */
.design-notes-section {
    margin: 16px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

#notes-textarea {
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    resize: none;
}

#notes-textarea:focus {
    outline: none;
    border-color: #00b843;
    box-shadow: 0 0 0 2px rgba(10,174,100,0.1);
}

/* Config Sections */
.config-section {
    margin: 28px 0;
}

.section-label {
    display: block;
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    color: rgb(55,65,81);
    margin-bottom: 0;
    margin: 0;
}

.section-label-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.required {
    color: #00b843;
}

.selected-val {
    color: #00b843;
    font-size: 14px;
    font-weight: 500;
    margin-left: 8px;
}

.mt-2 { margin-top: 8px; }

.text-input {
    width: 100% !important;
    padding: 8px 16px !important;
    border: 3px solid rgb(209,213,219) !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    box-sizing: border-box !important;
    color: rgb(10,10,10) !important;
    background: #fff !important;
    box-shadow: none !important;
    height: auto !important;
    line-height: 1.5 !important;
}

.text-input::placeholder {
    color: rgb(156,163,175) !important;
    font-size: 16px !important;
}

.text-input:focus {
    border-color: rgb(17,24,39) !important;
    box-shadow: none !important;
    outline: none !important;
}

.half-width {
    width: 50% !important;
    max-width: 50% !important;
}

@media (max-width: 640px) {
    .half-width { width: 100% !important; max-width: 100% !important; }
}

/* -----------------------------------------------
   Shape Buttons - Next.js exact match
----------------------------------------------- */
.shape-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shape-btn {
    position: relative !important;
    width: 104px !important;
    height: 98px !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    border: 3px solid rgb(209,213,219) !important;
    background: rgb(255,255,255) !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: border-color 0.15s !important;
    box-shadow: none !important;
    display: block !important;
}

.shape-btn:hover {
    border-color: rgb(156,163,175) !important;
}

.shape-btn.selected {
    border: 3px solid rgb(17,24,39) !important;
    box-shadow: none !important;
}

/* -----------------------------------------------
   Corner Style Toggle
----------------------------------------------- */
.corner-style-wrap {
    margin-top: 12px;
    padding-left: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.corner-style-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.corner-style-toggle {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.corner-btn {
    padding: 6px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border: none !important;
    cursor: pointer !important;
    background: #ffffff !important;
    color: #374151 !important;
    border-radius: 0 !important;
    transition: all 0.15s !important;
    box-shadow: none !important;
    line-height: 1.4 !important;
}

.corner-btn + .corner-btn {
    border-left: 1px solid #e5e7eb !important;
}

.corner-btn.active,
.corner-btn:hover {
    background: #00b843 !important;
    color: #ffffff !important;
}


/* Backing - same sizing and style as shape buttons */
.backing-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 8px !important;
}

.backing-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.backing-label {
    display: block !important;
    font-size: 11px !important;
    color: #6b7280 !important;
    margin-top: 4px !important;
    text-align: center !important;
}

.backing-card {
    position: relative !important;
    width: 104px !important;
    height: 98px !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    border: 3px solid rgb(209,213,219) !important;
    background: rgb(255,255,255) !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: border-color 0.15s !important;
    box-sizing: border-box !important;
    display: block !important;
    box-shadow: none !important;
}

.backing-card:hover {
    border-color: rgb(156,163,175) !important;
}

.backing-card.selected {
    border: 3px solid rgb(17,24,39) !important;
    box-shadow: none !important;
}

.popular {
    display: none !important;
}

/* Checkout Button */
/* Action buttons container */
#checkout-btn {
    margin-top: 24px !important;
}

.action-btn-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* -----------------------------------------------
   Proceed to Checkout Button (blue gradient)
----------------------------------------------- */
.checkout-btn {
    width: 100% !important;
    background: linear-gradient(135deg, #00b843 0%, #00b843 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 18px 32px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    letter-spacing: 0.3px !important;
    transition: all 0.25s ease !important;
    margin: 0 !important;
    text-transform: none !important;
    box-shadow: 0 4px 15px rgba(10,174,100,0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    position: relative !important;
    overflow: hidden !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    font-family: inherit !important;
}

.checkout-btn::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent) !important;
    transition: left 0.5s ease !important;
}

.checkout-btn:hover::before {
    left: 100% !important;
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #00b843 0%, #295230 100%) !important;
    box-shadow: 0 6px 20px rgba(10,174,100,0.55) !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
}

.checkout-btn:active {
    transform: translateY(0px) !important;
    box-shadow: 0 3px 10px rgba(10,174,100,0.4) !important;
}

/* -----------------------------------------------
   Get a Quote Button (white with blue border)
----------------------------------------------- */
.quote-btn {
    width: 100% !important;
    background: #ffffff !important;
    color: #00b843 !important;
    border: 2px solid #00b843 !important;
    border-radius: 12px !important;
    padding: 15px 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 0 !important;
    text-transform: none !important;
    box-shadow: none !important;
    letter-spacing: 0.2px !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    text-decoration: none !important;
}

.quote-btn:hover {
    background: #e6f7ef !important;
    color: #00b843 !important;
    border-color: #00b843 !important;
    box-shadow: 0 4px 12px rgba(10,174,100,0.15) !important;
    transform: translateY(-1px) !important;
}

.quote-btn:active {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

/* Trust section */
.trust-section {
    margin-top: 8px;
}

.trust-lock-row {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 16px;
    color: rgb(156,163,175);
}

@media (max-width: 768px) {
    .checkout-btn {
        padding: 16px 20px !important;
        font-size: 15px !important;
    }
    .quote-btn {
        padding: 13px 20px !important;
        font-size: 14px !important;
    }
}


/* Trust Badges */
.trust-badges {
    text-align: center;
    margin: 16px 0;
    padding: 12px;
    font-size: 13px;
    color: #666;
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.payment-icons img {
    height: 24px;
    width: auto;
    object-fit: contain;
}

/* ===============================================
   RESPONSIVE - COMPREHENSIVE
   Breakpoints: 1200px, 1024px, 768px, 480px
=============================================== */

/* --- 1200px: Shrink image column --- */
@media (max-width: 1200px) {
    .patch-product-container {
        grid-template-columns: 340px 1fr !important;
        column-gap: 24px !important;
        padding: 0 20px !important;
    }
}

/* --- 1024px: Stack columns vertically --- */
@media (max-width: 1024px) {
    .patch-product-container {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        margin: 24px auto !important;
        padding: 0 16px !important;
    }
    .patch-product-images {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    .patch-product-details {
        max-width: 100% !important;
    }

    /* Preview card: stack on tablet */
    .preview-card-grid {
        grid-template-columns: 1fr 240px !important;
        gap: 12px !important;
    }
}

/* --- 768px: Mobile layout --- */
@media (max-width: 768px) {
    /* Container */
    .patch-product-container {
        margin: 16px auto !important;
        padding: 0 12px !important;
        gap: 16px !important;
    }

    /* Typography */
    .patch-title {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }
    .patch-price-blurb {
        font-size: 18px !important;
    }

    /* Features */
    .patch-features {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
    .divider { display: none !important; }

    /* Upload box */
    .upload-prompt {
        height: 200px !important;
        padding: 12px !important;
    }
    .upload-btn {
        font-size: 14px !important;
        padding: 10px 20px !important;
    }

    /* Preview card: full width stack */
    .preview-card-grid {
        grid-template-columns: 1fr !important;
    }
    .preview-pricing-table-wrap {
        display: none !important;
    }
    .preview-image-wrap {
        padding: 6px !important;
    }

    /* Size/Qty steppers */
    .sqp-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .stepper {
        gap: 4px !important;
    }
    .stepper input {
        font-size: 15px !important;
        min-width: 40px !important;
    }
    .stepper-minus,
    .stepper-plus {
        width: 32px !important;
        height: 32px !important;
        font-size: 18px !important;
    }

    /* Shape buttons */
    .shape-btn-row {
        gap: 6px !important;
    }
    .shape-btn {
        width: 80px !important;
        height: 76px !important;
    }

    /* Backing cards */
    .backing-grid {
        gap: 6px !important;
    }
    .backing-card {
        width: 80px !important;
        height: 76px !important;
    }

    /* Inputs */
    .text-input {
        font-size: 14px !important;
        padding: 10px 14px !important;
    }

    /* Corner style */
    .corner-style-wrap {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    /* Price summary */
    .summary-unit-line,
    .summary-total-line {
        flex-wrap: wrap !important;
        gap: 4px !important;
    }

    /* Buttons */
    .checkout-btn {
        font-size: 15px !important;
        padding: 16px 20px !important;
    }
    .quote-btn {
        font-size: 14px !important;
        padding: 13px 20px !important;
    }

    /* Section labels */
    .section-label {
        font-size: 14px !important;
    }
    .config-section {
        margin-top: 16px !important;
    }

    /* Design notes */
    #notes-textarea {
        font-size: 14px !important;
    }
}

/* --- 480px: Small phones --- */
@media (max-width: 480px) {
    .patch-product-container {
        padding: 0 10px !important;
    }

    .patch-title {
        font-size: 22px !important;
    }

    /* Size/Qty: stack all 3 on small phones */
    .sqp-grid {
        grid-template-columns: 1fr !important;
    }

    /* Shape buttons: 4 in a row still but smaller */
    .shape-btn {
        width: 70px !important;
        height: 68px !important;
    }
    .backing-card {
        width: 70px !important;
        height: 68px !important;
    }

    /* Upload button */
    .upload-btn {
        font-size: 13px !important;
        padding: 9px 16px !important;
    }
    .upload-hint {
        font-size: 13px !important;
    }
    .upload-note {
        font-size: 11px !important;
    }

    /* Checkout button */
    .checkout-btn {
        font-size: 14px !important;
        padding: 15px 16px !important;
        gap: 8px !important;
    }
    .quote-btn {
        font-size: 13px !important;
        padding: 12px 16px !important;
    }

    /* Price summary compact */
    .summary-unit-price {
        font-size: 15px !important;
    }
    .summary-total-price {
        font-size: 15px !important;
    }

    /* Trust badges */
    .payment-icons img {
        height: 20px !important;
    }

    /* Quote modal */
    .quote-modal {
        max-height: 95vh !important;
        border-radius: 12px !important;
    }
    .quote-form-grid {
        grid-template-columns: 1fr !important;
    }
    .quote-summary-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .quote-modal-header {
        padding: 16px 16px 12px !important;
    }
    #quote-form-wrap {
        padding: 16px !important;
    }
    .quote-summary-box {
        margin: 12px 16px 0 !important;
    }
    .quote-modal-footer {
        flex-direction: column !important;
    }
    .quote-cancel-btn,
    .quote-submit-btn {
        width: 100% !important;
        flex: none !important;
    }
}

/* -----------------------------------------------
   Quote Modal
----------------------------------------------- */
.quote-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.quote-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    animation: slideUp 0.25s ease;
}

@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.quote-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    border-radius: 16px 16px 0 0;
}

.quote-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
}

.quote-modal-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.quote-modal-close {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    border: 1px solid #e5e7eb !important;
    background: white !important;
    font-size: 22px;
    line-height: 1;
    cursor: pointer !important;
    color: #6b7280 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0 !important;
    box-shadow: none !important;
}

.quote-modal-close:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

/* Summary Box */
.quote-summary-box {
    background: #e6f7ef;
    border: 1px solid #9de0be;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 20px 24px 0;
}

.quote-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.quote-summary-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quote-summary-row span {
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quote-summary-row strong {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

/* Form */
#quote-form-wrap {
    padding: 20px 24px 24px;
}

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

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

.quote-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.quote-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.quote-optional {
    font-weight: 400;
    color: #9ca3af;
    font-size: 12px;
}

.quote-field .text-input,
.quote-field textarea.text-input {
    width: 100%;
    box-sizing: border-box;
}

.quote-field textarea.text-input {
    resize: vertical;
    min-height: 80px;
}

.quote-form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 12px;
}

/* Footer buttons */
.quote-modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    align-items: center;
}

.quote-cancel-btn {
    flex: 1;
    padding: 12px;
    background: white !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer !important;
    transition: all 0.2s;
    box-shadow: none !important;
}

.quote-cancel-btn:hover {
    background: #f9fafb !important;
}

.quote-submit-btn {
    flex: 2;
    padding: 12px 20px;
    background: #00b843 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer !important;
    transition: all 0.2s;
    box-shadow: none !important;
    text-align: center;
}

.quote-submit-btn:hover {
    background: #00b843 !important;
    box-shadow: 0 4px 12px rgba(10,174,100,0.3) !important;
}

.quote-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed !important;
}



