/* Full-width layout: all site containers use the available viewport width. */
html body .container,
html body .site-container,
html body .content-container,
html body .elementor-section-boxed > .elementor-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Standard page shells should also use the full available content width. */
html body .site-main > .container > article,
html body .site-main > .container > .mr-oil-legal-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Keep deliberate edge-to-edge sections truly edge-to-edge. */
html body .full-bleed,
html body .alignfull,
html body .slider-section,
html body .hero-slider,
html body .special-section,
html body .under-slider-section {
    width: 100% !important;
    max-width: 100% !important;
}

/* The selected header logo size remains effective after the full-width override. */
html body .oil-brand-logo {
    width: var(--mr-oil-logo-size, 140px) !important;
    height: 58px !important;
    border-radius: 10px;
}
html body .oil-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 800px) {
    html body .oil-brand-logo {
        width: min(var(--mr-oil-logo-size, 140px), 120px) !important;
        height: 44px !important;
    }
}

/* Standard desktop header proportions: logo right, search centered, actions left. */
@media (min-width: 1051px) {
    html body .oil-header-main-inner {
        min-height: 88px;
        grid-template-columns: minmax(170px,220px) minmax(420px,1fr) minmax(280px,320px);
        gap: 24px;
    }
    html body .oil-brand {
        width: 100%;
        justify-self: end;
    }
    html body .oil-header-search {
        width: min(100%, 580px);
        justify-self: center;
    }
    html body .oil-search-form {
        height: 48px;
        border-radius: 12px;
    }
    html body .oil-search-form input {
        font-size: 13px;
    }
    html body .oil-search-form button {
        min-width: 86px;
        padding: 0 18px;
        font-size: 12px;
    }
    html body .oil-header-actions {
        justify-self: start;
        gap: 12px;
    }
    html body .oil-header-action,
    html body .oil-cart-action {
        gap: 8px;
    }
    html body .oil-action-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 16px;
    }
    html body .oil-cart-icon {
        width: 46px;
        height: 46px;
    }
    html body .oil-action-label,
    html body .oil-cart-action > span:last-child {
        font-size: 11px;
    }
    html body .oil-action-label small,
    html body .oil-cart-action small {
        font-size: 9px;
    }
}

/* The shop archive keeps its product-grid reading width; every other template page stays full-width. */
html body.mr-oil-shop-page .container,
html body.woocommerce-shop .container,
html body.post-type-archive-product .container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Homepage single product cover: clean compact catalog card. */
html body .products-home-pro .product-card.pro {
    min-height: 278px;
    border: 1px solid #dfe4e7 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 3px 12px rgba(23,35,43,.06) !important;
    overflow: hidden;
}
html body .products-home-pro .product-card.pro .img-wrap {
    aspect-ratio: 1 / 1;
    padding: 8px !important;
    background: #fff !important;
    border-bottom: 1px solid #edf0f1;
}
html body .products-home-pro .product-card.pro .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
html body .products-home-pro .product-card.pro .badge.sale {
    top: 8px;
    right: 8px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    padding: 0 !important;
    border-radius: 10px;
    background: #f04457 !important;
    color: #fff !important;
    font-size: 9px;
    font-weight: 900;
}
html body .products-home-pro .product-card.pro .info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    padding: 9px 11px 10px !important;
    direction: rtl;
    text-align: center !important;
}
html body .products-home-pro .product-card.pro .title {
    min-height: 36px;
    margin: 0;
    color: #3f4c55;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.7;
    text-align: center;
}
html body .products-home-pro .product-card.pro .title a {
    color: inherit;
}
html body .products-home-pro .product-card.pro .rating,
html body .products-home-pro .product-card.pro .homepage-stock {
    display: none !important;
}
html body .products-home-pro .product-card.pro .price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    margin-top: auto;
    color: #5b718a !important;
    font-size: 10px;
    line-height: 1.5;
}
html body .products-home-pro .product-card.pro .price del {
    order: 0;
    color: #e55b63 !important;
    font-size: 9px;
}
html body .products-home-pro .product-card.pro .price ins {
    order: 1;
    color: #55718f !important;
    text-decoration: none;
}
html body .products-home-pro .product-card.pro .homepage-product-meta {
    display: flex;
    justify-content: flex-start;
    min-height: 32px;
    margin: 0;
}
html body .products-home-pro .product-card.pro .homepage-quick-actions {
    display: inline-flex;
    gap: 0;
}
html body .products-home-pro .product-card.pro .homepage-quick-actions .qa-btn {
    display: none;
}
html body .products-home-pro .product-card.pro .homepage-quick-actions .qa-btn[title="افزودن به سبد"],
html body .products-home-pro .product-card.pro .homepage-quick-actions .qa-btn[title="سبد"] {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border: 1px solid #e2e7e9;
    border-radius: 50%;
    background: #f1f3f4;
    color: #82919b;
    font-size: 12px;
}
html body .products-home-pro .product-card.pro .homepage-quick-actions .qa-btn[title="افزودن به سبد"]:hover,
html body .products-home-pro .product-card.pro .homepage-quick-actions .qa-btn[title="سبد"]:hover {
    background: #d99a25;
    border-color: #d99a25;
    color: #fff;
}
html body .products-home-pro .product-card.pro .homepage-product-cart {
    display: none !important;
}

/* Header edge spacing: keep the left action labels fully inside the viewport. */
@media (min-width: 1201px) {
    html body .oil-header-main-inner {
        padding-left: 28px !important;
        padding-right: 28px !important;
        grid-template-columns: 250px minmax(480px, 1fr) max-content !important;
        gap: 24px !important;
    }
}
@media (min-width: 801px) and (max-width: 1200px) {
    html body .oil-header-main-inner {
        padding-left: 20px !important;
        padding-right: 20px !important;
        grid-template-columns: 220px minmax(250px, 1fr) max-content !important;
        gap: 17px !important;
    }
}
@media (min-width: 801px) {
    html body .oil-header-actions {
        min-width: max-content;
        overflow: visible;
    }
    html body .oil-header-action,
    html body .oil-cart-action {
        flex-shrink: 0;
    }
}
@media (max-width: 800px) {
    html body .oil-header-main-inner {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Click/tap support for the restored header mini-cart popup. */
html body .oil-cart-wrap.oil-mini-cart-open .mini-cart-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}
@media (max-width: 768px) {
    html body .oil-cart-wrap.oil-mini-cart-open .mini-cart-dropdown {
        display: block !important;
        position: fixed;
        top: 92px;
        left: 10px;
        right: 10px;
        width: auto;
        min-width: 0;
        margin-top: 0;
    }
}

/* Browser wishlist page and wishlist toggle state. */
html body .wishlist-toggle.is-wishlisted {
    color: #ef394e !important;
    background: #fff0f2 !important;
    border-color: #ffd6dc !important;
}
html body .mr-oil-wishlist-page {
    min-height: 58vh;
    padding: 42px 0 60px;
    background: #f7f8fa;
    direction: rtl;
}
html body .mr-oil-wishlist-heading {
    margin-bottom: 24px;
    text-align: right;
}
html body .mr-oil-wishlist-heading > span {
    color: #bd7411;
    font-size: 11px;
    font-weight: 800;
}
html body .mr-oil-wishlist-heading h1 {
    margin: 7px 0 4px;
    color: #20262d;
    font-size: 26px;
}
html body .mr-oil-wishlist-heading h1 i {
    color: #ef394e;
    font-size: 22px;
}
html body .mr-oil-wishlist-heading p {
    margin: 0;
    color: #7b858e;
    font-size: 12px;
}
html body .mr-oil-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}
html body .mr-oil-wishlist-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e5e9ec;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(16,24,32,.05);
}
html body .mr-oil-wishlist-card[hidden] { display: none !important; }
html body .mr-oil-wishlist-card .wishlist-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #e7eaed;
    border-radius: 50%;
    background: #fff;
    color: #ef394e;
    cursor: pointer;
}
html body .mr-oil-wishlist-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 170px;
    padding: 8px;
    border-radius: 10px;
    background: #fafbfc;
}
html body .mr-oil-wishlist-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
html body .mr-oil-wishlist-card h2 {
    min-height: 38px;
    margin: 12px 0 6px;
    font-size: 12px;
    line-height: 1.7;
}
html body .mr-oil-wishlist-card h2 a { color: #303940; }
html body .mr-oil-wishlist-price {
    min-height: 25px;
    color: #55718f;
    font-size: 11px;
    font-weight: 800;
}
html body .mr-oil-wishlist-price del { color: #e55b63; font-size: 9px; }
html body .mr-oil-wishlist-price ins { text-decoration: none; }
html body .mr-oil-wishlist-view {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 32px;
    margin-top: 10px;
    border-radius: 8px;
    background: #17232b;
    color: #f0d399 !important;
    font-size: 10px;
    font-weight: 800;
}
html body .mr-oil-wishlist-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    min-height: 220px;
    padding: 30px;
    border: 1px dashed #dfe4e7;
    border-radius: 16px;
    background: #fff;
    color: #7b858e;
    text-align: center;
}
html body .mr-oil-wishlist-empty i { color: #ef394e; font-size: 34px; }
html body .mr-oil-wishlist-empty strong { font-size: 13px; }
html body .mr-oil-wishlist-empty a {
    padding: 9px 16px;
    border-radius: 22px;
    background: #17232b;
    color: #f0d399 !important;
    font-size: 11px;
    font-weight: 800;
}
@media (max-width: 1100px) {
    html body .mr-oil-wishlist-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    html body .mr-oil-wishlist-page { padding: 28px 0 42px; }
    html body .mr-oil-wishlist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    html body .mr-oil-wishlist-card { padding: 8px; border-radius: 12px; }
    html body .mr-oil-wishlist-image { height: 130px; }
    html body .mr-oil-wishlist-card h2 { font-size: 10px; }
}
