/**
 * Personalizator Șampile - Styles
 *
 * CSS pentru interfața frontend
 */

@font-face {
    font-family: 'Archivo Black';
    src: url('../fonts/ArchivoBlack-Regular.woff2') format('woff2'),
         url('../fonts/ArchivoBlack-Regular.woff') format('woff'),
         url('../fonts/ArchivoBlack-Regular.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: block;
}

/* ====================  WRAPPER ==================== */
.stampile-personalizator-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ==================== STEP ==================== */
.stampile-step {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    animation: fadeIn 0.4s ease-in;
}

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

.stampile-step-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 0 30px 0;
    font-size: 24px;
    color: #2c3e50;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #378816 0%, #5cb85c 100%);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 20px;
}

/* ==================== DIMENSIUNI GRID ==================== */
.stampile-dimensiuni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.dimensiune-card {
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.dimensiune-card:hover {
    border-color: #378816;
    box-shadow: 0 5px 15px rgba(55, 136, 22, 0.2);
    transform: translateY(-3px);
}

.dimensiune-card.active {
    border-color: #378816;
    background: #f0f8ff;
    box-shadow: 0 5px 20px rgba(55, 136, 22, 0.3);
}

.dimensiune-image img {
    max-width: 100%;
    height: auto;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    background: white;
    padding: 10px;
}

.dimensiune-info h3 {
    margin: 10px 0 5px 0;
    font-size: 18px;
    color: #2c3e50;
}

.dimensiune-info p {
    margin: 0 0 10px 0;
    color: #7f8c8d;
    font-size: 14px;
}

.dimensiune-price {
    display: inline-block;
    background: #378816;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
}

/* ==================== TEXT INPUTS ==================== */
.stampile-text-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .stampile-text-container {
        grid-template-columns: 1fr;
    }
}

.text-inputs-wrapper {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

#text-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.text-input-group {
    display: flex;
    flex-direction: column;
}

.text-input-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.text-input-group input {
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: 'Archivo Black', sans-serif;
    transition: border-color 0.3s;
}

.text-input-group input:focus {
    outline: none;
    border-color: #378816;
}

.text-help {
    margin-top: 15px;
    padding: 10px;
    background: #e8f5e9;
    border-left: 4px solid #378816;
    border-radius: 4px;
    font-size: 14px;
    color: #2c3e50;
}

/* ==================== PREVIEW CANVAS ==================== */
.preview-wrapper h3,
.preview-final-wrapper h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #2c3e50;
    text-align: center;
}

.canvas-container,
.preview-final-wrapper {
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

#stampila-canvas,
#stampila-canvas-final {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    background: white;
}

/* ==================== TIPURI GRID ==================== */
.stampile-tipuri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.tip-card {
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.tip-card:hover {
    border-color: #378816;
    box-shadow: 0 5px 15px rgba(55, 136, 22, 0.2);
    transform: translateY(-3px);
}

.tip-card.active {
    border-color: #378816;
    background: #f0f8ff;
    box-shadow: 0 5px 20px rgba(55, 136, 22, 0.3);
}

.tip-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tip-card h3 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

/* ==================== OPȚIUNI ==================== */
.stampile-optiuni-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.optiune-group {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.optiune-label {
    display: block;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

/* CULORI */
.culori-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.culoare-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.culoare-option:hover {
    border-color: #378816;
    box-shadow: 0 3px 10px rgba(55, 136, 22, 0.2);
}

.culoare-option.active {
    border-color: #378816;
    background: #f0f8ff;
    box-shadow: 0 3px 15px rgba(55, 136, 22, 0.3);
}

.culoare-swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.culoare-option span {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

/* ACCESORII */
.accesorii-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.accesory-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.accesory-checkbox:hover {
    border-color: #378816;
}

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

.accesory-checkbox input[type="checkbox"]:checked + span {
    color: #378816;
}

.accesory-checkbox span {
    font-size: 16px;
    color: #2c3e50;
}

/* ==================== NOU: UPLOAD CERTIFICAT ==================== */
.stampile-upload-container {
    padding: 20px;
    background: #f0f8ff;
    border: 2px solid #3498db;
    border-radius: 8px;
}

.upload-description {
    margin: 0 0 20px 0;
    padding: 15px;
    background: white;
    border-left: 4px solid #3498db;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.6;
    color: #2c3e50;
}

.upload-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border: 2px dashed #3498db;
    border-radius: 8px;
    min-height: 150px;
}

.upload-fallback {
    text-align: center;
    padding: 30px;
}

.upload-fallback p {
    margin: 10px 0;
    font-size: 14px;
}

.upload-fallback a {
    color: #378816;
    font-weight: 600;
    text-decoration: none;
}

.upload-fallback a:hover {
    text-decoration: underline;
}

.upload-note {
    margin: 20px 0 0 0;
    padding: 12px;
    background: #e8f5e9;
    border-left: 4px solid #4CAF50;
    border-radius: 4px;
    font-size: 14px;
    color: #2c3e50;
}

/* ==================== NOU: MESAJ WHATSAPP ==================== */
.stampile-info-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    color: white;
}

.whatsapp-message {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 10px;
}

.whatsapp-icon {
    font-size: 48px;
    line-height: 1;
    flex-shrink: 0;
}

.whatsapp-content {
    flex: 1;
}

.whatsapp-content h4 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: white;
}

.whatsapp-content p {
    margin: 10px 0;
    line-height: 1.6;
    font-size: 15px;
    color: #f0f0f0;
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: white;
    color: #25D366;
    font-weight: bold;
    font-size: 16px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.whatsapp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: #128C7E;
}

.whatsapp-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.whatsapp-note {
    font-size: 13px;
    font-style: italic;
    color: #e0e0e0;
    margin-top: 15px;
}

/* ==================== FOOTER ==================== */
.stampile-footer {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 20px;
    border-top: 3px solid #378816;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    z-index: 100;
}

@media (max-width: 768px) {
    .stampile-footer {
        flex-direction: column;
    }
}

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

.price-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 600;
}

.price-value {
    font-size: 32px;
    font-weight: bold;
    color: #378816;
}

.stampile-btn-primary,
#add-to-cart-btn {
    padding: 15px 40px !important;
    background: linear-gradient(135deg, #378816 0%, #5cb85c 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 15px rgba(55, 136, 22, 0.3) !important;
}

.stampile-btn-primary:hover,
#add-to-cart-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(55, 136, 22, 0.4) !important;
    background: linear-gradient(135deg, #2d7012 0%, #4ca34c 100%) !important;
    color: white !important;
}

.stampile-btn-primary:active,
#add-to-cart-btn:active {
    transform: translateY(0) !important;
}

/* ==================== LOADER ==================== */
.stampile-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9999;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #378816;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stampile-loader p {
    color: white;
    font-size: 18px;
    font-weight: bold;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .stampile-personalizator-wrapper {
        padding: 10px;
    }

    .stampile-step {
        padding: 20px;
    }

    .stampile-step-title {
        font-size: 20px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

/* ==================== SELECTOR TIP STAMPILA ==================== */
.stampile-type-selector {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.stampile-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 700px;
    margin: 0 auto;
}

.stampile-type-card {
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    padding: 40px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
    position: relative;
    z-index: 2;
}

.stampile-type-card:hover {
    border-color: #9C27B0;
    box-shadow: 0 10px 30px rgba(156, 39, 176, 0.2);
    transform: translateY(-5px);
}

.stampile-type-card.active {
    border-color: #9C27B0;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    box-shadow: 0 10px 30px rgba(156, 39, 176, 0.3);
}

.stampile-type-icon {
    margin-bottom: 20px;
}

.stampile-type-icon svg {
    display: inline-block;
}

.stampile-type-card h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: #2c3e50;
}

.stampile-type-card p {
    margin: 0 0 15px 0;
    color: #7f8c8d;
    font-size: 14px;
}

.stampile-type-price {
    display: inline-block;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
}

.stampile-back-to-selector {
    display: block;
    margin: 30px auto 20px;
    padding: 15px 30px;
    background: #9C27B0;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.stampile-back-to-selector:hover {
    background: #7B1FA2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.4);
}

.stampile-circular-inline-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.stampile-circular-inline-wrapper .stampile-circular-container {
    display: none;
}

.stampile-circular-inline-wrapper .stampile-circular-modal {
    display: block !important;
    position: relative;
    background: transparent;
}

.stampile-circular-inline-wrapper .stampile-circular-overlay {
    display: none;
}

.stampile-circular-inline-wrapper .stampile-circular-content {
    position: relative;
    max-width: 100%;
    max-height: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.stampile-circular-inline-wrapper .stampile-circular-close {
    display: none;
}

.stampile-circular-inline-wrapper .btn-primary,
.stampile-circular-inline-wrapper #btn-next {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%) !important;
    color: #ffffff !important;
}

.stampile-circular-inline-wrapper .btn-primary:hover,
.stampile-circular-inline-wrapper #btn-next:hover {
    color: #ffffff !important;
}

body.page-id-6088 #content,
body.page-id-6088 .site-main,
body.page-id-6088 .page-content,
body.page-id-6088 .stampile-type-selector,
body.page-id-6088 #personalizator-dreptunghiular,
body.page-id-6088 #personalizator-circular {
    position: relative;
    z-index: 20;
}

body.page-id-6088 .stampile-type-card {
    pointer-events: auto;
    touch-action: manipulation;
}

body.page-id-6088 .elementor-location-footer .elementor-element-72a967e,
body.page-id-6088 .elementor-location-footer .elementor-custom-embed,
body.page-id-6088 .elementor-location-footer .elementor-element-72a967e iframe {
    pointer-events: none !important;
}

body.page-id-6088 .elementor-location-footer .elementor-element-72a967e {
    display: none !important;
}

@media (max-width: 768px) {
    .stampile-type-selector {
        padding: 20px 10px;
    }

    .stampile-type-grid {
        gap: 20px;
    }

    .stampile-type-card {
        padding: 30px 20px;
    }

    .stampile-type-card h3 {
        font-size: 18px;
    }
}

/* ==================== EDITOR ONLINE DREPTUNGHIULAR ==================== */
#personalizator-dreptunghiular {
    --stampile-accent: #378816;
    --stampile-accent-dark: #2d7012;
    --stampile-border: #d9e0e6;
    --stampile-muted: #64707d;
    --stampile-panel: #ffffff;
    --stampile-soft: #f6f8f6;
}

#personalizator-dreptunghiular.stampile-personalizator-wrapper,
.stampile-type-selector {
    width: min(1200px, calc(100% - 24px));
}

.stampile-type-selector {
    margin-top: 24px;
}

.stampile-type-grid {
    max-width: 860px;
}

.stampile-type-card,
.dimensiune-card,
.tip-card,
.culoare-option,
.optiune-group,
.canvas-container,
.preview-final-wrapper,
.text-inputs-wrapper {
    border-radius: 8px;
}

.stampile-type-card {
    border-width: 1px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.stampile-type-card:hover,
.stampile-type-card.active {
    border-color: #378816;
    box-shadow: 0 12px 32px rgba(55, 136, 22, 0.16);
}

.stampile-type-card.active {
    background: #f4faf1;
}

.stampile-type-card.active .stampile-type-price,
.stampile-type-price {
    background: #378816;
}

#personalizator-dreptunghiular .stampile-step {
    border: 1px solid var(--stampile-border);
    border-radius: 8px;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

#personalizator-dreptunghiular .stampile-step.is-complete {
    border-color: rgba(55, 136, 22, 0.35);
}

#personalizator-dreptunghiular .stampile-step-title {
    font-size: 22px;
    letter-spacing: 0;
}

#personalizator-dreptunghiular .step-number {
    background: var(--stampile-accent);
}

#personalizator-dreptunghiular .stampile-dimensiuni-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

#personalizator-dreptunghiular .dimensiune-card,
#personalizator-dreptunghiular .tip-card,
#personalizator-dreptunghiular .culoare-option {
    border-width: 1px;
    background: #fff;
    box-shadow: none;
}

#personalizator-dreptunghiular .dimensiune-card:hover,
#personalizator-dreptunghiular .tip-card:hover,
#personalizator-dreptunghiular .culoare-option:hover {
    border-color: var(--stampile-accent);
    box-shadow: 0 10px 24px rgba(55, 136, 22, 0.12);
    transform: translateY(-2px);
}

#personalizator-dreptunghiular .dimensiune-card.active,
#personalizator-dreptunghiular .tip-card.active,
#personalizator-dreptunghiular .culoare-option.active {
    border-color: var(--stampile-accent);
    background: #f4faf1;
    box-shadow: 0 10px 24px rgba(55, 136, 22, 0.14);
}

#personalizator-dreptunghiular .dimensiune-image img,
#personalizator-dreptunghiular .tip-image img {
    max-height: 112px;
    object-fit: contain;
}

#personalizator-dreptunghiular .stampile-text-container {
    grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
    align-items: start;
}

#personalizator-dreptunghiular .preview-wrapper {
    position: sticky;
    top: 24px;
}

#personalizator-dreptunghiular .text-inputs-wrapper,
#personalizator-dreptunghiular .optiune-group,
#personalizator-dreptunghiular .canvas-container,
#personalizator-dreptunghiular .preview-final-wrapper {
    background: var(--stampile-soft);
    border: 1px solid var(--stampile-border);
}

#personalizator-dreptunghiular .text-input-group {
    position: relative;
    gap: 6px;
}

#personalizator-dreptunghiular .text-input-group input {
    padding-right: 68px;
    border-width: 1px;
}

#personalizator-dreptunghiular .text-counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    color: var(--stampile-muted);
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

#personalizator-dreptunghiular .text-help {
    background: #eef7ea;
    border-left-color: var(--stampile-accent);
}

#personalizator-dreptunghiular .stampile-tipuri-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

#personalizator-dreptunghiular .tip-card {
    padding: 20px;
}

#personalizator-dreptunghiular .culori-grid {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

#personalizator-dreptunghiular .culoare-swatch {
    width: 44px;
    height: 44px;
}

#personalizator-dreptunghiular .accesory-checkbox {
    border-width: 1px;
}

#personalizator-dreptunghiular .stampile-info-whatsapp {
    background: #1f7a52;
    box-shadow: 0 10px 32px rgba(31, 122, 82, 0.18);
}

#personalizator-dreptunghiular .stampile-footer {
    width: min(1200px, calc(100% - 24px));
    margin: 0 auto;
    border: 1px solid var(--stampile-border);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.stampile-footer-main {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.stampile-summary-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #d9e0e6;
    border-radius: 6px;
    background: #f7f9fb;
    color: #202a33;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.stampile-config-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    gap: 8px;
    min-width: 0;
    color: #202a33;
    font-size: 13px;
}

.stampile-config-summary span {
    min-width: 0;
    padding: 8px 10px;
    background: #f7f9fb;
    border: 1px solid #e1e6eb;
    border-radius: 6px;
    overflow-wrap: anywhere;
}

.stampile-config-summary strong {
    display: block;
    color: #68737e;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.stampile-footer-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.stampile-validation-message {
    max-width: 220px;
    margin: 0;
    color: #9f3412;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

#add-to-cart-btn[disabled],
#add-to-cart-btn[aria-disabled="true"] {
    cursor: not-allowed !important;
    opacity: 0.55;
    transform: none !important;
    box-shadow: none !important;
}

@media (max-width: 980px) {
    #personalizator-dreptunghiular .stampile-text-container {
        grid-template-columns: 1fr;
    }

    #personalizator-dreptunghiular .preview-wrapper {
        position: static;
    }

    #personalizator-dreptunghiular .stampile-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .stampile-footer-main,
    .stampile-footer-actions {
        width: 100%;
        margin-left: 0;
    }

    .stampile-config-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stampile-footer-actions {
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    #personalizator-dreptunghiular.stampile-personalizator-wrapper,
    .stampile-type-selector {
        width: min(100%, calc(100% - 16px));
        padding-left: 8px;
        padding-right: 8px;
    }

    #personalizator-dreptunghiular .stampile-step {
        padding: 16px;
    }

    #personalizator-dreptunghiular .stampile-dimensiuni-grid,
    #personalizator-dreptunghiular .stampile-tipuri-grid,
    #personalizator-dreptunghiular .culori-grid {
        grid-template-columns: 1fr;
    }

    .stampile-footer-main,
    .stampile-footer-actions {
        flex-direction: row;
        align-items: center;
    }

    .stampile-config-summary {
        grid-template-columns: 1fr;
    }

    .stampile-validation-message {
        max-width: none;
    }

    #add-to-cart-btn {
        width: 100%;
    }

    #personalizator-dreptunghiular .stampile-footer {
        padding: 10px;
        gap: 8px;
        max-height: 34vh;
        overflow-y: auto;
    }

    #personalizator-dreptunghiular .stampile-footer-main {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    #personalizator-dreptunghiular .price-display {
        min-width: 0;
    }

    #personalizator-dreptunghiular .price-value {
        font-size: 22px;
        line-height: 1.1;
    }

    .stampile-summary-toggle {
        display: inline-flex;
    }

    #personalizator-dreptunghiular .stampile-config-summary,
    #personalizator-dreptunghiular .stampile-validation-message {
        display: none;
        grid-column: 1 / -1;
    }

    #personalizator-dreptunghiular .stampile-footer.is-summary-open .stampile-config-summary {
        display: grid;
    }

    #personalizator-dreptunghiular .stampile-footer.is-summary-open .stampile-validation-message {
        display: block;
    }

    #personalizator-dreptunghiular .stampile-footer-actions {
        gap: 8px;
    }
}
