/* PAGE WRAPPER */
.cma-page {
    width: 100%;
    display: flex;
    justify-content: center;
        font-family: 'Outfit', sans-serif;

}

/* GRID LAYOUT */
.cma-layout {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    padding: 40px 20px;
}

/* LEFT SIDEBAR */
/* SIDEBAR */
.cma-sidebar {
    background: #fff;
    border-right: 1px solid #eee;
}

/* Title */
.cma-sidebar-title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 30px;
    color: rgba(60, 60, 60, 1);
}

/* Menu list */
.cma-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Menu items */
.cma-menu li {
    margin-bottom: 8px;
}

/* Default menu link */
.cma-menu a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: rgba(60, 60, 60, 1);
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* Remove emoji spacing */
.cma-menu a .icon {
    display: none;
}

/* ACTIVE MENU */
.cma-menu li.active a {
    background: rgba(60, 60, 60, 1);
    color: rgba(255, 255, 255, 1);
}

/* Hover (optional clean hover) */
.cma-menu a:hover {
    background: rgba(60, 60, 60, 0.08);
}
/* RIGHT CONTENT */
.cma-content {
    width: 100%;
}

.cma-page-title {
    font-size: 28px;
    margin-bottom: 25px;
}

.cma-content-body {
    background: #fafafa;
    padding: 30px;
    min-height: 200px;
}

/* RESPONSIVE (later adjustable) */
@media (max-width: 768px) {
    .cma-layout {
        grid-template-columns: 1fr;
    }

    .cma-sidebar {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
    }
}





/* PROFILE CARD */
.cma-profile-card {
    max-width: 720px;
}

/* HEADER */
.cma-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cma-profile-header h2 {
    font-size: 20px;
    font-weight: 500;
    color: rgba(60,60,60,1);
}

.cma-edit-link {
    font-size: 13px;
    text-decoration: none;
    color: #888;
}

.cma-edit-link:hover {
    text-decoration: underline;
}

/* INFO VIEW */
.cma-profile-info {
    display: grid;
    row-gap: 28px;
}

.cma-info-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
}

.cma-label {
    font-size: 13px;
    color: #999;
}

.cma-value {
    font-size: 14px;
    color: rgba(60,60,60,1);
}

/* EDIT MODE */
.cma-profile-form label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #666;
}

.cma-profile-form input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
}

.cma-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.cma-profile-grid .full {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .cma-profile-grid {
        grid-template-columns: 1fr;
    }

    .cma-profile-grid .full {
        grid-column: span 1;
    }

    .cma-info-row {
        grid-template-columns: 1fr;
        row-gap: 6px;
    }
}  

.cma-success {
    background: #ecfdf5;
    color: #065f46;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 14px;
}


/* =========================
   MANAGE ADDRESS (VIEW MODE)
   ========================= */

.cma-address-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

/* Each column */
.cma-address-col {
    padding-right: 40px;
}

/* Vertical divider */
.cma-address-col:first-child {
    border-right: 1px solid #e5e5e5;
}

/* Header */
.cma-address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.cma-address-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: rgba(60,60,60,1);
}

/* Edit link */
.cma-edit-link {
    font-size: 13px;
    text-decoration: none;
    color: #888;
}

.cma-edit-link:hover {
    text-decoration: underline;
}

/* Address block */
.cma-address-content {
    font-size: 14px;
    line-height: 1.6;
}

.cma-address-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
}

.cma-address-value {
    color: rgba(60,60,60,1);
}

/* Mobile */
@media (max-width: 900px) {
    .cma-address-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cma-address-col:first-child {
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        padding-bottom: 30px;
    }
}

/*.cma-edit-btn {*/
/*    display:inline-block;*/
/*    margin-top:20px;*/
/*}*/

.cma-address-form {
    max-width:640px;
}

.cma-address-grid {
    display:grid;
    grid-template-columns: repeat(2,1fr);
    gap:20px;
}
.form-row-wide {
    grid-column: span 2;
}

.cma-btn-primary {
    background:#e63946;
    color:#fff;
    padding:10px 18px;
    border:none;
    margin-top:20px;
}

/* CHECKBOX ROW */
.cma-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 24px;
    font-size: 14px;
    cursor: pointer;
}

/* Checkbox itself */
.cma-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

/* Label text */
.cma-checkbox span {
    line-height: 1.4;
    user-select: none;
}

/* ===============================
   SECTION TITLE
=================================*/
.msm-size-title {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin: 0;
}

/* ===============================
   SECTION HEADER DIVIDER
=================================*/
.msm-section {
    padding: 24px 0;
}

.msm-section-header {
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

/* ===============================
   GRID LAYOUT
=================================*/
.msm-size-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

/* Remove last section bottom divider */
.msm-section:last-child .msm-size-grid {
    border-bottom: none;
}

/* ===============================
   VERTICAL COLUMN DIVIDERS
=================================*/

/* Apply right border to all items except last column */
.msm-size-grid .msm-size-item {
    padding-right: 20px;
    position: relative;
}

/* Add divider line */
.msm-size-grid .msm-size-item:not(:nth-child(4n))::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: #e5e7eb;
}

/* ===============================
   ITEM TEXT
=================================*/
.msm-size-item {
    font-size: 13px;
    line-height: 1.6;
}

.msm-size-label {
    display: block;
    font-size: 13px;
    color: #6b7280;
}

.msm-size-value {
    font-weight: 500;
    color: #111;
}

/* ===============================
   EDIT BUTTON
=================================*/
.msm-edit-size {
    display: inline-block;
    margin-top: 24px;
    font-size: 14px;
}

/* ===============================
   RESPONSIVE
=================================*/
/* ===============================
   RESPONSIVE - VIEW MODE
=================================*/

@media (max-width: 1024px) {
    .msm-size-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .msm-size-grid .msm-size-item:not(:nth-child(3n))::after {
        display: block;
    }

    .msm-size-grid .msm-size-item::after {
        display: none;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .msm-size-grid {
        grid-template-columns: repeat(3, 1fr); /* ✅ KEEP 3 */
    }

    .msm-size-grid .msm-size-item:not(:nth-child(3n))::after {
        display: block;
    }
}

/* Mobile */
@media (max-width: 520px) {
    .msm-size-grid {
        grid-template-columns: repeat(3, 1fr); /* ✅ FORCE 3 */
    }

    .msm-size-grid .msm-size-item::after {
        display: none; /* remove vertical dividers on small screens */
    }
}

/* ===============================
   SIZE PROFILE EDIT GRID
=================================*/

.msm-size-edit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.msm-edit-item {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 10px;
}

.msm-edit-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
}

.msm-edit-item select {
    width: 100%;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 0 10px;
    font-size: 13px;
}

/* Button area */
.msm-edit-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* Responsive */
/* ===============================
   RESPONSIVE - EDIT MODE
=================================*/

@media (max-width: 1100px) {
    .msm-size-edit-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .msm-size-edit-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)); /* ✅ KEEP 3 */
    }
}

@media (max-width: 520px) {
    .msm-size-edit-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)); /* ✅ FORCE 3 */
    }
}

@media (max-width: 520px) {
    .msm-size-grid,
    .msm-size-edit-grid {
        gap: 12px;
    }

    .msm-edit-item {
        padding: 8px;
    }

    .msm-size-item {
        font-size: 12px;
    }
}

.msm-edit-actions .button-primary {
    background: #111;
    border: none;
}

.msm-edit-actions .button-primary:hover {
    background: #333;
}



/* PROFILE PAGE */
.cma-profile-form {
    background: #fafafa;
    padding: 32px;
    max-width: 800px;
}

.cma-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.cma-field {
    display: flex;
    flex-direction: column;
}

.cma-field label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: rgba(60,60,60,1);
}

.cma-field input {
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
}

.cma-field input:focus {
    outline: none;
    border-color: rgba(60,60,60,1);
}

/* Full width field */
.cma-full {
    grid-column: span 2;
}

/* Save button */
.cma-btn-primary {
    margin-top: 28px;
    background: rgba(60,60,60,1);
    color: #fff;
    padding: 12px 22px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
}

.cma-btn-primary:hover {
    opacity: 0.9;
}

/* Success message */
.cma-success {
    background: #f1f1f1;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* PROFILE CARD */
.cma-profile-card {
    background: #fafafa;
    padding: 40px;
    max-width: 820px;
}

/* Header */
.cma-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.cma-profile-header h2 {
    font-size: 22px;
    font-weight: 500;
    color: rgba(60,60,60,1);
}

/* Edit link */
.cma-edit-link {
    font-size: 14px;
    color: rgba(60,60,60,0.7);
    text-decoration: none;
}

.cma-edit-link:hover {
    text-decoration: underline;
}

/* VIEW MODE */
.cma-profile-view {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.cma-profile-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px;
}

.cma-label {
    font-size: 13px;
    color: rgba(60,60,60,0.6);
    display: block;
    margin-bottom: 6px;
}

.cma-value {
    font-size: 15px;
    color: rgba(60,60,60,1);
}

/* EDIT GRID */
.cma-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 40px;
}

.cma-profile-grid .form-row-wide {
    grid-column: span 2;
}

.cma-field label {
    font-size: 13px;
    margin-bottom: 8px;
    display: block;
}

.cma-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e5e5;
    font-family: 'Outfit', sans-serif;
}

/* Button */
.cma-btn-primary {
    margin-top: 30px;
    background: rgba(60,60,60,1);
    color: #fff;
    padding: 12px 28px;
    border: none;
    cursor: pointer;
}

/* Success */
.cma-success {
    margin-bottom: 20px;
    background: #f3f3f3;
    padding: 12px;
    font-size: 14px;
}
/* INLINE EDIT INPUTS */
.cma-profile-inline-form input {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
}

.cma-profile-inline-form input:focus {
    outline: none;
    border-bottom: 1px solid rgba(60,60,60,1);
}

/* Actions */
.cma-profile-actions {
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.cma-btn-cancel {
    text-decoration: none;
    color: rgba(60,60,60,0.7);
    font-size: 14px;
}

.cma-btn-cancel:hover {
    text-decoration: underline;
}
/* Mobile */
@media (max-width: 768px) {
    .cma-profile-row,
    .cma-profile-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* TITLE */
.cma-orders-title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 30px;
}

.cma-orders-section {
    margin-bottom: 28px;
}

.cma-orders-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cma-orders-count {
    font-size: 18px;
    color: rgba(60,60,60,0.6);
}

/* ORDER WRAPPER */
.cma-order {
    padding: 25px 0;
    border-bottom: 1px solid #e6e6e6;
}

/* HEADER */
.cma-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: rgba(60,60,60,1);
    margin-bottom: 20px;
    cursor: pointer;
}

.cma-order-left {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.cma-order-id {
    font-weight: 500;
}

.cma-order-link {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.cma-order-link:hover {
    text-decoration: underline;
}

.cma-order-meta {
    font-size: 14px;
    color: rgba(60,60,60,0.7);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cma-order-toggle {
    width: 16px;
    height: 16px;
    border: solid rgba(60,60,60,0.5);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-left: 12px;
}

.cma-order--collapsed .cma-order-toggle {
    transform: rotate(-45deg);
}

.cma-order--collapsed .cma-order-items {
    display: none;
}

.cma-order--collapsed .cma-order-header {
    margin-bottom: 0;
}

.cma-order-date {
    font-size: 14px;
    color: rgba(60,60,60,0.6);
}

/* STATUS DOT */
.cma-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Woo statuses */
.cma-status-processing { background: #f4b400; }
.cma-status-completed { background: #34a853; }
.cma-status-cancelled { background: #ea4335; }
.cma-status-refunded { background: #ea4335; }

/* DIVIDER */
.cma-divider {
    margin: 0 6px;
    color: #ccc;
}

/* ITEMS */
.cma-order-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cma-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-top: 1px solid #f1f1f1;
}

/* IMAGE */
.cma-item-image img {
    width: 52px;
    height: auto;
}

/* DETAILS */
.cma-item-details {
    flex: 1;
}

.cma-item-brand {
    font-size: 12px;
    color: rgba(60,60,60,0.6);
}

.cma-item-name {
    font-size: 14px;
    margin: 4px 0;
}

.cma-item-sku {
    font-size: 13px;
    color: rgba(60,60,60,0.6);
}

.cma-item-track {
    color: #ef6b6b;
    text-decoration: none;
    font-weight: 500;
}

.cma-item-track:hover {
    text-decoration: underline;
}

/* PRICE */
.cma-item-price {
    font-weight: 500;
    font-size: 14px;
}

/* MOBILE */
@media (max-width: 768px) {

    .cma-order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cma-order-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cma-item-price {
        align-self: flex-end;
    }
}

/* ======================================
   VIEW ORDER – PREMIUM CLEAN VERSION
====================================== */

.cma-view-order-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 48px;
    margin-top: 20px;
    border-top: 1px solid #aeaeae;
    padding-top: 40px;
    align-items: start;
}

/* LEFT SIDE */
.cma-view-order-left {
    width: 100%;
}

/* ORDER TITLE */
.cma-view-title,
.cma-view-order-left h2 {
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 18px;
    color: #222;
}

/* ORDER META BLOCK */
.cma-order-meta-block {
    margin-bottom: 20px;
    font-size: 13px;
    color: rgba(60,60,60,0.7);
    line-height: 1.6;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cma-order-meta-block > div {
    position: relative;
    padding-right: 16px;
}

.cma-order-meta-block > div:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 14px;
    background: #aeaeae;
}

/* PRODUCT ITEM */
.cma-view-order-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid #f1f1f1;
}

.cma-view-order-item:first-child {
    border-top: none;
}

.cma-view-order-item img {
    width: 110px;
    height: auto;
    object-fit: contain;
    background: #f5f5f5;
    padding: 8px;
    border-radius: 6px;
}

/* PRODUCT INFO */
.cma-item-info {
    flex: 1;
}

.cma-item-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.cma-item-meta {
    font-size: 12px;
    color: rgba(60,60,60,0.7);
    margin-bottom: 4px;
}

/* STATUS / TRACKING BLOCK */
.cma-order-status-block {
    margin-top: 15px;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 12px;
    color: rgba(60,60,60,0.7);
}

/* ======================================
   RIGHT SUMMARY CARD
====================================== */

.cma-view-order-summary {
    background: #ffffff;
    padding: 20px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    position: sticky;
    top: 140px;
}

.cma-view-order-summary h3 {
    font-size: 15px;
    margin-bottom: 16px;
    font-weight: 500;
}

/* SUMMARY LIST */
.cma-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cma-summary-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 12px;
    color: rgba(60,60,60,0.8);
}

.cma-summary-total {
    border-top: 1px solid #e0e0e0;
    padding-top: 12px;
    margin-top: 12px;
    font-weight: 600;
    font-size: 13px;
}

/* ADDRESS SECTIONS */
.cma-view-order-addresses {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.cma-address-box {
    background: #ffffff;
    padding: 14px;
    border: 1px solid #ededed;
    border-radius: 8px;
}

.cma-address-box h4 {
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

.cma-address-box p {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(60,60,60,0.8);
    margin: 0;
}

/* ======================================
   RESPONSIVE
====================================== */

@media (max-width: 1024px) {
    .cma-view-order-layout {
        grid-template-columns: 1fr;
    }

    .cma-view-order-summary {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .cma-view-order-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cma-view-order-item img {
        width: 90px;
    }
}
/* ORDER PROGRESS CARD (TRACKING DESIGN) */
.cma-order-progress-card.cma-track-card {
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
    margin-bottom: 22px;
    box-shadow: none;
}

.cma-order-progress-card.cma-track-card h3 {
    font-size: 18px;
    line-height: 1.2;
    margin: 0 0 28px;
    font-weight: 600;
    color: #3e3e3e;
}

.cma-track {
    display: grid;
    gap: 34px;
}

.cma-track-row {
    display: flex;
    align-items: baseline;
    gap: 0;
}

.cma-track-step {
    flex: 1 1 0;
    min-width: 0;
}

.cma-track-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.cma-track-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.cma-track-label {
    font-size: 14px;
    font-weight: 500;
    color: #2f2f2f;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
}

.cma-track-time {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.25;
    color: rgba(0, 0, 0, 0.72);
    text-align: center;
}

.cma-track-link {
    flex: 0 0 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 39px;
}

.cma-track-link-line {
    flex: 1 1 auto;
    height: 3px;
    background: #505050;
}

.cma-track-dot {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 1.5px solid #979797;
    background: #fff;
    position: relative;
    flex: 0 0 18px;
}

.cma-track-link.is-done .cma-track-dot {
    border-color: #4a4a4a;
    background: #4a4a4a;
}

.cma-track-link.is-done .cma-track-dot::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cma-track-row--secondary {
    max-width: 470px;
}

.cma-track-row--secondary .cma-track-link {
    flex-basis: 100px;
}

.cma-track-row--secondary .cma-track-icon {
    width: 30px;
    height: 30px;
}

.cma-track-row--secondary .cma-track-icon img {
    width: 26px;
    height: 26px;
}

@media (max-width: 900px) {
    .cma-order-progress-card.cma-track-card {
        padding: 0;
    }

    .cma-track-row {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .cma-track-step {
        flex: 0 0 140px;
    }

    .cma-track-link {
        flex: 0 0 88px;
    }

    .cma-track-label,
    .cma-track-time {
        white-space: normal;
    }

    .cma-track-row--secondary {
        max-width: none;
    }
}

.cma-invoice-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.cma-invoice-btn {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
}

.cma-invoice-btn--primary {
    background: #111;
    color: #fff;
}

.cma-invoice-btn--secondary {
    background: #f3f3f3;
    color: #111;
    border: 1px solid #ddd;
}

.cma-item-tracking {
    margin-top: 8px;
}

.cma-item-track-line-wrap {
    margin-top: 10px;
}

.cma-item-track-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
}

.cma-item-track-stage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: #8b8b8b;
    font-size: 12px;
    line-height: 1.3;
    flex: 0 0 auto;
}

.cma-item-track-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d1d5db;
    display: inline-block;
    flex: 0 0 9px;
}

.cma-item-track-stage.is-done,
.cma-item-track-stage.is-active {
    color: #111111;
}

.cma-item-track-stage.is-done .cma-item-track-dot,
.cma-item-track-stage.is-active .cma-item-track-dot {
    background: #1f7a53;
}

.cma-item-track-connector {
    width: 26px;
    height: 1px;
    background: #d1d5db;
    display: inline-block;
    flex: 0 0 26px;
}

.cma-item-track-connector.is-done {
    background: #1f7a53;
}

.cma-item-track-vendor-note {
    margin-top: 6px;
    font-size: 11px;
    color: #6b7280;
}

.cma-track-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 10px;
    background: #f1f1f1;
    color: #333;
}

/* ===============================
   INVOICE ACTIONS CARD
=================================*/

/*.cma-invoice-actions {*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    gap: 12px;*/
/*    margin-bottom: 20px;*/
/*    padding: 20px;*/
/*    background: #ffffff;*/
/*    border-radius: 12px;*/
/*    border: 1px solid #eee;*/
/*}*/

/* Buttons Base */
.cma-invoice-btn {
    display: inline-flex;
   
    padding: 12px 18px; 
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

/* Primary Button */
.cma-invoice-btn--primary {
    background: #111;
    color: #fff;
}

.cma-invoice-btn--primary:hover {
    background: #000;
    transform: translateY(-2px);
}

/* Secondary Button */
.cma-invoice-btn--secondary {
    background: #f3f3f3;
    color: #111;
    border: 1px solid #ddd;
}

.cma-invoice-btn--secondary:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

/* Mobile */
@media (max-width: 768px) {
    .cma-invoice-actions {
        padding: 15px;
    }

    .cma-invoice-btn {
        font-size: 13px;
        padding: 10px 14px;
    }
}
.cma-invoice-actions {
    flex-direction: row;
     
       padding-left: 20px;
        flex-wrap: wrap;
  gap: 10px 20px;
    
}



/* ===============================
   ITEM TRACKING - ZARA STYLE
=================================*/

.cma-item-status-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

/* Minimal pill */
.cma-track-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    background: #f5f5f5;
    color: #111;
}

/* Subtle date */
.cma-track-date {
    font-size: 12px;
    color: #777;
}

.cma-page-title {
    font-size: 24px;
    margin-bottom: 20px;
}
/* Page title */
.cma-page-title {
    font-size: 24px;
    margin-bottom: 20px;
}

/* Grid - 2 columns, wrapper is the grid item */
.cma-promo-list,
.cma-giftcard-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    margin-top: 30px;
}

/* Wrapper holds card + button together */
.cma-ticket-wrap {
    display: flex;
    flex-direction: column;
}

/* Card base - ticket shape */
.cma-promo-card,
.cma-giftcard-card {
    position: relative;
    background: #fff;
    padding: 20px 50px 0px 50px;
    text-align: center;
    border: 3px solid #333;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

/* Outer dashed border */
.cma-promo-card::before,
.cma-giftcard-card::before {
    content: "";
    position: absolute;
    inset: -12px;
    background: repeating-linear-gradient(90deg, #413b3b 0 25px, transparent 10px 40px) top,
        repeating-linear-gradient(90deg, #3c3636 0 25px, transparent 10px 40px) bottom,
        repeating-linear-gradient(0deg, #433939 0 25px, transparent 10px 40px) left,
        repeating-linear-gradient(0deg, #363434 0 32px, transparent 10px 40px) right;
    background-size: 100% 1px, 100% 1px, 1px 100%, 1px 100%;
    background-repeat: no-repeat;
    /* border: 2px dashed #ccc; */
    border-radius: 8px;
    pointer-events: none;
}

/* LEFT half circle notch */
.cma-promo-card::after,
.cma-giftcard-card::after {
    content: "";
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 50%;
    border: 3px solid #333;
    clip-path: inset(0 0 0 50%);
    z-index: 2;
}

/* RIGHT half circle notch */
.cma-promo-card .cma-ticket-right,
.cma-giftcard-card .cma-ticket-right {
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 50%;
    border: 3px solid #333;
    clip-path: inset(0 50% 0 0);
    z-index: 2;
    display: block;
}

/* Scissors - top RIGHT corner */
.cma-promo-card .cma-scissors,
.cma-giftcard-card .cma-scissors {
    position: absolute;
    top: -20px;
    right: 8px;
    font-size: 14px;
    color: #999;
    background: #fff;
    padding: 0 4px;
    line-height: 1;
}

/* Center content area */
.cma-card-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 0 20px 0;
}

/* Scannable barcode (SVG rendered by JsBarcode) */
.cma-barcode {
    width: 100%;
    max-width: 420px;
    height: 56px;
    display: block;
    margin: 12px auto 0 auto;
}

/* Barcode + CODE badge row (sample alignment) */
.cma-code-block {
    width: 100%;
    margin-top: 14px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.cma-code-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    align-items: anchor-center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.cma-code-row .cma-barcode {
    flex: 1 1 120px;
    max-width: none;
    height: 46px;
    margin: 0;
}

.cma-code-badge {
    background: #222;
    color: #fff;
    padding: 6px 12px;
    border-radius: 2px;
    font-family: monospace;
    font-size: 12px;
    font-weight: 200 !important;
    letter-spacing: 1px;
    white-space: nowrap;
    margin-left: auto;
}

.cma-validity-line {
    display: none;
}

.cma-barcode * {
    shape-rendering: crispEdges;
}

/* Big discount text */
.cma-promo-discount {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

/* GIFT COUPON / GIFT CARD label */
.cma-promo-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #555;
    text-transform: uppercase;
}

/* Dark footer strip */
.cma-card-footer {
    background: #222;
    color: #fff;
    margin: 0 -50px;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 4px 4px;
}

/* Code text in footer */
.cma-promo-code,
.cma-giftcard-code {
    font-family: monospace;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #fff;
}

/* Validity text in footer */
.cma-promo-validity,
.cma-giftcard-validity {
    font-size: 11px;
    color: #ccc;
}

/* Copy button - full width below card */
.cma-copy-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 14px;
    box-sizing: border-box;
}

.cma-copy-btn:hover {
    background: #eee;
    color: black;
}

/* Empty state */
.cma-empty-box {
    padding: 30px;
    text-align: center;
    color: #999;
    border: 1px dashed #ccc;
    border-radius: 6px;
    margin-top: 20px;
}




/* =========================
   Tablet Responsive
========================= */
@media (max-width: 1024px) {

    .cma-promo-list,
    .cma-giftcard-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .cma-promo-card,
    .cma-giftcard-card {
        padding: 18px 30px 0 30px;
    }

    .cma-card-footer {
        margin: 0 -30px;
    }
}


/* =========================
   Mobile Responsive
========================= */
@media (max-width: 768px) {

    .cma-promo-list,
    .cma-giftcard-list {
        grid-template-columns: 1fr; /* single column */
        gap: 20px;
    }

    .cma-promo-card,
    .cma-giftcard-card {
        padding: 16px 20px 0 20px;
        min-height: auto;
    }

    .cma-card-footer {
        margin: 0 -20px;
        padding: 8px 12px;
    }

    .cma-promo-discount {
        font-size: 22px;
    }

    .cma-promo-label {
        font-size: 9px;
        letter-spacing: 2px;
    }

    .cma-copy-btn {
        font-size: 13px;
        padding: 9px;
    }

}


/* =========================
   Small Mobile
========================= */
@media (max-width: 480px) {

    .cma-promo-card,
    .cma-giftcard-card {
        padding: 14px 16px 0 16px;
    }

    .cma-card-footer {
        margin: 0 -16px;
    }

    .cma-promo-discount {
        font-size: 20px;
    }

    .cma-promo-code,
    .cma-giftcard-code {
        font-size: 11px;
    }

    .cma-promo-validity,
    .cma-giftcard-validity {
        font-size: 10px;
    }

}


.cma-tabs{
    display:flex;
    gap:10px;
    margin-bottom:25px;
}

/* ===============================
   SAVE STYLES (MY ACCOUNT)
=================================*/

.cma-save-styles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .cma-save-styles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .cma-save-styles-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.cma-save-style-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cma-save-style-card .cma-card-media {
    background: #fafafa;
    width: 100%;
    overflow: hidden;
}

/* Only apply strict sizing/object-fit to GENERATED preview images. */
.cma-save-style-card .cma-card-media--generated {
    aspect-ratio: 4 / 3;
}

.cma-save-style-card .cma-card-media--generated .cma-save-style-preview {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.cma-save-style-card .cma-card-body {
    padding: 16px;
}

.cma-save-style-card .cma-card-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(60,60,60,1);
    margin: 0 0 8px;
}

.cma-save-style-card .cma-card-meta {
    margin: 0 0 6px;
    font-size: 13px;
    color: rgba(60,60,60,0.75);
}

.cma-save-style-card .cma-card-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Scoped button styling for Save Styles. */
.cma-save-styles .cma-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #fff;
    color: rgba(60,60,60,1);
}

.cma-save-styles .cma-btn-secondary {
    background: #fff;
}

.cma-save-styles .cma-btn-primary {
    margin-top: 0;
    border: none;
    background: rgba(60,60,60,1);
    color: #fff;
}

.cma-save-styles .cma-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cma-tab{
    padding:10px 20px;
    border:1px solid #ccc;
    background:#f5f5f5;
    cursor:pointer;
    font-weight:600;
}

.cma-tab.active{
    background:#000;
    color:#fff;
}


.cma-tab-content{
display:none;
}

.cma-tab-content.active{
display:block;
}
.cma-save-style-card .cma-card-media--generated {
    aspect-ratio: auto;
}

.cma-save-style-card .cma-card-media--generated .cma-save-style-preview {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
