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

/* Base container */
.wcptm-wrapper {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 0 20px;
}

/* Tables container */
.wcptm-container,
.wcptm-selected-items {
    width: 100%;
    margin-bottom: 30px;
}

/* Tables */
.wcptm-table,
.wcptm-selected-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Table headers */
.wcptm-table th,
.wcptm-selected-table th {
    text-align: left;
    padding: 15px;
    font-weight: 700;
    font-size: 14px;
    border-bottom: 1px solid rgba(221, 221, 221, 0.7);
    color: #333;
}

/* Table cells */
.wcptm-table td,
.wcptm-selected-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(238, 238, 238, 0.7);
    vertical-align: middle;
    font-weight: 600;
}

/* Image column */
.wcptm-table td[data-label="Image"] {
    width: 80px;
}

.wcptm-table td[data-label="Image"] img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover;
    border-radius: 8px;
}

/* Buttons */
.wcptm-select-btn,
.wcptm-remove-btn,
.wcptm-clear-cart,
.view-cart-btn {
    border-radius: 20px;
    padding: 8px 20px;
    background: #2c3338;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Quantity controls */
.quantity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.quantity-decrease,
.quantity-increase {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    background: #2c3338;
    color: white;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quantity input {
    width: 80px;
    text-align: center;
    padding: 8px;
    border: 1px solid rgba(221, 221, 221, 0.7);
    border-radius: 8px;
}

/* Cart total */
.cart-total {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-top: 1px solid rgba(221, 221, 221, 0.7);
    font-weight: 700;
}

/* Clear Cart button */
.clear-cart-container {
    text-align: center;
    margin: 20px 0;
}

/* Cart summary bar */
.cart-summary-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(221, 221, 221, 0.7);
    padding: 15px 0;
    text-align: center;
}

.cart-summary-bar .total {
    font-weight: bold;
    font-size: 16px;
    display: inline-block;
    margin-right: 15px;
}

.cart-summary-bar .view-cart-btn {
    display: inline-block;
}

/* Hover effects */
.wcptm-select-btn:hover,
.wcptm-remove-btn:hover,
.wcptm-clear-cart:hover,
.view-cart-btn:hover {
    background: #3c4248;
    transform: translateY(-1px);
}

/* Unified category filter styling for all devices */
.wcptm-category-filter {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background-color: #ffffff;
    color: #333333;
    margin: 10px 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path fill="%23333" d="M0 0l6 6 6-6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.wcptm-category-filter:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.wcptm-category-filter option {
    padding: 10px;
    font-size: 16px;
    background: white;
    color: #333;
}

/* Mobile-specific adjustments */
@media screen and (max-width: 768px) {
    .wcptm-category-filter {
        font-size: 18px;
        padding: 18px;
        padding-right: 45px;
    }
    
    .wcptm-category-filter option {
        font-size: 18px;
        padding: 12px;
    }
}
    
    /* Ensure cart appears below products on mobile */
    .wcptm-wrapper {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .wcptm-container {
        order: 1 !important;
    }
    
    .wcptm-selected-items {
        order: 2 !important;
        margin-top: 30px !important;
    }
    
    /* Collapsible Selected Items */
    .selected-items-container {
        order: 2 !important;
        margin-top: 20px !important;
    }
    
    .selected-items-toggle {
        width: 100% !important;
        padding: 15px 20px !important;
        background: linear-gradient(135deg, #2E7D32, #4CAF50) !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        font-size: 18px !important;
        font-weight: bold !important;
        cursor: pointer !important;
        box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2) !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .selected-items-toggle:hover {
        background: linear-gradient(135deg, #4CAF50, #2E7D32) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3) !important;
    }
    
    .selected-items-toggle .toggle-icon {
        font-size: 16px !important;
        transition: transform 0.3s ease !important;
    }
    
    .selected-items-toggle.expanded .toggle-icon {
        transform: rotate(180deg) !important;
    }
    
    .selected-items-content {
        display: none !important;
        background: white !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        margin-top: 10px !important;
        overflow: hidden !important;
        animation: slideDown 0.3s ease !important;
    }
    
    .selected-items-content.show {
        display: block !important;
    }
    
    .wcptm-selected-items {
        order: 3 !important;
        margin-top: 0 !important;
    }
    
    /* Collapsible Order Form */
    .order-form-container {
        order: 4 !important;
        margin-top: 30px !important;
    }
    
    .order-toggle-btn {
        width: 100% !important;
        padding: 20px !important;
        background: linear-gradient(135deg, #2E7D32, #4CAF50) !important;
        color: white !important;
        border: none !important;
        border-radius: 12px !important;
        font-size: 18px !important;
        font-weight: bold !important;
        cursor: pointer !important;
        box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3) !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .order-toggle-btn:hover {
        background: linear-gradient(135deg, #4CAF50, #2E7D32) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4) !important;
    }
    
    .order-toggle-btn .order-icon {
        font-size: 20px !important;
        transition: transform 0.3s ease !important;
    }
    
    .order-toggle-btn.expanded .order-icon {
        transform: rotate(180deg) !important;
    }
    
    .order-form-content {
        display: none !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        margin-top: 15px !important;
        overflow: hidden !important;
        animation: slideDown 0.3s ease !important;
    }
    
    .order-form-content.show {
        display: block !important;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .wcptm-order-form {
        padding: 25px !important;
        background: white !important;
        border-radius: 12px !important;
    }
    
    .wcptm-order-form h2 {
        color: #2E7D32 !important;
        font-size: 24px !important;
        margin-bottom: 20px !important;
        text-align: center !important;
    }
}

/* Language Switcher Styles */
.language-switcher {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    border: 2px solid #2E7D32 !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

.language-switcher:hover {
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.2) !important;
    transform: translateY(-2px) !important;
}

.language-switcher select {
    width: 100% !important;
    padding: 10px 15px !important;
    border: none !important;
    background: white !important;
    color: #2E7D32 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    outline: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E7D32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 16px !important;
    padding-right: 35px !important;
}

.language-switcher select:focus {
    background-color: #F8F9FA !important;
}

.language-switcher select option {
    padding: 8px !important;
    background: white !important;
    color: #333 !important;
}

/* Mobile Language Switcher */
@media screen and (max-width: 768px) {
    .language-switcher {
        top: 10px !important;
        right: 10px !important;
        width: 120px !important;
    }
    
    .language-switcher select {
        font-size: 12px !important;
        padding: 8px 12px !important;
        padding-right: 30px !important;
    }
}

/* Desktop Order Form Styles */
.wcptm-order-form {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    padding: 25px !important;
    margin-top: 20px !important;
}

.wcptm-order-form h2 {
    color: #2E7D32 !important;
    font-size: 24px !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    border-bottom: 2px solid #E8F5E8 !important;
    padding-bottom: 15px !important;
}

@media screen and (max-width: 768px) {
    .wcptm-wrapper {
        padding: 0 15px;
    }

    /* Stack table cells */
    .wcptm-table thead,
    .wcptm-selected-table thead {
        display: none;
    }

    .wcptm-table tr,
    .wcptm-selected-table tr {
        display: grid;
        gap: 10px;
        padding: 15px;
        border-bottom: 1px solid rgba(238, 238, 238, 0.7);
    }

    .wcptm-table td,
    .wcptm-selected-table td {
        padding: 0;
        border: none;
        text-align: center;
    }

    /* Mobile image */
    .wcptm-table td[data-label="Image"] {
        width: 100%;
    }

    .wcptm-table td[data-label="Image"] img {
        width: 80px !important;
        height: 80px !important;
        margin: 0 auto;
    }

    /* Mobile buttons */
    .wcptm-select-btn,
    .wcptm-remove-btn {
        width: 100%;
        padding: 12px;
    }

    /* Mobile quantity */
    .quantity {
        justify-content: center;
        margin: 10px 0;
    }

    /* Mobile cart summary */
    .cart-summary-bar {
        padding: 15px 10px;
    }

    /* Larger text on mobile */
    .wcptm-table td[data-label="Name"] h3 {
        font-size: 18px;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .wcptm-table td[data-label="Description"] .description {
        font-size: 16px;
        line-height: 1.5;
    }

    .wcptm-table td[data-label="Price"] {
        font-size: 18px;
        font-weight: 700;
    }

    .wcptm-select-btn,
    .wcptm-remove-btn,
    .wcptm-clear-cart,
    .view-cart-btn {
        font-size: 16px;
        padding: 12px 24px;
    }

    .quantity input {
        font-size: 16px;
        padding: 10px;
        width: 60px;
    }

    .quantity-decrease,
    .quantity-increase {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    /* Cart summary text */
    .cart-summary-bar .total {
        font-size: 16px;
    }

    /* Table headers on mobile */
    .wcptm-table td::before,
    .wcptm-selected-table td::before {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 8px;
    }

    .wcptm-table td[data-label="Description"] .description {
        font-size: 16px;
        line-height: 1.5;
        text-align: left;
        padding: 0 15px;
    }

    /* Stack table cells */
    .wcptm-table tr {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
        border-bottom: 1px solid rgba(238, 238, 238, 0.7);
    }

    .wcptm-table td {
        padding: 0;
        border: none;
    }

    /* Show labels on mobile */
    .wcptm-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 5px;
    }

    /* Center all text and make it larger */
    .wcptm-table td,
    .wcptm-selected-table td,
    .wcptm-table th,
    .wcptm-selected-table th {
        text-align: center !important;
        font-size: 16px !important;
    }
    
    /* Make product names stand out */
    .wcptm-table td[data-label="Name"],
    .wcptm-selected-table td:first-child {
        font-size: 18px !important;
        font-weight: bold !important;
    }
    
    /* Make prices more visible */
    .wcptm-table td[data-label="Price"],
    .wcptm-selected-table td:nth-child(3) {
        font-size: 18px !important;
        color: #000000 !important;
    }
    
    /* Improve button visibility */
    .wcptm-select-btn,
    .remove-item,
    .wcptm-clear-cart,
    .view-cart-btn {
        width: 100% !important;
        padding: 12px !important;
        font-size: 16px !important;
        margin: 5px auto !important;
    }
    
    /* Center the cart summary bar content */
    .cart-summary-bar {
        text-align: center !important;
        padding: 15px 10px !important;
    }
    
    .cart-summary-bar .total {
        display: block !important;
        margin-bottom: 10px !important;
        font-size: 18px !important;
    }
    
    .cart-summary-bar .view-cart-btn {
        display: inline-block !important;
        width: 80% !important;
        max-width: 300px !important;
    }

    /* Mobile remove button styles */
    .wcptm-selected-table .wcptm-remove-btn {
        display: none;
    }
    
    .wcptm-selected-table .slide-hint {
        display: block;
    }
    
    .wcptm-selected-table tr {
        margin-bottom: 15px;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .wcptm-selected-table td {
        background: #fff;
        padding: 8px;
    }

    /* Mobile item details styling */
    .mobile-item-details {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .mobile-price-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-top: 8px;
        padding: 5px 0;
        border-top: 1px solid #eee;
    }

    .mobile-price {
        font-weight: bold;
        font-size: 16px;
        color: #333;
    }

    .mobile-subtotal {
        font-weight: bold;
        color: #4a4a4a;
    }

    .wcptm-selected-table td[data-label="Item"] {
        font-weight: bold;
        font-size: 16px;
        padding-bottom: 5px;
    }
    
    .wcptm-selected-table td[data-label="Details"] {
        padding-top: 0;
    }
    
    /* Ensure quantity controls are properly sized */
    .mobile-item-details .quantity {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 8px 0;
        width: 100%;
    }
    
    /* Remove the top price display */
    .wcptm-selected-items .cart-content > h3 {
        display: none;
    }

    /* Hide any standalone price displays */
    .wcptm-selected-items > h3,
    .wcptm-selected-items > div:not(.cart-content):not(.cart-summary-bar) {
        display: none !important;
    }
    
    /* Hide any price displays that might be added by other scripts */
    .wcptm-selected-items [class*="price"]:not(.mobile-price):not(.mobile-price-row) {
        display: none !important;
    }
}

/* Desktop view */
@media screen and (min-width: 1024px) {
    .wcptm-table tbody tr {
        border-bottom: 1px solid rgba(238, 238, 238, 0.7);
        transition: all 0.2s ease;
    }

    .wcptm-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.9);
    }

    /* Column styles */
    .wcptm-table td[data-label="Image"] {
        width: 120px;
        padding: 10px 20px;
    }

    .wcptm-table td[data-label="Image"] img {
        width: 100px !important;
        height: 100px !important;
        object-fit: cover;
        border: 1px solid #eee;
        border-radius: 8px;
    }

    .wcptm-select-btn {
        padding: 10px 20px;
        background: #2c3338;
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .wcptm-select-btn:hover {
        background: #3c4248;
        transform: translateY(-1px);
    }
}

/* Mobile grid view */
@media screen and (max-width: 1023px) {
    .wcptm-table thead {
        display: none;
    }
    
    .wcptm-table tbody {
        display: grid;
        gap: var(--wcptm-grid-gap, 20px);
    }
    
    .wcptm-table tbody tr:not(.category-header) {
        background: white;
        border: 1px solid #eee;
        border-radius: 8px;
        overflow: hidden;
    }
    
    /* Category headers should span full width */
    .wcptm-table tbody .category-header {
        grid-column: 1 / -1;
        width: 100%;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    @media screen and (min-width: 768px) {
        .wcptm-table tbody {
            grid-template-columns: repeat(var(--wcptm-tablet-columns, 2), 1fr);
        }
        
        .wcptm-table tbody .category-header {
            grid-column: 1 / span var(--wcptm-tablet-columns, 2);
        }
    }
    
    @media screen and (max-width: 767px) {
        .wcptm-table tbody {
            grid-template-columns: 1fr;
        }
        
        .wcptm-table tbody .category-header {
            grid-column: 1;
        }
    }
}

/* Product card */
.wcptm-table tbody tr {
    background: white;
    border: none;
    box-shadow: none;
    margin: 0;
}

/* Product content */
.wcptm-table td[data-label="Image"] {
    width: auto;
    aspect-ratio: auto;
}

.wcptm-table td[data-label="Image"] img {
    width: 100px !important;
    height: 100px !important;
    max-width: none;
}

.wcptm-table td[data-label="Name"] {
    width: 10%;
}

.wcptm-table td[data-label="Name"] h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #333;
}

.wcptm-table td[data-label="Description"],
.wcptm-table td[data-label="Name"] .description {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.wcptm-table td[data-label="Price"] {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    padding: 5px 15px 15px;
}

/* Small screens */
@media screen and (max-width: 480px) {
    .wcptm-table td[data-label="Name"] {
        font-size: 16px;
    }

    .wcptm-table td[data-label="Price"] {
        font-size: 15px;
    }

    .wcptm-select-btn {
        font-size: 15px;
    }
}

/* iOS safe area support */
@supports (padding: max(0px)) {
    body {
        padding-bottom: max(80px, env(safe-area-inset-bottom));
    }
}

/* Responsive grid using customizer settings */
@media screen and (min-width: 1024px) {
    .wcptm-table tbody {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .wcptm-table tbody tr {
        border: 1px solid #eee;
    }
    
    .wcptm-table td[data-label="Name"],
    .wcptm-table td[data-label="Price"] {
        padding: 10px;
    }
    
    .wcptm-select-btn {
        width: 100%;
        margin: 0;
        border-radius: 0;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .wcptm-table tbody {
        grid-template-columns: repeat(var(--wcptm-tablet-columns, 2), 1fr);
    }
}

@media screen and (max-width: 767px) {
    .wcptm-table tbody {
        grid-template-columns: 1fr;
    }
}

/* Form styles */
.wcptm-order-form {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.wcptm-order-form h2 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
    color: #333;
}

.form-row {
    margin-bottom: 20px;
    text-align: left;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-row textarea {
    min-height: 100px;
}

.order-submit-btn {
    background: #2c3338;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
    display: block;
    transition: background-color 0.3s ease;
}

.order-submit-btn:hover {
    background: #3c4248;
}

/* Order Total */
.order-total {
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    text-align: center;
    color: #333;
}

/* Order response messages */
.order-response {
    margin: 20px 0;
    padding: 30px;
    border-radius: 8px;
    display: none;
    text-align: center;
}

.order-success {
    background-color: #f8fff8;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    color: #333333;
}

.order-success h3 {
    color: #333333;
    font-size: 22px;
    margin-top: 10px;
    margin-bottom: 15px;
    font-weight: bold;
}

.order-success p {
    color: #333333;
    margin-bottom: 12px;
    line-height: 1.5;
}

.order-error {
    background: #f8e7e7;
    border: 1px solid #e6c3c3;
    color: #662c2c;
    padding: 20px;
}

.order-response h3 {
    margin-bottom: 15px;
    font-size: 22px;
}

.success-icon {
    background-color: #4CAF50;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-size: 24px;
    margin-bottom: 15px;
}

/* Spinner for loading state */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* Clean dropdown styles */
.wcptm-controls {
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: right;
}

.wcptm-sorter {
    display: inline-block !important;
    min-width: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    outline: none;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Option groups */
.wcptm-sorter optgroup {
    font-weight: 600;
    background: #f8f9fa;
}

/* Options */
.wcptm-sorter option {
    padding: 8px;
    background: white;
    font-weight: normal;
}

/* Hover and focus states */
.wcptm-sorter:hover {
    border-color: #999;
}

.wcptm-sorter:focus {
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

/* Hide all button-related elements */
.wcptm-filter-buttons,
.wcptm-sort-buttons,
.filter-btn,
.sort-btn,
.category-btn {
    display: none !important;
}

/* Ensure consistent width for cart area */
.wcptm-selected-items,
.wcptm-container,
.wcptm-wrapper {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

.wcptm-selected-table,
.wcptm-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

/* Fix NaN display */
.cart-summary-bar .total {
    font-weight: bold;
}

/* Center product names and make font larger */
.wcptm-table td[data-label="Name"] {
    text-align: center !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    width: auto !important;
}

/* Ensure product names are centered on all devices */
@media screen and (min-width: 769px) {
    .wcptm-table td[data-label="Name"] {
        text-align: center !important;
    }
    
    .wcptm-table th:nth-child(2) {
        text-align: center !important;
    }
}

/* Make sure the header is also centered */
.wcptm-table th:nth-child(2) {
    text-align: center !important;
}

/* Override any WooCommerce default styles */
.woocommerce img, 
.woocommerce-page img {
    height: auto;
    max-width: none;
}

/* Already selected message */
.item-already-selected {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(44, 51, 56, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-out 2s forwards;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Description styles */
.wcptm-table td[data-label="Description"] .description {
    font-size: 14px;
    line-height: 1.4;
    color: #666;
    margin: 0;
    font-weight: normal;
}

/* Divider with label */
.wcptm-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.wcptm-divider-line {
    flex-grow: 1;
    height: 2px;
    background-color: #ddd;
}

.wcptm-divider-label {
    padding: 0 15px;
    font-size: 18px;
    font-weight: 700;
    color: #2c3338;
    background-color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Make sure the divider stays visible when scrolling */
@media screen and (max-width: 768px) {
    .wcptm-divider {
        position: sticky;
        top: 0;
        z-index: 10;
        background-color: #fff;
        padding: 10px 0;
        margin: 20px 0;
    }
    
    .wcptm-divider-label {
        font-size: 16px;
    }
}

/* Item Added message */
.item-added-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(230, 126, 34, 0.9); /* Orange color */
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-out 2s forwards;
    z-index: 1000;
}

/* We can reuse the existing slideIn and fadeOut animations */

/* Mobile optimizations */
@media screen and (max-width: 768px) {
    .wcptm-controls {
        text-align: center !important;
    }
    
    .wcptm-sorter {
        width: 80% !important;
        max-width: 300px !important;
    }
}

/* Slide to remove functionality */
.wcptm-selected-table .cart-item-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    transition: transform 0.3s ease;
}

.wcptm-selected-table .cart-item-content {
    width: 100%;
    background: #fff;
    position: relative;
    z-index: 1;
}

.wcptm-selected-table .remove-indicator {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 80px;
    background-color: #ff5252;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

.wcptm-selected-table .remove-indicator::before {
    content: "×";
    font-size: 24px;
}

.wcptm-selected-table .slide-hint {
    display: none;
    font-size: 12px;
    color: #777;
    text-align: right;
    padding: 5px 10px;
    font-style: italic;
}

@media screen and (max-width: 768px) {
    /* ... existing code ... */
    
    /* Remove the previously added styles that might conflict */
    .wcptm-selected-table .wcptm-remove-btn {
        display: none;
    }
    
    .wcptm-selected-table .slide-hint {
        display: block;
    }
    
    .wcptm-selected-table tr {
        margin-bottom: 15px;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .wcptm-selected-table td {
        background: #fff;
        padding: 8px;
    }
    
    /* ... existing code ... */
}

/* Category Headers */
.wcptm-table .category-header {
    background: transparent;
    border: none;
    box-shadow: none;
}

.wcptm-table .category-header td {
    padding: 25px 0 10px 0;
    text-align: left;
    border-bottom: none;
}

.wcptm-table .category-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 8px;
    display: inline-block;
}

/* Mobile grid view - Ensure category headers work with grid layout */
@media screen and (max-width: 1023px) {
    /* Make category headers span full width in grid */
    .wcptm-table tbody .category-header {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        margin: 20px 0 10px 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        display: block !important;
    }
    
    /* Ensure product cards maintain their styling */
    .wcptm-table tbody tr:not(.category-header) {
        background: white !important;
        border: 1px solid #eee !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }
}

/* Ensure category headers are properly styled on mobile */
@media screen and (max-width: 768px) {
    .wcptm-table .category-header {
        display: block;
        width: 100%;
        margin: 20px 0 10px 0;
        padding: 0;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        grid-column: 1 / -1 !important;
    }
    
    .wcptm-table .category-header td {
        display: block;
        width: 100%;
        padding: 10px 0;
        text-align: center;
        background: transparent !important;
        border: none !important;
    }
    
    .wcptm-table .category-title {
        font-size: 20px;
        border-bottom: none;
        position: relative;
        color: #333 !important;
        font-weight: 700 !important;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .wcptm-table .category-title:after {
        content: '';
        display: block;
        width: 50px;
        height: 3px;
        background: #333;
        margin: 8px auto 0;
    }
    
    /* Restore original mobile grid layout */
    .wcptm-table tbody {
        display: grid !important;
        gap: var(--wcptm-grid-gap, 20px) !important;
    }
    
    /* Ensure category headers don't break the grid layout */
    .wcptm-table .category-header {
        margin-bottom: 0 !important;
    }
    
    /* Restore original product card styling */
    .wcptm-table tbody tr:not(.category-header) {
        background: white;
        border: 1px solid #eee;
        border-radius: 8px;
        overflow: hidden;
    }
}

/* Enhanced Mobile Landscape Styles */
@media screen and (orientation: landscape) and (max-width: 1023px) {
    /* Container optimization */
    .wcptm-wrapper {
        padding: 0;
        max-width: 100%;
        overflow-x: hidden;
        background: var(--wcptm-background-color, #fff);
    }
    
    /* Table structure */
    .wcptm-table {
        border-spacing: 0;
        border-collapse: separate;
        background: var(--wcptm-background-color, #fff);
    }
    
    .wcptm-table tbody {
        display: grid;
        gap: var(--wcptm-grid-gap, 20px);
        padding: 15px;
        background: var(--wcptm-background-color, #fff);
    }
    
    /* Row styling */
    .wcptm-table tr:not(.category-header) {
        background: var(--wcptm-background-color, #fff);
        border: 1px solid var(--wcptm-hover-color, rgba(0,0,0,0.1));
        border-radius: 16px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.05);
        transition: all 0.3s ease;
    }
    
    .wcptm-table tr:not(.category-header):hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px var(--wcptm-hover-color, rgba(0,0,0,0.08));
        border-color: var(--wcptm-secondary-color, #4CAF50);
    }
    
    /* Cell styling */
    .wcptm-table td {
        border: none;
        padding: 12px 15px;
        color: var(--wcptm-text-color, #333);
        transition: all 0.3s ease;
    }
    
    /* Category headers */
    .wcptm-table .category-header {
        grid-column: 1 / -1;
        width: 100%;
        background: transparent;
        border: none;
        margin: 20px 0 10px;
    }
    
    .wcptm-table .category-header td {
        padding: 25px 0 10px;
        border-bottom: 2px solid var(--wcptm-hover-color, rgba(0,0,0,0.1));
    }
    
    .wcptm-table .category-title {
        color: var(--wcptm-primary-color, #333);
        font-size: 1.4em;
        font-weight: 600;
        position: relative;
        padding-bottom: 10px;
    }
    
    .wcptm-table .category-title::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 60px;
        height: 3px;
        background: var(--wcptm-secondary-color, #4CAF50);
        border-radius: 2px;
    }
    
    /* Product content */
    .wcptm-table td[data-label="Name"] {
        color: var(--wcptm-primary-color, #333);
        font-weight: 600;
    }
    
    .wcptm-table td[data-label="Name"] h3 {
        color: var(--wcptm-primary-color, #333);
        margin-bottom: 8px;
    }
    
    .wcptm-table td[data-label="Description"] {
        color: var(--wcptm-text-color, #666);
        opacity: 0.9;
        line-height: 1.5;
    }
    
    .wcptm-table td[data-label="Description"] .description {
        color: var(--wcptm-text-color, #666);
    }
    
    .wcptm-table td[data-label="Price"] {
        color: var(--wcptm-secondary-color, #4CAF50);
        background: var(--wcptm-hover-color, #f8f9fa);
        padding: 8px 12px;
        border-radius: 6px;
        font-weight: bold;
    }
    
    /* Image styling */
    .wcptm-table td[data-label="Image"] {
        padding: 12px;
        background: var(--wcptm-background-color, #fff);
    }
    
    .wcptm-table td[data-label="Image"] img {
        border: 1px solid var(--wcptm-hover-color, rgba(0,0,0,0.1));
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .wcptm-table tr:hover td[data-label="Image"] img {
        border-color: var(--wcptm-secondary-color, #4CAF50);
    }
    
    /* Selected items table */
    .wcptm-selected-table {
        background: var(--wcptm-background-color, #fff);
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid var(--wcptm-hover-color, rgba(0,0,0,0.1));
    }
    
    .wcptm-selected-table tr {
        border-bottom: 1px solid var(--wcptm-hover-color, rgba(0,0,0,0.1));
    }
    
    .wcptm-selected-table tr:last-child {
        border-bottom: none;
    }
    
    .wcptm-selected-table th {
        background: var(--wcptm-primary-color, #2c3338);
        color: var(--wcptm-background-color, #fff);
        border: none;
        padding: 15px;
    }
    
    .wcptm-selected-table td {
        background: var(--wcptm-background-color, #fff);
        color: var(--wcptm-text-color, #333);
        border-bottom: 1px solid var(--wcptm-hover-color, rgba(0,0,0,0.1));
    }
    
    /* Mobile price row */
    .mobile-price-row {
        border-top: 1px solid var(--wcptm-hover-color, rgba(0,0,0,0.1));
    }
    
    .mobile-price {
        color: var(--wcptm-secondary-color, #4CAF50);
        font-weight: bold;
    }
    
    .mobile-subtotal {
        color: var(--wcptm-primary-color, #333);
        font-weight: bold;
    }
    
    /* Form elements */
    .form-row input,
    .form-row textarea {
        border: 1px solid var(--wcptm-hover-color, rgba(0,0,0,0.1));
        color: var(--wcptm-text-color, #333);
        background: var(--wcptm-background-color, #fff);
    }
    
    .form-row input:focus,
    .form-row textarea:focus {
        border-color: var(--wcptm-secondary-color, #4CAF50);
        outline: none;
    }
    
    .form-row label {
        color: var(--wcptm-primary-color, #333);
    }
    
    /* Order response styling */
    .order-success {
        background: var(--wcptm-hover-color, #e7f7e7);
        border: 1px solid var(--wcptm-secondary-color, #c3e6c3);
        color: var(--wcptm-primary-color, #2c662d);
    }
    
    .order-error {
        background: var(--wcptm-hover-color, #f8e7e7);
        border: 1px solid var(--wcptm-primary-color, #e6c3c3);
        color: var(--wcptm-primary-color, #662c2c);
    }
    
    /* Controls and dropdowns */
    .wcptm-controls {
        background: var(--wcptm-background-color, #fff);
        border-bottom: 1px solid var(--wcptm-hover-color, rgba(0,0,0,0.1));
    }
    
    .wcptm-sorter {
        border: 1px solid var(--wcptm-hover-color, rgba(0,0,0,0.1));
        color: var(--wcptm-text-color, #333);
        background: var(--wcptm-background-color, #fff);
    }
    
    .wcptm-sorter:hover,
    .wcptm-sorter:focus {
        border-color: var(--wcptm-secondary-color, #4CAF50);
    }
    
    .wcptm-sorter option {
        background: var(--wcptm-background-color, #fff);
        color: var(--wcptm-text-color, #333);
    }
    
    /* Divider styling */
    .wcptm-divider-line {
        background-color: var(--wcptm-hover-color, rgba(0,0,0,0.1));
    }
    
    .wcptm-divider-label {
        color: var(--wcptm-primary-color, #333);
        background-color: var(--wcptm-background-color, #fff);
    }
}

/* Payment method styles */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-option:hover {
    background-color: #f0f0f0;
}

.payment-option input[type="radio"] {
    margin-right: 10px;
}

.payment-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-label img {
    max-height: 24px;
    width: auto;
}

/* Ensure payment icons display properly */
.payment-label img, 
.payment-label svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

/* Mobile payment options */
@media screen and (max-width: 768px) {
    .payment-option {
        padding: 12px;
    }
    
    .payment-label {
        font-size: 14px;
    }
}

/* Bank account details in success message */
.bacs-details {
    margin-top: 25px;
    padding: 20px;
    background-color: #f7f7f7;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    color: #333333;
}

.bacs-details h4 {
    margin-top: 0;
    color: #333333;
    font-size: 18px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.bacs-details h5 {
    margin-top: 15px;
    font-size: 16px;
    color: #444444;
}

.bacs-details p {
    margin: 8px 0;
    line-height: 1.5;
    color: #333333;
}

.bacs-instructions {
    font-style: italic;
    margin-bottom: 15px;
    color: #444444;
}

.bacs-account {
    padding: 12px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.bacs-account p {
    color: #333333;
}

.bacs-account strong {
    color: #222222;
    font-weight: bold;
}

.bacs-accounts .bacs-account {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* Responsive styling for mobile view */
@media (max-width: 768px) {
    .bacs-details {
        padding: 15px 10px;
    }
    
    .bacs-account {
        padding: 10px;
    }
}

/* Cash on Delivery details styling */
.payment-details-cod {
    margin: 20px 0;
    padding: 0;
}

.payment-details-cod h4 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.payment-details-cod div {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #4CAF50;
}

.payment-details-cod p {
    margin-bottom: 10px;
    color: #333;
    line-height: 1.5;
}

.payment-details-cod strong {
    font-weight: bold;
    color: #222;
}

.payment-details-cod p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .payment-details-cod {
        margin: 15px 0;
    }
    
    .payment-details-cod div {
        padding: 12px;
    }
    
    .payment-details-cod h4 {
        font-size: 1.1em;
    }
}

/* PayPal payment option styling */
.payment-option.payment-option-paypal {
    border: 1px solid #f6f6f6;
    background-color: #fafafa;
}

.payment-option.payment-option-paypal:hover {
    background-color: #f0f7ff;
    border-color: #0070ba;
}

.payment-option.payment-option-paypal .payment-label {
    display: flex;
    align-items: center;
}

.payment-option.payment-option-paypal .payment-label img {
    max-height: 24px;
    margin-right: 5px;
}

.payment-option.payment-option-paypal input[type="radio"]:checked + .payment-label {
    color: #0070ba;
    font-weight: 600;
}

/* PayPal success message styling */
.payment-details-paypal {
    margin: 20px 0;
    padding: 0;
}

.payment-details-paypal h4 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.payment-details-paypal div {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #0070ba;
}

.payment-details-paypal p {
    margin-bottom: 10px;
    color: #333;
    line-height: 1.5;
}

.payment-details-paypal strong {
    font-weight: bold;
    color: #222;
}

.payment-details-paypal p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .payment-details-paypal {
        margin: 15px 0;
    }
    
    .payment-details-paypal div {
        padding: 12px;
    }
    
    .payment-details-paypal h4 {
        font-size: 1.1em;
    }
}

/* PayPal loading animation for redirect */
.paypal-loader {
    text-align: center;
    margin: 20px auto;
    width: 70px;
    height: 30px;
}

.paypal-loader:after {
    content: " ";
    display: block;
    width: 64px;
    height: 64px;
    margin: 8px;
    border-radius: 50%;
    border: 6px solid #0070ba;
    border-color: #0070ba transparent #0070ba transparent;
    animation: paypal-loader 1.2s linear infinite;
}

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

/* Fix PayPal button alignment in payment options */
.payment-option.payment-option-paypal {
    display: block;
    margin-bottom: 10px;
    position: relative;
}

.payment-option.payment-option-paypal label {
    display: flex;
    align-items: center;
}

.payment-option.payment-option-paypal img.paypal-button-logo {
    max-height: 24px;
    margin-left: 8px;
}

.payment-options {
    margin-bottom: 20px;
}

/* Ensuring other payment options remain correctly styled */
.payment-option input[type="radio"] {
    margin-right: 10px;
}

@media (max-width: 768px) {
    .paypal-loader {
        margin: 15px auto;
    }
}

/* Extra Options Modal Styles */
.wcptm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.wcptm-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    overflow-x: hidden;
}

.wcptm-modal-content * {
    box-sizing: border-box;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wcptm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.wcptm-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.wcptm-modal-close {
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.wcptm-modal-close:hover {
    color: #333;
}

.wcptm-modal-body {
    padding: 25px;
}

.wcptm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 25px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.wcptm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.wcptm-btn-primary {
    background: #2E7D32;
    color: white;
}

.wcptm-btn-primary:hover {
    background: #1B5E20;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.wcptm-btn-secondary {
    background: #6c757d;
    color: white;
}

.wcptm-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Extra Options Form Styles */
.extra-option-field {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.extra-option-field label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.extra-option-field input[type="text"],
.extra-option-field input[type="number"],
.extra-option-field textarea,
.extra-option-field select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.extra-option-field input[type="text"]:focus,
.extra-option-field input[type="number"]:focus,
.extra-option-field textarea:focus,
.extra-option-field select:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.extra-option-field textarea {
    resize: vertical;
    min-height: 80px;
}

.extra-option-field .option-price {
    color: #2E7D32;
    font-weight: 600;
    font-size: 14px;
    margin-top: 5px;
}

.extra-option-field .required {
    color: #e74c3c;
    font-size: 14px;
    margin-left: 5px;
}

/* Radio and Checkbox Styles */
.extra-option-field .radio-group,
.extra-option-field .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.extra-option-field .radio-item,
.extra-option-field .checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.extra-option-field .radio-item:hover,
.extra-option-field .checkbox-item:hover {
    border-color: #2E7D32;
    background: #f8f9fa;
}

.extra-option-field .radio-item input[type="radio"],
.extra-option-field .checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.extra-option-field .radio-item label,
.extra-option-field .checkbox-item label {
    margin: 0;
    cursor: pointer;
    flex: 1;
}

/* Mobile Responsive for Modal */
@media screen and (max-width: 768px) {
    .wcptm-modal {
        padding: 10px;
    }
    
    .wcptm-modal-content {
        max-height: 90vh;
        width: 100%;
        margin: 0 auto;
    }
    
    .wcptm-modal-header,
    .wcptm-modal-body,
    .wcptm-modal-footer {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .wcptm-modal-footer {
        flex-direction: column;
    }
    
    .wcptm-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .extra-option-field {
        padding: 15px;
        width: 100%;
    }
    
    /* Ensure all children elements respect container width */
    .wcptm-modal-body > *,
    .wcptm-modal-body > div {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix select dropdowns on mobile */
    .extra-option-field select {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px;
        padding: 14px;
        border-radius: 8px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path fill="%23333" d="M0 0l6 6 6-6z"/></svg>');
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 40px;
    }
    
    /* Better text wrapping for long option names */
    .extra-option-field label,
    .extra-option-field h4,
    .extra-option-field h5 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        width: 100%;
    }
    
    /* Price display responsive */
    .wcptm-price-display,
    .wcptm-base-price,
    .wcptm-options-price,
    .wcptm-total-price {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .wcptm-price-display > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        flex-wrap: nowrap;
    }
    
    .wcptm-price-display > div > span:first-child {
        flex: 0 0 auto;
        margin-right: 15px;
    }
    
    .wcptm-price-display > div > span:last-child {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* Extra Options Display Styles */
.extra-options-display {
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #2E7D32;
}

.extra-option-item {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
    line-height: 1.4;
}

.extra-option-item:last-child {
    margin-bottom: 0;
}

.extra-option-item strong {
    color: #333;
    font-weight: 600;
}

.extra-price {
    color: #2E7D32;
    font-weight: 600;
    font-size: 11px;
}

/* Mobile specific extra options styling */
@media screen and (max-width: 768px) {
    .extra-options-display {
        margin-top: 6px;
        padding: 6px;
        font-size: 11px;
    }
    
    .extra-option-item {
        font-size: 11px;
        margin-bottom: 3px;
    }
    
    .extra-price {
        font-size: 10px;
    }
}

/* Success Message Animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wcptm-success-message {
    animation: slideInRight 0.3s ease-out;
}

/* Option Groups Styling */
.option-group {
    margin-bottom: 30px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.group-title {
    margin: 0 0 10px 0;
    color: #2E7D32;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #2E7D32;
    padding-bottom: 8px;
}

.group-description {
    margin: 0 0 15px 0;
    color: #666;
    font-style: italic;
    font-size: 14px;
}

.group-required {
    margin: 0 0 15px 0;
    color: #e74c3c;
    font-weight: 600;
    font-size: 14px;
}

.group-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.group-options .extra-option-field {
    margin-bottom: 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

/* Mobile responsive for groups */
@media screen and (max-width: 768px) {
    .option-group {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .group-title {
        font-size: 16px;
    }
    
    .group-options {
        gap: 10px;
    }
    
    .group-options .extra-option-field {
        padding: 12px;
    }
}

/* Searchable Lists Styling */
.searchable-list-container {
    position: relative;
}

.searchable-list-container input[type="text"] {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.searchable-list-container input[type="text"]:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.category-item,
.product-item {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.category-item:hover,
.product-item:hover {
    background-color: #f0f8ff;
}

.category-item input[type="checkbox"],
.product-item input[type="checkbox"] {
    margin-right: 8px;
}

#selected-categories,
#selected-products {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    margin-top: 10px;
}

#selected-categories-list,
#selected-products-list {
    color: #2E7D32;
    font-weight: 500;
}

/* Button styling for searchable lists */
.searchable-list-container .button-small {
    margin-right: 5px;
    padding: 4px 8px;
    font-size: 12px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.searchable-list-container .button-small:hover {
    background: #2E7D32;
    color: white;
    border-color: #2E7D32;
}

.searchable-list-container .button-small:active {
    transform: translateY(1px);
}

/* Mobile responsive for searchable lists */
@media screen and (max-width: 768px) {
    .searchable-list-container input[type="text"] {
        padding: 8px 10px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .category-item,
    .product-item {
        padding: 8px;
        font-size: 14px;
    }
    
    #selected-categories,
    #selected-products {
        padding: 8px;
        font-size: 14px;
    }
}

/* Mobile View Cart Button */
.mobile-view-cart-btn {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background: white;
    color: #2c3338;
    border: none;
    border-bottom: 1px solid #ddd;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-view-cart-btn:hover {
    background: #f8f9fa;
    color: #2c3338;
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.mobile-view-cart-btn:active {
    background: #e9ecef;
    transform: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mobile-view-cart-btn .cart-icon {
    font-size: 16px;
    display: inline-block;
}

.mobile-view-cart-btn .cart-text {
    font-size: 13px;
    font-weight: 600;
}

.mobile-view-cart-btn .cart-total {
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
}

/* Hide mobile button on desktop */
@media (min-width: 769px) {
    .mobile-view-cart-btn {
        display: none !important;
    }
}

/* Ensure mobile button is visible on mobile */
@media (max-width: 768px) {
    .mobile-view-cart-btn {
        display: flex !important;
    }
    
    /* Add padding to body to account for fixed button at top */
    body {
        padding-top: 60px;
    }
    
    /* iOS Safari specific fixes for category headers */
    .wcptm-table tbody tr.category-header {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    /* Force iOS to respect display property changes */
    .wcptm-table tbody tr.category-header[style*="display: block"],
    .wcptm-table tbody tr.category-header[style*="display: table-row"] {
        display: block !important;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Ensure hidden headers stay hidden on iOS */
    .wcptm-table tbody tr.category-header[style*="display: none"] {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }
} 