/* Chellamani Fireworks Agencies - Diwali Festive Theme & Responsive Order Table */

:root {
    --cm-crimson: #991b1b;
    --cm-dark-red: #7f1d1d;
    --cm-gold: #f59e0b;
    --cm-light-gold: #fef3c7;
    --cm-dark-gold: #b45309;
    --cm-green: #15803d;
    --cm-dark: #1e293b;
    --cm-light-bg: #fffbf0;
    --cm-border: #fed7aa;
    --cm-shadow: 0 4px 15px rgba(153, 27, 27, 0.12);
}

html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.cm-order-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--cm-dark);
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 15px 100px;
    background-color: var(--cm-light-bg);
    overflow-x: hidden !important;
    width: 100%;
    box-sizing: border-box;
}

.cm-hidden,
.cm-product-row.cm-hidden,
.cm-cat-header-row.cm-hidden,
.cm-product-row[style*="display: none"],
.cm-cat-header-row[style*="display: none"] {
    display: none !important;
}

/* Festive Hero Banner */
.cm-festive-hero {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 50%, #450a0a 100%);
    color: #ffffff;
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px rgba(127, 29, 29, 0.3);
    position: relative;
    overflow: hidden;
    border: 2px solid var(--cm-gold);
}

.cm-festive-hero::before {
    content: "✨ 🪔 🎆 🪔 ✨";
    display: block;
    font-size: 18px;
    letter-spacing: 12px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.cm-diwali-badge {
    display: inline-block;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    color: #7f1d1d;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.cm-hero-title {
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 900;
    margin: 0 0 8px;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    letter-spacing: 0.5px;
}

.cm-hero-sub {
    font-size: clamp(14px, 2vw, 17px);
    margin: 0 0 16px;
    color: var(--cm-light-gold);
}

.cm-hero-sub strong {
    color: #fef08a;
    font-size: 1.15em;
    background: rgba(0,0,0,0.25);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--cm-gold);
}

.cm-highlights-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    font-size: 13px;
    font-weight: 600;
    color: #fde68a;
    padding: 10px 0;
    border-top: 1px dashed rgba(253, 230, 138, 0.4);
    border-bottom: 1px dashed rgba(253, 230, 138, 0.4);
    margin-bottom: 18px;
}

.cm-call-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.cm-phone-btn, .cm-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: transform 0.2s;
}

.cm-phone-btn {
    background: #ffffff;
    color: var(--cm-crimson);
}

.cm-phone-btn:hover {
    transform: translateY(-2px);
    background: var(--cm-light-gold);
}

.cm-wa-btn {
    background: #25d366;
    color: #ffffff;
}

.cm-wa-btn:hover {
    transform: translateY(-2px);
    background: #1eb855;
}

/* Sticky Filter & Search */
.cm-filter-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    border: 1px solid #fed7aa;
}

.cm-search-container {
    position: relative;
    margin-bottom: 10px;
}

.cm-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #94a3b8;
}

#cm-search-input {
    width: 100%;
    padding: 10px 38px 10px 36px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #f8fafc;
    box-sizing: border-box;
}

#cm-search-input:focus {
    border-color: var(--cm-crimson);
    background: #ffffff;
}

#cm-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.cm-category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.cm-category-scroll::-webkit-scrollbar {
    height: 4px;
}

.cm-category-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.cm-cat-btn {
    flex-shrink: 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.cm-cat-btn:hover {
    background: #fee2e2;
    color: var(--cm-crimson);
}

.cm-cat-btn.active {
    background: var(--cm-crimson);
    color: #ffffff;
    border-color: var(--cm-crimson);
    box-shadow: 0 2px 6px rgba(153, 27, 27, 0.3);
}

.cm-cat-btn.active small {
    color: #fde68a;
}

.cm-badge {
    background: rgba(0,0,0,0.08);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
}

.cm-cat-btn.active .cm-badge {
    background: rgba(255,255,255,0.25);
}

/* Instruction notice */
.cm-instruction-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fef3c7;
    border-left: 4px solid var(--cm-gold);
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #92400e;
}

.cm-inst-icon {
    font-size: 22px;
    flex-shrink: 0;
}

/* Products Table */
.cm-table-responsive {
    background: #ffffff;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid #fed7aa;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    margin-bottom: 30px;
}

.cm-products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cm-products-table thead th {
    background: #7f1d1d;
    color: #ffffff;
    padding: 12px 10px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    border: none;
}

.cm-products-table thead th.th-sno,
.cm-products-table thead th.th-img,
.cm-products-table thead th.th-unit,
.cm-products-table thead th.th-rate,
.cm-products-table thead th.th-offer,
.cm-products-table thead th.th-qty,
.cm-products-table thead th.th-subtotal {
    text-align: center;
}

/* Category separator row */
.cm-cat-header-row td {
    background: #fef3c7;
    padding: 10px 16px;
    border-top: 2px solid var(--cm-gold);
    border-bottom: 1px solid #fed7aa;
}

.cm-cat-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #991b1b;
}

.cm-cat-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
}

.cm-cat-tag {
    display: none !important;
}

.cm-cat-ta {
    color: #78350f;
    font-size: 14px;
}

/* Product rows */
.cm-product-row {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.cm-product-row:hover {
    background: #fffbeb;
}

.cm-product-row.cm-row-selected {
    background: #fef2f2;
}

.cm-product-row td {
    padding: 10px 8px;
    vertical-align: middle;
}

.cm-sno-pill {
    display: inline-block;
    background: #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 12px;
}

.cm-prod-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: block;
    margin: 0 auto;
}

.cm-name-en {
    font-weight: 700;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.3;
}

.cm-name-ta {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.cm-mobile-price-row, .td-price-mobile {
    display: none;
}

.cm-unit-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.td-rate, .td-offer, .td-subtotal, .td-qty, .td-sno, .td-img, .td-unit {
    text-align: center;
}

.cm-strike {
    color: #94a3b8;
    font-size: 13px;
}

.cm-offer-price {
    color: var(--cm-crimson);
    font-size: 15px;
    display: block;
}

.cm-discount-pill {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-weight: 800;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
    margin-top: 2px;
}

/* Quantity Box */
.cm-qty-box {
    display: inline-flex;
    align-items: center;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.cm-qty-btn {
    background: #f8fafc;
    border: none;
    width: 28px;
    height: 32px;
    font-size: 16px;
    font-weight: bold;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background 0.15s;
}

.cm-qty-btn:hover {
    background: #e2e8f0;
}

.cm-qty-btn:active {
    background: #cbd5e1;
}

.cm-qty-input {
    width: 44px;
    height: 32px;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    -moz-appearance: textfield;
    outline: none;
}

.cm-qty-input::-webkit-outer-spin-button,
.cm-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cm-row-subtotal {
    font-weight: 800;
    color: #0f172a;
    font-size: 14px;
}

.cm-row-selected .cm-row-subtotal {
    color: var(--cm-crimson);
}

.cm-no-results {
    text-align: center;
    padding: 40px 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    font-size: 15px;
}

/* Sticky Bottom Cart Bar */
.cm-sticky-bar {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(127, 29, 29, 0.95);
    backdrop-filter: blur(8px);
    color: #ffffff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
    padding: 10px 15px;
    transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 2px solid var(--cm-gold);
}

.cm-sticky-bar.visible {
    bottom: 0;
}

.cm-sticky-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.cm-sticky-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 15px;
    font-size: 13px;
}

.cm-sticky-count {
    background: var(--cm-gold);
    color: #7f1d1d;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
}

.cm-sticky-amount {
    font-size: 16px;
    color: #ffffff;
}

.cm-sticky-amount strong {
    color: #fef08a;
    font-size: 18px;
}

.cm-sticky-saved {
    color: #86efac;
    font-size: 12px;
}

.cm-btn-scroll-checkout {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #7f1d1d;
    font-weight: 800;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.cm-btn-scroll-checkout:hover {
    transform: scale(1.04);
}

/* Checkout Section */
.cm-checkout-section {
    margin-top: 40px;
}

.cm-checkout-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    border: 2px solid var(--cm-border);
    box-shadow: 0 10px 30px rgba(153, 27, 27, 0.08);
}

.cm-checkout-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-bottom: 2px solid #fed7aa;
    padding-bottom: 18px;
    margin-bottom: 25px;
}

.cm-ch-icon {
    font-size: 32px;
    background: #fef3c7;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.cm-checkout-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: #991b1b;
}

.cm-checkout-header p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* Order Summary Box */
.cm-order-summary-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.cm-order-summary-box h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #92400e;
}

.cm-summary-empty {
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
    padding: 15px;
}

.cm-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 15px;
}

.cm-summary-table th {
    background: #fef3c7;
    color: #78350f;
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #fed7aa;
}

.cm-summary-table td {
    padding: 8px;
    border-bottom: 1px solid #fef3c7;
}

.cm-sum-qty-pill {
    background: #fed7aa;
    color: #7c2d12;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.cm-summary-totals {
    border-top: 2px dashed #fde68a;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.cm-total-row {
    font-size: 14px;
    display: flex;
    gap: 15px;
}

.cm-total-row.cm-green {
    color: var(--cm-green);
    font-weight: 600;
}

.cm-total-row.cm-grand {
    font-size: 18px;
    color: #991b1b;
}

.cm-total-row.cm-grand strong {
    font-size: 22px;
}

/* Form Styles */
.cm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.cm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cm-form-group.full-width {
    grid-column: span 2;
}

.cm-form-group label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.cm-form-group .req {
    color: #dc2626;
}

.cm-form-group input,
.cm-form-group textarea,
.cm-form-group select {
    padding: 10px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.cm-form-group input:focus,
.cm-form-group textarea:focus,
.cm-form-group select:focus {
    border-color: var(--cm-crimson);
    box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.1);
}

.cm-form-group small {
    font-size: 11px;
    color: #64748b;
}

/* Payment Notice */
.cm-payment-notice {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.cm-pn-badge {
    display: inline-block;
    background: #059669;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.cm-payment-notice p {
    margin: 0;
    font-size: 13px;
    color: #065f46;
    line-height: 1.4;
}

/* Submit Button */
.cm-btn-order-submit {
    width: 100%;
    background: linear-gradient(135deg, #991b1b 0%, #b91c1c 50%, #7f1d1d 100%);
    color: #ffffff;
    border: none;
    padding: 16px 25px;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.5px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(153, 27, 27, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cm-btn-order-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(153, 27, 27, 0.45);
}

.cm-btn-order-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success Modal */
.cm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cm-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 3px solid var(--cm-gold);
    animation: cmPop 0.3s ease-out;
}

@keyframes cmPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cm-success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.cm-modal-content h2 {
    color: #15803d;
    margin: 0 0 12px;
    font-size: 24px;
}

.cm-order-id-box {
    font-size: 18px;
    color: #0f172a;
    margin: 6px 0;
}

.cm-order-total-box {
    font-size: 20px;
    color: #991b1b;
    margin: 6px 0 15px;
}

.cm-success-msg {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.cm-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cm-btn-wa-order {
    background: #25d366;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 8px;
    display: block;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.cm-btn-close-modal {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* =======================================================
   MOBILE-SPECIFIC RESPONSIVE OVERRIDES
   ======================================================= */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .cm-order-wrapper {
        padding: 6px 8px 120px !important;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .cm-festive-hero {
        padding: 18px 12px !important;
        margin-bottom: 14px !important;
        border-radius: 12px !important;
    }

    .cm-highlights-bar {
        flex-direction: column !important;
        gap: 6px !important;
        font-size: 12px !important;
    }

    .cm-call-strip {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .cm-phone-btn, .cm-wa-btn {
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .cm-filter-section {
        margin-bottom: 14px !important;
    }

    .cm-search-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .cm-category-scroll {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .cm-instruction-box {
        font-size: 12px !important;
        padding: 8px 12px !important;
        margin-bottom: 14px !important;
    }

    /* ===== MOBILE PRODUCT LIST TABLE: STRICTLY ZERO HORIZONTAL OVERFLOW ===== */
    .cm-table-responsive {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 25px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .cm-products-table {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        box-sizing: border-box !important;
    }

    .cm-products-table thead {
        display: none !important;
    }

    .cm-products-table tbody {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Category Header Banner */
    .cm-cat-header-row {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-top: 14px !important;
        margin-bottom: 8px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        border: 1px solid #f59e0b !important;
    }

    .cm-cat-header-row td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 9px 12px !important;
        background: #fef3c7 !important;
    }

    .cm-cat-header-content {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        font-size: 13.5px !important;
    }

    /* Individual Product Card Row */
    .cm-product-row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 10px !important;
        border: 1px solid #fed7aa !important;
        border-radius: 12px !important;
        margin-bottom: 10px !important;
        background: #ffffff !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
        overflow-x: hidden !important;
        position: relative !important;
        transition: all 0.2s ease !important;
    }

    .cm-product-row.cm-row-selected {
        background: #fffdf5 !important;
        border-color: #f59e0b !important;
        border-left: 4px solid #f59e0b !important;
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15) !important;
    }

    .cm-product-row td {
        display: block !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* Hide desktop-only columns */
    .td-sno, .td-unit, .td-rate, .td-offer {
        display: none !important;
    }

    /* Row 1: Product Thumbnail (Left) */
    .td-img {
        flex: 0 0 48px !important;
        width: 48px !important;
        max-width: 48px !important;
        order: 1 !important;
        margin-right: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .cm-prod-thumb {
        width: 48px !important;
        height: 48px !important;
        border-radius: 10px !important;
        object-fit: cover !important;
        display: block !important;
        border: 1px solid #fed7aa !important;
        background: #fffdf5 !important;
    }

    /* Row 1: Name and Details (Right of Thumbnail - Full Width!) */
    .td-name {
        flex: 1 1 calc(100% - 60px) !important;
        min-width: 0 !important;
        order: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    .cm-name-en {
        font-size: 13.5px !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        line-height: 1.3 !important;
        margin-bottom: 3px !important;
        word-break: break-word !important;
    }

    .cm-name-meta {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .cm-name-ta {
        font-size: 11.5px !important;
        color: #64748b !important;
        line-height: 1.2 !important;
        word-break: break-word !important;
    }

    .cm-unit-label {
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #78350f !important;
        background: #fef3c7 !important;
        border: 1px solid #fde68a !important;
        padding: 1px 5px !important;
        border-radius: 4px !important;
        display: inline-block !important;
    }

    /* Row 2: Price & Offer % Block (Left) */
    .td-price-mobile {
        display: flex !important;
        align-items: center !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        order: 3 !important;
        margin-top: 10px !important;
        padding-top: 8px !important;
        border-top: 1px dashed #fed7aa !important;
        box-sizing: border-box !important;
    }

    .cm-price-block-mobile {
        display: inline-flex !important;
        align-items: baseline !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
    }

    .cm-offer-num {
        font-size: 16px !important;
        font-weight: 900 !important;
        color: #991b1b !important;
        line-height: 1 !important;
        letter-spacing: -0.3px !important;
    }

    .cm-mrp-num {
        font-size: 11.5px !important;
        font-weight: 500 !important;
        color: #94a3b8 !important;
        text-decoration: line-through !important;
        line-height: 1 !important;
    }

    .cm-off-tag {
        font-size: 11px !important;
        font-weight: 800 !important;
        color: #15803d !important;
        background: #dcfce7 !important;
        border: 1px solid #bbf7d0 !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        letter-spacing: 0.2px !important;
        line-height: 1.1 !important;
        display: inline-block !important;
    }

    /* Row 2: Quantity Box (Right) */
    .td-qty {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex: 0 0 90px !important;
        width: 90px !important;
        max-width: 90px !important;
        order: 4 !important;
        margin-left: auto !important;
        margin-top: 10px !important;
        padding-top: 8px !important;
        border-top: 1px dashed #fed7aa !important;
        box-sizing: border-box !important;
    }

    .cm-qty-box {
        display: inline-flex !important;
        border: 1.5px solid #cbd5e1 !important;
        border-radius: 6px !important;
        overflow: hidden !important;
        background: #ffffff !important;
    }

    .cm-qty-btn {
        width: 27px !important;
        height: 32px !important;
        font-size: 16px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #f8fafc !important;
        border: none !important;
        color: #334155 !important;
    }

    .cm-qty-btn:active {
        background: #e2e8f0 !important;
    }

    .cm-qty-input {
        width: 36px !important;
        height: 32px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        padding: 0 !important;
        text-align: center !important;
        border: none !important;
        border-left: 1px solid #e2e8f0 !important;
        border-right: 1px solid #e2e8f0 !important;
        color: #0f172a !important;
    }

    /* Row 3: Subtotal Line (When selected) */
    .td-subtotal {
        display: none !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        order: 5 !important;
        text-align: right !important;
        padding-top: 6px !important;
        margin-top: 6px !important;
        border-top: 1px dotted #fed7aa !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        color: #991b1b !important;
        box-sizing: border-box !important;
    }

    .cm-product-row.cm-row-selected .td-subtotal {
        display: block !important;
    }

    .cm-row-subtotal::before {
        content: "Item Total: ";
        font-weight: 600;
        color: #64748b;
    }

    /* Sticky Bottom Bar on Mobile */
    .cm-sticky-bar {
        padding: 8px 10px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .cm-sticky-container {
        gap: 6px !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    .cm-sticky-info {
        gap: 4px 10px !important;
        font-size: 12px !important;
    }

    .cm-sticky-count {
        padding: 2px 6px !important;
        font-size: 11px !important;
    }

    .cm-sticky-amount {
        font-size: 13px !important;
    }

    .cm-sticky-amount strong {
        font-size: 15px !important;
    }

    .cm-sticky-saved {
        font-size: 11px !important;
    }

    .cm-btn-scroll-checkout {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    /* Checkout Form on Mobile */
    .cm-checkout-card {
        padding: 16px 12px !important;
        border-radius: 12px !important;
    }

    .cm-form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .cm-form-group.full-width {
        grid-column: span 1 !important;
    }

    .cm-form-group input, 
    .cm-form-group textarea, 
    .cm-form-group select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .cm-summary-table-wrap {
        overflow-x: hidden !important;
    }

    .cm-summary-table {
        font-size: 12px !important;
    }
}

/* Extra small devices (phones <= 380px) */
@media (max-width: 380px) {
    .td-img {
        flex: 0 0 42px !important;
        width: 42px !important;
        margin-right: 8px !important;
    }
    .cm-prod-thumb {
        width: 42px !important;
        height: 42px !important;
    }
    .td-name {
        flex: 1 1 calc(100% - 50px) !important;
    }
    .cm-name-en {
        font-size: 13px !important;
    }
    .cm-name-ta {
        font-size: 11px !important;
    }
    .cm-price-block-mobile {
        gap: 5px !important;
    }
    .cm-offer-num {
        font-size: 14.5px !important;
    }
    .cm-mrp-num {
        font-size: 11px !important;
    }
    .cm-off-tag {
        font-size: 10px !important;
        padding: 1px 5px !important;
    }
    .td-qty {
        flex: 0 0 84px !important;
        width: 84px !important;
    }
    .cm-qty-btn {
        width: 25px !important;
        height: 30px !important;
        font-size: 15px !important;
    }
    .cm-qty-input {
        width: 34px !important;
        height: 30px !important;
        font-size: 13px !important;
    }
}
