/* ==========================================================================
   TILE CONFIGURATOR STYLES
   ========================================================================== */

/* Grey background for colecao page only - class added via JS */
body.colecao-page {
    background-color: #f5f5f5;
}

/* ==========================================================================
   COLLECTION PAGE STYLES
   ========================================================================== */

.colecao-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0px 20px 140px 20px;
    position: relative;
    min-height: 600px;
    transition: filter 0.3s ease;
}

/* Blur content when dedicatória modal is open */
body.dedicatoria-modal-open .colecao-container {
    filter: blur(8px);
    pointer-events: none;
}

/* Promotional Banner */
.promo-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.promo-icon {
    width: 40px;
    height: 40px;
    background: rgba(230, 8, 110, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.promo-content {
    flex: 1;
}

.promo-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.promo-original {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
}

.promo-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Tiles Grid */
.tiles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tile-gap, 40px);
    justify-content: center;
    align-content: center;
    width: 100%;
    height: calc(70vh - 100px);
    padding: 40px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Empty state - only the + button */
.tiles-grid.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tiles-grid.empty-state .tile-add {
    width: 200px;
    height: 200px;
    aspect-ratio: 1;
}

.tile-card {
    width: var(--tile-width, 180px);
    height: var(--tile-height, 180px);
    border-radius: 0;
    overflow: visible;
    position: relative;
    background: #f8f8f8;
    transition: transform 0.2s, width 0.3s ease, height 0.3s ease;
}

.tile-card:hover {
    transform: translateY(-2px);
}

.tile-image-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.tile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
}

.tile-card:hover .tile-delete-btn {
    opacity: 1;
}

.tile-delete-btn:hover {
    background: #dc3545;
}

.tile-resolution-warning {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    color: #444;
    font-weight: 700;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    z-index: 5;
}

.tile-resolution-warning .warning-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #666;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 8px;
    pointer-events: none;
}

.tile-resolution-warning:hover .warning-tooltip {
    display: block;
}

/* Drag and Drop Styles */
.tile-card.dragging {
    opacity: 0.4;
    transform: scale(0.9) rotate(3deg);
    cursor: grabbing;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 100;
}

.tile-card.drag-over {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px #E6086E, 0 8px 25px rgba(230, 8, 110, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile-card[draggable="true"] {
    cursor: grab;
    position: relative;
}

.tile-card[draggable="true"]::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 4px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.tile-card[draggable="true"]:hover::after {
    opacity: 1;
}

.tile-card[draggable="true"]:active {
    cursor: grabbing;
}

/* Add Tile Button */
.tile-add {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border: 2px dashed #ddd;
    cursor: pointer;
    text-decoration: none;
}

.tile-add:hover {
    border-color: #E6086E;
    background: rgba(230, 8, 110, 0.02);
}

.tile-add-content {
    text-align: center;
}

.tile-add-icon {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tile-add-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.tile-limit {
    border-style: solid;
    border-color: #eee;
    cursor: default;
}

.tile-limit:hover {
    transform: none;
    box-shadow: none;
}

.tile-limit-text {
    font-size: 13px;
    color: #999;
}

/* Placeholder tile slots (for pack selection) */
.tile-placeholder {
    position: relative;
    background: transparent;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background-color 0.2s;
}

.tile-placeholder:hover {
    border-color: #E6086E;
    background: rgba(230, 8, 110, 0.05);
}

.tile-placeholder .tile-add-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tile-placeholder .tile-add-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.tile-placeholder:hover .tile-add-icon {
    opacity: 1;
}

/* Placeholder delete button */
.placeholder-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.tile-placeholder:hover .placeholder-delete-btn {
    opacity: 1;
}

.placeholder-delete-btn:hover {
    background: rgba(230, 8, 110, 0.8);
}

/* Summary & Checkout */
.colecao-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    bottom: 20px;
}

.summary-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-count {
    font-size: 14px;
    color: #666;
}

.summary-total {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.checkout-btn {
    padding: 14px 30px;
    background: #E6086E;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.checkout-btn:hover {
    background: #c70760;
}

@media (max-width: 576px) {
    /* Remove container padding so tiles can scroll edge-to-edge */
    .colecao-container {
        padding-left: 0;
        padding-right: 0;
    }

    /* Mobile tiles - JS calculates appropriate sizes for viewport */
    .tile-card {
        /* Don't multiply - JS autoScaleTiles() calculates mobile-appropriate sizes */
        width: var(--tile-width, 300px) !important;
        height: var(--tile-height, 300px) !important;
    }

    /* Make edit controls always visible on mobile (no hover on touch) */
    .tile-edit-controls {
        opacity: 1 !important;
        bottom: 12px;
        padding: 8px 12px;
    }

    /* Larger touch targets for mobile */
    .tile-zoom-btn,
    .tile-reset-btn {
        width: 40px;
        height: 40px;
    }

    .tile-zoom-btn svg,
    .tile-reset-btn svg {
        width: 20px;
        height: 20px;
    }

    .colecao-summary {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .checkout-btn {
        width: 100%;
    }

    .promo-banner {
        flex-direction: column;
        text-align: center;
    }
}

/* Container Layout */
.configurador-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.configurador-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.configurador-options {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    position: relative;
    min-height: 600px;
}

.configurador-preview {
    flex: 1;
    min-width: 300px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* Step Sections */
.config-step {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

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

.config-step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-step-number {
    width: 28px;
    height: 28px;
    background: #E6086E;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.config-step.completed .config-step-number {
    background: #28a745;
}

/* Option Cards Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.option-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    background: white;
}

.option-card:hover {
    border-color: #E6086E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.option-card.selected {
    border-color: #E6086E;
    background: rgba(230, 8, 110, 0.05);
}

.option-card-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.option-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.option-card-subtitle {
    font-size: 12px;
    color: #666;
}

.option-card-price {
    font-size: 13px;
    color: #E6086E;
    font-weight: 600;
    margin-top: 5px;
}

/* Tamanho Cards (larger) */
.tamanho-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.tamanho-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    background: white;
}

.tamanho-card:hover {
    border-color: #E6086E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tamanho-card.selected {
    border-color: #E6086E;
    background: rgba(230, 8, 110, 0.05);
}

.tamanho-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
}

.tamanho-card.selected .tamanho-icon {
    border-color: #E6086E;
}

.tamanho-dimensions {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.tamanho-price {
    font-size: 14px;
    color: #E6086E;
    font-weight: 600;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    background: #fafafa;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #E6086E;
    background: rgba(230, 8, 110, 0.05);
}

.upload-area.has-image {
    padding: 20px;
}

.upload-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    color: #999;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.upload-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 13px;
    color: #999;
}

.upload-preview {
    max-width: 200px;
    margin: 0 auto;
}

.upload-preview img {
    max-width: 100%;
    border-radius: 8px;
}

.upload-change {
    margin-top: 10px;
    font-size: 14px;
    color: #E6086E;
    cursor: pointer;
}

.upload-change:hover {
    text-decoration: underline;
}

.upload-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #856404;
    text-align: left;
}

.upload-warning-icon {
    flex-shrink: 0;
    font-size: 14px;
}

/* Hidden file input */
#imagem-upload {
    display: none;
}

/* Preview Panel */
.preview-panel {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.preview-canvas-container {
    background: #f0f0f0;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.preview-canvas {
    position: relative;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.preview-image {
    display: block;
    max-width: 100%;
}

.preview-placeholder {
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-align: center;
    padding: 20px;
}

.preview-placeholder svg {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Frame overlay */
.preview-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* Price Summary */
.price-summary {
    padding: 25px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
}

.price-row.total {
    border-top: 2px solid #eee;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.price-value {
    font-weight: 600;
}

/* Quantity Selector */
.quantity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.quantity-label {
    font-size: 14px;
    color: #666;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: border-color 0.2s, color 0.2s;
}

.quantity-btn:hover {
    border-color: #E6086E;
    color: #E6086E;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    font-size: 16px;
    font-weight: 600;
}

/* Add to Cart Button */
.add-to-cart-btn {
    width: 100%;
    padding: 16px;
    background: #E6086E;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    margin-top: 15px;
}

.add-to-cart-btn:hover {
    background: #c70760;
    transform: translateY(-1px);
}

.add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* CSS Filters for Effects */
.effect-none {
    filter: none;
}

.effect-bw {
    filter: grayscale(100%);
}

.effect-sepia {
    filter: sepia(100%);
}

.effect-vintage {
    filter: sepia(50%) contrast(90%) brightness(90%);
}

/* Responsive */
@media (max-width: 992px) {
    .configurador-wrapper {
        flex-direction: column;
    }

    .configurador-preview {
        position: static;
        max-width: 100%;
    }

    .configurador-options {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .tamanho-grid,
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .preview-canvas-container {
        padding: 15px;
    }

    .price-summary {
        padding: 15px;
    }
}

/* ==========================================================================
   HUB-AND-SPOKE PANEL SYSTEM
   ========================================================================== */

/* Panel Base Styles - All panels positioned absolutely at same location */
.config-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Hidden panels - display:none but prepared for fade */
.config-panel[style*="display: none"] {
    display: block !important;
    opacity: 0;
    pointer-events: none;
}

/* Fade Animations */
.config-panel.fading-out {
    opacity: 0;
    pointer-events: none;
}

.config-panel.fading-in {
    animation: fadeIn 0.3s ease forwards;
}

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

/* Panel Title */
.panel-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 30px 0;
}

/* ==========================================================================
   PRINCIPAL PANEL (HUB) - Summary Display
   ========================================================================== */

.config-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.config-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    transition: background-color 0.2s;
}

.config-summary-item:hover {
    background: #f5f5f5;
}

.summary-label {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    flex: 0 0 100px;
}

.summary-value {
    flex: 1;
    font-size: 15px;
    color: #666;
}

.btn-change {
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #E6086E;
    background: white;
    color: #E6086E;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-change:hover:not(:disabled) {
    background: #E6086E;
    color: white;
    transform: translateY(-1px);
}

.btn-change:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #ccc;
    color: #999;
}

/* Save Tile Button in Principal Panel */
.btn-save-tile {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: #E6086E;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-save-tile:hover:not(:disabled) {
    background: #c70760;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(230, 8, 110, 0.4);
}

.btn-save-tile:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   DETAIL PANELS - Tamanho, Efeito, Moldura, Upload
   ========================================================================== */

/* Tamanho Panel - Specific Styles */
.tamanho-size {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.tamanho-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

/* Confirmar Button in Detail Panels */
.btn-confirmar {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #E6086E;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 24px;
}

.btn-confirmar:hover:not(:disabled) {
    background: #c70760;
    transform: translateY(-1px);
}

.btn-confirmar:disabled {
    background: #ddd;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .config-panel {
        padding: 20px;
    }

    .panel-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .config-summary-item {
        flex-wrap: wrap;
        padding: 15px;
    }

    .summary-label {
        flex: 0 0 100%;
        margin-bottom: 8px;
    }

    .summary-value {
        flex: 1;
    }

    .btn-change {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .configurador-options {
        min-height: 500px;
    }

    .config-summary {
        gap: 12px;
    }

    .config-summary-item {
        padding: 12px;
    }

    .btn-save-tile {
        font-size: 16px;
        padding: 14px;
    }
}

/* Selection section from existing template */
.selection-section {
    padding: 40px 20px;
}

.selection-state {
    display: none;
}

.selection-state.active {
    display: block;
}

/* ==========================================================================
   UPLOAD MODAL
   ========================================================================== */

.upload-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.upload-modal {
    background: white;
    border-radius: 20px;
    padding: 50px 60px;
    position: relative;
    text-align: center;
    min-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.upload-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.upload-modal-close:hover {
    background: #eee;
}

.upload-modal-close svg {
    width: 16px;
    height: 16px;
    color: #666;
}

.upload-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.upload-modal-icon {
    width: 80px;
    height: 80px;
    background: rgba(230, 8, 110, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-modal-icon svg {
    width: 40px;
    height: 40px;
    color: #E6086E;
}

.upload-modal-btn {
    padding: 14px 40px;
    background: #E6086E;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.upload-modal-btn:hover {
    background: #c70760;
    transform: translateY(-1px);
}

/* Upload Loading State */
.upload-loading-text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(230, 8, 110, 0.2);
    border-top-color: #E6086E;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   TILES PREVIEW AREA & TOOLBAR
   ========================================================================== */

.tiles-preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 70vh;
    padding-bottom: 100px;
    background: transparent;
    margin-bottom: 40px;
    position: relative;
}

/* Tile with Frame - Classic Picture Frame Style */
.tile-with-frame {
    background: transparent;
    padding: 0;
}

/* Outer frame (moldura) */
.tile-frame {
    width: 100%;
    height: 100%;
    padding: var(--frame-percent, 6%);
    box-sizing: border-box;
    position: relative;
    background-color: var(--frame-color, #1a1a1a);
    /* Subtle rounded corners for organic feel */
    border-radius: 2px;
    /* Modern soft layered shadows - floating effect */
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25),
        0 5px 15px rgba(0, 0, 0, 0.15),
        0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

/* Mat/Passepartout container - the white border around image */
.tile-with-frame .tile-image-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Mat/passepartout - CSS percentage padding auto-scales with tile size! */
    /* 6% default, 25% for 50x50 tiles */
    padding: var(--borda-percent, 6%);
    background-color: var(--borda-color, #FFFFFF);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Inner lip depth - recessed shadow where frame meets mat */
    box-shadow:
        inset 0 0 8px rgba(0, 0, 0, 0.08),
        inset 0 3px 6px rgba(0, 0, 0, 0.15),
        inset 3px 0 6px rgba(0, 0, 0, 0.1),
        inset 0 -2px 4px rgba(255, 255, 255, 0.05),
        inset -2px 0 4px rgba(255, 255, 255, 0.05);
    transition: padding 0.3s ease, background-color 0.3s ease;
}

/* Subtle beveled edge on mat */
.tile-with-frame .tile-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid;
    border-color:
        rgba(0, 0, 0, 0.05)
        rgba(255, 255, 255, 0.5)
        rgba(255, 255, 255, 0.5)
        rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

.tile-with-frame .tile-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    /* Shadow where image sits in the mat */
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 0 1px rgba(0, 0, 0, 0.2);
}

.tile-with-frame .tile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
}

/* No frame style */
.tile-with-frame.no-frame .tile-frame {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.tile-with-frame.no-frame .tile-frame::before {
    display: none;
}

.tile-with-frame.no-frame .tile-image-container {
    box-shadow: none;
}

.tile-with-frame.no-frame .tile-image-container::before {
    display: none;
}

/* No border style - remove visual artifacts when borda is "none" */
.tile-with-frame.no-borda .tile-image-container {
    background-color: transparent !important;
    box-shadow: none !important;
}

.tile-with-frame.no-borda .tile-image-container::before {
    display: none;
}

/* Options Toolbar */
.options-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.toolbar-options {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    color: #666;
}

.toolbar-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.toolbar-btn.active {
    background: rgba(230, 8, 110, 0.1);
    color: #E6086E;
}

.toolbar-btn svg {
    width: 24px;
    height: 24px;
}

.toolbar-btn span {
    font-size: 11px;
    font-weight: 500;
}

/* Locked borda options (50x50 mandatory white border rule) */
.borda-option-wrapper.locked {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

/* Keep white border option visible but locked */
.borda-option-wrapper.locked.selected {
    opacity: 1;
    pointer-events: none;
}

/* Locked message */
.borda-locked-message {
    text-align: center;
    font-size: 11px;
    color: #888;
    margin: 16px 0 0 0;
}

.toolbar-divider {
    width: 1px;
    height: 40px;
    background: #eee;
    margin: 0 8px;
}

.toolbar-add {
    background: #FFF;
    padding: 12px;
    border-radius: 50%;
    filter: drop-shadow(0 1.278px 10.608px rgba(0, 0, 0, 0.10));
}

.toolbar-add:hover {
    background: #FFF;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.15));
}

.toolbar-add svg {
    width: 20px;
    height: 20px;
}

/* Cart Float Button - Desktop */
.cart-float-container {
    position: absolute;
    bottom: 25px;
    right: 40px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 100;
}

.cart-float-container:hover .cart-icon-btn {
    transform: scale(1.05);
}

.cart-icon-btn {
    width: 70px;
    height: 70px;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
    position: relative;
}

.cart-icon-btn svg {
    width: 26px;
    height: 32px;
}

.cart-text {
    padding: 10px 20px;
    border-radius: 21.126px;
    background: #E6086E;
    box-shadow: 0 4px 19.4px 0 rgba(230, 8, 110, 0.34);
    color: #FFF;
    font-family: var(--font-primary);
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.66px;
    white-space: nowrap;
    transition: all 0.2s;
}

.cart-float-container:hover .cart-text {
    background: #c00659;
    color: white;
}

.cart-float-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.cart-float-container.loading .cart-icon-btn {
    animation: cartPulse 1s ease-in-out infinite;
}

@keyframes cartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.cart-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    min-width: 22px;
    height: 22px;
    padding: 3px 7px;
    border-radius: 9999px;
    border: 1px solid rgba(230, 8, 110, 0.30);
    background: rgba(230, 8, 110, 0.10);
    backdrop-filter: blur(4px);
    color: #FFF;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: var(--font-primary);
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    line-height: 1;
}

.cart-badge:empty {
    display: none;
}

/* Moldura Selection Panel */
.moldura-panel {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90vw;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.moldura-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.moldura-panel-header h3 {
    color: #171717;
    font-family: var(--font-primary);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.66px;
    margin: 0;
}

.moldura-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #E6086E;
    text-align: right;
    font-family: var(--font-primary);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.66px;
    padding: 4px 0;
}

.moldura-panel-close:hover {
    opacity: 0.8;
}

.moldura-options {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    justify-content: center;
}

.moldura-option-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0px;
    padding-bottom: 12px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 1;
    min-width: 0;
}

.moldura-option-wrapper:hover {
    border-color: #E6086E;
    background: #FBF6F6;
}

.moldura-option-wrapper.selected {
    border-color: #E6086E;
    background: #FBF6F6;
}

.moldura-option {
    width: 127px;
    height: 84px;
    border-radius: 8px 8px 0px 0px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

/* Frame texture background support */
.moldura-option.has-texture {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.moldura-label {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: #171717;
    text-align: center;
}

.moldura-option-wrapper.selected .moldura-label {
    color: #E6086E;
}

.moldura-price {
    font-family: var(--font-primary);
    font-size: 11px;
    color: #666;
    text-align: center;
}

.moldura-none {
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
    position: relative;
}

/* Tamanho Selection Panel */
.tamanho-panel {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.tamanho-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.tamanho-panel-header h3 {
    color: #171717;
    font-family: var(--font-primary);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.66px;
    margin: 0;
}

.tamanho-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #E6086E;
    text-align: right;
    font-family: var(--font-primary);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.66px;
    padding: 4px 0;
}

.tamanho-panel-close:hover {
    opacity: 0.8;
}

.tamanho-options {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    justify-content: center;
}

.tamanho-option-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0px;
    padding-bottom: 12px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 1;
    min-width: 0;
}

.tamanho-option-wrapper:hover {
    border-color: #E6086E;
    background: #FBF6F6;
}

.tamanho-option-wrapper.selected {
    border-color: #E6086E;
    background: #FBF6F6;
}

.tamanho-option {
    width: 100px;
    height: 100px;
    border-radius: 8px 8px 0px 0px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: white;
}

.tamanho-preview {
    border: 2px solid #4C4C4C;
    border-radius: 2px;
    max-width: 76px;
    max-height: 76px;
    width: 100%;
    height: auto;
    background: transparent;
}

.tamanho-dimensions {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: #171717;
    text-align: center;
}

.tamanho-option-wrapper.selected .tamanho-dimensions {
    color: #E6086E;
}

.tamanho-label {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

/* Borda Selection Panel */
.borda-panel {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90vw;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.borda-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.borda-panel-header h3 {
    color: #171717;
    font-family: var(--font-primary);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.66px;
    margin: 0;
}

.borda-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #E6086E;
    text-align: right;
    font-family: var(--font-primary);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.66px;
    padding: 4px 0;
}

.borda-panel-close:hover {
    opacity: 0.8;
}

.borda-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.borda-option-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0px;
    padding-bottom: 12px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.borda-option-wrapper:hover {
    border-color: #E6086E;
    background: #FBF6F6;
}

.borda-option-wrapper.selected {
    border-color: #E6086E;
    background: #FBF6F6;
}

.borda-option {
    width: 127px;
    height: 84px;
    border-radius: 8px 8px 0px 0px;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.borda-preview {
    width: 100%;
    height: 100%;
    border-radius: 8px 8px 0px 0px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.borda-preview-none {
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.borda-label {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: #171717;
    text-align: center;
}

.borda-option-wrapper.selected .borda-label {
    color: #E6086E;
}

/* ==========================================================================
   EFEITOS (EFFECTS) PANEL
   ========================================================================== */

.efeitos-panel {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90vw;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.efeitos-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.efeitos-panel-header h3 {
    color: #171717;
    font-family: var(--font-primary);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.66px;
    margin: 0;
}

.efeitos-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #E6086E;
    text-align: right;
    font-family: var(--font-primary);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.66px;
    padding: 4px 0;
}

.efeitos-panel-close:hover {
    opacity: 0.8;
}

.efeitos-options {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    justify-content: center;
}

.efeito-option-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0px;
    padding-bottom: 12px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 1;
    min-width: 0;
}

.efeito-option-wrapper:hover {
    border-color: #E6086E;
    background: #FBF6F6;
}

.efeito-option-wrapper.selected {
    border-color: #E6086E;
    background: #FBF6F6;
}

.efeito-option {
    width: 127px;
    height: 84px;
    border-radius: 8px 8px 0px 0px;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.efeito-preview {
    width: 100%;
    height: 100%;
    border-radius: 8px 8px 0px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.efeito-preview-none {
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
}

.efeito-preview-sample {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 25%, #48dbfb 50%, #ff9ff3 75%, #54a0ff 100%);
}

.efeito-preview-grayscale .efeito-preview-sample {
    filter: grayscale(100%);
}

.efeito-preview-sepia .efeito-preview-sample {
    filter: sepia(100%);
}

.efeito-label {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: #171717;
    text-align: center;
}

.efeito-option-wrapper.selected .efeito-label {
    color: #E6086E;
}

/* ==========================================================================
   LUZ PANEL STYLES
   ========================================================================== */

.luz-panel {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90vw;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.luz-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.luz-panel-header h3 {
    color: #171717;
    font-family: var(--font-primary);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.66px;
    margin: 0;
}

.luz-info-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: super;
    cursor: pointer;
    margin-left: 2px;
}
.luz-info-trigger svg {
    display: block;
}
.luz-info-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    padding: 10px 14px;
    background: #fff;
    color: #555;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    z-index: 10;
}
.luz-info-trigger:hover .luz-info-tooltip {
    display: block;
}
.luz-info-tooltip::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #fff;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.04);
}

.luz-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #E6086E;
    text-align: right;
    font-family: var(--font-primary);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.66px;
    padding: 4px 0;
}

.luz-panel-close:hover {
    opacity: 0.8;
}

.luz-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.luz-option-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.luz-option-container.selected .luz-option-wrapper {
    border-color: #E6086E;
    background: #FBF6F6;
}

.luz-option-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0px;
    padding-bottom: 12px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.luz-option-wrapper:hover {
    border-color: #E6086E;
    background: #FBF6F6;
}

.luz-option {
    width: 127px;
    height: 84px;
    border-radius: 8px 8px 0px 0px;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.luz-preview {
    width: 100%;
    height: 100%;
    border-radius: 8px 8px 0px 0px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.luz-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.luz-label {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: #171717;
    text-align: center;
}

.luz-option-container.selected .luz-label {
    color: #E6086E;
}

.luz-price {
    color: #1D1D1D;
    font-family: var(--font-primary);
    font-size: 12px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    letter-spacing: -0.66px;
}

.luz-option-wrapper:hover .luz-price,
.luz-option-container.selected .luz-price {
    color: #E6086E;
}

/* Luz Quantity Selector */
.luz-qty-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 8px;
}

.luz-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #FBF6F6;
    color: #E6086E;
    font-size: 18px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.luz-qty-btn:hover {
    background: #E6086E;
    color: white;
}

.luz-qty-value {
    width: 32px;
    text-align: center;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    color: #171717;
}

/* ==========================================================================
   LOADING & STATUS TEXT STYLES
   ========================================================================== */

.loading-text,
.hint-text,
.error-text {
    font-family: var(--font-primary);
    font-size: 14px;
    text-align: center;
    padding: 20px;
    margin: 0;
}

.loading-text {
    color: #666;
}

.hint-text {
    color: #999;
}

.error-text {
    color: #E6086E;
}

/* ==========================================================================
   DEDICATÓRIA BAR & PANEL
   ========================================================================== */

/* Dedicatória Bar (below toolbar) */
.dedicatoria-bar {
    position: absolute;
    bottom: -75px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: opacity 0.3s ease;
    width: 448px;
}

.dedicatoria-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.dedicatoria-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.dedicatoria-bar-left svg {
    color: #E6086E;
    flex-shrink: 0;
}

.dedicatoria-bar-text {
    font-family: var(--font-primary);
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.dedicatoria-bar-text.has-text {
    color: #171717;
    font-style: italic;
}

.dedicatoria-add-btn {
    background: #E6086E;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.dedicatoria-add-btn:hover {
    background: #c9075f;
}

.dedicatoria-add-btn.added {
    background: white;
    color: #E6086E;
    border: 1px solid #E6086E;
}

.dedicatoria-add-btn.added:hover {
    background: #f5e8ea;
}

.dedicatoria-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dedicatoria-clear-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #E6086E;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E6086E;
    transition: all 0.2s ease;
}

.dedicatoria-clear-btn:hover {
    background: #f5e8ea;
}

/* Dedicatória Modal Overlay */
.dedicatoria-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(128, 128, 128, 0.4);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Dedicatória Input Panel (Modal) */
.dedicatoria-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 450px;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    z-index: 2001;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.dedicatoria-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E6086E;
    transition: opacity 0.2s ease;
}

.dedicatoria-modal-close:hover {
    opacity: 0.7;
}

.dedicatoria-panel-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.dedicatoria-panel-header h3 {
    color: #E6086E;
    font-family: var(--font-primary);
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin: 0;
    text-align: center;
}

.dedicatoria-panel-close {
    display: none;
}

.dedicatoria-panel-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dedicatoria-textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #171717;
    resize: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.dedicatoria-textarea:focus {
    outline: none;
    border-color: #E6086E;
}

.dedicatoria-textarea::placeholder {
    color: #999;
}

.dedicatoria-char-count {
    display: none;
}

.dedicatoria-submit-btn {
    width: 100%;
    background: #E6086E;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dedicatoria-submit-btn:hover {
    background: #c9075f;
}

/* ==========================================================================
   TILE IMAGE EFFECTS
   ========================================================================== */

.tile-with-frame.efeito-grayscale .tile-image {
    filter: grayscale(100%);
}

.tile-with-frame.efeito-sepia .tile-image {
    filter: sepia(100%);
}

/* ==========================================================================
   TILE IMAGE ZOOM & PAN CONTROLS
   ========================================================================== */

/* Edit controls overlay - appears on hover */
.tile-edit-controls {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.tile-card:hover .tile-edit-controls {
    opacity: 1;
}

/* Zoom buttons */
.tile-zoom-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    transition: background-color 0.2s, transform 0.2s;
}

.tile-zoom-btn:hover {
    background: white;
    transform: scale(1.1);
}

.tile-zoom-btn:active {
    transform: scale(0.95);
}

.tile-zoom-btn svg {
    width: 16px;
    height: 16px;
}

/* Image wrapper for pan/zoom - needs to handle transforms */
.tile-with-frame .tile-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
    position: relative;
}

.tile-with-frame .tile-image-wrapper.panning {
    cursor: grabbing;
}

.tile-with-frame .tile-image-wrapper .tile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
    pointer-events: none;
    user-select: none;
}

/* When not zoomed, don't show grab cursor */
.tile-with-frame .tile-image-wrapper[data-zoom="1"] {
    cursor: default;
}

/* Reset button */
.tile-reset-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(230, 8, 110, 0.9);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background-color 0.2s, transform 0.2s;
}

.tile-reset-btn:hover {
    background: #E6086E;
    transform: scale(1.1);
}

.tile-reset-btn svg {
    width: 14px;
    height: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    /* Container - exactly 100vh, flexbox layout */
    .colecao-container {
        position: relative;
        height: 100vh;
        height: 90dvh; /* Dynamic viewport height for mobile browsers */
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0;
    }

    /* Tiles preview area - flex container to reorder children */
    .tiles-preview-area {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
        padding: 0 15px;
    }

    /* Cart button - order 1 (first), combined pill style for mobile */
    .cart-float-container {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        order: 1;
        flex-shrink: 0;
        align-self: center;
        margin: 20px 0px 0px 0;
        z-index: 10;
        /* Mobile: horizontal pill layout */
        flex-direction: row;
        background: #E6086E;
        border-radius: 30px;
        padding: 5px 5px 5px 16px;
        box-shadow: 0 4px 19.4px 0 rgba(230, 8, 110, 0.34);
        gap: 10px;
    }

    .cart-icon-btn {
        width: 42px;
        height: 42px;
        box-shadow: none;
        background: transparent;
    }

    .cart-icon-btn svg path {
        fill: white;
    }

    .cart-text {
        border: none;
        padding: 0;
        background: transparent;
        box-shadow: none;
        font-family: var(--font-primary);
        font-size: 14px;
        font-weight: 500;
        letter-spacing: -0.5px;
        display: flex;
        align-items: center;
        color: white;
    }

    /* Tiles grid - order 2 (middle), takes remaining space with horizontal scroll */
    .tiles-grid {
        order: 2;
        flex: 1;
        min-height: 0;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 15px;
        gap: 20px;
        padding: 20px 15px;
        justify-content: flex-start;
        align-items: center;
    }

    .tile-card {
        flex-shrink: 0;
        scroll-snap-align: center;
    }

    /* Dedicatoria bar - order 3 (above toolbar) */
    .dedicatoria-bar {
        position: relative !important;
        order: 3;
        flex-shrink: 0;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        transform: none !important;
        margin: 5px 0;
        z-index: 10;
    }

    /* Toolbar - order 4 (last), at bottom naturally */
    .options-toolbar {
        position: relative;
        order: 4;
        flex-shrink: 0;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none;
        width: auto;
        max-width: 100%;
        margin: 5px auto;
        padding: 10px 16px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        gap: 6px;
        border-radius: 14px;
        z-index: 10;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent toolbar items from shrinking on small screens */
    .toolbar-options,
    .toolbar-divider,
    .toolbar-add {
        flex-shrink: 0;
    }

    .toolbar-btn {
        padding: 8px 12px;
        gap: 3px;
    }

    .toolbar-btn svg {
        width: 22px;
        height: 22px;
    }

    .toolbar-btn span {
        font-size: 10px;
    }

    .toolbar-divider {
        height: 36px;
        margin: 0 6px;
    }

    .toolbar-add {
        padding: 10px;
        order: -1;
    }

    .toolbar-divider {
        order: 0;
    }

    .toolbar-options {
        order: 1;
    }

    .toolbar-add svg {
        width: 18px;
        height: 18px;
    }

    /* Panel positioning - fixed to bottom of viewport on mobile */
    .moldura-panel,
    .tamanho-panel,
    .borda-panel,
    .efeitos-panel,
    .luz-panel {
        position: fixed;
        width: calc(100% - 30px);
        max-width: none;
        left: 15px;
        right: 15px;
        transform: none;
        padding: 15px 0;
        bottom: 10px;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    }

    .moldura-panel-header,
    .tamanho-panel-header,
    .borda-panel-header,
    .efeitos-panel-header,
    .luz-panel-header {
        padding: 0 15px;
    }

    /* Dedicatória panel - full width modal on mobile */
    .dedicatoria-panel {
        width: calc(100% - 30px) !important;
        max-width: none !important;
        left: 15px !important;
        right: 15px;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        padding: 15px;
        border-radius: 12px;
    }

    .dedicatoria-panel-header h3 {
        font-size: 16px;
    }

    .dedicatoria-textarea {
        min-height: 80px;
        font-size: 14px;
    }

    .dedicatoria-submit-btn {
        padding: 12px;
        font-size: 14px;
    }

    /* Dedicatória bar - styling on mobile (position handled above) */
    .dedicatoria-bar {
        padding: 10px 12px;
        border-radius: 12px;
    }

    .dedicatoria-bar-content {
        gap: 10px;
    }

    .dedicatoria-bar-text {
        font-size: 12px;
    }

    .dedicatoria-add-btn {
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* Horizontal scrollable options - centered when few items, scrollable when many */
    .moldura-options,
    .tamanho-options,
    .borda-options,
    .efeitos-options,
    .luz-options {
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 0 15px 10px 15px;
        margin: 0;
    }

    /* Prevent option shrinking */
    .moldura-option-wrapper,
    .tamanho-option-wrapper,
    .borda-option-wrapper,
    .efeito-option-wrapper,
    .luz-option-container {
        flex-shrink: 0;
    }

    /* Smaller option previews */
    .moldura-option,
    .borda-option,
    .efeito-option,
    .luz-option {
        width: 80px;
        height: 54px;
    }

    .tamanho-option {
        width: 90px;
        height: 90px;
        padding: 8px;
    }

    .tamanho-preview {
        transform: scale(0.9);
        transform-origin: center;
    }

    .moldura-label,
    .borda-label,
    .efeito-label,
    .tamanho-dimensions {
        font-size: 11px;
    }

    .moldura-price {
        font-size: 9px;
    }

    /* Scrollbar styling */
    .moldura-options::-webkit-scrollbar,
    .tamanho-options::-webkit-scrollbar,
    .borda-options::-webkit-scrollbar,
    .efeitos-options::-webkit-scrollbar,
    .luz-options::-webkit-scrollbar {
        height: 4px;
    }

    .moldura-options::-webkit-scrollbar-thumb,
    .tamanho-options::-webkit-scrollbar-thumb,
    .borda-options::-webkit-scrollbar-thumb,
    .efeitos-options::-webkit-scrollbar-thumb,
    .luz-options::-webkit-scrollbar-thumb {
        background: #E5E5E5;
        border-radius: 2px;
    }

    /* Panel headers - smaller on mobile */
    .moldura-panel-header h3,
    .tamanho-panel-header h3,
    .borda-panel-header h3,
    .efeitos-panel-header h3,
    .luz-panel-header h3 {
        font-size: 14px;
    }

    .moldura-panel-close,
    .tamanho-panel-close,
    .borda-panel-close,
    .efeitos-panel-close,
    .luz-panel-close {
        font-size: 14px;
    }

    /* Cart button - svg and badge sizing for mobile */
    .cart-icon-btn svg {
        width: 22px;
        height: 28px;
    }

    .cart-badge {
        bottom: 5px;
        right: 2px;
        min-width: 18px;
        height: 18px;
        font-size: 9px;
        padding: 2px 5px;
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(4px);
        color: #FFF;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    /* Colecao main - no extra padding needed */
    .colecao-main {
        padding-top: 0;
    }

    .tile-edit-controls {
        padding: 4px 8px;
        gap: 4px;
    }

    .tile-zoom-btn,
    .tile-reset-btn {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

/* ==========================================================================
   SUGESTÕES E PROMOÇÕES SECTION
   ========================================================================== */

.sugestoes-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.sugestoes-title {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin-bottom: 40px;
}

.sugestoes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.sugestoes-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #eee;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s;
}

.sugestoes-card:hover {
    transform: translateY(-4px);
}

.sugestoes-card .popular-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #9669FF;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1;
}

.sugestoes-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    padding: 16px;
    background: #FFF5F9;
}

.sugestoes-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sugestoes-info {
    padding: 20px;
    text-align: left;
}

.sugestoes-info h3 {
    font-size: 16px;
    font-weight: 400;
    color: #333;
    margin-bottom: 8px;
}

.sugestoes-info h3 strong {
    font-weight: 600;
}

.sugestoes-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.sugestoes-price .tile-count {
    font-size: 14px;
    color: #666;
}

.sugestoes-price .price {
    font-size: 32px;
    font-weight: 700;
    color: #E6086E;
}

.sugestoes-price .original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.btn-sugestoes {
    width: 100%;
    padding: 14px 20px;
    background: #E6086E;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-sugestoes:hover {
    background: #c70760;
}

.btn-sugestoes .btn-arrow {
    font-size: 16px;
}

.sugestoes-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.btn-aplicar-promo {
    padding: 18px 60px;
    background: #E6086E;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-aplicar-promo:hover {
    background: #c70760;
}

.btn-avancar {
    background: #E6086E;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    padding: 12px 32px;
    border-radius: 25px;
    transition: background 0.2s ease;
}

.btn-avancar:hover {
    background: #c70760;
    color: #fff;
}

/* Responsive for sugestoes */
@media (max-width: 900px) {
    .sugestoes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .sugestoes-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto 40px auto;
    }

    .sugestoes-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
}

/* ==========================================================================
   PRICING SECTION OVERRIDE FOR CRIAR-TILES PAGE
   ========================================================================== */

/* Remove padding-top for sugestoes state only (counteract parent's 40px padding) */
.selection-state[data-step="sugestoes"] {
    margin-top: -40px;
}

/* Make pricing section transparent when inside the selection flow */
.selection-section .pricing-section {
    background: transparent;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* "Continuar sem pack" button in criar-tiles */
.selection-section .pricing-footer-link {
    display: inline-block;
    margin-top: 15px;
    margin-bottom: 20px;
    padding: 12px 24px;
    background: #E6086E;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.2s;
}

.selection-section .pricing-footer-link:hover {
    background: #c00659;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 8, 110, 0.4);
}

/* ==========================================================================
   EMOTILES CART STYLES
   ========================================================================== */

.emotiles-cart-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px clamp(20px, 4vw, 60px);
    width: 100%;
    box-sizing: border-box;
}

.emotiles-cart-layout {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(20px, 3vw, 40px);
    align-items: flex-start;
}

/* Left Column (Product + Action Buttons) */
.emotiles-cart-left {
    flex: 1 1 500px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Product Area (white box) */
.emotiles-cart-product {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.emotiles-cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: clamp(15px, 2vw, 30px);
}

.emotiles-cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.emotiles-cart-item + .emotiles-cart-item {
    margin-top: 16px;
}

/* Product Group (tiles + info together) */
.emotiles-product-group {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.5vw, 20px);
    flex: 1 1 280px;
    min-width: 200px;
    max-width: 360px;
}

/* Tile Thumbnails Grid */
.emotiles-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.emotiles-tile-thumb {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.emotiles-tile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info - inline layout */
.emotiles-product-info {
    flex: 0 0 auto;
    min-width: 140px;
}

.emotiles-product-title {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    color: #231F20;
    margin: 0 0 4px 0;
    line-height: normal;
}

.emotiles-product-size {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    color: #989898;
    line-height: normal;
}

/* Dedicatória Line Item in Cart */
.emotiles-dedicatoria-item {
    border-top: 1px dashed #E5E5E5;
    margin-top: 20px;
    padding-top: 20px;
}


.emotiles-dedicatoria-icon {
    width: 200px;           /* Match tiles grid width */
    min-width: 200px;       /* Prevent shrinking */
    height: 60px;
    background: #FBF6F6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emotiles-dedicatoria-preview {
    font-family: var(--font-primary);
    font-size: 14px;
    font-style: italic;
    color: #666;
    line-height: 1.4;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emotiles-luz-icon {
    width: 200px;
    min-width: 200px;
    height: 60px;
    background: #FBF6F6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emotiles-luz-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.emotiles-luz-type {
    font-family: var(--font-primary);
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.emotiles-dedicatoria-item {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.emotiles-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: #231F20;
    padding: 0;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    white-space: nowrap;
}

.emotiles-stock-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
}

/* Quantity Selector - inline */
.emotiles-quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 5px 12px;
}

.emotiles-quantity-selector .qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: #333;
    transition: color 0.2s;
}

.emotiles-quantity-selector .qty-btn:hover {
    color: #E6086E;
}

.emotiles-quantity-selector .qty-value {
    font-size: 15px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Quantity Display (read-only) */
.emotiles-quantity-display {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 8px 16px;
    width: fit-content;
    margin-left: auto;
}

/* Reset margin-left for qty inside meta-row (main tile) */
.emotiles-meta-row .emotiles-quantity-display {
    margin-left: 0;
}

.emotiles-quantity-display .qty-value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

/* Price - inline */
.emotiles-price {
    font-family: var(--font-primary);
    font-size: 22px;
    font-weight: 900;
    color: #E6086E;
    line-height: normal;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    flex-shrink: 0;
}

/* Price Breakdown (when using multiple packs) */
.emotiles-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding: 10px 0;
    border-top: 1px dashed #E5E5E5;
    width: 100%;
}

.breakdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    width: 100%;
}

.breakdown-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 12px;
}

.pack-badge {
    background: #E6086E;
    color: white;
}

.individual-badge {
    background: #525252;
    color: white;
}

.breakdown-price {
    color: #525252;
    font-weight: 600;
}

.breakdown-prices {
    display: flex;
    gap: 8px;
    align-items: center;
}

.breakdown-item .original-price {
    text-decoration: line-through;
    color: #989898;
    font-size: 12px;
    font-weight: 400;
}

/* Compact version for checkout steps */
.emotiles-price-breakdown-compact {
    gap: 4px;
    margin-top: 6px;
    padding: 6px 0;
}

.emotiles-price-breakdown-compact .breakdown-item {
    font-size: 11px;
}

.emotiles-price-breakdown-compact .breakdown-badge {
    padding: 2px 6px;
    font-size: 10px;
}

.emotiles-price-breakdown-compact .breakdown-price {
    font-size: 11px;
}

.emotiles-price-breakdown-compact .breakdown-item .original-price {
    font-size: 10px;
}

/* Meta Row (Stock + Qty + Price) - display in a row */
.emotiles-meta-row {
    display: flex;
    align-items: center;
    gap: clamp(15px, 2vw, 30px);
    margin-left: auto;
}

/* Remove Link - inline */
.emotiles-remove-link,
.emotiles-remove-link:link,
.emotiles-remove-link:visited {
    color: #E6086E !important;
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    white-space: nowrap;
    text-align: right;
    flex-shrink: 0;
    margin-left: auto;
}

.emotiles-remove-link:hover {
    color: #E6086E !important;
    text-decoration: underline;
}

/* Action Buttons (outside the white boxes) */
.emotiles-cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 0px;
    margin-top: 30px;
}

.emotiles-btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

.emotiles-btn-back {
    background: transparent;
    color: #E6086E!important;
    border: 1px solid #E6086E;
}

.emotiles-btn-back:hover {
    background: rgba(230, 8, 110, 0.05);
    color: #E6086E;
}

.emotiles-btn-clear {
    background: transparent;
    color: #999;
    border: 1px solid #ddd;
}

.emotiles-btn-clear:hover {
    border-color: #999;
    color: #666;
}

/* Summary Sidebar (Right) */
.emotiles-cart-summary {
    flex: 0 1 350px;
    min-width: 280px;
    background: #fff;
    border-radius: 12px;
    padding: clamp(20px, 2.5vw, 30px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.emotiles-cart-summary h3 {
    font-family: var(--font-primary);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #231F20;
}

/* Order summary tiles grid - 2 per row, smaller tiles */
.emotiles-cart-summary .emotiles-tiles-grid-mini {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    --tile-size: 35px !important;
}

.emotiles-summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}

.emotiles-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    margin-top: 10px;
    border-top: 1px solid #eee;
}

.emotiles-summary-total span:first-child {
    font-family: var(--font-primary);
    font-size: 22px;
    font-weight: 700;
    color: #231F20;
    align-self: center;
}

.emotiles-summary-total span:last-child {
    font-family: var(--font-primary);
    font-size: 28px;
    font-weight: 900;
    color: #E6086E;
    text-align: right;
}

.emotiles-btn-checkout {
    display: block;
    width: 100%;
    text-align: center;
    background: #E6086E;
    color: #FFF!important;
    padding: 15px;
    margin-top: 20px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
}

.emotiles-btn-checkout:hover {
    background: #c70760;
    color: white;
}

/* Empty Cart */
.emotiles-cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.emotiles-cart-empty h2 {
    color: #666;
    margin-bottom: 20px;
}

.emotiles-btn-primary {
    background: #E6086E;
    color: white;
}

.emotiles-btn-primary:hover {
    background: #c70760;
    color: white;
}

/* Mini tiles grid for cart - FIXED SIZE tiles for consistent proportions */
/* CSS Variables set by PHP: --tile-size, --tile-aspect-ratio, --frame-percent, --borda-percent */
.emotiles-tiles-grid-mini {
    display: grid;
    flex-shrink: 0;
    grid-template-columns: repeat(auto-fill, var(--tile-size, 50px));
    gap: 3px;
    width: 200px;
    /*min-width: 200px;
    max-width: 200px;*/
}

/* Each tile is FIXED size - never changes based on grid */
.emotiles-tiles-grid-mini .tile-card {
    width: var(--tile-size, 50px);
    height: calc(var(--tile-size, 50px) / var(--tile-aspect-ratio, 1));
    flex-shrink: 0;
}

/* Frame uses percentage of tile size */
.emotiles-tiles-grid-mini .tile-frame {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: var(--frame-percent, 6%);
}

/* Border uses percentage of tile size */
.emotiles-tiles-grid-mini .tile-image-container {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: var(--borda-percent, 8%);
    background-color: var(--borda-color, #FFFFFF);
}

/* Image wrapper fills remaining space */
.emotiles-tiles-grid-mini .tile-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Image fills wrapper with object-fit */
.emotiles-tiles-grid-mini .tile-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Override for no-frame tiles */
.emotiles-tiles-grid-mini .tile-with-frame.no-frame .tile-frame {
    padding: 0;
}

/* Disable hover effects in cart */
.emotiles-tiles-grid-mini.emotiles-tiles-grid .tile-card:hover {
    transform: none;
}

/* Hide edit controls in cart view */
.emotiles-tiles-grid-mini .tile-delete-btn,
.emotiles-tiles-grid-mini .tile-edit-controls {
    display: none;
}

/* Responsive - Cart Page */

/* Tablet - Stack layout vertically */
@media (max-width: 992px) {
    .emotiles-cart-layout {
        flex-direction: column;
    }

    .emotiles-cart-left {
        width: 100%;
        flex: none;
    }

    .emotiles-cart-summary {
        width: 100%;
        flex: none;
        min-width: 0;
    }
}

/* Mobile - Adjust cart item layout */
@media (max-width: 768px) {
    .emotiles-cart-container {
        padding: 20px 16px;
    }

    .emotiles-cart-product {
        padding: 16px;
    }

    /* Cart item: block with overflow for float clearing */
    .emotiles-cart-item {
        display: block;
        overflow: hidden;
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid #eee;
    }

    .emotiles-cart-item:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    /* Product group: contents - disappears from layout */
    .emotiles-product-group {
        display: contents;
    }

    /* Tiles grid: float left - everything else flows beside it */
    .emotiles-tiles-grid-mini {
        float: left;
        width: 110px;
        min-width: 110px;
        margin-right: 15px;
        margin-bottom: 10px;
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Luz/Dedicatória icons: float left like tiles */
    .emotiles-luz-icon,
    .emotiles-dedicatoria-icon {
        float: left;
        width: 110px;
        min-width: 110px;
        height: 60px;
        margin-right: 15px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f9f9f9;
        border-radius: 8px;
    }

    .emotiles-luz-icon svg,
    .emotiles-dedicatoria-icon svg {
        width: 28px;
        height: 28px;
    }

    /* Product info: block, flows beside float */
    .emotiles-product-info {
        display: block;
        margin-bottom: 8px;
    }

    .emotiles-product-title {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .emotiles-product-size {
        font-size: 14px;
        color: #888;
        margin-bottom: 8px;
    }

    /* Meta row: flex container with wrap - Stock on first line, Qty+Price on second */
    .emotiles-meta-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    /* Em Stock takes full width - forces Qty+Price to new line */
    .emotiles-meta-row .emotiles-stock-badge {
        flex: 0 0 100%;
        margin: 0 0 4px 0;
        font-size: 12px;
    }

    .emotiles-meta-row .emotiles-quantity-display {
        flex-shrink: 0;
        display: inline-flex !important;
        padding: 6px 16px;
        font-size: 14px;
        font-weight: 600;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #fff;
    }

    .emotiles-meta-row .emotiles-price {
        flex-shrink: 0;
        font-size: 18px;
        font-weight: 700;
        color: #E6086E;
        margin-left: auto;
    }

    /* Remover: align with right content (not centered) */
    .emotiles-remove-link {
        clear: none;
        display: block;
        text-align: left;
        padding-top: 8px;
        font-size: 14px;
    }

    /* Luz/Dedicatória items: match main tile styling */
    .emotiles-cart-item .emotiles-product-info h3,
    .emotiles-cart-item .emotiles-product-info .emotiles-product-title {
        font-size: 16px;
        font-weight: 700;
        color: #231F20;
    }

    .emotiles-cart-item .emotiles-price {
        font-size: 16px;
        font-weight: 700;
    }

    .emotiles-cart-item .emotiles-quantity-display {
        margin-left: auto;
    }

    .emotiles-cart-item .emotiles-meta-row .emotiles-quantity-display {
        margin-left: 0;
    }

    /* Luz/Dedicatória items: CSS Grid layout for mobile */
    .emotiles-luz-item,
    .emotiles-dedicatoria-item {
        display: grid !important;
        grid-template-columns: 110px auto 1fr;
        grid-template-rows: auto auto auto auto auto;
        gap: 4px 12px;
        align-items: center;
    }

    .emotiles-luz-item .emotiles-product-group,
    .emotiles-dedicatoria-item .emotiles-product-group,
    .emotiles-luz-item .emotiles-product-info,
    .emotiles-dedicatoria-item .emotiles-product-info,
    .emotiles-luz-item .emotiles-meta-row,
    .emotiles-dedicatoria-item .emotiles-meta-row {
        display: contents;
    }

    /* Icon: col 1, rows 1-5 */
    .emotiles-luz-item .emotiles-luz-icon,
    .emotiles-dedicatoria-item .emotiles-dedicatoria-icon {
        grid-column: 1;
        grid-row: 1 / 6;
        float: none;
        margin: 0;
        align-self: start;
    }

    /* Title: col 2-3, row 1 */
    .emotiles-luz-item .emotiles-product-title,
    .emotiles-dedicatoria-item .emotiles-product-title {
        grid-column: 2 / 4;
        grid-row: 1;
    }

    /* "15€ cada" / dedicatória text: col 2-3, row 2 */
    .emotiles-luz-item .emotiles-luz-type,
    .emotiles-dedicatoria-item .emotiles-dedicatoria-preview {
        grid-column: 2 / 4;
        grid-row: 2;
    }

    /* Stock badge: col 2, row 3 */
    .emotiles-luz-item .emotiles-stock-badge,
    .emotiles-dedicatoria-item .emotiles-stock-badge {
        grid-column: 2 / 4;
        grid-row: 3;
        justify-self: start;
    }

    /* Qty: col 2, row 4 */
    .emotiles-luz-item .emotiles-quantity-display,
    .emotiles-dedicatoria-item .emotiles-quantity-display {
        grid-column: 2;
        grid-row: 4;
        margin-left: 0;
        justify-self: start;
    }

    /* Price: col 3, row 4 */
    .emotiles-luz-item .emotiles-price,
    .emotiles-dedicatoria-item .emotiles-price {
        grid-column: 3;
        grid-row: 4;
        justify-self: end;
    }

    /* Remover: col 3, row 5, aligned right */
    .emotiles-luz-item .emotiles-remove-link,
    .emotiles-dedicatoria-item .emotiles-remove-link {
        grid-column: 3;
        grid-row: 5;
        text-align: right;
        clear: none;
    }
}

/* Override the 576px configurator scaling for cart tiles only */
@media (max-width: 576px) {
    .emotiles-tiles-grid-mini .tile-card {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: var(--tile-aspect-ratio, 1);
        flex-shrink: 0;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .emotiles-cart-container {
        padding: 12px 10px;
    }

    .emotiles-cart-product {
        padding: 12px;
    }

    .emotiles-tiles-grid-mini {
        width: 90px;
        min-width: 90px;
        margin-right: 12px;
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .emotiles-product-title {
        font-size: 15px;
    }

    .emotiles-product-size {
        font-size: 13px;
    }

    .emotiles-stock-badge {
        font-size: 11px;
        margin-right: 8px;
    }

    .emotiles-quantity-display {
        margin-right: 8px;
        font-size: 14px;
    }

    .emotiles-price {
        font-size: 15px;
    }

    .emotiles-remove-link {
        font-size: 13px;
    }
}

/* ========================================
   CHECKOUT FORM STYLES (Step 2)
   ======================================== */

.emotiles-checkout-form {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.emotiles-form-title {
    font-family: var(--font-primary);
    font-size: 24px;
    font-weight: 700;
    color: #231F20;
    margin: 0 0 30px 0;
}

.emotiles-form-subtitle {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 600;
    color: #231F20;
    margin: 30px 0 20px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.emotiles-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.emotiles-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.emotiles-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.emotiles-form-group.emotiles-form-full {
    grid-column: 1 / -1;
}

.emotiles-form-group label {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    color: #231F20;
}

.emotiles-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #231F20;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.emotiles-input::placeholder {
    color: #989898;
}

.emotiles-input:focus {
    outline: none;
    border-color: #E6086E;
    box-shadow: 0 0 0 3px rgba(230, 8, 110, 0.1);
}

.emotiles-input.emotiles-input-error {
    border-color: #DF0000;
}

.emotiles-error {
    display: none;
    font-family: var(--font-primary);
    font-size: 12px;
    color: #DF0000;
}

/* Checkbox styling */
.emotiles-form-checkbox {
    margin-top: 10px;
}

/* Shipping form section - same spacing as main form */
#shipping-form-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.emotiles-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #231F20;
    cursor: pointer;
}

.emotiles-checkbox-label input[type="checkbox"] {
    display: none;
}

.emotiles-checkbox-icon {
    width: 20px;
    height: 20px;
    border: 2px solid #E6086E;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.emotiles-checkbox-label input[type="checkbox"]:checked + .emotiles-checkbox-icon {
    background: #E6086E;
}

.emotiles-checkbox-label input[type="checkbox"]:checked + .emotiles-checkbox-icon::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Order Summary in Step 2 */
.emotiles-summary-subtitle {
    font-family: var(--font-primary);
    font-size: 14px;
    color: #989898;
    margin: 0 0 20px 0;
}

.emotiles-order-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.emotiles-order-item:last-of-type {
    border-bottom: none;
}

.emotiles-order-item-image {
    flex-shrink: 0;
}

.emotiles-order-item-image .emotiles-tiles-grid-mini {
    width: 80px;
    gap: 2px;
}

.emotiles-order-item-details {
    flex: 1;
    min-width: 0;
}

.emotiles-order-item-details h4 {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    color: #231F20;
    margin: 0 0 4px 0;
}

.emotiles-order-item-size {
    font-family: var(--font-primary);
    font-size: 12px;
    color: #989898;
}

.emotiles-order-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.emotiles-order-item-stock {
    font-family: var(--font-primary);
    font-size: 12px;
    color: #28a745;
}

.emotiles-order-item-qty {
    font-family: var(--font-primary);
    font-size: 12px;
    color: #666;
}

.emotiles-order-item-price {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    color: #E6086E;
}

.emotiles-order-totals {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Responsive for checkout form */
@media (max-width: 768px) {
    .emotiles-form-row {
        grid-template-columns: 1fr;
    }

    .emotiles-checkout-form {
        padding: 24px;
    }

    .emotiles-order-item {
        flex-wrap: wrap;
    }

    .emotiles-order-item-meta {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 10px;
    }
}

/* ============================================
   PAYMENT METHOD SELECTION STYLES
   ============================================ */

.emotiles-payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emotiles-payment-option {
    background: #fff;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
}

.emotiles-payment-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.emotiles-payment-icon {
    height: 28px;
    width: auto;
    flex-shrink: 0;
}

.emotiles-payment-label {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 500;
    color: #231F20;
    flex-grow: 1;
}

.emotiles-payment-select {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.emotiles-payment-radio {
    width: 18px;
    height: 18px;
    border: 1.5px solid #999;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.emotiles-payment-option.selected .emotiles-payment-radio {
    border-color: #231F20;
}

.emotiles-payment-option.selected .emotiles-payment-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #231F20;
    border-radius: 50%;
}

.emotiles-payment-status {
    font-family: var(--font-primary);
    font-size: 13px;
    color: #888;
    transition: all 0.15s ease;
}

.emotiles-payment-option.selected .emotiles-payment-status {
    color: #231F20;
    font-weight: 500;
}

/* MB WAY Phone Input - inside card */
.emotiles-mbway-phone-wrapper {
    display: none;
    padding: 0 20px 16px 20px;
}

.emotiles-payment-option.selected .emotiles-mbway-phone-wrapper {
    display: block;
}

.emotiles-mbway-phone-wrapper label {
    display: block;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.emotiles-mbway-phone-wrapper input {
    width: 100%;
    max-width: 160px;
    padding: 10px 14px;
    font-size: 15px;
    font-family: var(--font-primary);
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    letter-spacing: 1px;
    background: #fff;
}

.emotiles-mbway-phone-wrapper input:focus {
    outline: none;
    border-color: #E6086E;
}

/* Responsive payment styles */
@media (max-width: 768px) {
    .emotiles-payment-row {
        padding: 14px 16px;
    }

    .emotiles-payment-icon {
        height: 24px;
    }

    .emotiles-payment-status {
        display: none;
    }

    .emotiles-mbway-phone-wrapper input {
        max-width: 100%;
    }
}

/* ==========================================================================
   SHIPPING METHOD SELECTION STYLES
   ========================================================================== */

.emotiles-shipping-option {
    background: #fff;
    border: 2px solid #E8E8E8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emotiles-shipping-option:hover {
    border-color: #E6086E;
    background: #FBF6F6;
}

.emotiles-shipping-option.selected {
    border-color: #E6086E;
    background: #FBF6F6;
}

.emotiles-shipping-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.emotiles-shipping-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.emotiles-shipping-name {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 16px;
    color: #171717;
}

.emotiles-shipping-delivery {
    font-family: var(--font-primary);
    font-size: 14px;
    color: #6B7280;
}

.emotiles-shipping-price {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 18px;
    color: #E6086E;
    min-width: 60px;
    text-align: right;
}

.emotiles-shipping-status {
    font-family: var(--font-primary);
    font-size: 14px;
    color: #6B7280;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #E8E8E8;
    background: #fff;
    min-width: 100px;
    text-align: center;
}

.emotiles-shipping-status.selected-status {
    background: #E6086E;
    color: white;
    border-color: #E6086E;
}

/* Responsive shipping styles */
@media (max-width: 768px) {
    .emotiles-shipping-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .emotiles-shipping-info {
        flex: 1 1 100%;
    }

    .emotiles-shipping-price {
        flex: 1;
        text-align: left;
    }

    .emotiles-shipping-status {
        flex: 1;
    }
}

/* Order Item Extras (Luz, Dedicatoria) */
.emotiles-order-item-extras {
    flex-basis: 100%;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #E8E8E8;
}

.emotiles-extra-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-primary);
    font-size: 11px;
    color: #6B7280;
    padding: 2px 0;
}

.emotiles-extra-line span:first-child {
    color: #E6086E;
}

.emotiles-dedicatoria-text {
    font-style: italic;
    color: #989898 !important;
}

/* ==========================================================================
   SUCCESS PAGE STYLES
   ========================================================================== */

/* Success message card */
.emotiles-success-message {
    text-align: center;
    padding: 40px 20px;
    background: #f0fdf4;
    border-radius: 12px;
    margin-bottom: 30px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg {
    width: 48px;
    height: 48px;
    color: white;
}

.error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-icon svg {
    width: 48px;
    height: 48px;
    color: white;
}

/* Payment/Shipping info display values */
.emotiles-info-value {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    color: #231F20;
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 8px;
}

/* Payment details (Multibanco) */
.emotiles-payment-details {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.multibanco-reference {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.mb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
}

.mb-label {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.mb-value {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    color: #231F20;
}

/* Address cards */
.emotiles-address-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.emotiles-address-title {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    color: #231F20;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.emotiles-address-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.emotiles-address-content p {
    margin: 0;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.emotiles-address-content p strong {
    color: #231F20;
    font-weight: 600;
}

/* Primary button */
.emotiles-btn-primary {
    background: #E6086E;
    color: #FFF!important;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.emotiles-btn-primary:hover {
    background: #c70760;
}

/* ========================================
   SUCCESS PAGE STYLES
   ======================================== */

/* Simple Success Page Styling */
.emotiles-success-simple {
    /* max-width: 900px; */
    margin: 60px auto;
    padding: 20px;
}

.emotiles-success-content {
    background: #FFF;
    border-radius: 16px;
    padding: 48px 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Two Column Layout */
.emotiles-success-two-col {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    text-align: left;
}

.emotiles-success-left {
    flex: 1;
}

.emotiles-success-right {
    flex-shrink: 0;
}

.emotiles-success-logo {
    width: 220px;
    height: auto;
}

.emotiles-success-actions .btn-arrow {
    margin-right: 8px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
}

.success-icon svg {
    width: 64px;
    height: 64px;
}

.error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
}

.error-icon svg {
    width: 64px;
    height: 64px;
}

.emotiles-success-title {
    font-size: 28px;
    font-weight: 700;
    color: #231F20;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.emotiles-error-title {
    font-size: 28px;
    font-weight: 700;
    color: #dc2626;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.emotiles-success-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: #666;
    margin: 0 0 8px 0;
}

.emotiles-error-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: #666;
    margin: 0 0 8px 0;
}

.emotiles-success-text {
    font-size: 16px;
    color: #666;
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.emotiles-error-text {
    font-size: 16px;
    color: #666;
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.emotiles-success-actions {
    margin-top: 32px;
}

.emotiles-payment-info {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    margin-top: 32px;
    text-align: left;
}

.emotiles-payment-info-title {
    font-size: 18px;
    font-weight: 600;
    color: #231F20;
    margin: 0 0 16px 0;
}

.emotiles-payment-info-text {
    font-size: 15px;
    color: #666;
    margin: 0 0 16px 0;
    text-align: center;
}

.emotiles-payment-form-wrapper {
    margin-top: 24px;
}

/* Multibanco Payment - Horizontal Layout */
.emotiles-mb-payment {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 24px;
    width: 100%;
    box-sizing: border-box;
}

.emotiles-mb-logo {
    flex-shrink: 0;
}

.emotiles-mb-logo img {
    width: 80px;
    height: auto;
}

.emotiles-mb-details {
    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.8;
}

/* Override global .mb-row styles */
.emotiles-mb-details .mb-row {
    display: block;
    padding: 0;
    background: none;
    margin-bottom: 2px;
}

.emotiles-mb-details .mb-label {
    color: #231F20;
}

.emotiles-mb-details .mb-value {
    color: #E6086E;
    font-weight: 600;
    margin-left: 4px;
}

/* MB WAY Payment - Horizontal Layout */
.emotiles-mbway-payment {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 24px;
    width: 100%;
    box-sizing: border-box;
}

.emotiles-mbway-logo {
    flex-shrink: 0;
}

.emotiles-mbway-logo img {
    width: 80px;
    height: auto;
}

.emotiles-mbway-details {
    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.8;
}

.emotiles-mbway-details .mbway-row {
    margin-bottom: 2px;
}

.emotiles-mbway-details .mbway-label {
    color: #231F20;
}

.emotiles-mbway-details .mbway-value {
    color: #E6086E;
    font-weight: 600;
    margin-left: 4px;
}

.emotiles-mbway-details .mbway-text {
    color: #666;
}

.emotiles-mbway-details .mbway-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.emotiles-mbway-details .status-icon.waiting {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ccc;
    border-top-color: #E6086E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.emotiles-mbway-details .status-text {
    color: #666;
}

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

/* Success Checkmark SVG */
.emotiles-success-checkmark {
    width: 100px;
    height: auto;
}

@media (max-width: 768px) {
    .emotiles-success-checkmark {
        width: 70px;
    }

    .emotiles-mb-payment,
    .emotiles-mbway-payment {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .emotiles-success-simple {
        margin: 30px auto;
    }

    .emotiles-success-content {
        padding: 32px 20px;
    }

    .emotiles-success-two-col {
        flex-direction: column;
        text-align: center;
    }

    .emotiles-success-right {
        order: -1;
        margin-bottom: 24px;
    }

    .emotiles-success-logo {
        width: 160px;
    }

    .emotiles-success-title,
    .emotiles-error-title {
        font-size: 24px;
    }

    .success-icon,
    .error-icon {
        width: 64px;
        height: 64px;
    }

    .success-icon svg,
    .error-icon svg {
        width: 48px;
        height: 48px;
    }
}

/* ========================================
   CONFIRMATION REVIEW PAGE STYLES
   ======================================== */

/* Cards Container - 3 Column Grid (Confirmation Page Only) */
.emotiles-cart-confirmation {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

.emotiles-cart-confirmation > .emotiles-form-title {
    grid-column: 1 / -1;
}

.emotiles-cart-confirmation > .emotiles-cart-actions {
    grid-column: 1 / -1;
}

/* Review Card Styling */
.emotiles-review-card {
    background: #FFF;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.emotiles-review-card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #E0E0E0;
}

.emotiles-review-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #231F20;
    margin: 0;
}

.emotiles-review-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    margin-bottom: 20px;
}

.emotiles-btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 12px;
    color: #E6086E;
    background: #FFF;
    border: 2px solid #E6086E;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    margin-top: auto;
}

.emotiles-btn-edit:hover {
    background: #FFF5FB;
    text-decoration: none;
}

.emotiles-btn-edit svg {
    flex-shrink: 0;
}

.emotiles-review-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

/* Responsive: Single column on mobile */
@media (max-width: 768px) {
    .emotiles-cart-confirmation {
        grid-template-columns: 1fr;
    }

    .emotiles-review-card-content {
        flex-direction: column;
    }

    .emotiles-review-item {
        width: 100%;
    }
}

.emotiles-review-icon {
    width: 20px;
    height: 20px;
    color: #666;
    flex-shrink: 0;
}

.emotiles-review-icon svg {
    width: 20px;
    height: 20px;
}

.emotiles-review-label {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.emotiles-review-label-strong {
    font-size: 16px;
    font-weight: 600;
    color: #231F20;
}

/* Newsletter card - independent styling */
.emotiles-newsletter-card {
    background: #FAFAFA;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    padding: 16px 20px;
    grid-column: 1 / -1;
}

.emotiles-newsletter-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.emotiles-newsletter-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.emotiles-newsletter-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #E0E0E0;
    border-radius: 5px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    background: #fff;
}

.emotiles-newsletter-label input[type="checkbox"]:checked + .emotiles-newsletter-checkbox {
    background-color: #E6086E;
    border-color: #E6086E;
}

.emotiles-newsletter-label input[type="checkbox"]:checked + .emotiles-newsletter-checkbox::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.emotiles-newsletter-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.emotiles-newsletter-title {
    font-size: 15px;
    font-weight: 600;
    color: #231F20;
}

.emotiles-newsletter-desc {
    font-size: 13px;
    color: #666;
}

/* Shipping form section */
#shipping-form-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #E0E0E0;
}

/* Tax note */
.emotiles-tax-note {
    font-family: var(--font-primary);
    font-size: 12px;
    color: #989898;
    text-align: center;
    margin-top: 15px;
    font-style: italic;
}

/* Success page responsive */
@media (max-width: 768px) {
    .emotiles-address-card {
        margin-bottom: 15px;
    }
}

/* ==========================================================================
   LUZ UPSELL POPUP
   ========================================================================== */

.luz-upsell-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.luz-upsell-overlay.visible {
    opacity: 1;
}

.luz-upsell-popup {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.luz-upsell-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #E6086E;
    cursor: pointer;
    line-height: 1;
}

.luz-upsell-close:hover {
    opacity: 0.7;
}

.luz-upsell-header {
    text-align: center;
    margin-bottom: 25px;
}

.luz-upsell-header h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #333;
}

.luz-upsell-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.luz-upsell-options {
    margin-bottom: 10px;
}

.luz-upsell-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease;
}

.luz-upsell-item:hover {
    border-color: #E6086E;
}

.luz-upsell-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
    background: #f5f5f5;
    flex-shrink: 0;
}

.luz-upsell-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.luz-upsell-info {
    flex: 1;
    min-width: 0;
}

.luz-upsell-name {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.luz-upsell-price {
    color: #E6086E;
    font-size: 14px;
}

.luz-upsell-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.luz-upsell-qty .qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #E6086E;
    background: #fff;
    color: #E6086E;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.luz-upsell-qty .qty-btn:hover {
    background: #E6086E;
    color: #fff;
}

.luz-upsell-qty .qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
}

.luz-upsell-tooltip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 0 4px;
}
.luz-upsell-tooltip svg {
    flex-shrink: 0;
}
.luz-upsell-tooltip span {
    font-size: 13px;
    color: #AFAFAF;
}

.luz-upsell-footer {
    margin-top: 20px;
    text-align: center;
}

.luz-upsell-continue {
    background: #999;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.luz-upsell-continue:hover {
    background: #777;
}

.luz-upsell-continue.active {
    background: #E6086E;
}

.luz-upsell-continue.active:hover {
    background: #c9075d;
}

/* Luz Upsell Mobile */
@media (max-width: 768px) {
    .luz-upsell-popup {
        padding: 20px;
        max-height: 90vh;
    }

    .luz-upsell-header h3 {
        font-size: 18px;
    }

    .luz-upsell-item {
        padding: 12px;
    }

    .luz-upsell-image {
        width: 55px;
        height: 55px;
        margin-right: 12px;
    }

    .luz-upsell-name {
        font-size: 14px;
    }

    .luz-upsell-price {
        font-size: 13px;
    }

    .luz-upsell-qty .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}
