/* GRID */
.shop-container { padding: 60px 0; }
.shop-grid { display: flex; gap: 40px; }

.shop-sidebar {
    width: 280px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,.05);
}

.shop-products { flex: 1; }

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

/* PRODUCT CARD */
.product-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,.05);
    transition: .3s;
}
.product-card:hover {
    transform: translateY(-5px);
}

/* IMAGE HOVER */
.product-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}
.product-thumb img {
    width: 100%;
    transition: .4s;
}
.product-thumb .img-hover {
    position: absolute;
    top:0; left:0;
    opacity:0;
}
.product-card:hover .img-hover { opacity:1; }
.product-card:hover .img-main { opacity:0; }

/* BUTTONS */
.product-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}
.btn-small {
    padding: 7px 15px;
    border-radius: 6px;
    font-size: 13px;
}
.btn-outline {
    border: 1px solid #e60023;
    color: #e60023;
}
.btn-outline:hover {
    background: #e60023;
    color: #fff;
}

/* LOAD MORE */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}
/* SINGLE PRODUCT */
.product-single-container {
    padding: 60px 0;
}

.woocommerce div.product {
    display: flex;
    gap: 60px;
}

.woocommerce div.product div.images {
    width: 50%;
}

.woocommerce div.product div.summary {
    width: 50%;
}

.woocommerce div.product .price {
    font-size: 22px;
    color: #e60023;
    margin: 15px 0;
}

.woocommerce div.product form.cart .button {
    background: #e60023;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
}

.woocommerce div.product form.cart .button:hover {
    background: #c4001d;
}

/* Tabs */
.woocommerce-tabs {
    margin-top: 50px;
}

.woocommerce-tabs ul.tabs li a {
    padding: 10px 20px;
    border-radius: 6px;
}
/* CART PAGE */
.woocommerce-cart .woocommerce {
    padding: 60px 0;
}

.woocommerce-cart table.shop_table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,.05);
}

.woocommerce-cart .button {
    background: #e60023;
    border: none;
    border-radius: 6px;
}

.woocommerce-cart .button:hover {
    background: #c4001d;
}

.cart_totals {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,.05);
}
/* CHECKOUT */
.woocommerce-checkout {
    padding: 60px 0;
}

.woocommerce form .form-row input,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px;
}

.woocommerce form .form-row {
    margin-bottom: 18px;
}

#place_order {
    background: #e60023;
    border: none;
    padding: 14px;
    font-size: 16px;
    border-radius: 8px;
}

#place_order:hover {
    background: #c4001d;
}






















/* Custom Shop Page Styles for arman-salamat theme */

.shop-container {
    padding-top: 50px;
    padding-bottom: 50px;
}

.shop-grid {
    display: grid;
    grid-template-columns: 1fr 3fr; /* Sidebar and Product Area */
    gap: 30px;
}

.shop-sidebar {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.shop-sidebar .filter-box {
    margin-bottom: 25px;
}

.shop-sidebar .filter-title {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #e74c3c; /* Red underline */
    padding-bottom: 8px;
    display: inline-block;
}

.shop-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shop-sidebar ul li {
    margin-bottom: 8px;
}

.shop-sidebar ul li a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.shop-sidebar ul li a:hover,
.shop-sidebar ul li.current-cat a {
    color: #e74c3c;
}

.shop-sidebar .ajax-filter label {
    display: block;
    margin-bottom: 10px;
    color: #555;
}

.shop-sidebar .ajax-filter input[type="checkbox"] {
    margin-left: 8px; /* For RTL */
}

/* Product Grid Styling */
.shop-products {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#product-area .products { /* Use .products because wc_product_loop_start/end wraps in ul.products */
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    gap: 25px; /* Spacing between products */
    list-style: none; /* Remove default list styling */
    padding: 0;
    margin: 0;
}

/* Individual Product Card Styling (from content-product.php) */
#product-area .products li.product {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#product-area .products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

#product-area .products li.product .woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

#product-area .products li.product img {
    max-width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid #eee;
    transition: transform 0.3s ease;
}

#product-area .products li.product:hover img {
    transform: scale(1.05);
}

/* Product Hover Overlay */
.product-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#product-area .products li.product:hover .product-hover-overlay {
    opacity: 1;
    visibility: visible;
}

.product-hover-overlay .icon-button {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1em;
    margin: 0 5px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.product-hover-overlay .icon-button:hover {
    background-color: #c0392b;
}

/* Product Info */
.product-info {
    padding: 15px;
    text-align: center;
}

.product-info .woocommerce-loop-product__title {
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 10px;
    min-height: 40px; /* Give some fixed height for titles */
}

.product-info .woocommerce-loop-product__title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-info .woocommerce-loop-product__title a:hover {
    color: #e74c3c;
}

.product-info .price {
    font-size: 1.2em;
    color: #e74c3c;
    font-weight: bold;
    display: block;
    margin-top: 5px;
}

/* Product Attributes Panel (Hover) */
.product-attributes-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #eee;
    padding: 10px 15px;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    text-align: right; /* RTL support */
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

#product-area .products li.product:hover .product-attributes-panel {
    transform: translateY(0);
}

.product-attributes-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85em;
    color: #555;
}

.product-attributes-panel ul li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.product-attributes-panel ul li strong {
    color: #333;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 30px;
}

.load-more-container .btn-hero {
    display: inline-block;
    padding: 12px 25px;
    background-color: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.load-more-container .btn-hero:hover {
    background-color: #c0392b;
}

.load-more-container .btn-hero:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}


/* Responsive adjustments */
@media (max-width: 992px) {
    .shop-grid {
        grid-template-columns: 1fr; /* Stack sidebar and products on smaller screens */
    }

    .shop-sidebar {
        margin-bottom: 30px;
    }

    #product-area .products {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on medium screens */
    }
}

@media (max-width: 768px) {
    #product-area .products {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (max-width: 576px) {
    #product-area .products {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}
/* ----------------------------------------- */
/* رفع مشکل عرض محصولات در گرید (بسیار مهم) */
/* ----------------------------------------- */
.woocommerce ul.products[class*="columns-"] li.product,
.woocommerce-page ul.products[class*="columns-"] li.product {
    width: auto !important;   /* عرض را به حالت خودکار برمیگرداند تا گرید آن را کنترل کند */
    float: none !important;  /* فلوت را غیرفعال می کند */
    margin-right: 0 !important; /* حاشیه اضافی را حذف می کند */
    margin-left: 0 !important;
}
