/* Common styles for checkout and thank-you pages */

:root {
    --page-h-padding: 40px;
    --content-max-width: 1100px;
    /* Чёрно-белая палитра */
    --color-bg: #f5f5f5;
    --color-bg-tint: #ebebeb;
    --color-surface: #ffffff;
    --color-border: #ddd;
    --color-border-focus: #000;
    --color-text: #000;
    --color-text-muted: #666;
    --color-primary: #000;
    --color-primary-hover: #333;
    --color-header-bg: #000;
    --color-header-text: #fff;
    --color-accent-bg: rgba(0, 0, 0, 0.06);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: 0.2s ease;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
}

/* Prevent blue tap/focus highlights (mobile + keyboard) */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.12);
}

a {
    color: inherit;
}

a:focus,
button:focus {
    outline: none;
}

a:focus-visible,
button:focus-visible,
.iti__selected-country:focus-visible,
.iti__country:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.header {
    width: 100%;
    padding: 20px 0;
    background: var(--color-header-bg);
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-container {
    max-width: var(--content-max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--page-h-padding);
}

.header-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.header-logo-fallback {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-header-text) !important;
    letter-spacing: -0.02em;
    display: none;
}

.header-logo-container:has(.header-logo[src=""]) .header-logo-fallback,
.header-logo-container .header-logo:not([src]) + .header-logo-fallback {
    display: block;
}

.header-cart {
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-header-text);
}

.header-cart:hover {
    opacity: 0.7;
}

.header-cart-icon {
    width: 24px;
    height: 24px;
    fill: var(--color-header-text);
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 24px 0 48px;
}

    .checkout-layout {
        display: grid;
        width: 100%;
        padding: 0 var(--page-h-padding);
        box-sizing: border-box;
    }
    
    @media(min-width:1000px){
        .checkout-layout {
            padding: 0;
            grid-template-columns: 
                minmax(0, calc((100% - var(--content-max-width)) / 2)) 
                56fr 
                44fr 
                minmax(0, calc((100% - var(--content-max-width)) / 2));
            min-height: calc(100vh - 69px);
        }
        
        .checkout-info {
            grid-column: 2 / 3;
            display: flex;
            justify-content: flex-end;
            border-right: 1px solid var(--color-border);
        }

        .checkout-products {
            grid-column: 3 / 5;
        }
    }

.checkout-info {
    flex: 1;
    display: flex;
    justify-content: center;
}

.checkout-info-container {
    padding: 20px 16px;
    max-width: 630px;
    width: 100%;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: 0 16px;
}

@media(min-width:600px){
    .checkout-info-container {
        padding: 32px 40px;
        margin: 0 24px;
    }
}

@media(min-width:1000px){
    .checkout-info{
        display: flex;
        justify-content: flex-end;
        border-right: 1px solid var(--color-border);
    }
}

.checkout-products {
    flex-shrink: 0;
    background: var(--color-bg-tint);
    align-self: stretch;
}

.products-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: 24px;
    max-width: 473px;
    box-shadow: var(--shadow-md);
}

@media(min-width:600px){
    .products-section {
        padding: 32px;
    }
}

.products-section h2 {
    color: var(--color-text);
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    gap: 15px;
    padding:10px 0px;
}

.product-item:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
}

.product-image-wrapper {
    position: relative;
    width: 66px;
    height: 66px;
    flex-shrink: 0;
}

.product-image {
    width: 66px;
    height: 66px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
}

.product-image-placeholder {
    width: 66px;
    height: 66px;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--color-text-muted);
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
}

.product-image-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    z-index: 1;
    border: 2px solid var(--color-surface);
}

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

.product-name {
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 5px;
}

.product-details {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Атрибуты товара (properties): гравировка, надписи */
.product-properties {
    margin-top: 4px;
    font-size: 13px;
    color: #555;
}
.product-properties .product-property {
    display: block;
    line-height: 1.35;
}
.product-properties .product-property:not(:last-child) {
    margin-bottom: 2px;
}

.product-price {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    margin-left: 15px;
    flex-shrink: 0;
}

.product-quantity {
    color: var(--color-text-muted);
    font-size: 14px;
}

/* Скидка на товар — как в Shopify checkout */
.product-discount-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

.product-discount-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.product-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-left: 15px;
    flex-shrink: 0;
}

.product-original-price {
    font-size: 14px;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.product-final-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--color-border);
}

.total-label {
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text);
}

.total-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.section-title {
    color: var(--color-text);
    font-size: 13px;
    font-weight: 700;
    margin: 32px 0 12px 0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.section-title:first-child{
    margin-top:0;
}

.promo-section {
    margin-top: 15px;
    padding-top: 15px;
}

.promo-section label {
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.promo-input {
    display: flex;
    gap: 10px;
}

.promo-input input {
    flex: 1;
}

.promo-input button {
    width: auto;
    padding: 12px 18px;
    margin-top: 0;
    white-space: nowrap;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
    font-weight: 500;
    font-size: 14px;
}

/* Floating labels (Shopify-like) */
.floating-label-group {
    position: relative;
}

.floating-label-group > label {
    position: absolute;
    left: 16px;
    top: 18px;
    margin: 0;
    padding: 0 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-text-muted);
    background: var(--checkout-bg-color, var(--color-surface));
    border-radius: var(--radius-sm);
    transition: transform 0.15s ease, top 0.15s ease, font-size 0.15s ease, color 0.15s ease;
    cursor: text;
}

.floating-label-group.has-iti > label {
    /* align with phone input text (intl-tel-input adds left padding) */
    left: 52px;
}

.floating-label-group input[type="text"],
.floating-label-group input[type="email"],
.floating-label-group input[type="tel"],
.floating-label-group textarea,
.floating-label-group select {
    padding-top: 22px;
    padding-bottom: 10px;
}

.floating-label-group.is-filled > label,
.floating-label-group.is-focused > label {
    top: 6px;
    font-size: 12px;
    transform: translateY(0);
}

.floating-label-group.is-focused > label {
    color: var(--primary-color, var(--color-primary));
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-size: 16px;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

button {
    width: 100%;
    padding: 18px 28px;
    color: #fff;
    background: var(--color-primary);
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    letter-spacing: 0.02em;
    transition: background var(--transition), transform var(--transition);
}

button:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.spinner.hidden {
    display: none;
}

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

/* Shipping and Payment Methods */
.shipping-method {
    border: 1px solid var(--color-border);
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-radius: 0;
    transition: border-color var(--transition), background var(--transition);
}

.shipping-method:hover {
    border-color: var(--color-border-focus);
}

/* Custom Radio Buttons */
.shipping-method input[type="radio"],
.shipping-method-header input[type="radio"],
.np-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Radio button for shipping methods in header */
.shipping-method-header {
    position: relative;
    padding: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    margin-bottom: 0;
}

.shipping-method-header input[type="radio"] {
    margin-right: 15px;
    width: auto;
}

.shipping-method-header .shipping-label {
    padding-left: 33px;
    position: relative;
}

.shipping-method-header input[type="radio"] + .shipping-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: 1.5px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    transition: all var(--transition);
    cursor: pointer;
}

.shipping-method-header input[type="radio"]:checked + .shipping-label::before {
    border-color: var(--primary-color, var(--color-primary));
    background: var(--color-surface);
    box-shadow: inset 0 0 0 5px var(--primary-color, var(--color-primary));
}

.shipping-method-header input[type="radio"]:focus + .shipping-label::before {
    outline: none;
}

.shipping-method-header input[type="radio"]:hover + .shipping-label::before {
    border-color: var(--primary-color, var(--color-primary));
}

/* Radio button for payment methods */
.payment-method-item {
    display: none;
    border-top: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}

.payment-method-item:first-child {
    border-top: none;
}

.payment-method-item:hover {
    background-color: var(--color-accent-bg);
}

.payment-methods .shipping-method {
    position: relative;
    border: none;
    margin-bottom: 0;
    display: flex;
}

.payment-methods .shipping-method .shipping-label {
    padding-left: 33px;
    position: relative;
}

.payment-methods .shipping-method input[type="radio"] + .shipping-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: 1.5px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    transition: all var(--transition);
    cursor: pointer;
}

.payment-methods .shipping-method input[type="radio"]:checked + .shipping-label::before {
    border-color: var(--primary-color, var(--color-primary));
    background: var(--color-surface);
    box-shadow: inset 0 0 0 5px var(--primary-color, var(--color-primary));
}

.payment-methods .shipping-method input[type="radio"]:focus + .shipping-label::before {
    outline: none;
}

.payment-methods .shipping-method input[type="radio"]:hover + .shipping-label::before {
    border-color: var(--primary-color, var(--color-primary));
}

/* Radio button for Nova Poshta sub-options (Shopify-like) */
.np-sub-options {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    border: none;
    padding:15px 0px;
    border-radius: 0;
    overflow: visible;
}

.np-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0;
    cursor: pointer;
    border-bottom: none;
    margin-bottom: 0;
    font-weight: normal;
}

.np-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.np-option input[type="radio"] + span {
    padding-left: 30px;
    position: relative;
    display: inline-block;
    font-size: 14px;
    color: var(--color-text);
}

.np-option input[type="radio"] + span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: 1.5px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    transition: all var(--transition);
    cursor: pointer;
}

.np-option input[type="radio"]:checked + span::before {
    border-color: var(--primary-color, var(--color-primary));
    background: var(--color-surface);
    box-shadow: inset 0 0 0 5px var(--primary-color, var(--color-primary));
}

.np-option input[type="radio"]:focus + span::before {
    outline: none;
}

.np-option input[type="radio"]:hover + span::before {
    border-color: var(--primary-color, var(--color-primary));
}

.np-option.selected {
    background-color: transparent;
}

.shipping-label {
    flex: 1;
    font-size: 14px;
    color: var(--color-text);
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.shipping-price {
    font-weight: 500;
    font-size: 12px;
    color: var(--color-text-muted);
}

.payment-logo {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
    line-height: 0;
    flex-shrink: 0;
}

.payment-logo svg {
    width: 95px;
    height: 20px;
    display: block;
    flex-shrink: 0;
    max-width: 100%;
}

.payment-logo img {
    width: 95px;
    height: 20px;
    display: block;
    flex-shrink: 0;
    max-width: 100%;
    object-fit: contain;
}

/* Скрываем логотип, если метод оплаты скрыт */
.payment-methods .shipping-method[style*="display: none"] .payment-logo,
.payment-methods .shipping-method:not([style*="display: none"])[style*="display: none"] .payment-logo {
    display: none;
}

/* Скрываем иконки в способах оплаты и доставки */
.payment-methods .payment-logo {
    display: none !important;
}
.shipping-methods .shipping-label svg {
    display: none !important;
}

/* New Shipping Styles */
.shipping-methods {
    border-radius: 0;
}

.shipping-item-wrapper {
    border: none;
    border-top: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    margin-bottom: 0;
    background: var(--color-surface);
    display: none;
}

.shipping-item-wrapper.is-active {
    position: relative;
    z-index: 999;
    border-top: none;
    border-left: none;
    border-right: none;
}

/* Выбранный способ доставки: толстая полоса слева вместо полной рамки */
.shipping-item-wrapper.is-active > .shipping-method-header {
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--primary-color, var(--color-primary));
    background: var(--color-accent-bg);
    padding-left: calc(15px - 3px);
}
.shipping-item-wrapper.is-active > .shipping-method-header+div{
    border-left: 4px solid var(--color-primary);
    border-right: 1px solid var(--color-border);
    margin-left: 0;
}

.shipping-item-wrapper:first-child.is-active > .shipping-method-header {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.shipping-item-wrapper:last-child.is-active > .shipping-method-header {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.shipping-item-wrapper.is-active:not(:first-child):not(:last-child) > .shipping-method-header {
    border-radius: 0;
}

/* Avoid double line between active and next item */
.shipping-item-wrapper.is-active + .shipping-item-wrapper {
    border-top-color: transparent;
}

.shipping-item-wrapper:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.shipping-item-wrapper:last-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid var(--color-border);
}

.shipping-item-wrapper:hover {
    background-color: var(--color-accent-bg);
}

/* Payment Methods Styles */
.payment-methods {
    border-radius: 0;
    overflow: hidden;
}

.payment-method-item:first-child {
    border-top: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.payment-method-item:last-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.payment-method-item.last-visible {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid var(--color-border);
}

.payment-method-item.is-active {
    position: relative;
    z-index: 1;
    border-left: none;
    border-right: none;
    border-top: none;
}
.payment-method-item.is-active .payment-description{
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.payment-method-item.is-active > .shipping-method {
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--primary-color, var(--color-primary));
    background: var(--color-accent-bg);
    padding-left: calc(15px - 3px);
}
.payment-method-item:first-child.is-active > .shipping-method {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.payment-method-item.last-visible.is-active > .shipping-method,
.payment-method-item:last-child.is-active > .shipping-method {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.payment-method-item.is-active:not(:first-child):not(:last-child) > .shipping-method {
    border-radius: 0;
}

.payment-method-item.is-active + .payment-method-item {
    border-top-color: transparent;
}

.novaposhta-details {
    padding: 0 15px 15px 15px;
    display: none;
}

/* Shipping/Payment details background should match summary (right column) */
.novaposhta-details,
#ukrposhta-details,
.courier-details,
.payment-description {
    background: var(--summary-bg-color, var(--color-bg)) !important;
}

/* Keep special COD warning colors */
#cod-prepayment-info {
    background: #fff3cd !important;
    border-color: #ffeeba !important;
}

#cod-disabled-warning {
    background: #f8d7da !important;
    border-color: #f5c6cb !important;
}

.novaposhta-details .np-field > label {
    /* keep accessible, hide visually (we use placeholders like Shopify) */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.novaposhta-details input.np-selectlike {
    width: 100%;
    padding: 14px 44px 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background-color: var(--color-surface);
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%231a1a1a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.novaposhta-details input.np-selectlike::placeholder {
    color: var(--color-text-muted);
}

.novaposhta-details input.np-selectlike:focus {
    outline: none;
    border-color: var(--primary-color, var(--color-primary));
    background-color: var(--color-surface);
}

.np-quick-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin: -4px 2px 6px 2px;
    grid-column: 1 / -1;
    margin-top: -20px;
    padding-left: 16px;
}

.np-quick-city {
    width: auto;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 400;
    text-decoration: underline;
    cursor: pointer;
    opacity: 1;
}

.np-quick-city:hover {
    color: var(--color-text);
    opacity: 1;
}

.np-sub-options {
    border-radius: 0;
    margin-bottom: 15px;
    overflow: hidden;
}

.np-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.np-inputs.np-inputs-inline {
    grid-template-columns: 1fr 1fr;
}

/* Autocomplete styles */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-md);
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background-color var(--transition);
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: var(--color-accent-bg);
}

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

.autocomplete-item-title {
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 4px;
}

.autocomplete-item-subtitle {
    font-size: 12px;
    color: var(--color-text-muted);
}

input:disabled {
    background-color: var(--color-bg);
    cursor: not-allowed;
}

.phone-input-wrapper {
    position: relative;
    width: 100%;
}

.iti {
    width: 100%;
    display: block;
}

.phone-input-wrapper.error input {
    border-color: #d32f2f;
}

#phone {
    letter-spacing: 0.5px;
    padding-top:15px;
    padding-bottom:15px;
}

.error-message {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.error-message.show {
    display: block;
}

input.error,
textarea.error,
select.error {
    border-color: #d32f2f;
}

input.error:focus,
textarea.error:focus,
select.error:focus {
    border-color: #d32f2f;
    outline: none;
}

#country,
label[for="country"],
.form-group:has(#country) {
    display: none;
}

/* Thank you page specific styles */
.order-details-box, .payment-instructions-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.order-details-header, .payment-instructions-header {
    background: var(--color-bg);
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
}

.order-details-title, .payment-instructions-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0;
}

.order-details-body, .payment-instructions-body {
    padding: 24px;
}

.order-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media(min-width:600px){
    .order-details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.order-detail-group {
    display: flex;
    flex-direction: column;
}

.order-detail-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}

.order-detail-value {
    font-size: 15px;
    color: var(--color-text);
    line-height: 1.5;
}

.order-detail-value a {
    color: inherit !important;
    text-decoration: none !important;
}

.thank-you-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.thank-you-subtitle {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

.continue-shopping-btn {
    width: 100%;
    padding: 18px 28px;
    color: #fff !important;
    background: var(--color-primary) !important;
    border: none !important;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 32px;
    text-decoration: none;
    display: block;
    text-align: center;
    letter-spacing: 0.02em;
    transition: background var(--transition), transform var(--transition);
}

.continue-shopping-btn:hover {
    background: var(--color-primary-hover) !important;
    transform: translateY(-1px);
}

.divider {
    border-top: 1px dashed var(--color-border);
    margin: 32px 0;
}

/* Responsive styles */
@media (max-width: 1000px) {
    .checkout-layout {
        flex-direction: column-reverse;
    }

    .checkout-products {
        width: 100%;
        margin-bottom: 30px;
        order:-1;
    }

    .products-section {
        position: static;
        margin:0 auto;
    }
}

@media (max-width: 600px) {
    .row {
        grid-template-columns: 1fr;
        gap:0;
    }

    .header {
        padding: 15px 0;
    }

    .header-container {
        padding: 0 20px;
    }

    .checkout-layout {
        padding: 0 20px;
    }

    .header-logo {
        height: 40px;
    }

    .header-logo-fallback {
        font-size: 20px;
    }

    .header-cart-icon {
        width: 20px;
        height: 20px;
    }

    .product-item {
        flex-direction: row;
        align-items: center;
    }

    .product-price {
        margin-left: 0;
        margin-top: 0;
    }

    .product-image-wrapper {
        width: 66px;
        height: 66px;
    }

    .product-image {
        width: 66px;
        height: 66px;
    }

    .product-image-placeholder {
        width: 66px;
        height: 66px;
    }

    .order-details-grid {
        grid-template-columns: 1fr;
    }

    .thank-you-title {
        font-size: 24px;
    }
}

