/* =====================================================
   AYSELL GALLERY
   ORDERS PAGE STYLE
===================================================== */

.orders-section {
    width: 100%;
    min-height: 70vh;
    padding: 45px 20px 100px;
}

.orders-page-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}


/* =====================================================
   عنوان صفحه
===================================================== */

.orders-page-title {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 30px;
}

.orders-title-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(
        135deg,
        #d4af37,
        #f5df8a
    );
    font-size: 27px;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.22);
}

.orders-page-title h1 {
    margin: 0 0 6px;
    font-size: 27px;
    font-weight: 800;
}

.orders-page-title p {
    margin: 0;
    opacity: 0.65;
    font-size: 14px;
}


/* =====================================================
   باکس پیگیری
===================================================== */

.orders-lookup-box {
    display: flex;
    align-items: center;
    gap: 22px;

    padding: 25px;

    margin-bottom: 32px;

    border-radius: 24px;

    background: rgba(255, 255, 255, 0.88);

    border: 1px solid rgba(212, 175, 55, 0.18);

    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.07);

    backdrop-filter: blur(12px);
}

.orders-lookup-icon {
    flex: 0 0 65px;

    width: 65px;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.16),
        rgba(212, 175, 55, 0.05)
    );

    font-size: 28px;
}

.orders-lookup-content {
    flex: 1;
}

.orders-lookup-content h2 {
    margin: 0 0 6px;

    font-size: 19px;
    font-weight: 800;
}

.orders-lookup-content p {
    margin: 0 0 18px;

    font-size: 13px;
    opacity: 0.62;
}


/* =====================================================
   فرم شماره موبایل
===================================================== */

.orders-lookup-form {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.orders-phone-field {
    position: relative;
    flex: 1;
}

.orders-phone-field input {
    width: 100%;
    height: 52px;

    padding: 0 48px 0 18px;

    border-radius: 15px;

    border: 1px solid rgba(0, 0, 0, 0.09);

    background: #fafafa;

    color: inherit;

    outline: none;

    font-family: inherit;
    font-size: 14px;

    direction: ltr;
    text-align: left;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.orders-phone-field input:focus {
    border-color: #d4af37;

    background: #fff;

    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.10);
}

.phone-field-icon {
    position: absolute;

    right: 17px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 18px;

    pointer-events: none;

    opacity: 0.65;
}


/* =====================================================
   دکمه جستجو
===================================================== */

.orders-search-button {
    min-width: 190px;
    height: 52px;

    padding: 0 20px;

    border: 0;
    border-radius: 15px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    background: linear-gradient(
        135deg,
        #d4af37,
        #b8901e
    );

    color: #fff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 9px 22px rgba(212, 175, 55, 0.22);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.orders-search-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 13px 28px rgba(212, 175, 55, 0.28);

    filter: brightness(1.04);
}

.orders-search-button:active {
    transform: translateY(0);
}


/* =====================================================
   کارت سفارش
===================================================== */

.orders-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.order-card {
    overflow: hidden;

    border-radius: 22px;

    background: #fff;

    border: 1px solid rgba(0, 0, 0, 0.06);

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.order-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.09);
}


/* =====================================================
   هدر سفارش
===================================================== */

.order-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 20px 22px;

    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.order-number {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-label {
    font-size: 11px;
    opacity: 0.55;
}

.order-number strong {
    font-size: 15px;
    direction: ltr;
    letter-spacing: 0.3px;
}


/* =====================================================
   وضعیت سفارش
===================================================== */

.order-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;

    padding: 6px 13px;

    border-radius: 50px;

    font-size: 12px;
    font-weight: 700;

    white-space: nowrap;

    background: rgba(212, 175, 55, 0.12);
    color: #9b7710;
}

.order-status-pending {
    background: rgba(255, 183, 77, 0.14);
    color: #a66a00;
}

.order-status-confirmed,
.order-status-processing {
    background: rgba(33, 150, 243, 0.11);
    color: #1976d2;
}

.order-status-shipped {
    background: rgba(156, 39, 176, 0.11);
    color: #8e24aa;
}

.order-status-delivered {
    background: rgba(46, 125, 50, 0.12);
    color: #2e7d32;
}

.order-status-cancelled {
    background: rgba(244, 67, 54, 0.11);
    color: #d32f2f;
}


/* =====================================================
   اطلاعات سفارش
===================================================== */

.order-card-info {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 1px;

    background: rgba(0, 0, 0, 0.05);

    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.order-info-item {
    display: flex;
    flex-direction: column;
    gap: 7px;

    padding: 17px 22px;

    background: #fff;
}

.order-info-item span {
    font-size: 11px;
    opacity: 0.55;
}

.order-info-item strong {
    font-size: 14px;
}


/* =====================================================
   محصولات سفارش
===================================================== */

.order-items {
    padding: 4px 22px;
}

.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 16px 0;

    border-bottom: 1px dashed rgba(0, 0, 0, 0.09);
}

.order-item:last-child {
    border-bottom: 0;
}

.order-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;

    min-width: 0;
}

.order-item-info strong {
    font-size: 14px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-item-info span {
    font-size: 11px;
    opacity: 0.58;
}

.order-item-price {
    flex-shrink: 0;

    font-size: 13px;

    color: #b28a19;
}


/* =====================================================
   فوتر کارت
===================================================== */

.order-card-footer {
    display: flex;
    justify-content: flex-end;

    padding: 14px 22px;

    background: rgba(0, 0, 0, 0.015);

    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.order-details-button {
    border: 0;

    padding: 9px 17px;

    border-radius: 12px;

    background: rgba(212, 175, 55, 0.10);

    color: #a17b12;

    font-family: inherit;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.order-details-button:hover {
    background: rgba(212, 175, 55, 0.18);

    transform: translateY(-1px);
}


/* =====================================================
   حالت خالی
===================================================== */

.orders-empty {
    min-height: 260px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    padding: 35px;

    border-radius: 22px;

    background: rgba(255, 255, 255, 0.75);

    border: 1px dashed rgba(212, 175, 55, 0.35);
}

.orders-empty-icon {
    width: 72px;
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 15px;

    border-radius: 22px;

    background: rgba(212, 175, 55, 0.10);

    font-size: 32px;
}

.orders-empty h3 {
    margin: 0 0 8px;

    font-size: 18px;
}

.orders-empty p {
    max-width: 450px;

    margin: 0;

    font-size: 13px;

    line-height: 1.9;

    opacity: 0.6;
}


/* =====================================================
   Loading
===================================================== */

.orders-loading {
    min-height: 240px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 15px;

    text-align: center;

    border-radius: 22px;

    background: rgba(255, 255, 255, 0.7);
}

.orders-loading p {
    margin: 0;

    font-size: 13px;

    opacity: 0.6;
}

.loading-spinner {
    width: 40px;
    height: 40px;

    border-radius: 50%;

    border: 3px solid rgba(212, 175, 55, 0.18);

    border-top-color: #d4af37;

    animation:
        ordersSpin 0.8s linear infinite;
}

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


/* =====================================================
   خطا
===================================================== */

.orders-error {
    min-height: 250px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    padding: 30px;

    border-radius: 22px;

    background: rgba(244, 67, 54, 0.04);

    border: 1px solid rgba(244, 67, 54, 0.12);
}

.orders-error-icon {
    font-size: 35px;

    margin-bottom: 12px;
}

.orders-error h3 {
    margin: 0 0 7px;

    font-size: 18px;
}

.orders-error p {
    margin: 0 0 18px;

    font-size: 13px;

    opacity: 0.65;
}

.retry-orders-button {
    border: 0;

    padding: 10px 18px;

    border-radius: 12px;

    background: #d4af37;

    color: #fff;

    font-family: inherit;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}


/* =====================================================
   DARK MODE
===================================================== */

body.dark-mode .orders-lookup-box,
.dark-mode .orders-lookup-box {
    background: rgba(30, 30, 30, 0.88);

    border-color: rgba(212, 175, 55, 0.20);

    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.25);
}

body.dark-mode .orders-phone-field input,
.dark-mode .orders-phone-field input {
    background: #202020;

    border-color: rgba(255, 255, 255, 0.10);

    color: #fff;
}

body.dark-mode .orders-phone-field input:focus,
.dark-mode .orders-phone-field input:focus {
    background: #252525;
}

body.dark-mode .order-card,
.dark-mode .order-card {
    background: #1d1d1d;

    border-color: rgba(255, 255, 255, 0.07);

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.25);
}

body.dark-mode .order-card-info,
.dark-mode .order-card-info {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .order-info-item,
.dark-mode .order-info-item {
    background: #1d1d1d;
}

body.dark-mode .order-card-header,
.dark-mode .order-card-header {
    border-color: rgba(255, 255, 255, 0.07);
}

body.dark-mode .order-item,
.dark-mode .order-item {
    border-color: rgba(255, 255, 255, 0.09);
}

body.dark-mode .order-card-footer,
.dark-mode .order-card-footer {
    background: rgba(255, 255, 255, 0.025);

    border-color: rgba(255, 255, 255, 0.07);
}

body.dark-mode .orders-empty,
.dark-mode .orders-empty {
    background: rgba(30, 30, 30, 0.75);
}

body.dark-mode .orders-loading,
.dark-mode .orders-loading {
    background: rgba(30, 30, 30, 0.75);
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 700px) {

    .orders-section {
        padding: 28px 13px 90px;
    }

    .orders-page-title {
        gap: 12px;
    }

    .orders-title-icon {
        width: 50px;
        height: 50px;

        border-radius: 15px;

        font-size: 23px;
    }

    .orders-page-title h1 {
        font-size: 22px;
    }

    .orders-page-title p {
        font-size: 11px;
    }


    .orders-lookup-box {
        flex-direction: column;

        align-items: stretch;

        padding: 18px;

        border-radius: 20px;
    }

    .orders-lookup-icon {
        width: 52px;
        height: 52px;

        flex-basis: 52px;

        border-radius: 15px;

        font-size: 23px;
    }


    .orders-lookup-form {
        flex-direction: column;
    }

    .orders-search-button {
        width: 100%;
        min-width: 0;
    }


    .order-card {
        border-radius: 18px;
    }

    .order-card-header {
        align-items: flex-start;

        padding: 16px;
    }

    .order-card-info {
        grid-template-columns: 1fr;
    }

    .order-info-item {
        padding: 13px 16px;
    }

    .order-items {
        padding: 2px 16px;
    }

    .order-item {
        align-items: flex-start;
    }

    .order-item-price {
        font-size: 11px;
    }

    .order-card-footer {
        padding: 12px 16px;
    }

    .order-details-button {
        width: 100%;
    }
}


@media (max-width: 400px) {

    .orders-page-title h1 {
        font-size: 20px;
    }

    .orders-page-title p {
        font-size: 10px;
    }

    .orders-lookup-content h2 {
        font-size: 17px;
    }

    .orders-phone-field input {
        height: 49px;
    }

    .orders-search-button {
        height: 49px;
    }

    .order-status {
        padding: 5px 9px;

        font-size: 10px;
    }
}