@media (max-width: 600px) {
    .woocommerce-checkout .woocommerce-billing-fields {
        flex-direction: column !important;
        gap: 15px !important;
    }
    .woocommerce-checkout .woocommerce-billing-fields .form-row,
    .woocommerce-checkout .woocommerce-billing-fields .form-row-first,
    .woocommerce-checkout .woocommerce-billing-fields .form-row-last,
    .woocommerce-checkout .woocommerce-billing-fields .form-row-wide,
    .woocommerce-checkout .woocommerce-billing-fields .form-row-third {
        flex: 0 0 100% !important;
        width: 100% !important;
        margin-right: 0 !important;
        float: none !important;
    }
}
/**
 * Custom Cart & Checkout Styles
 * Mobile-first, responsive design with skeleton loaders
 * 
 * @package Breakdance_Zero
 * @version 1.0.0
 */

/* ==========================================
   RESET & BASE STYLES
   ========================================== */

* {
    box-sizing: border-box;
}

/* ==========================================
   SKELETON LOADER ANIMATION
   ========================================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton-loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.skeleton-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
    z-index: 1;
}

/* ==========================================
   CART PAGE LAYOUT
   ========================================== */

.custom-cart-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    overflow-x: hidden;
}

.custom-cart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    min-width: 0;
}

/* Desktop: 70/30 split */
@media (min-width: 768px) {
    .custom-cart-grid {
        grid-template-columns: 70fr 30fr;
    }
}

/* ==========================================
   CART ITEMS LIST
   ========================================== */

.custom-cart-items {
    background: #fff;
    padding: 16px;
    border-radius: 10px;
    min-width: 0;
}

@media (min-width: 600px) {
    .custom-cart-items {
        padding: 20px;
    }
}

.cart-items-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #333;
}

.cart-items-list {
    margin-bottom: 25px;
}

/* Cart Line Item — unified CSS Grid (mobile + desktop) */
.cart-line-item {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    grid-auto-rows: auto;
    gap: 4px 12px;
    padding: 12px 36px 12px 0; /* right padding for ✕ button */
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Desktop: multi-column grid, all on one row */
@media (min-width: 600px) {
    .cart-line-item {
        grid-template-columns: 100px minmax(0, 1fr) auto auto 36px;
        grid-template-rows: auto;
        gap: 15px;
        padding: 20px 0;
        align-items: center;
    }
}

.line-item-thumbnail {
    grid-column: 1;
    grid-row: 1 / span 3; /* mobile: span all 3 rows */
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}

@media (max-width: 359px) {
    .line-item-thumbnail {
        width: 55px;
        height: 55px;
    }
    .cart-line-item {
        grid-template-columns: 55px minmax(0, 1fr);
        gap: 4px 10px;
        padding: 10px 32px 10px 0;
    }
}

@media (min-width: 600px) {
    .line-item-thumbnail {
        grid-column: 1;
        grid-row: auto;
        width: 100px;
        height: 100px;
    }
}

.line-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Details: name + unit price (col 2, row 1) */
.line-item-details {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

@media (min-width: 600px) {
    .line-item-details {
        grid-column: 2;
        grid-row: auto;
        gap: 6px;
    }
}

.line-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
}

@media (min-width: 600px) {
    .line-item-title { font-size: 16px; }
}

.line-item-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.line-item-title a:hover { color: #0066cc; }

.line-item-sku {
    font-size: 12px;
    color: #777;
}

/* Unit price: visible everywhere */
.line-item-price {
    font-size: 13px;
    color: #555;
}

@media (min-width: 600px) {
    .line-item-price { font-size: 14px; color: #666; }
}

/* ==========================================
   LINE TOTAL + QUANTITY (mobile: stacked in col 2)
   ========================================== */

/* Pricing: "Iš viso: €XXX" — col 2, row 2 (mobile) */
.line-item-pricing {
    display: flex;
    grid-column: 2;
    grid-row: 2;
    align-items: center;
    gap: 4px;
}

@media (min-width: 600px) {
    .line-item-pricing {
        grid-column: auto;
        grid-row: auto;
        flex-direction: column;
        gap: 8px;
        text-align: right;
    }
}

/* Quantity: "[- 1 +]" — col 2, row 3 (mobile) */
.line-item-quantity {
    display: flex;
    grid-column: 2;
    grid-row: 3;
    align-items: center;
    margin-top: 2px;
}

@media (min-width: 600px) {
    .line-item-quantity {
        grid-column: auto;
        grid-row: auto;
        margin-top: 0;
    }
}

.price-label,
.subtotal-label {
    font-size: 12px;
    color: #777;
}

/* Mobile: hide "Price:" (already in .line-item-price) */
@media (max-width: 599px) {
    .price-label { display: none; }
}

.price-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Desktop line-item price: more compact */
@media (min-width: 600px) {
    .line-item-price .price-value {
        font-size: 13px;
    }
}

.subtotal-value {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

/* Desktop line-item subtotal: more compact */
@media (min-width: 600px) {
    .line-item-pricing .subtotal-value {
        font-size: 13px;
    }
}

/* Mobile subtotal: smaller to fit one line */
@media (max-width: 599px) {
    .line-item-pricing .subtotal-label { font-size: 12px; }
    .subtotal-value { font-size: 14px; }
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.qty-btn svg {
    fill: currentColor;
    pointer-events: none;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.qty-btn:active {
    background: #d0d0d0;
}

.qty-input {
    width: 40px;
    height: 36px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    outline: none;
    background: #f9f9f9;
}

/* Remove Item Button */
.line-item-remove {
    position: absolute;
    top: 4px;
    right: 0;
    z-index: 2;
}

@media (min-width: 600px) {
    .line-item-remove {
        position: static;
        display: flex;
        justify-content: center;
    }
}

.remove-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: fill 0.2s;
}

/* ==========================================
   COUPON FORM
   ========================================== */

.cart-coupon-section {
    margin-top: 20px;
}

.cart-applied-coupons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.applied-coupon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #f3f3f3;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    gap: 10px;
    min-width: 0;
}

.coupon-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coupon-code-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    overflow-wrap: break-word;
    word-break: break-all;
}

.coupon-description {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    line-height: 1.4;
}

.remove-coupon-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

.remove-coupon-inline:hover {
    transform: scale(1.1);
}

.remove-coupon-inline:active {
    transform: scale(0.95);
}

.remove-coupon-inline .remove-icon {
    width: 20px;
    height: 20px;
    fill: #999;
    transition: fill 0.2s;
}

.remove-coupon-inline:hover .remove-icon {
    fill: #d00;
}

.cart-coupon-form {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

@media (min-width: 480px) {
    .cart-coupon-form {
        flex-direction: row;
    }
}

.coupon-input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px; /* Prevent iOS zoom */
    transition: border-color 0.2s;
}

@media (min-width: 480px) {
    .coupon-input {
        font-size: 14px;
    }
}

.coupon-input:focus {
    outline: none;
    border-color: #0066cc;
}

.coupon-apply-btn {
    padding: 12px 24px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.coupon-apply-btn:hover {
    background: #0052a3;
}

.coupon-apply-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ==========================================
   FREE SHIPPING PROGRESS
   ========================================== */

.free-shipping-progress {
    margin-top: 20px;
    padding: 15px 16px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

.free-shipping-message {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.free-shipping-message.free-shipping-eligible {
    color: #2e7d32;
    font-weight: 600;
}

.free-shipping-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.free-shipping-text {
    line-height: 1.4;
}

.remaining-amount {
    color: #0066cc;
    font-weight: 600;
}

.free-shipping-progress-bar {
    margin-top: 10px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.free-shipping-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #9aee89 0%, #42c409 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Shipping Information Block */
.shipping-info-block {
    margin-top: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f5e9 100%);
    border: 1px solid #b8d8e8;
    border-left: 4px solid #2e7d32;
    border-radius: 10px;
}

.shipping-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.shipping-info-icon {
    width: 22px;
    height: 22px;
    fill: #2e7d32;
    flex-shrink: 0;
    margin-top: 1px;
}

.shipping-info-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
    color: #444;
}

.shipping-time-message {
    color: #1a1a1a;
    margin-bottom: 4px;
    font-weight: 500;
}

.shipping-time-message strong {
    color: #2e7d32;
    font-weight: 700;
}

.shipping-delivery-time {
    color: #666;
    font-size: 12px;
}

.shipping-delivery-time strong {
    color: #444;
    font-weight: 600;
}

@media (max-width: 599px) {
    .shipping-info-block {
        padding: 12px 14px;
    }
    .shipping-info-text {
        font-size: 12px;
    }
    .shipping-delivery-time {
        font-size: 11px;
    }
}

/* Shipping info in checkout step context */
.checkout-step-shipping-method .shipping-info-block {
    margin-top: 16px;
}

.breakdance-auto-shipping-placeholder {
    margin-top: 8px;
}

.breakdance-auto-shipping-fake-method {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px dashed #c0c0c0;
    border-radius: 8px;
    background: #f8f9fb;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #666;
    line-height: 1.5;
}

/* Icon next to text */
.breakdance-auto-shipping-fake-method::before {
    content: "📦";
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.breakdance-auto-shipping-fake-method input[type="radio"] {
    display: none;
}

@media (max-width: 599px) {
    .breakdance-auto-shipping-fake-method {
        font-size: 11px;
        padding: 10px 12px;
        gap: 8px;
    }
    .breakdance-auto-shipping-fake-method::before {
        font-size: 16px;
    }
}

/* ==========================================
   CART TOTALS SIDEBAR
   ========================================== */

.custom-cart-sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: none;
    height: fit-content;
    min-width: 0;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .custom-cart-sidebar {
        position: sticky;
        top: 20px;
    }
}

.custom-cart-totals {
    position: relative;
}

.totals-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #333;
}

.totals-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    gap: 8px;
    min-width: 0;
}

.totals-line-bold {
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}

.totals-label {
    color: #555;
    min-width: 0;
    overflow-wrap: break-word;
}

.totals-value {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    flex-shrink: 0;
}

.totals-discount {
    color: #d00;
}

.totals-discount-value {
    color: #d00;
}

.coupon-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f4fd;
    color: #0066cc;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.remove-coupon {
    background: none;
    border: none;
    color: #0066cc;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    transition: color 0.2s;
}

.remove-coupon:hover {
    color: #d00;
}

.totals-shipping small {
    font-size: 12px;
    color: #777;
    font-weight: 400;
}

/* Shipping notice box in cart — override parent flex */
.totals-shipping-notice {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f0f7ff;
    border: 1px solid #b8d8e8;
    border-left: 3px solid #0066cc;
    border-radius: 6px;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    display: block !important;
    width: 100%;
    box-sizing: border-box;
}

.totals-shipping-notice span,
.totals-shipping-notice small {
    display: block;
    white-space: normal !important;
    width: 100%;
}

.totals-total {
    border: none;
    padding: 0;
    margin-top: 15px;
    font-size: 18px;
    font-weight: 700;
}

.totals-total .totals-label {
    color: #000;
}

.totals-total .totals-value {
    font-size: 24px;
    color: #000;
}

.proceed-to-checkout-wrapper {
    margin-top: 0;
}

.checkout-button {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: #0066cc;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}

.checkout-button:hover {
    background: #0052a3;
}

/* ==========================================
   NOTIFICATIONS
   ========================================== */

.breakdance-cart-notice {
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease;
}

/* WooCommerce native notices — ensure consistent font across all notice types */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    list-style: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.breakdance-cart-notice--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.breakdance-cart-notice--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.notice-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin-left: 15px;
}

/* ==========================================
   CHECKOUT PAGE LAYOUT
   ========================================== */

.custom-checkout-grid {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 769px) {
    .custom-checkout-grid {
        flex-direction: row;
        gap: 30px;
    }
}

.custom-checkout-form-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); */
}

@media (min-width: 769px) {
    .custom-checkout-form-wrapper {
        flex: 7;
    }
}

.checkout-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #333;
}

/* ==========================================
   ACCORDION SECTIONS
   ========================================== */

.checkout-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.accordion-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.accordion-section.active {
    border-color: #d8d8d8;
    box-shadow: none;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.accordion-section.active .accordion-header {
    background: #e8f4fd;
}

.accordion-header:hover {
    background: #f0f0f0;
}

.accordion-section.active .accordion-header:hover {
    background: #d9ecf9;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.accordion-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #e0e0e0;
    color: #666;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
}

.accordion-section.active .accordion-number {
    background: #0066cc;
    color: #fff;
}

.accordion-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.accordion-section.active .accordion-toggle {
    transform: rotate(180deg);
}

.accordion-icon {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid #666;
    display: block;
}

.accordion-section.active .accordion-icon {
    border-top-color: #0066cc;
}

/* Locked sections */
.accordion-section.locked {
    opacity: 0.6;
    pointer-events: none;
}

.accordion-section.locked .accordion-header {
    cursor: not-allowed;
    background: #f0f0f0;
}

.accordion-section.locked .accordion-number {
    background: #ccc;
    color: #999;
}

/* Completed sections */
.accordion-section.completed .accordion-number {
    background: #2e7d32;
    color: #fff;
    font-size: 14px;
}

.accordion-section.completed:not(.active) {
    border-color: #2e7d32;
}

.accordion-content {
    overflow: hidden;
}

.accordion-content-inner {
    padding: 25px 20px;
    position: relative;
}

/* ==========================================
   CHECKOUT FORM FIELDS
   ========================================== */

.woocommerce-checkout .form-row {
    margin-bottom: 20px;
}

/* Inline form fields */
.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
    width: 48%;
    float: left;
    margin-bottom: 20px;
}

.woocommerce-checkout .form-row-first {
    clear: both;
    margin-right: 4%;
}

.woocommerce-checkout .form-row-last {
    float: right;
    margin-right: 0;
}

.woocommerce-checkout .form-row-wide {
    width: 100%;
    clear: both;
    margin-bottom: 20px;
}

/* Three columns for country, city, postcode */
.woocommerce-checkout .form-row-third {
    width: calc(33.333% - 10px);
    margin-bottom: 20px;
}

/* Flexbox layout for billing fields */
.woocommerce-checkout .woocommerce-billing-fields {
    display: flex;
    flex-flow: wrap;
    gap: 15px;
}

.woocommerce-checkout .woocommerce-billing-fields .form-row-wide {
    flex: 0 0 100%;
    width: 100%;
}

.woocommerce-checkout .woocommerce-billing-fields .form-row-third {
    flex: 0 0 calc(33.333% - 10px);
    width: calc(33.333% - 10px);
}

.woocommerce-checkout .woocommerce-billing-fields .form-row-first,
.woocommerce-checkout .woocommerce-billing-fields .form-row-last {
    flex: 0 0 calc(50% - 7.5px);
    width: calc(50% - 7.5px);
    float: none;
    margin-right: 0;
}

/* Clear floats after form rows */
.woocommerce-checkout .woocommerce-billing-fields::after,
.woocommerce-checkout .woocommerce-shipping-fields::after,
.woocommerce-checkout .woocommerce-additional-fields::after {
    content: "";
    display: table;
    clear: both;
}

.woocommerce-checkout label {
    display: block;
    margin-bottom: 0px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="number"],
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
    outline: none;
    border-color: #0066cc;
}

.woocommerce-checkout .select2-container {
    width: 100% !important;
}

/* Hide ship-to-different-address checkbox (auto-checked) */
.woocommerce-checkout .woocommerce-shipping-fields #ship-to-different-address {
    display: none;
}

/* Shipping and Payment Methods */
.breakdance-woocommerce ul.woocommerce-shipping-methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.breakdance-woocommerce ul.woocommerce-shipping-methods li {
    display: flex;
    align-items: unset;
    background-color: #efefef;
    padding: 10px 5px;
}

/* When only ONE shipping method: hide the radio button (no choice needed) */
.breakdance-woocommerce ul.woocommerce-shipping-methods li:only-of-type input[type="radio"] {
    display: none;
}

.breakdance-woocommerce ul.woocommerce-shipping-methods li label,
.breakdance-woocommerce ul.payment_methods li label {
    line-height: 1.6;
    font-size: 13px;
}

/* Payment section */
.breakdance-woocommerce #payment {
    border: 0px !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Radio buttons */
.breakdance-woocommerce input[type=radio] {
    border-radius: 9999px;
    padding: 0;
    margin: 2px 5px;
}

/* ==========================================
   INTERNATIONAL PHONE INPUT
   ========================================== */

/* Main container */
.woocommerce-checkout .iti {
    width: 100%;
    display: block;
}

.woocommerce-checkout .iti__input {
    width: 100%;
    padding: 12px 16px 12px 60px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.woocommerce-checkout .iti__input:focus {
    outline: none;
    border-color: #0066cc;
}

/* Flag container */
.woocommerce-checkout .iti__flag-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    padding: 0;
}

.woocommerce-checkout .iti__selected-flag {
    padding: 0 0 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 6px 0 0 6px;
}

.woocommerce-checkout .iti__selected-flag:hover,
.woocommerce-checkout .iti__selected-flag:focus {
    background: #f5f5f5;
}

/* Country dropdown */
.woocommerce-checkout .iti__country-list {
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
    max-height: 200px;
    font-size: 14px;
    z-index: 10000;
}

.woocommerce-checkout .iti__country {
    padding: 8px 12px;
}

.woocommerce-checkout .iti__country:hover,
.woocommerce-checkout .iti__country.iti__highlight {
    background-color: #f5f5f5;
}

.woocommerce-checkout .iti__country-name {
    margin-right: 6px;
}

.woocommerce-checkout .iti__dial-code {
    color: #666;
}

/* Arrow */
.woocommerce-checkout .iti__arrow {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #666;
    margin-left: 6px;
}

.woocommerce-checkout .iti__arrow--up {
    border-top: none;
    border-bottom: 5px solid #666;
}

/* Validation states */
.woocommerce-checkout .woocommerce-invalid .iti__input {
    border-color: #c00;
}

.woocommerce-checkout .woocommerce-validated .iti__input {
    border-color: #2e7d32;
}

/* Phone validation error message */
.woocommerce-checkout .phone-validation-error {
    display: block;
    color: #c00;
    font-size: 12px;
    margin-top: 6px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .woocommerce-checkout .iti__country-list {
        max-height: 150px;
    }
    
    .woocommerce-checkout .iti__input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* ==========================================
   CHECKOUT SIDEBAR
   ========================================== */

.custom-checkout-sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: none;
    height: fit-content;
    position: sticky;
    top: 20px;
}

@media (min-width: 769px) {
    .custom-checkout-sidebar {
        flex: 3;
    }
}

.checkout-order-summary {
    position: relative;
}

.summary-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #333;
}

.summary-items {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 10px 0;
    font-size: 14px;
}

.item-name {
    flex: 1;
    color: #555;
    font-size: 13px;
}

.item-qty {
    color: #777;
    font-size: 13px;
    margin-left: 4px;
}

.item-total {
    font-weight: 600;
    color: #333;
    margin-left: 15px;
}

.summary-totals {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.summary-label {
    color: #555;
}

.summary-value {
    font-weight: 600;
    color: #333;
}

.summary-discount {
    color: #d00;
}

.summary-discount .summary-value {
    color: #d00;
}

.summary-total {
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #e0e0e0;
    font-size: 13px;
    font-weight: 700;
    display: grid;
}

.summary-total .summary-label {
    color: #000;
}

/* ==========================================
   TOAST NOTIFICATIONS (Snackbar style)
   ========================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    min-width: 300px;
    max-width: 400px;
    background: #323232;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    line-height: 1.5;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-notice--show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50%;
}

.toast-notice--success {
    background: #2e7d32;
    color: #fff;
}

.toast-notice--success .toast-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.toast-notice--error {
    background: #c62828;
    color: #fff;
}

.toast-notice--error .toast-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.toast-notice--info {
    background: #0277bd;
    color: #fff;
}

.toast-notice--info .toast-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.toast-text {
    flex: 1;
    word-wrap: break-word;
}

.toast-close {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #fff;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
    
    .toast-notice {
        min-width: auto;
        max-width: none;
    }
}

.summary-total .summary-value {
    font-size: 24px;
    color: #000;
}

/* ==========================================
   PAYMENT METHODS — card-style selection
   ========================================== */

#payment .payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

/* Each <li> as a card */
#payment .payment_methods li.payment_method {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin-bottom: 10px;
    padding: 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: hidden;
}

#payment .payment_methods li.payment_method:hover {
    border-color: #90caf9;
    background: #f5f9ff;
}

/* Selected state */
#payment .payment_methods li.payment_method:has(input[type="radio"]:checked) {
    border-color: #0066cc;
    background: #eaf3fb;
}

/* Radio + label row */
#payment .payment_methods li.payment_method > input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0 0 0 16px;
    accent-color: #0066cc;
    flex-shrink: 0;
}

#payment .payment_methods li.payment_method > label {
    flex: 1;
    padding: 14px 16px 14px 10px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

/* Payment description: below the label, full width */
#payment .payment_methods li.payment_method .payment_box {
    flex: 0 0 100%;
    width: 100%;
    padding: 12px 16px 14px 44px;
    margin: 0;
    background: transparent;
    border-top: 1px solid #d0d8e0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

#payment .payment_methods li.payment_method .payment_box p {
    margin: 0;
}

@media (max-width: 599px) {
    #payment .payment_methods li.payment_method > input[type="radio"] {
        margin-left: 12px;
    }
    #payment .payment_methods li.payment_method > label {
        padding: 12px 12px 12px 8px;
        font-size: 13px;
    }
    #payment .payment_methods li.payment_method .payment_box {
        padding: 10px 12px 12px 40px;
        font-size: 12px;
    }
}

#place_order {
    width: 100%;
    padding: 16px 24px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#place_order:hover {
    background: #0052a3;
}

#place_order:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Privacy policy text in payment section */
.breakdance-woocommerce .woocommerce-checkout-payment .woocommerce-privacy-policy-text {
    margin-top: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 12px;
    color: #777;
    line-height: 1.5;
    background: #fafafa;
}

.breakdance-woocommerce .woocommerce-checkout-payment .woocommerce-privacy-policy-text a {
    color: #0066cc;
}

.breakdance-woocommerce .woocommerce-privacy-policy-text p:not([class]) {
    font-size: 13px;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 767px) {
    .custom-cart-items,
    .custom-checkout-form-wrapper {
        padding: 16px;
    }
    
    .custom-cart-sidebar,
    .custom-checkout-sidebar {
        padding: 16px;
        position: static;
        min-width: 0;
    }
    
    .cart-items-title,
    .checkout-title {
        font-size: 20px;
    }
    
    .totals-title,
    .summary-title {
        font-size: 18px;
    }
}

/* Very small phones */
@media (max-width: 359px) {
    .custom-cart-items,
    .custom-cart-sidebar,
    .custom-checkout-form-wrapper,
    .custom-checkout-sidebar {
        padding: 12px;
    }
    
    .cart-items-title,
    .checkout-title {
        font-size: 18px;
    }
    
    .line-item-title {
        font-size: 13px;
    }
    
    .line-item-price {
        font-size: 12px;
    }
    
    .accordion-title {
        font-size: 13px;
    }
    
    .subtotal-value {
        font-size: 14px;
    }
}

/* Ensure remove button stays visible on all screens */
.remove-item {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.remove-item:hover {
    background: #fee;
    color: #d00;
}

.remove-item.removing {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

button:focus,
a:focus,
input:focus,
select:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .accordion-section {
        border-width: 2px;
    }
    
    .totals-line {
        border-bottom-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   CHECKOUT PROCESSING STATE
   ========================================== */

/* Processing state for checkout form */
.checkout.woocommerce-checkout.processing {
    opacity: 0.9;
    pointer-events: none;
}

/* Enhanced skeleton loading for checkout sidebar */
.custom-checkout-sidebar.skeleton-loading {
    opacity: 0.7;
    pointer-events: none;
}

.custom-checkout-sidebar.skeleton-loading #checkout-order-summary {
    filter: blur(2px);
}

/* Skeleton loading for shipping methods during update */
#shipping-method-wrapper.skeleton-loading {
    min-height: 60px;
    opacity: 0.6;
}

/* Prevent interaction during skeleton loading */
#checkout-order-summary.skeleton-loading,
#shipping-method-wrapper.skeleton-loading {
    user-select: none;
}

/* Smooth transition when skeleton is removed */
.custom-checkout-sidebar,
#checkout-order-summary,
#shipping-method-wrapper {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Loading indicator for checkout fields during validation */
.checkout-step.validating {
    opacity: 0.8;
    pointer-events: none;
}

.step-header {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Ensure order totals remain readable during loading */
#checkout-order-summary.skeleton-loading .summary-total {
    opacity: 1;
    font-weight: 600;
}

/* ==========================================
   COMPANY TYPE FIELDS
   ========================================== */

/* Customer type radio buttons */
.customer-type-wrapper {
    margin-bottom: 20px;
}

.customer-type-wrapper .woocommerce-input-wrapper {
    display: flex;
    gap: 10px;
}

.customer-type-wrapper .radio-option {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding: 12px 24px 12px 45px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    font-weight: 500;
    font-size: 15px;
    margin: 0;
}

.customer-type-wrapper .radio-option input[type="radio"] {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.customer-type-wrapper .radio-option .radio-label {
    user-select: none;
}

.customer-type-wrapper .radio-option:has(input[type="radio"]:checked) {
    border-color: #000000;
    background: #000000;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
}

.customer-type-wrapper .radio-option:hover {
    border-color: #000000;
    background: #ddd;
}

/* Company fields - hidden by default */
.company-field {
    display: none;
}

/* VAT validation states */
.form-row.vat-valid #billing_vat_number {
    border-color: #28a745 !important;
    background: #f0fff4;
}

.form-row.vat-invalid #billing_vat_number {
    border-color: #dc3545 !important;
    background: #fff5f5;
}

/* Make form-row relative for absolute positioned icon */
.form-row.vat-validation-field {
    position: relative;
}

.breakdance-woocommerce .select2-container--default .select2-selection--single, .breakdance-woocommerce select {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 32px;
    height: 47px;
    border-radius:5px;
    border:1px solid #ddd;
}

/* VAT validation icons */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vat-validation-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(0%);
    font-size: 16px;
    font-weight: bold;
    pointer-events: none;
}

.vat-validation-icon.vat-success {
    color: #28a745;
}

.vat-validation-icon.vat-error {
    color: #dc3545;
}

.vat-validation-icon.vat-loading {
    color: #6c757d;
}

.vat-validation-icon .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* VAT info messages */
.vat-info-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.vat-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.vat-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.vat-warning-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Company details in order view */
.company-details {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.company-details h2 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.company-details table {
    width: 100%;
    margin: 0;
}

.company-details table th {
    text-align: left;
    padding: 8px 15px 8px 0;
    font-weight: 600;
    color: #666;
    width: 40%;
}

.company-details table td {
    padding: 8px 0;
    color: #333;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .customer-type-wrapper .woocommerce-input-wrapper {
        flex-direction: column;
    }
    
    .customer-type-wrapper .radio-option {
        width: 100%;
    }
    
    .company-details table th {
        width: 35%;
        font-size: 13px;
    }
    
    .company-details table td {
        font-size: 14px;
    }
}

/* ==========================================
   TERMS CHECKBOXES
   ========================================== */

.custom-terms-checkboxes {
    margin: 15px 0;
    text-align: left;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
}

.terms-checkbox:last-child {
    margin-bottom: 0;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* ==========================================
   MINI CART (OFFCANVAS)
   ========================================== */

.bde-mini-cart-offcanvas-body {
    width: 480px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bde-mini-cart-offcanvas-body .cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.bde-mini-cart-offcanvas-body .cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.bde-mini-cart-offcanvas-body .cart-item:last-child {
    border-bottom: none;
}

.bde-mini-cart-offcanvas-body .cart-item-image {
    flex: 0 0 64px;
    border-radius: 6px;
    overflow: hidden;
}

.bde-mini-cart-offcanvas-body .cart-item-image img {
    width: 100%;
    height: auto;
    display: block;
}

.bde-mini-cart-offcanvas-body .cart-item-info {
    flex: 1;
    min-width: 0;
}

.bde-mini-cart-offcanvas-body .cart-item-title {
    font-size: 13px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.bde-mini-cart-offcanvas-body .cart-item-title:hover {
    color: #555;
}

.bde-mini-cart-offcanvas-body .cart-item-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.bde-mini-cart-offcanvas-body .cart-item-price {
    font-weight: 600;
    color: #111;
}

.bde-mini-cart-offcanvas-body .cart-item-qty {
    color: #999;
}

.bde-mini-cart-offcanvas-body .cart-item-remove {
    color: #999;
    text-decoration: none;
    font-size: 11px;
    margin-left: auto;
    flex-shrink: 0;
}

.bde-mini-cart-offcanvas-body .cart-item-remove:hover {
    color: #e74c3c;
}

.bde-mini-cart-offcanvas-footer {
    flex-shrink: 0;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
}

.bde-mini-cart-offcanvas-footer .shipping-info-block {
    margin-bottom: 12px;
}

.mini-cart-totals {
    margin-bottom: 14px;
}

.mini-cart-total-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
    padding: 3px 0;
}

.mini-cart-total-line.total {
    font-size: 15px;
    color: #111;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
}

.bde-mini-cart-offcanvas-footer .bde-mini-cart-continue-link {
    position: static;
    margin-top: 8px;
    display: block;
    text-align: center;
}
