/* =========================================================
   AidinToy Damaged Products
   Responsive Frontend Styles
========================================================= */


/* =========================================================
   Base
========================================================= */

.atdg-grid,
.atdg-grid *,
.atdg-lightbox,
.atdg-lightbox * {
    box-sizing: border-box;
}


/* =========================================================
   Product Grid
========================================================= */

.atdg-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px !important;
    width: 100%;
    direction: rtl;
    align-items: stretch;
}

.atdg-grid > * {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
}


/* =========================================================
   Product Card
========================================================= */

.atdg-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
    overflow: hidden;

    background: #ffffff;
    border: 1px solid #e4e8ec;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(23, 43, 77, 0.07);
}

.atdg-image-area {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f3f5f7;
}

.atdg-open-gallery {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    cursor: zoom-in;
}

.atdg-cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f5f6f7;
}

.atdg-count {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 2;

    padding: 4px 7px;
    border-radius: 5px;

    background: rgba(22, 27, 32, 0.78);
    color: #ffffff;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   Product Content
========================================================= */

.atdg-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 13px 13px 0;
}

.atdg-title {
    min-height: 52px;
    margin: 0 0 8px;
    overflow: hidden;

    color: #1f2933;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.75;
}

.atdg-sku {
    margin: 0 0 10px;
    color: #6b7280;
    font-size: 12px;
}

.atdg-sku strong {
    direction: ltr;
    unicode-bidi: embed;
}

.atdg-prices {
    margin-top: auto;
    padding-top: 5px;
}

.atdg-sale-price {
    color: #bc2d2d;
    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   Footer and Order Button
========================================================= */

.atdg-footer {
    padding: 13px;
}

.atdg-rubika {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;

    border-radius: 6px;
    background: #21a9df;
    color: #ffffff !important;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none !important;
}


/* =========================================================
   Lightbox
========================================================= */

.atdg-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;

    display: none;
    width: 100vw !important;
    height: 100vh !important;
    padding: 80px 12px 20px;

    overflow: hidden;
    background: rgba(8, 12, 16, 0.95);

    align-items: center;
    justify-content: center;
}

.atdg-lightbox.is-open {
    display: flex !important;
}


/* =========================================================
   Lightbox Image
========================================================= */

.atdg-lb-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: auto;
    max-width: 100%;
    max-height: 100%;
    margin: 0;

    text-align: center;
}

.atdg-lb-figure img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 140px);
    object-fit: contain;
}

.atdg-lb-figure figcaption {
    margin-top: 8px;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   Lightbox Buttons
   همه دکمه‌ها در بالای لایت‌باکس
========================================================= */

.atdg-lb-prev,
.atdg-lb-next,
.atdg-lb-close {
    position: absolute !important;
    top: 18px !important;
    z-index: 10 !important;

    display: none !important;
    align-items: center;
    justify-content: center;

    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;

    border: 0 !important;
    border-radius: 50% !important;
    outline: 0 !important;

    color: #ffffff !important;
    font-family: Arial, sans-serif !important;
    font-size: 27px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.atdg-lightbox.is-open .atdg-lb-prev,
.atdg-lightbox.is-open .atdg-lb-next,
.atdg-lightbox.is-open .atdg-lb-close {
    display: flex !important;
}


/* بستن: بالا سمت راست */
.atdg-lb-close {
