/* =============================================
   STORE LIST — Liike-listaus
   ============================================= */

.dg-store-list {
    display: flex;
    flex-direction: column;
}

.dg-store-list .dg-store {
    padding: 50px 0;
}

.dg-store-list .dg-store:nth-of-type(even) {
    background-color: #F7F8F9;
}

/* Store row — single store */
.dg-store-row {
    padding: 0;
}
@media (min-width: 992px) {
    .dg-store-row {
        padding: 50px 0;
    }
}

/* Header: name + location + buttons on same row */
.dg-store-row__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.dg-store-row__header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dg-store-row__name {
    font-size: 1.8rem;
    font-weight: 900;
    font-style: italic;
    margin: 0;
}

.dg-store-row__location {
    color: var(--wp--preset--color--text-gray);
    margin: 0;
}

/* 3-column details: contact, hours, CTA image */
.dg-store-row__details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    align-items: stretch;
}

.dg-store-row__hours {
    background-color: var(--wp--preset--color--light-gray);
}

.dg-store-row__details .dg-store-row__contact {
    padding-left: 0 !important;
}

.dg-store-row__contact-info {
    margin-bottom: 30px;
}

.dg-store-row__contact-info p {
    margin: 0 0 7.5px;
}

.dg-store-row__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.dg-store-row__247 {
    margin-top: 15px !important;
}

.dg-store-row__phone-highlight {
    color: var(--wp--preset--color--primary-dark);
}

/* Hours table */
.dg-store-row__hours .dg-opening-hours td {
    padding: 0 10px 5px 0;
}

/* CTA cover card */
.dg-store-row__cta {
    overflow: hidden;
    display: flex;
}

.dg-store-row .wp-block-cover {
}

.dg-store-row__cta .wp-block-cover {
    flex: 1;
    min-height: 400px !important;
}

.dg-store-row__cta .wp-block-cover__background {
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.65) 100%) !important;
    opacity: 1 !important;
}

.dg-store-row__cta .wp-block-cover__inner-container {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dg-store-row__cta-text {
    color: #fff;
    font-size: 1.3rem;
    margin: 0 0 15px;
}

/* Actions — buttons */
.dg-store-row__actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.dg-store-row__actions .wp-block-button__link {
    text-align: center;
    white-space: nowrap;
}

/* Accordion — services */
.dg-store-row__accordion {
    padding-bottom: 25px;
}

.dg-store-row__accordion summary {
    cursor: pointer;
    padding: 15px 25px;
    background: var(--wp--preset--color--light-gray, #f5f5f5);
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 900;
    font-style: italic;
    text-transform: normal;
}

.dg-store-list .dg-store:nth-child(even) .dg-store-row__accordion summary {
    background: #fff;
}

.dg-store-row__accordion summary::-webkit-details-marker {
    display: none;
}

.dg-store-row__accordion summary::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background: url('../../../images/icon-caret-black-down.svg') no-repeat center;
    background-size: contain;
    transition: transform 0.2s;
}

.dg-store-row__accordion details[open] summary::after {
    transform: rotate(180deg);
}

/* Services grid */
.dg-store-row__services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 25px;
}

.dg-store-row__service {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.dg-store-row__service-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background: #EEF0F2;
    border-radius: 40%;
    padding: 6px 10px;
    box-sizing: content-box;
}

/* =============================================
   STORE LIST PAGINATION — sivutusnavi listan lopussa
   ============================================= */

.dg-store-list-pagination {
    padding: 30px 0;
    display: flex;
    justify-content: center;
}

.dg-store-list-pagination ul.page-numbers {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.dg-store-list-pagination li {
    display: inline-block;
}

.dg-store-list-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: 700;
    text-decoration: none;
    color: var(--wp--preset--color--text-gray);
    background: var(--wp--preset--color--light-gray, #f5f5f5);
    transition: background 0.15s, color 0.15s;
}

.dg-store-list-pagination a.page-numbers:hover {
    background: var(--wp--preset--color--primary-dark);
    color: #fff;
}

.dg-store-list-pagination .page-numbers.current {
    background: var(--wp--preset--color--primary-dark);
    color: #fff;
}

.dg-store-list-pagination .page-numbers.dots {
    background: transparent;
}

/* Responsive */
@media (max-width: 991px) {
    .dg-store-row {
        flex-direction: column;
    }
    .dg-store-row__details {
        grid-template-columns: 1fr;
    }
    .dg-store-row__actions {
        flex-direction: row;
        width: 100%;
    }
    .dg-store-row__services {
        grid-template-columns: repeat(2, 1fr);
    }
    .dg-store-list .dg-store:nth-of-type(even) .dg-store-row__hours {
        padding: 0 0 50px 0 !important;
    }
    .dg-store-row__accordion:last-child {
        padding-bottom: 0;
    }
}

@media (max-width: 500px) {
    .dg-store-row__services {
        grid-template-columns: 1fr;
    }
}
