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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Vazirmatn", sans-serif;
    background: #f7faf8;
    color: #17231f;
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input {
    font-family: inherit;
}

img {
    max-width: 100%;
}

.container {
    width: min(1250px, calc(100% - 40px));
    margin: auto;
}


/* ================= TOP ================= */

.top-strip {
    background: #f0f6f3;
    border-bottom: 1px solid #e1ebe6;
    color: #60706a;
    font-size: 13px;
}

.mini-bar {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


/* ================= HEADER ================= */

.header {
    background: #fff;
    border-bottom: 1px solid #e6eeea;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-main {
    min-height: 78px;
    display: grid;
    grid-template-columns: 170px 1fr auto;
    align-items: center;
    gap: 25px;
}


/* ================= LOGO ================= */

.logo {
    font-size: 42px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -2px;
    color: #202c29;
}

.logo span {
    color: #169563;
}


/* ================= SEARCH ================= */

.search {
    height: 48px;
    display: flex;
    background: #f5f9f7;
    border: 1px solid #cfe1d9;
    border-radius: 14px;
    overflow: hidden;
}

.search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0 18px;
    color: #263630;
    font-size: 14px;
}

.search button {
    width: 55px;
    flex-shrink: 0;
    border: 0;
    background: #168f63;
    color: white;
    font-size: 25px;
    cursor: pointer;
}


/* ================= ACTIONS ================= */

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account {
    background: transparent;
    border: 0;
    color: #263630;
    cursor: pointer;
    font-size: 14px;
}

.cart {
    border: 0;
    background: #168f63;
    color: white;
    border-radius: 13px;
    padding: 11px 16px;
    cursor: pointer;
    position: relative;
    font-weight: 600;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -7px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ff4d4d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}


/* ================= NAV ================= */

.nav {
    min-height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 45px;
}

.nav a {
    position: relative;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #34423d;
    white-space: nowrap;
}

.nav a.active {
    color: #168f63;
}

.nav a.active::after {
    content: "";
    position: absolute;
    height: 3px;
    left: 0;
    right: 0;
    bottom: -1px;
    border-radius: 10px;
    background: #168f63;
}


/* ================= BREADCRUMB ================= */

.breadcrumb {
    padding: 20px 0 14px;
    color: #71817b;
    font-size: 13px;
}


/* ================= HERO ================= */

.hero {
    min-height: 390px;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    border: 1px solid #dceae3;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #eaf8f1 48%,
        #c9efdd 100%
    );
    margin-bottom: 45px;
}

.hero-content {
    padding: 55px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    color: #168f63;
    font-weight: 800;
    margin-bottom: 12px;
}

.hero h1 {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.35;
    margin-bottom: 16px;
}

.hero h1 strong {
    color: #168f63;
}

.hero p {
    color: #596a63;
    max-width: 580px;
    margin-bottom: 25px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.btn {
    padding: 11px 25px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: #168f63;
    color: white;
}

.btn-ghost {
    border: 1px solid #81c9aa;
    color: #168f63;
    background: rgba(255,255,255,.6);
}

.hero-meta {
    display: flex;
    gap: 25px;
    color: #40534b;
    font-size: 13px;
    font-weight: 600;
}


/* ================= HERO IMAGE ================= */

.hero-visual {
    min-height: 390px;
    position: relative;
    overflow: hidden;
    background: #d9f2e8;
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 390px;
    display: block;
    object-fit: cover;
}


/* ================= PRODUCTS ================= */

.section-block {
    margin-bottom: 50px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 22px;
}

.section-kicker {
    display: block;
    color: #168f63;
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 5px;
}

.section-head h2 {
    font-size: 28px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.product-card {
    background: white;
    border: 1px solid #e0ebe6;
    border-radius: 17px;
    overflow: hidden;
    transition: .25s ease;
    box-shadow: 0 5px 20px rgba(30, 80, 60, .05);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(30, 80, 60, .10);
}

.product-image {
    height: 230px;
    padding: 10px;
    background: #f4f7f6;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.product-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #168f63;
    color: white;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
}

.product-info {
    padding: 17px;
}

.product-info h3 {
    font-size: 17px;
    margin-bottom: 7px;
}

.product-info p {
    color: #788781;
    font-size: 12px;
    line-height: 1.9;
    min-height: 70px;
}

.product-rating {
    color: #f3a900;
    font-size: 17px;
    letter-spacing: 1px;
    margin: 8px 0;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 5px;
}

.product-bottom .product-price {
    margin-left: auto;
}

.product-bottom .tps-favorite-button {
    position: static !important;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    margin: 0;
    padding: 0;
    border: 1px solid #e2e8e5;
    border-radius: 12px;
    background: #fff;
    color: #555;
    box-shadow: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease, color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.product-bottom .tps-favorite-button:hover {
    transform: translateY(-1px) scale(1.03);
    border-color: #cfe2d9;
    background: #f7fbf9;
    box-shadow: 0 6px 16px rgba(22,143,99,.10) !important;
}

.product-bottom .tps-favorite-button:disabled {
    opacity: .65;
    cursor: wait;
}

.product-price {
    font-size: 17px;
    font-weight: 800;
    color: #172b24;
}

.add-to-cart {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    border: 1px solid #bde2d2;
    background: #effaf5;
    color: #168f63;
    cursor: pointer;
    font-size: 19px;
}

.wholesale-text {
    margin-top: 10px;
    color: #168f63;
    font-size: 12px;
    font-weight: 700;
}


/* ================= ABOUT ================= */

.about-box {
    background: white;
    border: 1px solid #dfeae5;
    border-radius: 20px;
    padding: 35px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.about-box h2 {
    margin-bottom: 12px;
}

.about-box p {
    color: #697971;
    max-width: 750px;
}

.about-stats {
    display: flex;
    gap: 15px;
}

.about-stats div {
    min-width: 100px;
    text-align: center;
    background: #f3faf7;
    border-radius: 14px;
    padding: 15px;
}

.about-stats strong {
    display: block;
    color: #168f63;
    font-size: 22px;
}

.about-stats span {
    color: #66766f;
    font-size: 12px;
}


/* ================= FOOTER ================= */

.footer {
    background: #10221b;
    color: white;
    padding: 35px 0 20px;
}

.trust-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.trust-row > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trust-row strong {
    font-size: 20px;
}

.trust-row span {
    font-weight: 700;
}

.trust-row small {
    color: #aebdb7;
    font-size: 11px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 35px;
    padding: 35px 0;
}

.footer-columns h4 {
    margin-bottom: 14px;
}

.footer-columns a {
    display: block;
    color: #b8c7c1;
    font-size: 13px;
    margin-bottom: 8px;
}

.footer-columns p {
    color: #b8c7c1;
    font-size: 12px;
    margin-bottom: 12px;
}

.newsletter {
    display: flex;
    overflow: hidden;
    border-radius: 10px;
}

.newsletter input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 10px;
    outline: none;
}

.newsletter button {
    border: 0;
    background: #168f63;
    color: white;
    padding: 0 15px;
    cursor: pointer;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    color: #aebdb7;
    font-size: 12px;
}

.socials {
    display: flex;
    gap: 18px;
}


/* ================= TOAST ================= */

.toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #10221b;
    color: white;
    padding: 13px 20px;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: .3s;
    z-index: 999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .header-main {
        grid-template-columns: 130px 1fr;
        gap: 15px;
    }

    .header-actions {
        grid-column: 1 / -1;
        justify-content: center;
        padding-bottom: 12px;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: 0;
        min-height: 360px;
    }

    .hero-content {
        order: 1;
    }

    .hero-image {
        min-height: 360px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-box {
        grid-template-columns: 1fr;
    }

    .trust-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    body {
        font-size: 14px;
    }

    .container {
        width: calc(100% - 24px);
    }


    /* TOP BAR */

    .top-strip {
        font-size: 9px;
    }

    .mini-bar {
        min-height: 32px;
        gap: 8px;
        white-space: nowrap;
        overflow: hidden;
    }

    .mini-bar span {
        overflow: hidden;
        text-overflow: ellipsis;
    }


    /* HEADER */

    .header-main {
        min-height: auto;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 10px;
        padding: 12px 0;
    }

    .logo {
        font-size: 34px;
    }


    /* SEARCH */

    .search {
        height: 44px;
        border-radius: 12px;
    }

    .search input {
        font-size: 11px;
        padding: 0 10px;
    }

    .search button {
        width: 43px;
        font-size: 21px;
    }


    /* ACTIONS */

    .header-actions {
        grid-column: 1 / -1;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 0;
    }

    .account,
    .cart {
        height: 42px;
        border-radius: 11px;
        font-size: 12px;
    }

    .account {
        border: 1px solid #d7e5df;
        background: #f7faf8;
    }


    /* NAV */

    .nav {
        min-height: 44px;
        justify-content: flex-start;
        gap: 25px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav a {
        font-size: 12px;
        padding: 6px 0;
    }


    /* BREADCRUMB */

    .breadcrumb {
        padding: 13px 0 12px;
        font-size: 10px;
    }


    /* HERO */

    .hero {
        display: flex;
        flex-direction: column;
        border-radius: 17px;
        margin-bottom: 32px;
    }

    .hero-visual {
        order: 0;
        width: 100%;
        height: 270px;
        min-height: 270px;
    }

    .hero-image {
        width: 100%;
        height: 270px;
        min-height: 270px;
        object-fit: cover;
    }

    .hero-content {
        order: 1;
        padding: 25px 20px 27px;
    }

    .eyebrow {
        font-size: 12px;
        margin-bottom: 7px;
    }

    .hero h1 {
        font-size: 27px;
        line-height: 1.5;
        margin-bottom: 10px;
    }

    .hero p {
        font-size: 12px;
        line-height: 2;
        margin-bottom: 17px;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 16px;
    }

    .btn {
        padding: 10px 8px;
        font-size: 12px;
        border-radius: 10px;
    }

    .hero-meta {
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 10px;
    }


    /* PRODUCTS */

    .section-block {
        margin-bottom: 35px;
    }

    .section-head {
        margin-bottom: 15px;
    }

    .section-head h2 {
        font-size: 22px;
    }

    .section-kicker {
        font-size: 11px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .product-card {
        border-radius: 14px;
    }

    .product-card:hover {
        transform: none;
    }

    .product-image {
        height: 165px;
        padding: 6px;
    }

    .product-image img {
        border-radius: 9px;
    }

    .product-badge {
        top: 8px;
        right: 8px;
        font-size: 9px;
        padding: 3px 7px;
    }

    .product-info {
        padding: 11px;
    }

    .product-info h3 {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .product-info p {
        font-size: 9px;
        line-height: 1.8;
        min-height: 68px;
    }

    .product-rating {
        font-size: 12px;
        margin: 5px 0;
        letter-spacing: 0;
    }

    .product-price {
        font-size: 11px;
    }

    .add-to-cart {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        font-size: 15px;
    }

    .wholesale-text {
        margin-top: 7px;
        font-size: 9px;
        line-height: 1.7;
    }


    /* ABOUT */

    .about-box {
        padding: 22px 17px;
        border-radius: 16px;
        gap: 20px;
        margin-bottom: 35px;
    }

    .about-box h2 {
        font-size: 19px;
        line-height: 1.7;
    }

    .about-box p {
        font-size: 11px;
        line-height: 2;
    }

    .about-stats {
        width: 100%;
        gap: 7px;
    }

    .about-stats div {
        min-width: 0;
        flex: 1;
        padding: 10px 5px;
    }

    .about-stats strong {
        font-size: 17px;
    }

    .about-stats span {
        font-size: 9px;
    }


    /* FOOTER */

    .footer {
        padding: 28px 0 17px;
    }

    .trust-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 12px;
        padding-bottom: 25px;
    }

    .trust-row strong {
        font-size: 17px;
    }

    .trust-row span {
        font-size: 11px;
    }

    .trust-row small {
        font-size: 9px;
    }

    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 25px 18px;
        padding: 28px 0;
    }

    .footer-columns h4 {
        font-size: 12px;
        margin-bottom: 9px;
    }

    .footer-columns a {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .footer-columns p {
        font-size: 9px;
        line-height: 1.8;
    }

    .newsletter {
        height: 37px;
    }

    .newsletter input {
        font-size: 9px;
        padding: 7px;
    }

    .newsletter button {
        font-size: 10px;
        padding: 0 10px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
        font-size: 9px;
    }

    .socials {
        gap: 12px;
    }


    /* TOAST */

    .toast {
        left: 12px;
        right: 12px;
        bottom: 15px;
        text-align: center;
        font-size: 11px;
        padding: 11px 14px;
    }

}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .product-grid {
        gap: 8px;
    }

    .product-image {
        height: 145px;
    }

    .product-info {
        padding: 9px;
    }

    .product-info p {
        min-height: 75px;
    }

    .hero-visual,
    .hero-image {
        height: 235px;
        min-height: 235px;
    }

    .hero h1 {
        font-size: 24px;
    }

}
/* ================= ORDER MODAL ================= */

.order-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 34, 27, 0.68);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

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

    padding: 20px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .25s ease, visibility .25s ease;

    z-index: 99999;
}

.order-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.order-open {
    overflow: hidden;
}

.order-modal {
    position: relative;

    width: min(620px, 100%);
    max-height: 92vh;
    overflow-y: auto;

    background: #ffffff;
    border-radius: 24px;

    padding: 30px;

    box-shadow: 0 25px 80px rgba(0, 0, 0, .25);

    direction: rtl;

    transform: translateY(20px) scale(.97);
    transition: transform .25s ease;
}

.order-overlay.show .order-modal {
    transform: translateY(0) scale(1);
}

/* دکمه بستن */

.order-close {
    position: absolute;

    top: 14px;
    left: 14px;

    width: 38px;
    height: 38px;

    border: 0;
    border-radius: 50%;

    background: #f1f5f3;
    color: #263630;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;

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

    transition: .2s ease;
}

.order-close:hover {
    background: #168f63;
    color: #fff;
}

/* عنوان */

.order-header {
    text-align: center;
    margin-bottom: 24px;
    padding-top: 5px;
}

.order-header .section-kicker {
    margin-bottom: 2px;
}

.order-header h2 {
    font-size: 28px;
    margin-bottom: 5px;
}

.order-header p {
    color: #71817b;
    font-size: 13px;
}

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

.order-cart {
    background: #f7faf8;
    border: 1px solid #e0ebe6;
    border-radius: 16px;

    padding: 18px;

    margin-bottom: 22px;
}

.order-cart h3 {
    font-size: 17px;
    margin-bottom: 14px;
}

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

    gap: 15px;

    padding: 12px 0;

    border-bottom: 1px solid #e3ebe7;
}

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

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

    min-width: 0;
}

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

.order-item-info span {
    color: #71817b;
    font-size: 12px;
}

.order-item-price {
    color: #168f63;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

/* مبلغ کل */

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

    gap: 15px;

    margin-top: 14px;
    padding-top: 15px;

    border-top: 2px solid #dce8e2;
}

.order-total span {
    font-weight: 700;
}

.order-total strong {
    color: #168f63;
    font-size: 18px;
}

/* فرم */

.order-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;

    border: 1px solid #cfe1d9;
    border-radius: 12px;

    background: #f8fbf9;

    padding: 12px 14px;

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

    color: #263630;

    outline: none;

    transition: .2s ease;

    resize: vertical;
}

.form-group input {
    height: 46px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #168f63;
    background: #fff;

    box-shadow: 0 0 0 3px rgba(22, 143, 99, .10);
}

.order-submit {
    width: 100%;

    border: 0;
    border-radius: 13px;

    background: #168f63;
    color: white;

    padding: 13px 20px;

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

    cursor: pointer;

    transition: .2s ease;
}

.order-submit:hover {
    background: #117b55;
    transform: translateY(-1px);
}

.order-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

/* موفقیت */

.order-success {
    text-align: center;
    padding: 25px 10px 10px;
}

.success-icon {
    width: 65px;
    height: 65px;

    margin: 0 auto 15px;

    border-radius: 50%;

    background: #e8f8f0;
    color: #168f63;

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

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

.order-success h3 {
    font-size: 21px;
    margin-bottom: 10px;
}

.order-success p {
    color: #687970;
    font-size: 13px;
    line-height: 2;
    margin-bottom: 20px;
}

.order-success-button {
    border: 0;
    border-radius: 11px;

    background: #168f63;
    color: #fff;

    padding: 11px 25px;

    font-family: inherit;
    font-weight: 700;

    cursor: pointer;
}

/* ================= ORDER MOBILE ================= */

@media (max-width: 650px) {

    .order-overlay {
        padding: 12px;
    }

    .order-modal {
        width: 100%;
        max-height: 94vh;

        border-radius: 20px;

        padding: 22px 16px;
    }

    .order-close {
        top: 10px;
        left: 10px;

        width: 34px;
        height: 34px;

        font-size: 22px;
    }

    .order-header {
        padding: 5px 30px 0;
        margin-bottom: 18px;
    }

    .order-header h2 {
        font-size: 23px;
    }

    .order-header p {
        font-size: 11px;
    }

    .order-cart {
        padding: 13px;
        margin-bottom: 17px;
    }

    .order-cart h3 {
        font-size: 15px;
    }

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

    .order-item-info span {
        font-size: 10px;
    }

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

    .order-total strong {
        font-size: 15px;
    }

    .form-group {
        gap: 5px;
    }

    .form-group label {
        font-size: 11px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 12px;
        border-radius: 10px;
    }

    .form-group input {
        height: 42px;
    }

    .order-submit {
        padding: 12px;
        font-size: 12px;
    }
}

/* =========================================================
   TPS MODERN UI ENHANCEMENTS
   ظاهر اصلی حفظ شده؛ فقط تعاملات و حالت‌های جدید اضافه شده‌اند.
========================================================= */

:root {
    --tps-green: #168f63;
}

button,
.btn,
.add-to-cart,
.account,
.cart,
.search button,
.nav a {
    transition: transform .18s ease, background-color .18s ease,
                border-color .18s ease, color .18s ease,
                box-shadow .18s ease, opacity .18s ease;
}

button:not(:disabled):active,
.btn:active,
.add-to-cart:not(:disabled):active,
.cart:active {
    transform: scale(.97);
}

button:disabled,
.add-to-cart:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.add-to-cart:not(:disabled):hover {
    background: #168f63;
    color: #fff;
    border-color: #168f63;
    box-shadow: 0 7px 18px rgba(22,143,99,.18);
}

.product-image img {
    transition: transform .28s ease, filter .28s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.035);
}

.tps-favorite-button:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(0,0,0,.14) !important;
}

.tps-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 180px;
    padding: 25px;
    color: #66766f;
    direction: rtl;
}

.tps-loading::before {
    content: "";
    width: 22px;
    height: 22px;
    border: 3px solid #d9ebe3;
    border-top-color: #168f63;
    border-radius: 50%;
    animation: tpsSpin .75s linear infinite;
}

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

.tps-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 45px 20px;
    border: 1px dashed #cfe1d9;
    border-radius: 18px;
    background: #f8fbf9;
    color: #66766f;
}

.tps-empty-state .icon {
    display: block;
    font-size: 36px;
    margin-bottom: 8px;
}

.tps-modern-modal {
    animation: tpsModalIn .2s ease both;
}

@keyframes tpsModalIn {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

body {
    animation: tpsPageIn .18s ease both;
}

@keyframes tpsPageIn {
    from { opacity: .92; }
    to { opacity: 1; }
}

/* Dark mode — فقط وقتی از تنظیمات فعال شود */
html.tps-dark body {
    background: #101714;
    color: #edf5f1;
}

html.tps-dark .header,
html.tps-dark .product-card,
html.tps-dark .about-box,
html.tps-dark .search,
html.tps-dark .account {
    background: #18221e;
    color: #edf5f1;
    border-color: #2c3b34;
}

html.tps-dark .top-strip {
    background: #141d19;
    border-color: #2c3b34;
    color: #aebdb7;
}

html.tps-dark .search input,
html.tps-dark .account,
html.tps-dark .nav a {
    color: #edf5f1;
}

html.tps-dark .product-image {
    background: #202b26;
}

html.tps-dark .product-info p,
html.tps-dark .breadcrumb,
html.tps-dark .hero p,
html.tps-dark .about-box p {
    color: #aebdb7;
}

html.tps-dark .product-price,
html.tps-dark .product-info h3,
html.tps-dark .section-head h2 {
    color: #edf5f1;
}

html.tps-dark .tps-empty-state {
    background: #18221e;
    border-color: #355047;
    color: #aebdb7;
}

html.tps-dark #tpsNotificationPanel {
    background: #18221e !important;
    color: #edf5f1;
}

html.tps-dark .tps-favorite-button {
    background: rgba(24,34,30,.94) !important;
    color: #edf5f1 !important;
}

html.tps-animations-off *,
html.tps-animations-off *::before,
html.tps-animations-off *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0s !important;
        transition-duration: 0s !important;
        scroll-behavior: auto !important;
    }
}


/* =========================================================
   TPS FAVORITES HEADER + ACCOUNT
========================================================= */
.tps-header-favorite {
    width: 46px;
    height: 46px;
    border: 1px solid #d9e8e1;
    border-radius: 13px;
    background: #f7fbf9;
    color: #168f63;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.tps-header-favorite:hover {
    transform: translateY(-1px) scale(1.03);
    background: #edf8f3;
    box-shadow: 0 7px 18px rgba(22,143,99,.13);
}

.tps-header-favorite-icon {
    font-size: 25px;
    line-height: 1;
}

.tps-header-favorite-icon.active {
    color: #e5484d;
}

.tps-account-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #edf0ee;
    cursor: pointer;
}

.tps-account-setting-row input {
    width: 20px;
    height: 20px;
    accent-color: #168f63;
    cursor: pointer;
}

.tps-account-settings-panel,
.tps-account-favorites-panel {
    border-top: 1px solid #e5eae7;
    padding-top: 18px;
}

.tps-account-settings-title,
.tps-account-favorites-heading {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 12px;
}

.tps-account-setting-disabled {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff5f4;
    color: #b42318;
    font-size: 12px;
    line-height: 1.8;
}

.tps-account-secondary-button {
    width: 100%;
    padding: 11px;
    border: 1px solid #d9e2de;
    border-radius: 11px;
    background: #fff;
    color: #34423d;
    cursor: pointer;
    margin-top: 12px;
    font-family: inherit;
}

.tps-account-favorites-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tps-account-favorite-item {
    display: block;
    border: 1px solid #e2ebe6;
    border-radius: 14px;
    padding: 9px;
    background: #fff;
    transition: transform .18s ease, box-shadow .18s ease;
}

.tps-account-favorite-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(22,55,40,.08);
}

.tps-account-favorite-image {
    height: 105px;
    border-radius: 10px;
    background: #f7faf8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 8px;
}

.tps-account-favorite-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tps-account-favorite-item strong {
    display: block;
    font-size: 12px;
    line-height: 1.7;
}

.tps-account-favorite-item span {
    display: block;
    color: #168f63;
    font-size: 12px;
    font-weight: 800;
    margin-top: 3px;
}

.tps-account-favorites-empty,
.tps-account-favorites-loading {
    text-align: center;
    padding: 25px 12px;
    color: #68766f;
}

.tps-account-favorites-empty-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #edf8f3;
    color: #168f63;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 29px;
}

.tps-account-favorites-empty strong {
    display: block;
    color: #263630;
    margin-bottom: 5px;
}

.tps-account-favorites-empty span {
    display: block;
    font-size: 12px;
    line-height: 1.9;
}

html.tps-dark .tps-header-favorite,
html.tps-dark .tps-account-favorite-item,
html.tps-dark .tps-account-secondary-button {
    background: #18231f;
    border-color: #2b3a34;
    color: #edf5f1;
}

html.tps-dark .tps-account-favorite-image {
    background: #111916;
}

html.tps-dark .tps-account-favorites-empty strong {
    color: #edf5f1;
}

@media (max-width: 520px) {
    .tps-header-favorite {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .tps-header-favorite-icon {
        font-size: 23px;
    }

    .tps-account-favorites-grid {
        grid-template-columns: 1fr;
    }
}
