/* ===== FONTS ===== */
@font-face {
    font-family: 'Abrade';
    src: url('/wp-content/plugins/collections-vc-widget/assets/fonts/abrade_medium-webfont.woff') format('woff');
    font-weight: 500;
}
@font-face {
    font-family: 'AbradeThin';
    src: url('/wp-content/plugins/collections-vc-widget/assets/fonts/abrade_thin-webfont.woff') format('woff');
    font-weight: 300;
}

/* ===== GRID ===== */
.cg-grid {
    display: grid;
    gap: 64px 76px;
    width: 100%;
    padding: 64px 61px;
    box-sizing: border-box;
}
.cg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.cg-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== CARD ===== */
.cg-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    min-height: 320px!important; 
    background-color: #ebebeb;
}

.cg-card__label {
    display:none!important;
}

/* ===== IMAGES ===== */
.cg-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.cg-card__img--default {
    opacity: 1;
}

.cg-card__img--hover {
    opacity: 0;
}

.cg-card:hover .cg-card__img--default {
    opacity: 0;
}

.cg-card:hover .cg-card__img--hover {
    opacity: 1;
}

/* ===== LABEL ===== */
.cg-card__label {
    position: absolute;
    z-index: 3;
    display: none;
    flex-direction: column;
    line-height: 1.15;
    text-align: left !important;
}

/* Odd → label δεξιά */
.cg-card:nth-child(odd) .cg-card__label {
    right: 28px;
    text-align: right;
}

/* Even → label αριστερά */
.cg-card:nth-child(even) .cg-card__label {
    left: 28px;
    text-align: left;
}

.cg-card__title {
    display: block;
    font-family: 'Abrade', sans-serif;
    font-weight: 500;
    font-size: 32px;
    letter-spacing: 0.1em;
    color: #1e2a3a;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.cg-card__subtitle {
    display: block;
    font-family: 'AbradeThin', sans-serif;
    font-weight: 300;
    font-size: 18px;
    letter-spacing: 0.22em;
    color: #5a6472;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* ===== HOVER STATE ===== */
.cg-card:hover .cg-card__label {
    z-index: 4;
}

.cg-card:hover .cg-card__title,
.cg-card:hover .cg-card__subtitle {
    color: #ffffff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .cg-grid {
        gap: 24px;
        padding: 24px 20px;
    }
    .cg-cols-2,
    .cg-cols-3,
    .cg-cols-4 {
        grid-template-columns: 1fr;
    }
}

/*Home Page Widget*/
/* ===== PRODUCT CARD ===== */
.pc-card {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

/* Default: background image */
.pc-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 1;
}

/* Label default — πάνω αριστερά */
.pc-card__label--default {
    position: absolute;
    top: 20px;
    left: 24px;
    z-index: 5;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Label hover — κάτω αριστερά */
.pc-card__label--hover {
    position: absolute;
    bottom: 20px;
    left: 24px;
    z-index: 5;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pc-card__title {
    font-family: 'Abrade', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #1e2a3a;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.pc-card__subtitle {
    font-family: 'AbradeThin', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #555;
    letter-spacing: 0.15em;
    transition: color 0.3s ease;
}

/* Γκρι πλαίσιο με προϊόν */
.pc-card__hover-box {
    position: absolute;
    left: 0;
    right: 0;
    background-color: #ebebeb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.45s ease, transform 0.45s ease;
    z-index: 3;
}

.pc-card__hover-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.1));
}

/* ── Hover effects ── */
.pc-card:hover .pc-card__bg {
    opacity: 0;
}

.pc-card:hover .pc-card__label--default {
    opacity: 0;
}

.pc-card:hover .pc-card__label--hover {
    opacity: 1;
}

.pc-card:hover .pc-card__hover-box {
    opacity: 1;
    transform: scale(1);
}


.pc-card {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
	width: 100% !important;
    max-width: 100% !important;
}

/* Both images fill the card */
.pc-card__img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.4s ease;
}

/* Hover image sits on top, hidden by default */
.pc-card__img--hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}

/* On hover: swap */
.pc-card:hover .pc-card__img--default {
    opacity: 0;
}

.pc-card:hover .pc-card__img--hover {
    opacity: 1;
}

/* Label always on top */
.pc-card__label {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
}

.pc-card__title {
    display: block;
    color: #fff;
    font-size: 18px;
}

.pc-card__subtitle {
    display: block;
    color: #fff;
    font-size: 12px;
}


@media (max-width: 768px) {
    .cg-grid {
        gap: 24px;
        padding: 24px 20px;
    }
    .cg-cols-2,
    .cg-cols-3,
    .cg-cols-4 {
        grid-template-columns: 1fr;
    }

    .cg-card {
        min-height: unset;
        height: auto !important;
        display: block; /* όχι flex */
    }

    .cg-card__img--default {
        position: relative; /* βγαίνει από το absolute */
        inset: unset;
        width: 100%;
        height: auto;      /* φυσικό ύψος βάσει εικόνας */
        object-fit: unset;
        display: block;
    }

    .cg-card__img--hover {
        display: none;
    }

    /* Κρύβουμε το label αφού είναι ήδη πάνω στην εικόνα */
    .cg-card__label {
        display: none;
    }
}

@media (max-width: 768px) {
    .cg-card {
        min-height: unset !important;
        height: unset !important;
        max-height: unset !important;
        display: block;
        background-color: transparent;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
     .cg-grid {
        gap: 24px 32px;
        padding: 0 24px 32px 24px; /* padding-top: 0 */
    }

    .cg-cols-3,
    .cg-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .cg-card {
		height: auto !important;
        min-height: unset !important;
        overflow: hidden !important;
        background-color: #ebebeb;
    }

    .cg-card .cg-card__img--default {
		position: relative !important;
        inset: unset !important;
        width: 100% !important;
        height: auto !important;
        object-fit: unset !important;
        object-position: center !important;
    }

    /* Κρύβουμε το CSS label αφού είναι baked in στην εικόνα */
    .cg-card .cg-card__label {
        display: none !important;
    }
}


/* ===== SMALL LAPTOP (1025px – 1280px) ===== */
@media (min-width: 1025px) and (max-width: 1280px) {
    .cg-grid {
        gap: 48px 56px;
        padding: 48px 44px;
    }

    .cg-card {
        min-height: 270px !important;
    }
}

/* ===== LARGE LAPTOP (1281px – 1440px) ===== */
@media (min-width: 1281px) and (max-width: 1440px) {
    .cg-grid {
        gap: 56px 64px;
        padding: 56px 52px;
    }

    .cg-card {
        min-height: 295px !important;
    }
}