/* ================================================= */
/* CLEAN GRID VIEW REBUILD (V1 - Stable) */
/* Structural integrity + minimal positioning */
/* ================================================= */

/* --- GENERAL CARD STRUCTURE & HOVER --- */

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-wrapper {
    position: relative; 
    border: 1px solid #eee !important; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important; 
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex; 
    flex-direction: column; 
    transition: all 0.2s ease-in-out; 
}

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-wrapper:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1) !important;
}

#dokan-seller-listing-wrap.grid-view 
.dokan-modern-card 
.store-data-container h2 {
    margin-top: 16px !important;
}


/* --- HEADER, STATUS, AND AVATAR POSITIONING --- */

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-header {
    height: 160px !important; 
    position: relative !important; 
}

/* Banner overlay */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-header::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

/* Make the entire store-header clickable */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-header {
    cursor: pointer;
}

/* Ensure the link fills the header */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-header a {
    display: block !important;
    width: 100% !important;
    height: 100% 
    position: absolute !important;
    top: 0;
    left: 0;
    z-index: 10; /* above overlay */
    text-decoration: none !important;
}


/* Open / Closed Status Badge */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .dokan-store-is-open-close-status {
    position: absolute !important;
    top: -148px !important;
    right: 12px !important;
    display: block !important;

    padding: 2px 9px !important;          /* nice vertical + horizontal spacing */
    border-radius: 20px !important;        /* pill shape */
    
    font-size: 13px !important;            /* readable on all devices */
    font-weight: 500 !important;           /* semi-bold, not too heavy */
    text-transform: none !important;       /* keep original case */
    
    color: #fff !important;                /* text color */
    background-color: #28a745 !important;  /* default green for Open */
    border: 1px solid rgba(255,255,255,0.5) !important; /* subtle border */
    box-shadow: 0 0 15px rgba(175, 175, 175, 0.5) !important; /* subtle shadow */

    z-index: 15 !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

/* Closed state */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .dokan-store-is-closed-status {
    background-color: #dc3545 !important;  /* red for Closed */
}


/* --- CONTENT AREA --- */

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-content {
    padding-top: 50px !important; 
    padding-left: 0 !important; 
    padding-right: 0 !important; 
    padding-bottom: 5px !important; 
    flex-grow: 1; 
    position: relative;
    text-align: center;
    background-color: #ffffff;
}

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-data-container,
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-data-container > div {
    padding-top: 0 !important; 
    margin-top: 0 !important;
    padding-bottom: 0 !important; 
    margin-bottom: 0 !important;
}


/* --- FOOTER / NAME / ADDRESS --- */

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-data {
    margin-top: 0 !important; 
    padding: 5px 5px;
    padding-bottom: 60px;
    background-color: #fcfcfc;
    border-top: 1px solid #eee;
    position: relative;
}

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-data h2 a {
    font-weight: bold !important;
    font-size: 1.2em;
    color: #333333 !important;
    display: block !important;
}

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-address,
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-phone {
    font-size: 0.9em;
    color: #444;
    margin: 5px 0 !important;
    line-height: 1.3;
}


/* --- BUTTON --- */


#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-footer a span,
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-footer a i {
    display: none !important;
}

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-footer a {
    position: absolute !important;
    bottom: 10px !important;

    left: 0 !important;           /* start at left edge */
    right: 0 !important;          /* end at right edge */
    margin: 0 auto !important;    /* auto margin for centering */
    
    width: 90% !important;        /* button width */
    padding: 6px 0 !important;
    
    border-radius: 6px !important;
    text-align: center;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: none !important;
    color: #fff !important;
    background: #dc2626 !important;
    line-height: 1 !important;
}



@media (max-width: 768px) {
    #dokan-seller-listing-wrap.grid-view .dokan-modern-card * {
        color: #000 !important;
    }
}

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-content,
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-data-container,
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-data-container > div {
    background: #ffffff !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 5 !important;
    padding-right: 5 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-content {
    padding-top: 0px !important; /* was 50px */
}

#dokan-seller-listing-wrap.grid-view .dokan-modern-card {
    overflow: visible !important;
}



/* --- STORE FOOTER BACKGROUND --- */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-footer {
    background-color: #ffffff !important; /* white background */
    position: relative !important;
    overflow: visible !important;
    height: auto !important;
}

/* Remove borders from store content and footer */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-content,
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-data,
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-footer {
    border: none !important;
}

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .seller-avatar {
    display: none !important;
}
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .seller-avatar img {
    display: none !important;
}

/* Modern store title style */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-data h2 a {
    font-size: 18px !important;         /* standard size */
    font-weight: 700 !important;        /* bold but not crazy heavy */
    color: #222 !important;             /* dark, readable on light bg */
    text-shadow: none !important;
	text-decoration: none !important;   /* remove underline */
    line-height: 1.2 !important;        /* nice tight spacing */
    display: block !important;          
    white-space: nowrap !important;     
    overflow: hidden !important;        
    text-overflow: ellipsis !important; /* nice truncation for long names */
    transition: color 0.2s ease-in-out; /* smooth hover effect */
}

/* Optional: subtle hover effect for interactivity */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-data h2 a:hover {
    color: #ff5a1f !important;          /* eye-catching accent color */
}


/* ==============================
   CLEAN RESPONSIVE GRID-VIEW
   ============================== */

/* Desktop: 3 cards per row */
@media (min-width: 1025px) {
    #dokan-seller-listing-wrap.grid-view .dokan-modern-card {
        flex: 1 1 calc(33.333% - 20px) !important;
        max-width: calc(33.333% - 20px) !important;
        margin: 10px !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

/* Tablet: 2 cards per row */
@media (min-width: 769px) and (max-width: 1024px) {
    #dokan-seller-listing-wrap.grid-view .dokan-modern-card {
        flex: 1 1 calc(50% - 15px) !important;
        max-width: calc(50% - 15px) !important;
        margin: 7.5px !important;
    }
}

/* Mobile: 1 card per row */
@media (max-width: 768px) {
    #dokan-seller-listing-wrap.grid-view .dokan-modern-card {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        margin: 15px 0 !important;
    }

    #dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-content {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-top: 10px !important;
    }

    #dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-footer a {
        width: 95% !important;
    }
}

/* Slightly more padding and darker border for store-wrapper */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-wrapper {
    border: 1px solid #e0e0e0 !important;  /* slightly darker border */
}

/*  store footer and visit button */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-footer a {
    display: block !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-footer a {
    position: relative !important;
    display: block !important;
    margin: 1px auto 0 auto !important;
    width: calc(100% - 20px) !important;

    background: #dc2626 !important;
    color: #ffffff !important;

    text-align: center;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: none;

	padding: 6px 0 !important;
	line-height: 1 !important;
    border-radius: 6px !important;
    letter-spacing: 0.5px;
}



#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-wrapper:hover .store-footer a {
    opacity: 1;
    pointer-events: auto;
}


#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-footer a::before {
    content: "Visit Page";
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1.2 !important;
    display: inline-block;
    text-transform: none !important;
}



/* Parent container for the grid: makes all cards stretch evenly */
#dokan-seller-listing-wrap.grid-view .dokan-seller-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important; /* ensures all cards same height */
}

/* --- Desktop: 3 cards per row --- */
@media (min-width: 1025px) {
    #dokan-seller-listing-wrap.grid-view .dokan-modern-card {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 calc(33.333% - 20px) !important;
        max-width: calc(33.333% - 20px) !important;
        margin: 10px !important;
    }
}

/* --- Tablet: 2 cards per row --- */
@media (min-width: 769px) and (max-width: 1024px) {
    #dokan-seller-listing-wrap.grid-view .dokan-modern-card {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 calc(50% - 15px) !important;
        max-width: calc(50% - 15px) !important;
        margin: 7.5px !important;
    }
}

/* --- Mobile: 1 card per row --- */
@media (max-width: 768px) {
    #dokan-seller-listing-wrap.grid-view .dokan-modern-card {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
        margin: 15px 0 !important;
    }
}

/* Overlay effect on store-wrapper including footer */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-wrapper {
    position: relative; /* ensure overlay positions correctly */
    overflow: hidden;   /* clip overlay */
}

/* Overlay pseudo-element */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-wrapper::after {
    content: "";
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; /* covers everything inside store-wrapper, including footer */
    background: rgba(0, 0, 0, 0); /* invisible by default */
    transition: background 0.3s ease-in-out;
    pointer-events: none; /* allow clicks to pass through */
    z-index: 2; /* above content but below clickable header */
}

/* Show overlay on hover */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-wrapper:hover::after {
    background: rgba(0, 150, 255, 0.05); /* subtle dark overlay */
}
/* Make footer transparent so overlay covers it */
#dokan-seller-listing-wrap.grid-view .dokan-modern-card .store-footer {
	padding: 8px !important;
	height: 40px !important; 
    background-color: transparent !important;
}


/* ================================================= */
/* CLEAN GRID VIEW REBUILD (V1 - Stable) */
/* Structural integrity + minimal positioning */
/* ================================================= */
