/* ========================================
   DEFAULT CHECKOUT THEME CSS
   ======================================== */


/* Font Family Variables */

:root {
    --page-font-family: var(--theme-font-family, 'Open Sans, sans-serif');
}

body,
input,
button,
select,
textarea,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
a,
li {
    font-family: var(--page-font-family) !important;
}


/* Color Variables - Dynamic PHP injection will be handled in the theme loader */

:root {
    --primary: var(--theme-primary, #3B82F6);
    --secondary: var(--theme-secondary, #10B981);
    --icon-bg-color: var(--theme-icon-bg-color, #000000);
    --background: var(--theme-background, #FFFFFF);
    --text: var(--theme-text, #1F2937);
    /* Calculated Colors */
    --button-hover: var(--theme-button-hover);
    --border-color: var(--theme-border-color);
    --primary-rgb: var(--theme-primary-rgb);
    --secondary-rgb: var(--theme-secondary-rgb);
    --text-rgb: var(--theme-text-rgb);
    --text-hover: var(--theme-text-hover);
    --card-background: var(--theme-card-background);
    --input-background: var(--theme-input-background);
    /* Fixed Colors */
    --error: #EF4444;
    --success: #10B981;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
}


/* Base Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}


/* Container */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}


/* Header */

.checkout-header {
    padding: 1.5rem 0;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

.checkout-header img {
    width: var(--theme-header-width, 180px);
    height: auto;
    max-height: 120px;
    border-radius: 4px;
}

.checkout-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

/* Header Image Layout - Logo à esquerda, Secure à direita */
.header-image-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 1rem;
    gap: 1rem;
    min-width: 0; /* Permite que os filhos encolham */
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Logo não encolhe, tem prioridade */
    min-width: 0;
}

.header-left img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
    flex-shrink: 1; /* Pode encolher se necessário */
    min-width: 0;
    flex-basis: auto;
}

.secure-badge-img {
    width: 100%;
    max-width: 100%;
    height: 60px !important;
    max-height: 60px !important;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    display: block;
    flex-shrink: 1;
    min-width: 0;
}

.secure-badge-img svg {
    width: 100%;
    height: 100%;
    max-height: 60px;
    max-width: 210px;
    display: block;
}

.secure-badge-img:hover {
    opacity: 1;
}


/* Layout */

.checkout-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .checkout-layout {
        flex-direction: row;
    }
}

.checkout-main {
    flex: 1;
}

@media (min-width: 768px) {
    .checkout-main {
        min-width: 400px;
    }
}

.checkout-sidebar {
    width: 100%;
}

@media (min-width: 768px) {
    .checkout-sidebar {
        width: 380px;
        min-width: 240px;
    }
}


/* Typography */

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    color: var(--primary);
}

.section-title i {
    margin-right: 0.5rem;
}


/* Cards */

.card {
    background-color: var(--card-background);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}


/* Forms */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--input-background);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--secondary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(var(--secondary-rgb), 0.1);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
    min-width: 0;
}


/* Buttons */

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    color: white;
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-primary:hover {
    background-color: var(--button-hover);
    border-color: var(--button-hover);
}

.btn-block {
    display: block;
    width: 100%;
}


/* Section Divider */

.section-divider {
    height: 1px;
    background-color: var(--gray-200);
    margin: 1rem 0 1.5rem 0;
}

/* Product Card */

.product-card {
    padding: 0;
}

.product-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.375rem;
    flex-shrink: 0;
}

.product-name {
    flex: 1;
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
    word-wrap: break-word;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.product-mini-description {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-style: italic;
    line-height: 1.2;
}

/* Order Bump Mini Description - mesmo estilo da mini-descrição do produto */
.order-bump-mini-description {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-style: italic;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    text-align: center;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    flex-shrink: 0;
}

/* Preço no header (quando quantidade está escondida) */
.product-price-header {
    margin-left: auto;
    align-self: flex-start;
}

.price-original {
    text-decoration: line-through;
    color: var(--gray-400) !important;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.price-current {
    color: var(--theme-price-color);
    font-weight: 600;
    font-size: 1rem;
}


/* Quantity Controls - Unified Component */

.product-quantity-group {
    display: flex;
    align-items: center;
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    height: 36px;
}

.quantity-btn {
    width: 36px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background-color: rgba(var(--text-rgb), 0.1);
    color: var(--text-hover);
}

.quantity-minus {
    border-right: 1px solid var(--border-color);
}

.quantity-plus {
    border-left: 1px solid var(--border-color);
}

.quantity-input {
    width: 50px;
    height: 34px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
}


/* Summary */

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.summary-row span:last-child {
    color: var(--theme-price-color);
}

.summary-row.total {
    font-weight: 600;
    font-size: 1.125rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}


/* Coupon */

.coupon-form {
    display: flex;
    margin-bottom: 1rem;
}

.coupon-form input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.coupon-form button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.coupon-form button:hover {
    background-color: var(--button-hover);
    border-color: var(--button-hover);
}


/* Coupon Toggle */

.coupon-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.coupon-toggle:hover {
    background-color: rgba(var(--text-rgb), 0.1);
    color: var(--text-hover);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.coupon-toggle i.fa-chevron-down {
    transition: transform 0.2s ease;
}

.coupon-toggle.open i.fa-chevron-down {
    transform: rotate(180deg);
}


/* Payment Methods */

.payment-methods {
    margin-bottom: 1.5rem;
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out;
}

.payment-method:hover {
    border-color: var(--secondary);
}

.payment-method.active {
    border-color: var(--secondary);
    background-color: rgba(var(--secondary-rgb), 0.05);
}

.payment-method-radio {
    margin-right: 1rem;
}

.payment-method-info {
    flex: 1;
}

.payment-method-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--gray-600);
}

.payment-method-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
}

.payment-icons {
    display: flex;
}

.payment-icon {
    width: 32px;
    height: 20px;
    background-color: var(--gray-100);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Credit Card Fields */

#credit-card-fields {
    background-color: rgba(var(--secondary-rgb), 0.02);
    border: 1px solid rgba(var(--secondary-rgb), 0.1);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

#credit-card-fields .form-group label {
    color: var(--text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

#credit-card-fields .form-group input {
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#credit-card-fields .form-group input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(var(--secondary-rgb), 0.2);
}

#credit-card-fields .form-group input.show-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

#credit-card-fields .form-group input.show-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}


/* Credit Card Responsive */

@media (max-width: 768px) {
    #credit-card-fields {
        padding: 1rem;
    }
    #credit-card-fields .form-row {
        flex-direction: column;
    }
    #credit-card-fields .form-row .form-group {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    #credit-card-fields .form-row .form-group:last-child {
        margin-bottom: 0;
    }
}


/* Alerts */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}


/* PIX Container */

.pix-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
}

.pix-qrcode {
    width: 200px;
    height: 200px;
    margin-bottom: 1.5rem;
}

.pix-code-container {
    width: 100%;
    position: relative;
    margin-bottom: 1.5rem;
}

.pix-code {
    width: 100%;
    padding-right: 3rem;
}

.copy-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
}


/* Footer */

.checkout-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: auto;
    border-top: 1px solid var(--gray-200);
}

.footer-text {
    margin-bottom: 1.5rem;
}

.footer-text.hidden {
    display: none;
}

.security-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.security-badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.security-badge-item i {
    font-size: 0.9rem;
    color: var(--text);
}

.security-badge-item span {
    font-size: 0.75rem;
    color: var(--text);
    font-weight: 500;
}

.checkout-disclaimer {
    margin-top: 2rem;
    font-size: 0.7rem;
    color: var(--gray-500);
    text-align: center;
    line-height: 1.4;
}

.checkout-disclaimer a {
    color: var(--gray-600);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.checkout-disclaimer a:hover {
    color: var(--text);
}

.security-badges-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.security-badges-inline .security-badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.security-badges-inline .security-badge-item i {
    font-size: 0.9rem;
    color: var(--text);
}

.security-badges-inline .security-badge-item span {
    font-size: 0.75rem;
    color: var(--text);
    font-weight: 500;
}

@media (max-width: 768px) {
    .security-badges-inline {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .security-badges-inline .security-badge-item {
        flex: 0 0 auto;
        width: auto;
        min-width: calc(50% - 0.375rem);
        justify-content: center;
    }
    
    /* Terceiro badge (Múltiplas opções) centralizado em linha própria */
    .security-badges-inline .security-badge-item:nth-child(3) {
        flex-basis: 100%;
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .security-badges-inline .security-badge-item span {
        font-size: 0.7rem;
    }
    
    .security-badges-inline .security-badge-item i {
        font-size: 0.85rem;
    }
    
    .security-badges-inline {
        gap: 0.5rem;
    }
}

@media (max-width: 360px) {
    .security-badges-inline .security-badge-item span {
        font-size: 0.68rem;
    }
    
    .security-badges-inline .security-badge-item i {
        font-size: 0.8rem;
    }
    
    .security-badges-inline {
        gap: 0.4rem;
    }
}

@media (max-width: 768px) {
    .security-badges {
        gap: 1rem;
        margin-top: 0.25rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .security-badge-item {
        flex: 0 0 auto;
        width: auto;
    }
    
    .security-badge-item:first-child,
    .security-badge-item:nth-child(2) {
        flex: 0 0 auto;
    }
    
    .security-badge-item:last-child {
        flex-basis: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .security-badge-item i {
        font-size: 0.85rem;
    }
    
    .security-badge-item span {
        font-size: 0.7rem;
    }
    
    .checkout-disclaimer {
        margin-top: 1.5rem;
        font-size: 0.65rem;
    }
}


/* Animations */

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

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}


/* Notification Banner */

.notification-banner {
    background-color: var(--primary);
    color: white;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.875rem;
}


/* Responsive Adjustments */

@media (max-width: 767px) {
    .checkout-header {
        padding: 1rem 0;
    }
    
    /* Header Image Layout Mobile */
    .header-image-layout {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }
    
    .secure-badge-img {
        height: 45px !important;
        max-height: 45px !important;
    }
    
    .secure-badge-img svg {
        max-height: 45px;
        max-width: 170px;
    }
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    .section-title {
        font-size: 1rem;
    }
    
    /* Product Card Mobile */
    .product-header {
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .product-image {
        width: 70px;
        height: 70px;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
    
    .product-mini-description {
        font-size: 0.8rem;
    }
    
    .product-footer {
        /* Manter flexbox horizontal no mobile */
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
    
    .product-quantity-group {
        height: 32px;
        flex-shrink: 0;
    }
    
    .quantity-btn {
        width: 32px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .quantity-input {
        width: 45px;
        height: 30px;
        font-size: 0.85rem;
    }
    
    .product-price {
        align-items: flex-end;
        flex-shrink: 0;
    }
    
    /* Preço no header - mobile */
    .product-price-header {
        align-items: flex-end;
        margin-left: auto;
    }
    
    .price-current {
        font-size: 0.95rem;
    }
    
    .price-original {
        font-size: 0.8rem;
    }
}


/* Order Bump Styles */

.order-bump-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.order-bump-option {
    flex: 1;
    min-width: 120px;
    max-width: 180px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.order-bump-option:hover {
    border-color: var(--secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-bump-option.selected {
    background-color: rgba(var(--secondary-rgb), 0.2);
    border-color: var(--secondary);
}

.order-bump-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.order-bump-image {
    width: 100px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 6px;
    border-radius: 4px;
}

.order-bump-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.order-bump-price {
    font-size: 17px;
    font-weight: 600;
    color: var(--theme-price-color);
}


/* Order Bump Responsive */

@media (max-width: 480px) {
    .order-bump-options {
        flex-direction: column;
        align-items: center;
    }
    .order-bump-option {
        width: 100%;
        max-width: 100%;
    }
}


/* Grid Layout for Order Bumps */

.grid-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
}

@media (min-width: 600px) {
    .grid-container {
        grid-template-columns: repeat(1, 1fr);
    }
    .checkout-main:not(.order-bumps-only) .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .checkout-main.order-bumps-only .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .checkout-main:not(.order-bumps-only) .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
    .checkout-main.order-bumps-only .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Grid Item Styles */

.grid-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.grid-item-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.grid-item-content {
    padding: 15px;
}

.grid-item-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.grid-item-price {
    font-weight: 700;
    color: var(--theme-price-color);
    margin-bottom: 10px;
}

.grid-item-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 15px;
}


/* Form Validation Styles */

.form-error {
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.form-control.is-invalid {
    border-color: var(--error);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
    border-color: var(--success);
}

.invalid-feedback {
    display: none;
    color: var(--error);
    font-size: 0.875em;
    margin-top: 0.25rem;
}

.form-control.is-invalid+.invalid-feedback {
    display: block;
}


/* Order Bumps Only Mode */

@media (min-width: 768px) {
    .checkout-main.order-bumps-only {
        max-width: 80%;
        width: 80%;
        margin: 0 auto;
    }
    .checkout-layout.order-bumps-only {
        flex-direction: column;
        max-width: 80%;
        width: 80%;
        margin: 0 auto;
    }
}


/* Order Bump Item Styles */

.order-bump-item {
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: var(--input-background);
    transition: all 0.3s ease;
    width: 100%;
    cursor: default;
    position: relative;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.order-bump-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin: -0.5rem;
    flex: 1;
}

.order-bump-content:hover {
    background-color: rgba(var(--secondary-rgb), 0.05);
}

.order-bump-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.order-bump-item.selected {
    background-color: rgba(var(--secondary-rgb), 0.2);
    border-color: var(--secondary);
    border-style: dashed;
}

.order-bump-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Order Bump Footer */
.order-bump-footer {
    margin-top: auto;
    margin-bottom: -10px;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
    transition: all 0.2s ease;
    pointer-events: none;
}

.order-bump-footer i {
    font-size: 0.8rem;
    color: var(--gray-400);
    transition: all 0.2s ease;
}

.order-bump-item:hover .order-bump-footer {
    color: var(--secondary);
}

.order-bump-item:hover .order-bump-footer i {
    color: var(--secondary);
    animation: wiggle 0.5s ease-in-out;
}

.order-bump-item.selected .order-bump-footer {
    color: var(--secondary);
    font-weight: 600;
}

.order-bump-item.selected .order-bump-footer i {
    color: var(--secondary);
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}


/* Form Control Validation States */

.form-control.show-invalid {
    border-color: var(--error);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.form-control.show-invalid+.invalid-feedback,
.invalid-feedback.show {
    display: block;
}

.form-control.show-valid {
    border-color: var(--success);
}


/* Price Styling */

.price,
.product-price,
.order-bump-price,
.grid-item-price,
.summary-row span:last-child,
[class*="price"] {
    color: var(--theme-price-color);
}


/* Payment Button States */

.btn-payment {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.btn-payment.loading {
    pointer-events: none !important;
    opacity: 0.9 !important;
    cursor: not-allowed !important;
    background-color: var(--secondary) !important;
    transform: scale(0.98) !important;
}

.btn-payment.loading:hover {
    background-color: var(--secondary) !important;
    transform: scale(0.98) !important;
}

.btn-payment .payment-text {
    transition: opacity 0.25s ease-in-out;
    font-weight: bold;
}

.btn-payment.loading .payment-text {
    opacity: 0 !important;
    font-weight: bold;
}

.btn-payment.blocked {
    animation: blockedShake 0.4s ease-in-out;
}

.btn-payment.btn-validation-error {
    background-color: var(--error) !important;
    transform: scale(0.98);
    animation: validationErrorPulse 2.5s ease-in-out;
}

@keyframes blockedShake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-1px);
    }
    75% {
        transform: translateX(1px);
    }
}

@keyframes validationErrorPulse {
    0% {
        transform: scale(0.98);
    }
    50% {
        transform: scale(1.005);
    }
    100% {
        transform: scale(0.98);
    }
}

.spinner-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-weight: 500;
}

.btn-payment.loading .spinner-container {
    opacity: 1 !important;
    display: flex !important;
}

.spinner-container span {
    color: white !important;
    font-weight: 500 !important;
    margin-left: 0.25rem;
}

.payment-spinner {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    border-right-color: #fff;
    animation: spin 0.8s linear infinite;
}

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


/* Layout Extensions */

.checkout-layout.layout-extended {
    flex-direction: column;
    align-items: center;
}

.checkout-main.main-extended {
    width: 100%;
    max-width: 720px;
}


/* Pulse Button */

.btn-pulse-checkout {
    background: var(--secondary);
    color: #fff;
    font-weight: 700;
    font-size: 1.08rem;
    border: none;
    border-radius: 12px;
    padding: 0.7em 2.2em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.7em;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    position: relative;
    overflow: visible;
    transition: background-color 0.3s ease-in-out;
    z-index: 1;
}

.btn-pulse-checkout:hover {
    background: var(--button-hover);
}

.btn-pulse-checkout::before {
    display: none;
}

@keyframes sonarShadowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--secondary-rgb), 0.3);
        opacity: 0.5;
    }
    70% {
        box-shadow: 0 0 0 8px rgba(var(--secondary-rgb), 0);
        opacity: 0;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--secondary-rgb), 0);
        opacity: 0;
    }
}


/* Order Bump Grid Custom Layouts */

.grid-container.order-bump-single {
    display: flex !important;
    justify-content: center;
    align-items: stretch;
    gap: 32px;
}

.grid-container.order-bump-single .order-bump-item {
    max-width: 340px;
    width: 100%;
    margin: 0 auto;
}

.grid-container.order-bump-double {
    display: flex !important;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    padding-left: 10vw;
    padding-right: 10vw;
}

.grid-container.order-bump-double .order-bump-item {
    flex: 1 1 0;
    max-width: 340px;
    min-width: 220px;
}

@media (max-width: 900px) {
    .grid-container.order-bump-double {
        padding-left: 2vw;
        padding-right: 2vw;
        gap: 18px;
    }
}

@media (max-width: 600px) {
    .grid-container.order-bump-single,
    .grid-container.order-bump-double {
        flex-direction: column !important;
        align-items: center;
        padding-left: 0;
        padding-right: 0;
        gap: 18px;
    }
    .grid-container.order-bump-double .order-bump-item,
    .grid-container.order-bump-single .order-bump-item {
        max-width: 98vw;
        min-width: 0;
    }
}


/* Percentage Off Label */

.percent-off-label {
    position: absolute;
    bottom: -1em;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 16px;
    padding: 0.22em 1.3em;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

@media (max-width: 376px) {
    .percent-off-label {
        bottom: -1.5em;
        padding: 0.1em 1.3em;
    }
}


/* Total Payment Highlights */

.total-payment-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5em auto;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(var(--secondary-rgb), 0.10), 0 1.5px 6px rgba(0, 0, 0, 0.07);
    padding: 0.7em 2.2em 0.7em 2.2em;
    position: relative;
    min-width: 180px;
    max-width: 320px;
    animation: pulseTotal 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    gap: 0.2em;
}

.total-label {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.1em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}

.total-value-highlight {
    color: #fff;
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.13);
    margin-bottom: 0.1em;
    margin-top: 0.1em;
    display: block;
    transition: color 0.2s;
}

.total-icon {
    color: #fff;
    font-size: 1.3rem;
    margin-top: 0.1em;
    opacity: 0.85;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.10));
    animation: coinBounce 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 600px) {
    .total-payment-highlight {
        padding: 0.6em 1.1em;
        min-width: 120px;
        max-width: 98vw;
    }
    .total-value-highlight {
        font-size: 1.3rem;
    }
    .total-label {
        font-size: 0.95rem;
    }
    .total-icon {
        font-size: 1.1rem;
    }
}


/* Total Payment Inline */

.total-payment-inline {
    display: flex;
    align-items: center;
    gap: 0.7em;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(var(--secondary-rgb), 0.10), 0 1px 4px rgba(0, 0, 0, 0.07);
    padding: 0.35em 1.2em 0.35em 1.2em;
    min-width: 120px;
    max-width: 260px;
    animation: pulseTotalInline 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    margin-left: auto;
    margin-top: 0;
    margin-bottom: 0;
}

.total-value-inline {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.13);
    margin: 0 0.1em;
    display: block;
    transition: color 0.2s;
}

.total-icon-inline {
    color: #fff;
    font-size: 1.1rem;
    margin-left: 0.2em;
    opacity: 0.85;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.10));
    animation: coinBounceInline 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 600px) {
    .total-payment-inline {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        margin: 0.5em auto 0.5em auto;
        min-width: 90px;
        max-width: 98vw;
        width: 100%;
        position: relative;
    }
    .payment-header-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.2em !important;
    }
    .section-title {
        order: 1;
        justify-content: flex-start !important;
        width: 100%;
        text-align: left !important;
    }
}


/* ========================================
   ERROR OVERLAY STYLES (Conditional)
   ======================================== */

#checkout-blur-content {
    filter: blur(3px) grayscale(0.2);
    pointer-events: none;
    user-select: none;
}

.checkout-error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.97);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-error-modal,
.checkout-warning-modal {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 68px 32px 56px 32px;
    max-width: 95vw;
    width: 100%;
    max-width: 420px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

/* Modal de aviso (produto não selecionado) - mais amigável */
.checkout-warning-modal {
    border: 2px solid var(--gray-400, #9CA3AF);
}

.checkout-warning-modal .checkout-error-icon .fa-shopping-cart {
    color: var(--gray-600, #4B5563);
    animation: gentleBounce 2s ease-in-out infinite;
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.checkout-error-modal .icon {
    font-size: 3.5rem;
    color: #F7D44C;
    margin-bottom: 8px;
}

.checkout-error-modal h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.5rem;
}

.checkout-error-modal p {
    color: #555;
    font-size: 1.08rem;
    margin-bottom: 1.2rem;
}

.checkout-error-modal .try-again {
    background: #f3f4f6;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid #d1d5db;
    padding: 0.55rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    margin-top: -0.8rem;
    margin-bottom: 0.5rem;
}

.checkout-error-modal .try-again:hover {
    background: #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

@media (max-width: 600px) {
    .checkout-error-modal {
        padding: 32px 8vw 24px 8vw;
    }
}


/* ========================================
   ADDRESS SECTION STYLES
   ======================================== */

/* Address specific styles */
.address-loading {
    position: relative;
}

.address-loading::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--gray-300);
    border-top: 2px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Campo Cidade - Visual bloqueado com película opaca */
.form-group:has(#cidade) {
    position: relative;
}

.form-group:has(#cidade)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(0, 0, 0, 0.02) 50%,
        rgba(255, 255, 255, 0.05) 75%,
        rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(0.5px);
    border-radius: 0.375rem;
    pointer-events: none;
    z-index: 2;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.form-group:has(#cidade):hover::after {
    opacity: 0.4;
    backdrop-filter: blur(0.3px);
}

#cidade {
    position: relative;
    background: var(--theme-input-background) !important;
    color: rgba(var(--theme-text-rgb), 0.6) !important;
    cursor: not-allowed !important;
    user-select: none;
    filter: grayscale(0.3) brightness(0.95);
    transition: all 0.3s ease;
    z-index: 1;
}

#cidade:focus {
    border-color: var(--theme-border-color) !important;
    box-shadow: 0 0 0 2px rgba(var(--theme-border-color), 0.06) !important;
    filter: grayscale(0.2) brightness(0.97);
}

#cidade::placeholder {
    color: rgba(var(--theme-text-rgb), 0.35) !important;
}

/* Label da cidade com indicador profissional */
label[for="cidade"] {
    position: relative;
    color: rgba(var(--theme-text-rgb), 0.7);
    font-weight: 500;
}

label[for="cidade"]::after {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(var(--theme-text-rgb), 0.45);
    font-style: italic;
}

.form-control[readonly] {
    background-color: var(--gray-100);
    color: var(--gray-600);
    cursor: default;
}

.form-control[readonly]:focus {
    background-color: var(--gray-100);
    border-color: var(--border-color);
    box-shadow: none;
}

/* Address error states */
.address-error {
    border-color: var(--error) !important;
    background-color: rgba(239, 68, 68, 0.05);
}

.address-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Address success states */
.address-success {
    border-color: var(--success) !important;
    background-color: rgba(16, 185, 129, 0.05);
}

.address-success:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* CEP field specific styling */
#cep {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* State select styling */
#estado {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

/* Address validation messages */
.address-feedback {
    display: none;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.address-feedback.show {
    display: block;
}

.address-feedback.error {
    color: var(--error);
}

.address-feedback.success {
    color: var(--success);
}

.address-feedback.info {
    color: var(--primary);
}

/* Responsive adjustments for address form */
@media (max-width: 767px) {
    .form-row {
        flex-direction: column;
    }
    
    /* Exceção: CEP/Número e Cidade/Estado devem ficar lado a lado no mobile */
    .form-row.cep-numero-row,
    .form-row.cidade-estado-row {
        flex-direction: row !important;
        gap: 0.75rem;
    }
    
    .form-row.cep-numero-row .form-group,
    .form-row.cidade-estado-row .form-group {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    /* CEP maior (60%), Número menor (40%) */
    .form-row.cep-numero-row .form-group:first-child {
        flex: 3;
    }
    
    .form-row.cep-numero-row .form-group:last-child {
        flex: 2;
    }
    
    /* Cidade e Estado com tamanhos iguais */
    .form-row.cidade-estado-row .form-group {
        flex: 1;
    }
    
    /* Ajustar barra de pesquisa do dropdown no mobile */
    .form-row.cidade-estado-row .custom-select-search {
        padding: 6px 8px; /* Reduzido para 6px top/bottom, 8px left/right no mobile */
    }
    
    .form-row .form-group {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}


/* ========================================
   LANDING PAGE PRODUCT STYLES (Conditional)
   ======================================== */

.produto-descricao h1 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5em;
}

.produto-descricao h2 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.4em;
}

.produto-descricao h3 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.3em;
}

.produto-descricao span {
    color: #444;
    font-style: inherit;
}

.produto-descricao div {
    margin-bottom: 0.5em;
}

.produto-descricao ul,
.produto-descricao ol {
    margin-left: 1.2em;
    margin-bottom: 0.5em;
}

.produto-descricao li {
    margin-bottom: 0.2em;
}

.produto-descricao a {
    text-decoration: underline;
    word-break: break-all;
}

.produto-descricao p {
    margin-bottom: 0.5em;
}

.produto-descricao .ql-align-center {
    text-align: center;
}

.produto-descricao .ql-align-right {
    text-align: right;
}

.produto-descricao .ql-align-justify {
    text-align: justify;
}

.produto-descricao .ql-align-left {
    text-align: left;
}

.percent-desconto-label {
    display: inline-block;
    background: var(--theme-price-color);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 12px;
    padding: 0.18em 0.7em;
    margin-left: 0.5em;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    vertical-align: middle;
}

.product-landing-image-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 1.5rem auto;
    aspect-ratio: 4 / 3;
    transition: transform 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-landing-image-container:hover {
    transform: translateY(-4px);
}

.product-landing-image-container img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px !important;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
    transition: filter 0.3s ease-in-out;
}

.product-landing-image-container:hover img {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.12));
}

/* === BANNER FULL-WIDTH STYLES === */
.checkout-banner {
    width: 100%;
    margin: 0.1rem 0 2rem 0;
    padding: 0;
    background: transparent;
    overflow: hidden;
    border-radius: 12px;
}

.banner-image {
    width: 100%;
    height: auto;
    min-height: 160px;
    max-height: 280px;
    object-fit: cover;
    object-position: center center;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 12px;
}

/* Banner estático - sem hover */

/* Responsividade melhorada */
@media (max-width: 1200px) {
    .banner-image {
        max-height: 350px;
        min-height: 180px;
    }
}

@media (max-width: 768px) {
    .checkout-banner {
        margin: 0.1rem 0 1.5rem 0;
        padding: 0 0.25rem;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        border-radius: 0;
    }
    
    .banner-image {
        max-height: 200px;
        min-height: 120px;
    }
    
    .banner-image:hover {
        transform: none; /* Desabilitar hover em mobile */
    }
}

@media (max-width: 480px) {
    .checkout-banner {
        margin: 0.1rem 0 1rem 0;
        padding: 0 0.25rem;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        border-radius: 0;
    }
    
    .banner-image {
        max-height: 150px;
        min-height: 100px;
    }
}

@media (max-width: 320px) {
    .banner-image {
        max-height: 150px;
        min-height: 100px;
    }
}

/* ========================================
   SCARCITY TIMER STYLES - MOBILE FIRST (NO FLASH)
   ======================================== */

.scarcity-timer-container {
    transition: all 0.3s ease;
    
    /* MOBILE FIRST: Começar com fixed para evitar flash */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

/* DESKTOP: Sobrescrever para posição natural */
@media (min-width: 769px) {
    .scarcity-timer-container {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        z-index: auto;
        margin: 1rem 0;
        padding: 0;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
    }
}

.scarcity-timer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--timer-bg-color);
    color: var(--timer-text-color);
    padding: 1.2rem 1.8rem;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-height: 60px;
    width: 100%;
}

/* Telas muito pequenas (iPhone X, etc) - mais espaçamento */
@media (max-width: 390px) {
    .scarcity-timer-content {
        padding: 1.4rem 1.2rem;
        gap: 0.8rem;
        min-height: 65px;
    }
}

/* Telas ultra-pequenas (iPhone 5, etc) - máximo espaçamento */
@media (max-width: 320px) {
    .scarcity-timer-content {
        padding: 1.5rem 0.8rem;
        gap: 0.6rem;
        min-height: 70px;
    }
}

/* Desktop: padding e tamanho maior */
@media (min-width: 769px) {
    .scarcity-timer-content {
        padding: 1.6rem 2.4rem;
        gap: 1.5rem;
        min-height: 80px;
        border-radius: 6px;
    }
}

.scarcity-timer-content::before {
    display: none;
}

/* Container do tempo - agora centralizado */
.timer-countdown-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Telas ultra-pequenas (iPhone 5) - gap menor */
@media (max-width: 320px) {
    .timer-countdown-group {
        gap: 0.5rem;
    }
}

.timer-countdown {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    text-align: center;
    line-height: 1;
    min-width: auto;
}

/* Telas pequenas - countdown mais compacto */
@media (max-width: 390px) {
    .timer-countdown {
        font-size: 1rem;
        padding: 0.25rem 0.6rem;
    }
}

/* Telas ultra-pequenas (iPhone 5) - countdown super compacto */
@media (max-width: 320px) {
    .timer-countdown {
        font-size: 0.9rem;
        padding: 0.2rem 0.5rem;
        border-radius: 3px;
    }
}

@media (min-width: 769px) {
    .timer-countdown {
        font-size: 1.4rem;
        padding: 0.4rem 1rem;
        border-radius: 6px;
    }
}

.timer-icon {
    font-size: 1rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: inherit;
    animation: clockTick 1.2s ease-in-out infinite;
    transform-origin: center;
}

/* Animação de tique-taque urgente */
@keyframes clockTick {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-8deg) scale(1.05);
    }
    50% {
        transform: rotate(0deg) scale(1);
    }
    75% {
        transform: rotate(8deg) scale(1.05);
    }
}

/* Telas pequenas - ícone ligeiramente menor */
@media (max-width: 390px) {
    .timer-icon {
        font-size: 0.9rem;
    }
}

/* Telas ultra-pequenas (iPhone 5) - ícone compacto */
@media (max-width: 320px) {
    .timer-icon {
        font-size: 0.8rem;
    }
}

@media (min-width: 769px) {
    .timer-icon {
        font-size: 1.5rem;
    }
}

/* Texto centralizado */
.timer-text {
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    flex-shrink: 0;
}

/* Telas pequenas - texto mais compacto */
@media (max-width: 390px) {
    .timer-text {
        font-size: 0.85rem;
        line-height: 1.2;
    }
}

/* Telas ultra-pequenas (iPhone 5) - texto super compacto */
@media (max-width: 320px) {
    .timer-text {
        font-size: 0.75rem;
        line-height: 1.1;
        font-weight: 700;
    }
}

@media (min-width: 769px) {
    .timer-text {
        font-size: 1.1rem;
        font-weight: 700;
    }
}

/* Estado expirado - texto substitui tudo */
.scarcity-timer-content.timer-expired {
    justify-content: center;
}

.scarcity-timer-content.timer-expired .timer-countdown-group {
    display: none;
}

.scarcity-timer-content.timer-expired .timer-text {
    text-align: center;
    flex: none;
    font-size: 1rem;
    animation: timerExpiredPulse 600ms ease-in-out infinite;
}

@media (min-width: 769px) {
    .scarcity-timer-content.timer-expired .timer-text {
        font-size: 1.1rem;
    }
}

@keyframes timerExpiredPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.02);
    }
}

/* Estados especiais - Removidos para manter timer estático */

/* Keyframes removidos - timer agora é completamente estático */

/* Adicionar espaçamento no body quando timer fixed está ativo no mobile */
@media (max-width: 768px) {
    body.scarcity-timer-active {
        padding-top: 70px; /* Espaço apenas para o timer fixed */
    }
    
    /* Header e banner ficam abaixo do timer fixed */
    .checkout-header,
    .checkout-banner {
        position: relative;
        z-index: 999;
    }
}

/* Esconder timer quando estiver desabilitado */
.scarcity-timer-container[data-enabled="false"] {
    display: none;
}

/* ========================================
   TESTIMONIALS SECTION STYLES
   ======================================== */

/* Seção de Depoimentos - Desktop: abaixo do resumo, coluna única */
.testimonials-section {
    margin-top: 1.5rem;
}

/* Modo Landing Page: Carrossel horizontal sempre */
.testimonials-landing-mode {
    margin-top: 0;
    margin-bottom: 1.5rem;
    width: 100%;
}

.testimonials-landing-mode .testimonials-container {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    padding: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) transparent;
    -webkit-overflow-scrolling: touch;
}

.testimonials-landing-mode .testimonials-container::-webkit-scrollbar {
    height: 6px;
}

.testimonials-landing-mode .testimonials-container::-webkit-scrollbar-track {
    background: transparent;
}

.testimonials-landing-mode .testimonials-container::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 3px;
}

.testimonials-landing-mode .testimonial-card {
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
}

/* Posicionamento Centralizado APENAS para Landing Page (desktop) - SEM alterar tamanhos */
.testimonials-landing-mode .testimonials-container.testimonials-single {
    justify-content: center;
    overflow-x: visible !important;
}

.testimonials-landing-mode .testimonials-container.testimonials-double {
    justify-content: center;
    overflow-x: visible !important;
}

/* Posicionamento Centralizado para Mobile (<768px) - APENAS 1 review */
@media (max-width: 767px) {
    /* 1 review: centralizado (sidebar e Landing Page) */
    .testimonials-container.testimonials-single,
    .testimonials-landing-mode .testimonials-container.testimonials-single {
        justify-content: center !important;
        overflow-x: visible !important;
    }
    
    /* 2+ reviews em mobile: scroll normal (remover centralização do LP) */
    .testimonials-landing-mode .testimonials-container.testimonials-double,
    .testimonials-landing-mode .testimonials-container:not(.testimonials-single):not(.testimonials-double) {
        justify-content: flex-start !important;
        overflow-x: auto !important;
    }
}

/* Responsividade do Landing Mode: apenas tamanhos (3+ reviews) */
@media (max-width: 768px) {
    .testimonials-landing-mode .testimonial-card {
        min-width: 240px;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .testimonials-landing-mode .testimonial-card {
        min-width: 260px;
        max-width: 280px;
    }
}

.testimonials-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0;
}

/* Card de Depoimento - Desktop */
.testimonial-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.testimonial-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary);
}

/* Header: Aspas + Estrelas */
.testimonial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.testimonial-quote {
    font-size: 1.5rem;
    color: var(--secondary);
    opacity: 0.3;
}

.testimonial-stars {
    display: flex;
    gap: 0.2rem;
}

.testimonial-stars i {
    font-size: 0.9rem;
    color: #fbbf24;
}

.testimonial-stars .far {
    color: var(--gray-300);
}

/* Texto do Depoimento - Desktop */
.testimonial-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
    flex: 1;
    font-style: italic;
}

/* Rodapé: Avatar + Nome - Desktop */
.testimonial-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.testimonial-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.testimonial-avatar i {
    font-size: 1.1rem;
    color: white;
}

.testimonial-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-author {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* ========================================
   TESTIMONIALS - MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    /* Mobile: Mover depoimentos para cima do resumo */
    .checkout-sidebar {
        display: flex;
        flex-direction: column;
    }
    
    /* Forçar ordem: depoimentos primeiro, depois resumo */
    .testimonials-section {
        order: -1;
        margin-top: 0;
        margin-bottom: 1.5rem;
        width: 100%;
    }
    
    /* Carrossel horizontal - transformar coluna em linha */
    .testimonials-container {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding: 0.5rem 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--secondary) transparent;
    }
    
    .testimonials-container::-webkit-scrollbar {
        height: 6px;
    }
    
    .testimonials-container::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .testimonials-container::-webkit-scrollbar-thumb {
        background: var(--secondary);
        border-radius: 3px;
    }
    
    .testimonial-card {
        min-width: 280px;
        max-width: 300px;
        flex-shrink: 0;
        scroll-snap-align: start;
        padding: 1.5rem;
    }
    
    .testimonial-quote {
        font-size: 1.75rem;
    }
    
    .testimonial-text {
        font-size: 0.9rem;
    }
    
    .testimonial-avatar {
        width: 40px;
        height: 40px;
    }
    
    .testimonial-avatar i {
        font-size: 1.1rem;
    }
    
    .testimonial-avatar-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .testimonial-author {
        font-size: 0.9rem;
    }
}

/* Telas muito pequenas */
@media (max-width: 480px) {
    .testimonial-card {
        min-width: 260px;
        max-width: 280px;
        padding: 1.25rem;
    }
    
    .testimonial-quote {
        font-size: 1.5rem;
    }
    
    .testimonial-text {
        font-size: 0.85rem;
    }
}

/* ========================================
   RECURRENCE CHECKBOX STYLES
   ======================================== */

/* Estilos base para checkboxes de recorrência */
.recurrence-checkbox-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.75rem 0;
}

.recurrence-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text);
    background: rgba(var(--secondary-rgb), 0.08);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(var(--secondary-rgb), 0.2);
    transition: all 0.2s ease;
    text-align: center;
    user-select: none;
}

.recurrence-checkbox-label:hover {
    background: rgba(var(--secondary-rgb), 0.12);
    border-color: rgba(var(--secondary-rgb), 0.3);
}

/* Checkbox customizado - Estrutura universal para todos os contextos */
.checkbox-custom {
    position: relative;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-background);
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-custom input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
    z-index: 1;
}

.checkbox-checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.checkbox-checkmark i {
    font-size: 10px;
    color: white;
    font-weight: 900;
}

/* Estado checked */
.checkbox-custom input[type="checkbox"]:checked + .checkbox-checkmark {
    opacity: 1;
}

.checkbox-custom:has(input[type="checkbox"]:checked) {
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(var(--secondary-rgb), 0.2);
}

/* Estado checked no label */
.recurrence-checkbox-label:has(input[type="checkbox"]:checked) {
    background: rgba(var(--secondary-rgb), 0.15);
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Checkbox visual universal - para recurrence-section e outros contextos */
.recurrence-checkbox-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.recurrence-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
    z-index: 1;
}

.recurrence-checkbox-visual {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-background);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.recurrence-checkbox-visual i {
    font-size: 12px;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-weight: 900;
}

/* Estados checked para checkbox visual */
.recurrence-checkbox-wrapper input[type="checkbox"]:checked + .recurrence-checkbox-visual {
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(var(--secondary-rgb), 0.2);
}

.recurrence-checkbox-wrapper input[type="checkbox"]:checked + .recurrence-checkbox-visual i {
    opacity: 1;
}

/* Texto de recorrência */
.recurrence-text strong {
    font-weight: 600;
    color: inherit;
}

/* Estilos específicos por contexto */

/* Landing Page */
.recurrence-checkbox-lp {
    margin: 1rem 0;
}

.recurrence-checkbox-lp .recurrence-checkbox-label {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
}

/* Summary/Sidebar */
.recurrence-checkbox-summary {
    margin: 0.75rem 0;
}

.recurrence-checkbox-summary .recurrence-checkbox-label {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background: rgba(var(--secondary-rgb), 0.06);
}

/* Order Bumps */
.recurrence-checkbox-bump {
    margin-top: 0.75rem;
}

.recurrence-checkbox-bump .recurrence-checkbox-label {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background: rgba(var(--secondary-rgb), 0.08);
    border: 2px solid rgba(var(--secondary-rgb), 0.2);
    transition: all 0.3s ease;
}

.recurrence-checkbox-bump .recurrence-checkbox-label:hover {
    background: rgba(var(--secondary-rgb), 0.12);
    border-color: rgba(var(--secondary-rgb), 0.4);
}

.recurrence-checkbox-bump .checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(var(--secondary-rgb), 0.3);
    background: var(--card-background);
}

.recurrence-checkbox-bump .checkbox-custom:has(input[type="checkbox"]:checked) {
    background: var(--secondary);
    border-color: var(--secondary);
}

.recurrence-checkbox-bump .checkbox-checkmark i {
    font-size: 10px;
    font-weight: bold;
}

.recurrence-checkbox-bump .recurrence-checkbox-label:has(input[type="checkbox"]:checked) {
    background: rgba(var(--secondary-rgb), 0.15);
    border-color: var(--secondary);
    color: var(--secondary);
    font-weight: 600;
}

.recurrence-checkbox-bump .recurrence-text strong {
    color: inherit;
}

/* Responsividade */
@media (max-width: 768px) {
    .recurrence-checkbox-label {
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
        gap: 0.4rem;
    }
    
    .recurrence-checkbox-lp .recurrence-checkbox-label {
        font-size: 0.85rem;
        padding: 0.55rem 0.8rem;
    }
    
    .recurrence-checkbox-container {
        margin: 0.5rem 0;
    }
    
    .checkbox-custom {
        width: 14px;
        height: 14px;
    }
    
    .checkbox-checkmark i {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    .recurrence-checkbox-label {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
        gap: 0.3rem;
    }
    
    .recurrence-text {
        text-align: center;
    }
    
    .checkbox-custom {
        width: 12px;
        height: 12px;
    }
    
    .checkbox-checkmark i {
        font-size: 7px;
    }
}

/* ========================================
   RECURRENCE SECTION (SIDEBAR) - ESTILO CUPOM
   ======================================== */

.recurrence-section {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.recurrence-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.recurrence-toggle:hover {
    border-color: var(--secondary);
    background: rgba(var(--secondary-rgb), 0.02);
}

.recurrence-toggle.active {
    border-color: var(--secondary);
    background: rgba(var(--secondary-rgb), 0.05);
}

.recurrence-info {
    padding: 0 1rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: none;
}

.recurrence-info.show {
    display: block;
}