/* ==========================================================
   Dustrium Products Grid Widget — Frontend Styles
   All rules scoped to .dpg-wrapper to avoid theme conflicts
   ========================================================== */

.dpg-wrapper {
    font-family: 'Barlow', sans-serif !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ── Header ── */
.dpg-header {
    text-align: center !important;
    margin-bottom: 56px !important;
}

.dpg-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    color: #d32f2f !important;
    margin-bottom: 14px !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.dpg-label::before,
.dpg-label::after {
    content: '' !important;
    display: block !important;
    width: 28px !important;
    height: 2px !important;
    background: #d32f2f !important;
    flex-shrink: 0 !important;
}

.dpg-title {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: clamp(32px, 4vw, 48px) !important;
    font-weight: 800 !important;
    color: #1a1f2e !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1.05 !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
}

.dpg-title span {
    color: #d32f2f !important;
}

.dpg-desc {
    font-family: 'Barlow', sans-serif !important;
    font-size: 15px !important;
    color: #6b7280 !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    line-height: 1.7 !important;
    padding: 0 !important;
}

/* ── Grid ── */
.dpg-grid {
    display: grid !important;
    column-gap: 28px !important;
    row-gap: 36px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dpg-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.dpg-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.dpg-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
.dpg-cols-5 { grid-template-columns: repeat(5, 1fr) !important; }
.dpg-cols-6 { grid-template-columns: repeat(6, 1fr) !important; }

/* ── Product Item (anchor) ── */
.dpg-grid a.dpg-item {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.dpg-grid a.dpg-item:hover,
.dpg-grid a.dpg-item:focus,
.dpg-grid a.dpg-item:active,
.dpg-grid a.dpg-item:visited {
    text-decoration: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

/* ── Image Wrap ── */
.dpg-img-wrap {
    overflow: hidden !important;
    aspect-ratio: 1 / 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 14px !important;
    position: relative !important;
    background: transparent !important;
}

.dpg-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 8px !important;
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    margin: 0 !important;
    max-width: none !important;
}

/* Red sweep underline on hover */
.dpg-img-wrap::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 3px !important;
    background: #d32f2f !important;
    transition: width 0.35s ease !important;
}

.dpg-grid a.dpg-item:hover .dpg-img-wrap::after {
    width: 100% !important;
}

.dpg-grid a.dpg-item:hover .dpg-img-wrap img {
    transform: scale(1.06) !important;
}

/* ── Product Title ── */
.dpg-name {
    font-family: 'Barlow', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1f2e !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    display: block !important;
}

.dpg-grid a.dpg-item:hover .dpg-name {
    color: #d32f2f !important;
}

/* ── CTA Button ── */
.dpg-cta-wrap {
    text-align: center !important;
    margin-top: 56px !important;
}

.dpg-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #d32f2f !important;
    color: #ffffff !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    padding: 15px 36px !important;
    text-decoration: none !important;
    border: none !important;
    border-radius: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: gap 0.25s ease, box-shadow 0.25s ease !important;
    box-shadow: none !important;
}

.dpg-btn::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.35s ease !important;
}

.dpg-btn:hover,
.dpg-btn:focus {
    background: #d32f2f !important;
    color: #ffffff !important;
    text-decoration: none !important;
    gap: 16px !important;
    box-shadow: 0 6px 24px rgba(211, 47, 47, 0.45) !important;
}

.dpg-btn:hover::before {
    transform: translateX(0) !important;
}

.dpg-btn svg {
    width: 15px !important;
    height: 15px !important;
    stroke: #ffffff !important;
    fill: none !important;
    flex-shrink: 0 !important;
    position: relative !important;
    transition: stroke 0.2s !important;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .dpg-cols-5,
    .dpg-cols-6 { grid-template-columns: repeat(4, 1fr) !important; }
}

@media (max-width: 900px) {
    .dpg-cols-4,
    .dpg-cols-5,
    .dpg-cols-6 { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 640px) {
    .dpg-cols-3,
    .dpg-cols-4,
    .dpg-cols-5,
    .dpg-cols-6 { grid-template-columns: repeat(2, 1fr) !important; }
    .dpg-grid   { column-gap: 16px !important; row-gap: 24px !important; }
}

@media (max-width: 400px) {
    .dpg-cols-2,
    .dpg-cols-3,
    .dpg-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
}
