
/* MODERN PREMIUM STORE STYLES */

/* Store Layout - Flexbox */
@media (min-width: 992px) {
    .ps-section__container {
        display: flex;
        align-items: flex-start;
        gap: 30px;
    }
    
    .ps-section__left {
        width: 280px;
        flex-shrink: 0;
    }
    
    .ps-section__right {
        flex-grow: 1;
        width: calc(100% - 310px);
    }
}

@media (max-width: 991px) {
    .ps-section__left {
        margin-bottom: 30px;
    }
}

/* STORE PROFILE / SELLER PAGE STYLES */

/* Sidebar Profile Card */
.ps-block--vendor {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef2f5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    padding: 25px 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.ps-block--vendor:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.ps-block--vendor .ps-block__thumbnail {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.ps-block--vendor .ps-block__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ps-block--vendor .ps-block__header h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.ps-block--vendor .ps-block__content {
    text-align: left;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.ps-block--vendor .ps-block__divider {
    height: 1px;
    background-color: #f0f0f0;
    margin: 15px 0;
    display: block;
}

.ps-block--vendor p {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ps-block--vendor p i {
    color: #0277bd;
    margin-top: 3px;
}

/* Contact Button */
.btn-contact-seller {
    background-color: #25d366;
    color: white !important;
    border: none;
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.btn-contact-seller:hover {
    background-color: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
    color: white !important;
}

/* CATEGORY PILL DESIGN */
.ps-block--category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 50px; /* Pill shape */
    transition: all 0.3s ease;
    height: 100%;
    min-width: 0; /* Important for flex child truncation */
}

.ps-block--category-item:hover {
    border-color: #0277bd;
    background-color: #f0f9ff;
    box-shadow: 0 4px 12px rgba(2, 119, 189, 0.12);
    transform: translateY(-2px);
}

.ps-block--category-item .ps-block__overlay {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    color: #444;
    font-weight: 500;
    text-decoration: none;
    min-width: 0; /* Important for flex child truncation */
}

.ps-block--category-item img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    flex-shrink: 0; /* Prevent image from shrinking */
}

.ps-block--category-item p {
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    flex-grow: 1;
}

.ps-countdown li span {
    font-size: 18px;
    font-weight: 700;
}

.ps-countdown li p {
    font-size: 10px;
    margin-bottom: 0;
    color: rgba(255,255,255,0.8);
}

/* PRODUCT CARD ENHANCEMENTS */
.ps-product {
    border-radius: 10px;
    border: 1px solid #f4f4f4;
}

.ps-product:hover {
    border-color: #b3e5fc; /* Light blue border on hover */
}

.ps-product__title {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: #333;
}

.ps-product__title:hover {
    color: #0277bd;
}

/* Helper Classes */
.shadow-premium {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

/* FIX LAYOUT SHIFT AND FLICKERING ON PRODUCT CARDS */

/* 1. Prevent content swapping */
.ps-product:hover .ps-product__content {
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
}

.ps-product:hover .ps-product__content.hover {
    display: none !important;
}

/* 2. Static Wrapper Implementation */
.product-hover-trigger {
    height: 100%;
    display: block;
}

.product-hover-trigger .ps-product {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-hover-trigger .ps-product--horizontal {
    height: 100%;
    display: flex;
    flex-direction: row;
    background: #fff;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    border-radius: 10px;
    border: 1px solid #f4f4f4;
}

.product-hover-trigger .ps-product--horizontal:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-color: #b3e5fc;
}

.ps-product__container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 10px;
}

.ps-product__content {
    padding: 0 10px;
}

/* 3. Handle Action Buttons (Wishlist, Quickview) */
/* Keep them visible on hover but without layout shift */
.ps-product .ps-product__thumbnail .ps-product__actions {
    transform: translate(-50%, 100%); /* Default hidden state */
    transition: transform 0.3s ease;
    z-index: 10;
}

.ps-product:hover .ps-product__thumbnail .ps-product__actions {
    transform: translate(-50%, -10px) !important; /* Move up slightly into view */
}

/* 4. Mobile Category Fixes */
@media (max-width: 576px) {
    .ps-block--category-item {
        padding: 8px 5px;
        flex-direction: column; /* Stack icon and text */
        height: auto;
        min-height: 80px;
        justify-content: center;
    }
    
    .ps-block--category-item .ps-block__overlay {
        flex-direction: column;
        gap: 5px;
    }
}

/* 5. Price Color Update */
.ps-product__price {
    color: #0277bd !important;
    font-weight: 700;
}

/* CUSTOM PRODUCT DETAIL ACTIONS */
.custom-shopping-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding-top: 25px;
    border-top: 1px solid #eef2f5;
    margin-top: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eef2f5;
}

.custom-shopping-actions .qty-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    min-width: 80px;
}

.custom-shopping-actions .qty-wrapper figcaption {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.custom-shopping-actions .form-group--number .qty {
    height: 48px;
    border-radius: 50px;
    border: 1px solid #ddd;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    background: #f9f9f9;
}

.custom-shopping-actions .actions-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
}

.btn-custom-action {
    padding: 0 25px;
    height: 48px;
    line-height: 1.2;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    font-size: 15px;
    text-decoration: none !important;
    position: relative;
    z-index: 1;
    gap: 8px;
    white-space: nowrap;
}

.btn-custom-action i {
    font-size: 18px;
}

.btn-add-cart {
    background-color: #fff;
    border: 2px solid #0277bd;
    color: #0277bd !important;
}

.btn-add-cart:hover {
    background-color: #e1f5fe;
    color: #0277bd !important;
    border-color: #0277bd;
    box-shadow: 0 5px 15px rgba(2, 119, 189, 0.15);
    transform: translateY(-2px);
}

.btn-buy-now {
    background-color: #0277bd;
    border: 2px solid #0277bd;
    color: #fff !important;
}

.btn-buy-now:hover {
    background-color: #01579b;
    border-color: #01579b;
    box-shadow: 0 5px 15px rgba(2, 119, 189, 0.3);
    transform: translateY(-2px);
}

.btn-disabled {
    background-color: #f5f5f5;
    border: 2px solid #eee;
    color: #bbb !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.btn-wishlist-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #e1e1e1;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    flex-shrink: 0;
}

.btn-wishlist-wrapper:hover {
    background-color: #ffebee;
    border-color: #ffcdd2;
    color: #e53935;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.15);
}

.btn-wishlist-wrapper i {
    font-size: 20px;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .btn-custom-action {
        min-width: 140px;
        padding: 0 15px;
        font-size: 14px;
    }
}

@media (max-width: 992px) {
    .custom-shopping-actions {
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .custom-shopping-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 20px 0;
    }
    
    .custom-shopping-actions .qty-wrapper {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        background: #f9f9f9;
        padding: 10px 15px;
        border-radius: 12px;
        border: 1px solid #eee;
    }
    
    .custom-shopping-actions .qty-wrapper figcaption {
        margin-bottom: 0;
        font-weight: 600;
        color: #333;
    }
    
    .custom-shopping-actions .form-group--number {
        width: 120px;
        margin-bottom: 0;
    }

    .custom-shopping-actions .form-group--number .qty {
        background: #fff;
        height: 40px;
    }
    
    .custom-shopping-actions .actions-wrapper {
        flex-direction: row; /* Try to keep them side by side if possible */
        width: 100%;
        gap: 10px;
    }
    
    .btn-custom-action {
        width: calc(50% - 35px); /* Share space */
        flex-grow: 1;
        min-width: 0; /* Allow shrinking */
        padding: 0 10px;
        font-size: 13px;
        height: 50px;
    }

    .btn-wishlist-wrapper {
        width: 50px;
        height: 50px;
        border-radius: 12px; /* Square with rounded corners on mobile looks better next to buttons */
    }
}
