/**
 * Frontend Styles
 */

/* Container */
.vime-cart-container {
    position: relative;
}

.vime-cart-widget {
    width: 100%;
}

/* Loading overlay */
.vime-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.vime-loading-overlay .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: vime-spin 1s linear infinite;
}

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

/* Shipping calculator specific */
.vime-shipping-calculator.vime-loading form {
    opacity: 0.6;
    pointer-events: none;
}

/* Prevent form submission on enter in shipping calculator */
.woocommerce-shipping-calculator input[type="text"],
.woocommerce-shipping-calculator input[type="number"] {
    ime-mode: inactive;
}

/* Layout variations */
.vime-cart-container[data-settings*='"layout_type":"two_columns"'] {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.vime-cart-container[data-settings*='"layout_type":"three_columns"'] {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

/* Cart sections for grid layout */
.vime-cart-container[data-settings*='"layout_type":"two_columns"'] .vime-cart-main {
    grid-column: 1;
}

.vime-cart-container[data-settings*='"layout_type":"two_columns"'] .vime-cart-sidebar {
    grid-column: 2;
}

/* Cart sections */
.vime-cart-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

/* Header */
.vime-cart-header {
    margin-bottom: 30px;
}

.vime-cart-title {
    margin-bottom: 20px;
}

/* Breadcrumb */
.vime-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.vime-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.vime-breadcrumb a:hover {
    color: #333;
}

.vime-breadcrumb-separator {
    color: #999;
}

.vime-breadcrumb-current {
    color: #333;
    font-weight: 600;
}

/* Progress Bar */
.vime-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.vime-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 10px;
}

.vime-progress-step::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: -1;
}

.vime-progress-step:last-child::before {
    display: none;
}

/* Quantity Selector Styles */
.vime-quantity-wrapper {
    display: inline-block;
    position: relative;
}

.vime-quantity-input-group {
    display: inline-flex;
    align-items: center;
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.vime-quantity-wrapper input[type="number"] {
    -moz-appearance: textfield;
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    padding: 0 10px;
    font-size: 16px;
    font-weight: 500;
}

/* Hide number input spinners */
.vime-quantity-wrapper input[type="number"]::-webkit-inner-spin-button,
.vime-quantity-wrapper input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Plus/Minus Buttons */
.vime-qty-minus,
.vime-qty-plus {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    color: #333;
}

.vime-qty-minus:hover,
.vime-qty-plus:hover {
    background: #e0e0e0;
}

.vime-qty-minus:active,
.vime-qty-plus:active {
    background: #d0d0d0;
}

.vime-qty-minus {
    border-right: 1px solid #ddd;
}

.vime-qty-plus {
    border-left: 1px solid #ddd;
}

/* SVG Icons in Quantity Buttons */
.vime-qty-minus svg,
.vime-qty-plus svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Table Styles */
.vime-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.vime-cart-table th {
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.vime-cart-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.vime-cart-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Table Style Variations */
.vime-table-bordered {
    border: 1px solid #e0e0e0;
}

.vime-table-bordered th,
.vime-table-bordered td {
    border: 1px solid #e0e0e0;
}

.vime-table-striped tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.vime-table-clean th {
    border-bottom: none;
}

.vime-table-clean td {
    border-bottom: none;
}

/* Product cells */
.vime-product-thumbnail img {
    max-width: 80px;
    height: auto;
    border-radius: 4px;
}

.vime-product-name {
    min-width: 200px;
}

/* Remove button styles moved to main .vime-remove-item class */

/* Input Fields General Styles */
.vime-cart-container input[type="text"],
.vime-cart-container input[type="email"],
.vime-cart-container input[type="tel"],
.vime-cart-container input[type="url"],
.vime-cart-container input[type="password"],
.vime-cart-container input[type="search"],
.vime-cart-container select,
.vime-cart-container textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.vime-cart-container input:focus,
.vime-cart-container select:focus,
.vime-cart-container textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Coupon Form */
.vime-coupon-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.vime-coupon-form.vime-coupon-collapse {
    display: none;
}

.vime-coupon-form.vime-coupon-collapse.active {
    display: flex;
}

.vime-coupon-input {
    flex: 1;
}

/* Buttons - Base structure without colors (colors set via widget controls) */
.vime-button {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vime-button.vime-full-width {
    width: 100%;
    display: block;
    text-align: center;
}

/* Cart Totals */
.vime-totals-table {
    width: 100%;
}

.vime-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.vime-totals-label {
    font-weight: normal;
}

.vime-totals-value {
    font-weight: 600;
}

.vime-order-total.vime-highlighted {
    font-size: 1.2em;
    color: #333;
}

.vime-order-total.vime-highlighted .vime-totals-row {
    padding: 15px 0;
}

/* Loading states */
.vime-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.vime-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: vime-spin 1s linear infinite;
}

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

/* Notices */
.vime-notice {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.vime-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.vime-notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.vime-empty-cart-icon {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.vime-empty-cart-message {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* Cross-sells */
.vime-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.vime-product-item {
    text-align: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.vime-product-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.vime-product-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.vime-product-title {
    font-size: 14px;
    margin-bottom: 10px;
}

.vime-product-price {
    font-weight: 600;
    color: #007cba;
}

.vime-progress-step.completed::before {
    background: #4caf50;
}

.vime-progress-icon,
.vime-progress-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 600;
}

.vime-progress-step.completed .vime-progress-icon,
.vime-progress-step.completed .vime-progress-number {
    background: #4caf50;
    color: white;
}

.vime-progress-step.current .vime-progress-icon,
.vime-progress-step.current .vime-progress-number {
    background: #2196f3;
    color: white;
}

.vime-progress-title {
    font-size: 14px;
    color: #666;
}

/* Cart Table */
.vime-cart-table-wrapper {
    overflow-x: auto;
    margin-bottom: 30px;
}

.vime-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.vime-cart-table th {
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
}

.vime-cart-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

/* Table styles */
.vime-table-bordered td,
.vime-table-bordered th {
    border: 1px solid #e0e0e0;
}

.vime-table-striped tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.vime-table-clean td,
.vime-table-clean th {
    border: none;
    border-bottom: 1px solid #f0f0f0;
}

/* Product columns */
.vime-product-remove {
    width: 50px;
    text-align: center;
}

.vime-remove-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    line-height: 1;
    text-align: center;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    border-radius: 50%;
    border: 1px solid #ddd;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 18px;
    font-weight: normal;
}

.vime-remove-item:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

/* SVG and Icon styles inside remove button */
.vime-remove-item svg,
.vime-remove-item i {
    width: 60%;
    height: 60%;
    display: block;
}

.vime-remove-item svg {
    fill: currentColor;
}

.vime-remove-item:hover svg {
    fill: currentColor;
}

.vime-remove-item img.vime-remove-icon-svg {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

/* Ensure proper column width for remove button */
.vime-product-remove {
    width: 50px;
    text-align: center;
    padding: 10px !important;
}

/* When remove button is at the end */
.vime-cart-table th.vime-product-remove:last-child,
.vime-cart-table td.vime-product-remove:last-child {
    text-align: center;
}

.vime-product-thumbnail {
    width: 100px;
}

.vime-product-thumbnail img {
    max-width: 80px;
    height: auto;
    border-radius: 4px;
}

.vime-product-name {
    min-width: 200px;
}

.vime-product-name a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
}

.vime-product-name a:hover {
    color: #0073aa;
}

.vime-product-sku {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.vime-product-price,
.vime-product-subtotal {
    white-space: nowrap;
}

/* Quantity input */
.vime-quantity-wrapper {
    display: inline-flex;
    align-items: center;
}

.vime-quantity-wrapper input[type="number"] {
    width: 60px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Plus/Minus quantity */
.vime-quantity-wrapper[data-quantity-type="plus_minus"] {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.vime-quantity-wrapper[data-quantity-type="plus_minus"] button {
    background: #f0f0f0;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

.vime-quantity-wrapper[data-quantity-type="plus_minus"] button:hover {
    background: #e0e0e0;
}

.vime-quantity-wrapper[data-quantity-type="plus_minus"] input {
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

/* Coupon Form */
.vime-coupon-section {
    margin-bottom: 30px;
}

.vime-toggle-coupon {
    display: inline-block;
    margin-bottom: 15px;
    color: #0073aa;
    text-decoration: none;
}

.vime-coupon-form {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.vime-coupon-form.vime-coupon-collapse {
    display: none;
}

.vime-coupon-form.active {
    display: flex;
}

.vime-coupon-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.vime-applied-coupons {
    margin-top: 15px;
}

/* Remove background when vime-no-bg class is applied */
.vime-applied-coupons.vime-no-bg {
    background: none;
    padding: 0;
    border: none;
    box-shadow: none;
}

.vime-coupon-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f0f0f0;
    padding: 5px 15px;
    border-radius: 20px;
    margin: 5px;
}

.vime-remove-coupon {
    color: #666;
    text-decoration: none;
    font-weight: bold;
}

.vime-remove-coupon:hover {
    color: #e74c3c;
}

/* Shipping Calculator */
.vime-shipping-section {
    margin-bottom: 30px;
}

/* Shipping Calculator Title - Base styles */
.vime-shipping-calculator-title {
    margin-bottom: 15px;
    display: block;
}

/* Remove any default heading styles that might interfere */
h1.vime-shipping-calculator-title,
h2.vime-shipping-calculator-title,
h3.vime-shipping-calculator-title,
h4.vime-shipping-calculator-title,
h5.vime-shipping-calculator-title,
h6.vime-shipping-calculator-title {
    /* Reset theme defaults */
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    font-family: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    font-style: inherit;
    text-decoration: inherit;
    margin: 0 0 15px 0;
    padding: 0;
}

.vime-toggle-shipping {
    display: inline-block;
    margin-bottom: 15px;
    color: #0073aa;
    text-decoration: none;
}

.vime-shipping-calculator.vime-shipping-collapse {
    display: none;
}

.vime-shipping-calculator.active {
    display: block;
}

/* Style WooCommerce native shipping calculator to match our design */
.vime-shipping-calculator .woocommerce-shipping-calculator {
    margin-top: 15px;
}

.vime-shipping-calculator .shipping-calculator-form {
    margin-top: 10px;
}

/* Hide CEP label */
.vime-shipping-calculator label[for="calc_shipping_postcode"] {
    display: none !important;
}

/* Align CEP input and button side by side */
.vime-shipping-calculator .shipping-calculator-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

.vime-shipping-calculator .shipping-calculator-form p {
    margin: 0;
    flex: 1 1 auto;
}

/* Target the postcode field specifically */
.vime-shipping-calculator .shipping-calculator-form p:has(input[name="calc_shipping_postcode"]) {
    flex: 1 1 auto;
    max-width: 300px;
}

/* Target the button container specifically */
.vime-shipping-calculator .shipping-calculator-form p:has(button[name="calc_shipping"]) {
    flex: 0 0 auto;
}

/* Ensure the button doesn't wrap to next line */
.vime-shipping-calculator .shipping-calculator-form button[name="calc_shipping"] {
    flex-shrink: 0;
}

/* Alternative approach without :has() for better browser support */
.vime-shipping-calculator .shipping-calculator-form p.form-row {
    margin: 0;
    flex: 1 1 auto;
}

.vime-shipping-calculator .shipping-calculator-form p.form-row:last-of-type {
    flex: 0 0 auto;
}

/* Ensure proper inline layout */
.vime-shipping-calculator .shipping-calculator-form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Make sure form-row elements don't have conflicting styles */
.vime-shipping-calculator .shipping-calculator-form .form-row {
    display: block !important;
    width: auto !important;
}

/* Specific styling for the postcode input container */
.vime-shipping-calculator .shipping-calculator-form .form-row:first-child {
    flex: 1 1 auto !important;
    max-width: 300px !important;
}

.vime-shipping-calculator input[name="calc_shipping_postcode"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.vime-shipping-calculator button[name="calc_shipping"] {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.vime-shipping-calculator button[name="calc_shipping"]:hover {
    background: #555;
}

.vime-shipping-calculator button[name="calc_shipping"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Shipping Options */
.vime-shipping-options h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.vime-shipping-methods {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vime-shipping-methods li {
    margin-bottom: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    transition: background 0.3s;
}

.vime-shipping-methods li:hover {
    background: #f0f0f0;
}

.vime-shipping-methods label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    width: 100%;
}

.vime-shipping-methods input[type="radio"] {
    margin-right: 10px;
    flex-shrink: 0;
}

.vime-shipping-methods .shipping-method-label {
    flex: 1;
}

/* Shipping Cards Layout - Default styles */
.vime-shipping-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vime-shipping-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
}

.vime-shipping-card:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vime-shipping-card.selected {
    border-color: #0073aa;
    background: #f0f8ff;
}

.vime-shipping-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vime-shipping-card label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    padding: 0;
    width: 100%;
}

.vime-shipping-card .vime-shipping-icon {
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
}

.vime-shipping-card .vime-shipping-details {
    flex: 1;
}

.vime-shipping-card .shipping-method-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    width: 100%;
}

/* Style the price span inside shipping method label */
.vime-shipping-card .shipping-method-label .woocommerce-Price-amount {
    margin-left: auto;
}

.vime-shipping-card .shipping-delivery-time {
    display: block;
    font-size: 12px;
    color: #666;
}


.vime-no-shipping-methods {
    margin: 0;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    color: #856404;
}

/* Cart Totals */
.vime-cart-totals {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 4px;
}

.vime-cart-totals h3 {
    margin-bottom: 20px;
}

/* Already updated in previous edit */

.vime-total-savings {
    color: #4caf50;
}

/* Action Buttons */
.vime-cart-actions {
    margin-top: 30px;
}

.vime-actions-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.vime-checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Button hover effects */
.vime-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.vime-checkout-button {
    background: #0073aa;
    color: white;
    width: 100%;
}

.vime-checkout-button:hover {
    background: #005a87;
}

.vime-checkout-button.vime-full-width {
    width: 100%;
    justify-content: center;
}

/* Continue shopping button - all styles via widget controls */

.vime-clear-cart {
    background: #e74c3c;
    color: white;
    white-space: nowrap;
}

/* Cross-sells */
.vime-cross-sells {
    margin-top: 50px;
}

.vime-cross-sells h3 {
    margin-bottom: 20px;
}

/* Upsells */
.vime-upsells {
    margin-top: 2rem;
}

.vime-upsells h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Upsells in sidebar */
.vime-cart-sidebar .vime-upsells {
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 5px;
}

.vime-cart-sidebar .vime-upsells .vime-products-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vime-cart-sidebar .vime-upsell-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.vime-cart-sidebar .vime-upsell-item .vime-product-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    text-decoration: none;
}

.vime-cart-sidebar .vime-upsell-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
}

.vime-cart-sidebar .vime-upsell-item .vime-product-title {
    font-size: 0.9rem;
    margin: 0;
    flex: 1;
}

.vime-cart-sidebar .vime-upsell-item .vime-product-price {
    font-weight: 600;
    color: #23a455;
}

.vime-cart-sidebar .vime-upsell-item .vime-quick-add {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.vime-products-grid {
    display: grid;
    gap: 20px;
}

.vime-products-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.vime-products-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.vime-products-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.vime-products-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.vime-product-item {
    text-align: center;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s;
}

.vime-product-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.vime-product-link {
    text-decoration: none;
    color: inherit;
}

.vime-product-title {
    margin: 10px 0;
    font-size: 16px;
}

.vime-product-price {
    font-weight: 600;
    color: #0073aa;
}

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

.vime-empty-cart-icon {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.vime-empty-cart-message {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.vime-shop-button {
    background: #0073aa;
    color: white;
}

/* Email Capture */
.vime-email-capture {
    background: #f0f9ff;
    border: 1px solid #0073aa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.vime-incentive-text {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.vime-capture-form {
    display: flex;
    gap: 10px;
}

.vime-capture-form input[type="email"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.vime-gdpr-consent {
    display: block;
    margin-top: 10px;
    font-size: 14px;
}

.vime-gdpr-consent input[type="checkbox"] {
    margin-right: 5px;
}

/* Loading States */
.vime-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.vime-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: vime-spin 1s linear infinite;
}

/* Loading Overlay */
.vime-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.vime-loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: vime-spin 1s linear infinite;
}

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

/* Notices */
.vime-notice {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.vime-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.vime-notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Price mobile - hidden by default */
.vime-product-price-mobile {
    display: none;
}

/* Mobile price cell - hidden on desktop */
.vime-product-price-mobile-cell {
    display: none;
}

/* Toast Notifications Container */
.vime-toast-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
    max-width: 400px;
}

/* Position variations */
.vime-toast-container[data-position="top-right"] {
    top: 20px;
    right: 20px;
}

.vime-toast-container[data-position="top-left"] {
    top: 20px;
    left: 20px;
}

.vime-toast-container[data-position="bottom-right"] {
    bottom: 20px;
    right: 20px;
}

.vime-toast-container[data-position="bottom-left"] {
    bottom: 20px;
    left: 20px;
}

.vime-toast-container[data-position="top-center"] {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.vime-toast-container[data-position="bottom-center"] {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.vime-toast-container .vime-toast {
    pointer-events: all;
}

/* Individual Toast */
.vime-toast {
    background: #fff;
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    min-width: 300px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Toast Icon */
.vime-toast-icon {
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Toast Content */
.vime-toast-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

/* Toast Close Button */
.vime-toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.vime-toast-close:hover {
    color: #333;
    background: transparent;
}

/* Toast Types */
.vime-toast-success {
    border-left: 4px solid #28a745;
}

.vime-toast-success .vime-toast-icon {
    color: #28a745;
}

.vime-toast-error {
    border-left: 4px solid #dc3545;
}

.vime-toast-error .vime-toast-icon {
    color: #dc3545;
}

.vime-toast-warning {
    border-left: 4px solid #ffc107;
}

.vime-toast-warning .vime-toast-icon {
    color: #ffc107;
}

.vime-toast-info {
    border-left: 4px solid #17a2b8;
}

.vime-toast-info .vime-toast-icon {
    color: #17a2b8;
}

/* Progress Bar */
.vime-toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.vime-toast-progress {
    height: 100%;
    background: currentColor;
    opacity: 0.3;
    animation: vime-toast-progress linear forwards;
}

/* Animations */
/* Slide animation (default) */
.vime-toast-slide {
    animation: vime-toast-slide-in 0.3s ease forwards;
}

.vime-toast-slide.vime-toast-removing {
    animation: vime-toast-slide-out 0.3s ease forwards;
}

@keyframes vime-toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes vime-toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Fade animation */
.vime-toast-fade {
    animation: vime-toast-fade-in 0.3s ease forwards;
}

.vime-toast-fade.vime-toast-removing {
    animation: vime-toast-fade-out 0.3s ease forwards;
}

@keyframes vime-toast-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes vime-toast-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Bounce animation */
.vime-toast-bounce {
    animation: vime-toast-bounce-in 0.5s ease forwards;
}

.vime-toast-bounce.vime-toast-removing {
    animation: vime-toast-slide-out 0.3s ease forwards;
}

@keyframes vime-toast-bounce-in {
    0% {
        transform: translateX(100%) scale(0.7);
        opacity: 0;
    }
    50% {
        transform: translateX(-10px) scale(1.05);
    }
    70% {
        transform: translateX(5px) scale(0.95);
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* No animation */
.vime-toast-none {
    animation: none;
    opacity: 1;
}

.vime-toast-none.vime-toast-removing {
    display: none;
}

@keyframes vime-toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .vime-toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .vime-toast {
        min-width: auto;
    }
}

/* Legacy Coupon Messages - Hidden when using toast */
.vime-coupon-message {
    display: none;
}

.vime-coupon-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.vime-coupon-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes vime-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Editor Notice */
.vime-editor-notice {
    background: #f0f0f0;
    padding: 20px;
    text-align: center;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

/* Cart main content */
.vime-cart-main {
    /* Main cart content area */
    position: relative;
}

/* Cart sidebar */
.vime-cart-sidebar {
    /* Sidebar content area */
    position: relative;
}

/* Remove default margins between sections in sidebar */
.vime-cart-sidebar > .vime-cart-section {
    margin-bottom: 0 !important;
}

/* Remove gap between direct children in sidebar */
.vime-cart-sidebar > * {
    margin-bottom: 0 !important;
}

/* Let each section control its own spacing */
.vime-cart-sidebar .vime-cart-section + .vime-cart-section {
    margin-top: 0 !important;
}

/* Continue Shopping Section */
.vime-continue-shopping-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

/* Ensure continue shopping button inherits elementor styles */
.vime-continue-shopping-section .vime-continue-shopping {
    display: inline-block;
}