/* =========================================================
   PREMIUM WOOCOMMERCE ORDER DETAILS
   ========================================================= */

.section-order-details {
    padding: 70px 0;
    background: #f7faf4;
}

.section-order-details .container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}


/* =========================================================
   TABLE CARD
   ========================================================= */

.table-container {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #effae7;
    border-radius: 20px;
    box-shadow:
        0 10px 35px rgba(20, 24, 40, 0.05),
        0 2px 8px rgba(20, 24, 40, 0.03);

    scrollbar-width: thin;
    scrollbar-color: #d2dccf transparent;
}

.table-container::-webkit-scrollbar {
    height: 7px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background: #d4dfd1;
    border-radius: 20px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #b5c0ae;
}


/* =========================================================
   TABLE
   ========================================================= */

.order-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: separate;
    border-spacing: 0;
    font-family: inherit;
    color: #252936;
}


/* =========================================================
   TABLE HEADER
   ========================================================= */

.order-table thead th {
    padding: 19px 18px;
    background: #fafcf8;
    border-bottom: 1px solid #eaf0e8;

    color: #5b8a49;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.055em;

    white-space: nowrap;
}

.order-table thead th:first-child {
    padding-left: 26px;
    border-top-left-radius: 20px;
}

.order-table thead th:last-child {
    padding-right: 26px;
    border-top-right-radius: 20px;
}


/* =========================================================
   HIDDEN ROWS
   ========================================================= */

.order-row-hidden {
    display: none;
}


/* =========================================================
   TABLE BODY
   ========================================================= */

.order-table tbody tr {
    background: #ffffff;
    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease;
}

.order-table tbody tr:hover {
    background: #fcfffb;
}

.order-table tbody td {
    padding: 20px 18px;
    border-bottom: 1px solid #eff4ee;

    color: #44503d;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    vertical-align: middle;
}

.order-table tbody tr:last-child td {
    border-bottom: 0;
}

.order-table tbody td:first-child {
    padding-left: 26px;
}

.order-table tbody td:last-child {
    padding-right: 26px;
}


/* =========================================================
   PRODUCT COLUMN
   ========================================================= */

.order-table .col-product {
    min-width: 240px;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 200px;
}

.product-info > a {
    display: flex;
    flex: 0 0 auto;
    text-decoration: none;
}


/* =========================================================
   ORDER DETAILS PRODUCT IMAGE
   ========================================================= */

.order-details-product-image {
    width: 58px;
    height: 58px;

    display: block;

    object-fit: cover;

    background: #f6f9f5;

    border: 1px solid #edf3ec;
    border-radius: 12px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.product-info > a:hover .order-details-product-image {
    transform: translateY(-2px);

    box-shadow:
        0 7px 18px rgba(20, 24, 40, 0.10);
}

.product-info span {
    color: #20232d;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.45;
}


/* =========================================================
   PRICE
   ========================================================= */

.order-table td[data-label="Price"] {
    color: #252936;
    font-weight: 650;
    white-space: nowrap;
}

.order-table td[data-label="Price"] .woocommerce-Price-amount {
    font-weight: 700;
}


/* =========================================================
   QUANTITY
   ========================================================= */

.order-table td[data-label="Quantity"] {
    color: #555b69;
    font-weight: 600;
}


/* =========================================================
   TOTAL
   ========================================================= */

.order-table td[data-label="Total Amount"] {
    color: #171a22;
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
}


/* =========================================================
   STATUS
   ========================================================= */

.order-table td[data-label="Status"] {
    white-space: nowrap;
    font-weight: 650;
}


/* =========================================================
   PAYMENT METHOD
   ========================================================= */

.order-table td[data-label="Payment Method"] {
    color: #626876;
    font-size: 13px;
    line-height: 1.45;
}


/* =========================================================
   DELIVERY DATE
   ========================================================= */

.order-table td[data-label="Delivery Date"] {
    color: #555b68;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}


/* =========================================================
   ACTION DROPDOWN
   ========================================================= */

.action-dropdown {
    position: relative;

    display: inline-flex;
    align-items: center;
}

.dots-btn {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: #5e6472;
    background: #ffffff;

    border: 1px solid #e5ece4;
    border-radius: 10px;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.dots-btn:hover {
    color: #171a22;
    background: #f9fbf7;
    border-color: #dde4d8;

    box-shadow:
        0 5px 14px rgba(20, 24, 40, 0.08);

    transform: translateY(-1px);
}

.dots-btn:focus {
    outline: none;

    border-color: #92a28d;

    box-shadow:
        0 0 0 3px rgba(50, 55, 70, 0.08);
}

.dots-btn svg {
    width: 17px;
    height: 17px;
}


/* =========================================================
   DROPDOWN MENU
   ========================================================= */

.dropdown-menu {
    position: absolute;

    top: calc(100% + 9px);
    right: 0;

    z-index: 50;

    min-width: 175px;

    padding: 7px;

    background: #ffffff;

    border: 1px solid #e8eee7;
    border-radius: 13px;

    box-shadow:
        0 18px 45px rgba(20, 24, 40, 0.12),
        0 4px 12px rgba(20, 24, 40, 0.05);

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(-6px)
        scale(0.98);

    transform-origin: top right;

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease;
}

.action-dropdown:hover .dropdown-menu,
.action-dropdown:focus-within .dropdown-menu,
.action-dropdown .dropdown-menu.show {
    opacity: 1;
    visibility: visible;

    transform:
        translateY(0)
        scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;

    min-height: 40px;

    padding: 9px 11px;

    color: #343844;

    border-radius: 8px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;

    text-decoration: none;

    transition:
        color 0.18s ease,
        background-color 0.18s ease;
}

.dropdown-item:hover {
    color: #1b2216;
    background: #f6f9f5;
}

.dropdown-item.danger {
    color: #d14343;
}

.dropdown-item.danger:hover {
    color: #c13232;
    background: #fff3f3;
}


/* =========================================================
   VIEW MORE BUTTON AREA
   ========================================================= */

.btn-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 30px;
}


/* =========================================================
   VIEW MORE BUTTON
   ========================================================= */

.btn-view-more {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    min-width: 155px;
    min-height: 48px;

    padding: 12px 24px;

    color: #ffffff;
    background: #3f6d31;

    border: 1px solid #215821;
    border-radius: 10px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(32, 35, 45, 0.16);

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.btn-view-more::after {
    content: "↓";

    font-size: 15px;
    line-height: 1;

    transition:
        transform 0.25s ease;
}

.btn-view-more:hover {
    color: #ffffff;

    background: #70a854;
    border-color: #48ca48;

    transform: translateY(-2px);

    box-shadow:
        0 12px 25px rgba(32, 35, 45, 0.20);
}

.btn-view-more:hover::after {
    transform: translateY(2px);
}

.btn-view-more:active {
    transform: translateY(0);

    box-shadow:
        0 5px 12px rgba(32, 35, 45, 0.14);
}

.btn-view-more:focus {
    outline: none;

    box-shadow:
        0 0 0 4px rgba(32, 35, 45, 0.10),
        0 8px 20px rgba(32, 35, 45, 0.16);
}


/* =========================================================
   EMPTY ORDERS
   ========================================================= */

.no-orders {
    padding: 70px 25px !important;

    color: #7a808d !important;

    font-size: 14px !important;
    font-weight: 500 !important;

    text-align: center;
}


/* =========================================================
   STATUS COLORS
   ========================================================= */

.status-processing,
.status-completed,
.status-cancelled,
.status-pending {
    display: inline-flex;
    align-items: center;

    padding: 6px 10px;

    border-radius: 30px;

    font-size: 11px;
    font-weight: 700;

    line-height: 1;
}


/* Processing */

.status-processing {
    color: #a56a00;
    background: #fff6df;
}


/* Completed */

.status-completed {
    color: #168052;
    background: #eaf9f1;
}


/* Cancelled */

.status-cancelled {
    color: #c33d3d;
    background: #fff0f0;
}


/* Pending */

.status-pending {
    color: #686f7c;
    background: #f0f1f4;
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .section-order-details {
        padding: 50px 0;
    }

    .section-order-details .container {
        padding: 0 18px;
    }

    .order-table thead th {
        padding: 17px 14px;
    }

    .order-table tbody td {
        padding: 17px 14px;
    }

    .order-table tbody td:first-child,
    .order-table thead th:first-child {
        padding-left: 20px;
    }

    .order-table tbody td:last-child,
    .order-table thead th:last-child {
        padding-right: 20px;
    }

}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .section-order-details {
        padding: 35px 0;
    }

    .section-order-details .container {
        padding: 0 12px;
    }

    .table-container {
        overflow: visible;

        border-radius: 16px;
        border: 0;

        background: transparent;

        box-shadow: none;
    }

    .order-table {
        display: block;
        min-width: 0;
    }

    .order-table thead {
        display: none;
    }

    .order-table tbody {
        display: block;
    }

    .order-table tbody tr {
        display: block;

        margin-bottom: 16px;
        padding: 5px 0;

        background: #ffffff;

        border: 1px solid #e9ebf1;
        border-radius: 16px;

        box-shadow:
            0 8px 25px rgba(20, 24, 40, 0.05);
    }

    .order-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .order-table tbody td {
        display: flex;

        align-items: center;
        justify-content: space-between;

        min-height: 50px;

        padding: 12px 16px;

        border-bottom: 1px solid #f0f1f4;

        font-size: 13px;

        text-align: right;
    }

    .order-table tbody td:last-child {
        border-bottom: 0;
    }

    .order-table tbody td::before {
        content: attr(data-label);

        flex: 0 0 auto;

        margin-right: 20px;

        color: #8a8f9c;

        font-size: 11px;
        font-weight: 700;

        text-align: left;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .order-table tbody td:first-child {
        padding: 16px;
    }

    .order-table tbody td:first-child::before {
        display: none;
    }

    .order-table tbody td:last-child {
        padding: 12px 16px;
    }

    .product-info {
        width: 100%;

        justify-content: flex-start;

        text-align: left;
    }


    /* =====================================================
       MOBILE ORDER DETAILS IMAGE
       ===================================================== */

    .order-details-product-image {
        width: 60px;
        height: 60px;
    }

    .product-info span {
        font-size: 14px;
        text-align: left;
    }

    .order-table td[data-label="Status"] {
        text-align: right;
    }

    .order-table td[data-label="Payment Method"] {
        max-width: 100%;
    }

    .action-dropdown {
        margin-left: auto;
    }

    .dropdown-menu {
        right: 0;
    }

    .btn-wrapper {
        margin-top: 24px;
    }

    .btn-view-more {
        width: 100%;
        max-width: 220px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .section-order-details {
        padding: 25px 0;
    }

    .section-order-details .container {
        padding: 0 10px;
    }

    .order-table tbody tr {
        border-radius: 14px;
    }


    /* =====================================================
       SMALL MOBILE ORDER DETAILS IMAGE
       ===================================================== */

    .order-details-product-image {
        width: 52px;
        height: 52px;
        border-radius: 10px;
    }

    .product-info {
        gap: 11px;
    }

    .order-table tbody td {
        padding: 11px 14px;
    }

    .order-table tbody td:first-child {
        padding: 14px;
    }

    .order-table tbody td::before {
        font-size: 10px;
    }

    .btn-view-more {
        max-width: 100%;
        min-height: 46px;
    }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .order-table tbody tr,
    .order-details-product-image,
    .dots-btn,
    .dropdown-menu,
    .dropdown-item,
    .btn-view-more,
    .btn-view-more::after {
        transition: none !important;
    }

}


/* =========================================================
   ORDER SUCCESS MESSAGE
   ========================================================= */

.order-success-message {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 25px;
    padding: 16px 20px;

    background: #f0faf4;

    border: 1px solid #bce8cc;
    border-radius: 12px;

    color: #216e3a;

    box-shadow:
        0 4px 15px rgba(32, 94, 55, 0.06);

    animation: orderSuccessIn 0.35s ease;
}


.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    border-radius: 50%;

    background: #2e9d59;
    color: #ffffff;

    font-size: 17px;
    font-weight: 700;
}


.order-success-message strong {
    display: block;

    margin-bottom: 3px;

    font-size: 15px;
    font-weight: 700;
}


.order-success-message p {
    margin: 0;

    font-size: 13px;
    color: #4d765b;
}


@keyframes orderSuccessIn {

    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   CANCEL ORDER BUTTON
   ========================================================= */

.cancel-order-form {
    margin: 0;
    padding: 0;
}


.cancel-order-button {
    width: 100%;

    border: 0;
    outline: 0;

    background: transparent;

    text-align: left;

    cursor: pointer;

    font-family: inherit;
}


.dropdown-item.danger {
    color: #d64545;
}


.dropdown-item.danger:hover {
    background: #fff3f3;
    color: #c53030;
}
