/*
Theme Name: Funeral Products
Description: Custom styling for funeral products grid and single product pages
Version: 1.0
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Product Grid Layout */
.funeral-products-wrapper {
    display: flex;
    gap: 40px;
}

/* Sidebar Categories */
.product-categories-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.categories-title {
    font-size: 20px !important;
    font-weight: 500 !important;
    margin-bottom: 18px !important;
    text-transform: uppercase !important;
    font-family: 'MD Sans', sans-serif !important;
}

.category-list {
    list-style: none;
}

.category-item {
    margin-bottom: 5px;
}

.category-item.has-children > a {
    font-weight: 600;
    color: #4A90E2;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    cursor: pointer;
}

.category-item.has-children > a:hover {
    color: #357ABD;
}

.category-toggle {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.category-item.active .category-toggle {
    transform: rotate(180deg);
}

.subcategory-list {
    list-style: none;
    padding-left: 15px;
    margin-top: 5px;
    display: none;
}

.category-item.active .subcategory-list {
    display: block;
}

.subcategory-item {
    margin-bottom: 3px;
}

.subcategory-item a {
    color: #666;
    text-decoration: none;
    padding: 8px 0;
    display: block;
    font-size: 14px;
}

.subcategory-item a:hover,
.subcategory-item.active a {
    color: #4A90E2;
}

/* Main Product Content */
.product-main-content {
    flex: 1;
    min-width: 0;
    border-left: 1px solid #dddddd;
    padding-left: 50px;
}

/* Breadcrumb */
.product-breadcrumb {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.product-breadcrumb a {
    color: #000000;
    text-decoration: none;
    font-size: 18px !important;
    font-family: 'DM Sans';
}

.product-breadcrumb a:hover {
    color: #4A90E2;
}

.product-breadcrumb .separator {
    margin: 0 8px;
}

/* Product Grid Introduction */
.product-grid-intro {
    margin-bottom: 15px;
}

.hrr{
    border-top: 1px solid #dddddd;
    margin-bottom: 20px;
}
.product-grid-intro p {
    color: #1B1B1B !important;
    font-size: 16px !important;
    font-family: 'DM Sans' !important;
    font-weight: 400 !important;
    line-height: 1.5;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 5px;
}

/* Product Card */
.product-card {
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.product-card .fusion-button.button-flat {
    box-shadow: none !important;
    padding: 10px 5px !important;
    color: #000000 !important;
    font-size: 16px !important;
    width: 70%;
}
.product-card .fusion-button.button-flat span{
    color:#000000 !important;
}
.product-card .fusion-button-default{
    border-color: #000000 !important;
}
.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #4A90E2;
    color: white;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #4A90E2;
    color: white;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: #4A90E2;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title a {
    color: #4A90E2;
    text-decoration: none;
}

.product-title a:hover {
    color: #357ABD;
}

.product-price {
    font-size: 16px;
    color: #000000 !important;
    margin-bottom: 15px;
    font-weight: 500;
    font-family: 'DM Sans' !important;
    margin-top: 15px;

}

.old-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 8px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px 20px;
    background: white;
    border: 1px solid #333;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
    margin-top: auto;
}

.add-to-cart-btn:hover {
    background: #333;
    color: white;
}

/* Single Product Page */
.single-product-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    margin-bottom: 30px;
    font-size: 24px;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: #4A90E2;
}

.single-product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 60px;
    min-height: 600px;
}

.single-product-image-wrapper {
    position: relative;
    background: #f5f5f5;
    overflow: hidden;
}

.single-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 100%;
}

.single-product-info {
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    background: white;
    position: relative;
}

.single-product-info .back-button-inline {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1;
}

.single-product-info .back-button-inline:hover {
    color: #4A90E2;
}

.single-product-info h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    margin-top: 40px;
}

.single-product-price {
    font-size: 28px;
    color: #4A90E2;
    margin-bottom: 25px;
    font-weight: 500;
}

.single-product-description {
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 15px;
    flex-grow: 1;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
}

.qty-btn {
    width: 45px;
    height: 45px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    transition: background 0.3s ease;
}

.qty-btn:hover {
    background: #f5f5f5;
}

.qty-input {
    width: 60px;
    height: 45px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 16px;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.single-add-to-cart {
    width: 100%;
    padding: 18px 30px;
    background: #4A90E2;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-transform: capitalize;
    font-weight: 500;
}

.single-add-to-cart:hover {
    background: #357ABD;
}

/* Product Tabs */
.product-tabs {
    border-top: 1px solid #e0e0e0;
    padding-top: 40px;
}

.tab-buttons {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 0;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: #333;
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #333;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content-inner {
    background: #f8f9fa;
    padding: 30px;
    color: #333;
    line-height: 1.8;
    font-size: 15px;
}
.single-product-image-wrapper {
    width: 100%;
    height: 400px; /* ou hauteur désirée */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Cachez l'img tag si vous utilisez cette méthode */
.single-product-image {
    display: none;
}

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

/* Large Desktop (1440px and above) */
@media (max-width: 1440px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .product-card .fusion-button.button-flat{
        width: 75% !important;
    }
}

/* Desktop (1200px - 1360px) */
@media (max-width: 1360px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .product-card .fusion-button.button-flat{
        width: 80% !important;
    }
}

/* Tablet Landscape (992px - 1199px) */
@media (max-width: 1200px) {
    .funeral-products-wrapper {
        padding: 30px 15px;
        gap: 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
    
    .product-categories-sidebar {
        width: 250px;
    }
    
    .single-product-info {
        padding: 40px 50px;
    }
    
    .single-product-info h1 {
        font-size: 32px;
    }
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
    .product-card .fusion-button.button-flat {
        width: 86% !important;
    }
}
/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) {
    .funeral-products-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    
    .product-categories-sidebar {
        width: 100%;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .single-product-content {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .single-product-image-wrapper {
        min-height: 400px;
        height: 400px;
    }
    
    .single-product-info {
        padding: 40px 30px;
    }
    
    .single-product-info .back-button-inline {
        position: static;
        margin-bottom: 20px;
        display: inline-block;
    }
    
    .single-product-info h1 {
        margin-top: 0;
        font-size: 28px;
    }
    
    .single-product-wrapper {
        padding: 15px;
    }
    
    .back-button {
        margin-bottom: 20px;
        font-size: 20px;
    }
}

/* Mobile Landscape (576px - 767px) */
@media (max-width: 768px) {
    .funeral-products-wrapper {
        padding: 20px 10px;
        gap: 30px;
    }
    .h2-section .fusion_builder_column .fusion-column-wrapper{
        padding: 20px !important;
        max-height: max-content;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-card {
        font-size: 14px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .product-price {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .add-to-cart-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .categories-title {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .category-item.has-children > a {
        font-size: 14px;
        padding: 8px 0;
    }
    
    .subcategory-item a {
        font-size: 13px;
        padding: 6px 0;
    }
    
    .product-grid-intro p {
        font-size: 14px;
    }
    
    .product-breadcrumb {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .single-product-image-wrapper {
        min-height: 300px;
        height: 300px;
    }
    
    .single-product-info {
        padding: 30px 20px;
    }
    
    .single-product-info h1 {
        font-size: 24px;
    }
    
    .single-product-price {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .single-product-description {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .qty-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .qty-input {
        width: 50px;
        height: 40px;
        font-size: 14px;
    }
    
    .single-add-to-cart {
        padding: 15px 25px;
        font-size: 15px;
    }
    
    .product-tabs {
        padding-top: 30px;
    }
    
    .tab-buttons {
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .tab-btn {
        padding: 12px 0;
        font-size: 15px;
    }
    
    .tab-content-inner {
        padding: 20px;
        font-size: 14px;
    }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
    .funeral-products-wrapper {
        padding: 15px 10px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-image-wrapper {
        aspect-ratio: 4 / 3;
    }
    
    .single-product-content {
        gap: 0;
    }
    
    .single-product-image-wrapper {
        min-height: 250px;
        height: 250px;
    }
    
    .single-product-info {
        padding: 25px 15px;
    }
    
    .single-product-info h1 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .single-product-price {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .single-product-description {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 20px;
    }
    
    .quantity-selector {
        margin-bottom: 15px;
    }
    
    .single-product-wrapper {
        padding: 10px;
    }
    
    .back-button {
        margin-bottom: 15px;
        font-size: 18px;
    }
    
    .tab-content-inner {
        padding: 15px;
        font-size: 13px;
    }
    
    .stock-badge,
    .discount-badge {
        font-size: 10px;
        padding: 3px 10px;
    }
}

/* Extra Small Devices (up to 380px) */
@media (max-width: 380px) {
    .funeral-products-wrapper {
        padding: 10px 5px;
    }
    .h2-section .fusion_builder_column .fusion-column-wrapper {
        padding: 0px !important;
        max-height: max-content;
    }
    .product-info {
        padding: 12px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 13px;
    }
    
    .add-to-cart-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .single-product-info {
        padding: 20px 12px;
    }
    
    .single-product-info h1 {
        font-size: 20px;
    }
    
    .single-product-price {
        font-size: 18px;
    }
    
    .single-product-description {
        font-size: 12px;
    }
    
    .qty-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .qty-input {
        width: 45px;
        height: 35px;
        font-size: 13px;
    }
    
    .single-add-to-cart {
        padding: 12px 20px;
        font-size: 14px;
    }
}
@media (max-width: 320px) {
    .categories-title {
        font-size: 16px !important;
        margin-bottom: 20px;
    }
}
/* Landscape Orientation Fix for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .single-product-image-wrapper {
        min-height: 200px;
        height: 200px;
    }
    
    .single-product-info {
        padding: 20px;
    }
    
    .single-product-info h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .single-product-price {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .single-product-description {
        font-size: 13px;
        margin-bottom: 15px;
    }
}

/* Print Styles */
@media print {
    .back-button,
    .add-to-cart-btn,
    .single-add-to-cart,
    .quantity-selector,
    .product-categories-sidebar {
        display: none !important;
    }
    
    .single-product-content {
        grid-template-columns: 1fr;
    }
    
    .funeral-products-wrapper {
        display: block;
    }
}
/**
 * Funeral Products CSS
 */

/* Loading state */
.loading-products {
    text-align: center;
    padding: 40px 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-products p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Smooth transitions */
.products-grid {
    transition: opacity 0.3s ease;
}

.products-grid.loading {
    opacity: 0.5;
}

.product-grid-intro p {
    transition: opacity 0.3s ease;
}

/* Category active states */
.category-item.active > .category-toggle-link,
.subcategory-item.active > a {
    font-weight: bold;
    color: #000;
}

/* Subcategory list */
.subcategory-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category-item.active .subcategory-list {
    max-height: 500px;
}

/* Category toggle arrow */
.category-toggle {
    transition: transform 0.3s ease;
    display: inline-block;
}

.category-item.active .category-toggle {
    transform: rotate(180deg);
}

/* Product card hover effects */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* Button states */
.add_to_cart_button:disabled,
.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Breadcrumb transitions */
.product-breadcrumb {
    transition: opacity 0.3s ease;
}
