/*
 * Dynasty Nerds Shop Archive — v1.0.0
 * All rules scoped to #dn-shop-wrapper
 * Zero Tailwind dependency.
 */

/* ══════════════════════════════════
   ELEMENTOR OVERRIDES (scoped)
   ══════════════════════════════════ */
#dn-shop-wrapper * {
    box-sizing: border-box;
}
#dn-shop-wrapper a {
    text-decoration: none !important;
    color: inherit !important;
}
#dn-shop-wrapper a:hover {
    text-decoration: none !important;
}
#dn-shop-wrapper p {
    margin: 0;
}
#dn-shop-wrapper img {
    border: none !important;
    box-shadow: none !important;
}
#dn-shop-wrapper h1,
#dn-shop-wrapper h2,
#dn-shop-wrapper h3 {
    margin: 0;
    padding: 0;
}
#dn-shop-wrapper button {
    border: none;
    cursor: pointer;
}

/* ══════════════════════════════════
   PAGE BACKGROUND
   ══════════════════════════════════ */
body:has(#dn-shop-wrapper) {
    background: #f3f4f6 !important;
}

/* ══════════════════════════════════
   LAYOUT
   ══════════════════════════════════ */
#dn-shop-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 60px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #334155;
    -webkit-font-smoothing: antialiased;
}

/* ── Breadcrumbs ── */
#dn-shop-wrapper .dn-shop-breadcrumbs ol {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 16px 0;
    font-size: 13px;
    color: #94a3b8;
}
#dn-shop-wrapper .dn-shop-breadcrumbs li {
    display: flex;
    align-items: center;
}
#dn-shop-wrapper .dn-shop-breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: #cbd5e1;
}
#dn-shop-wrapper .dn-shop-breadcrumbs a {
    color: #64748b !important;
    transition: color 0.15s;
}
#dn-shop-wrapper .dn-shop-breadcrumbs a:hover {
    color: #B2150D !important;
}
#dn-shop-wrapper .dn-shop-breadcrumbs li[aria-current] {
    color: #334155;
    font-weight: 500;
}

/* ── Header ── */
#dn-shop-wrapper .dn-shop-header {
    text-align: center;
    padding: 32px 0 40px;
}
#dn-shop-wrapper .dn-shop-title {
    font-family: 'Teko', sans-serif;
    font-size: 42px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: #1a2f4a;
    line-height: 1.1;
}
#dn-shop-wrapper .dn-shop-description {
    font-size: 15px;
    color: #64748b;
    margin-top: 8px !important;
}
#dn-shop-wrapper .dn-shop-count {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px !important;
}

/* ══════════════════════════════════
   BEFORE-LOOP BAR (result count + sorting)
   ══════════════════════════════════ */
#dn-shop-wrapper .woocommerce-result-count {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    float: left;
    line-height: 38px;
}
#dn-shop-wrapper .woocommerce-ordering {
    float: right;
    margin: 0;
}
#dn-shop-wrapper .woocommerce-ordering select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 36px 8px 14px;
    font-size: 13px;
    color: #334155;
    background: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
#dn-shop-wrapper .woocommerce-ordering select:focus {
    outline: none;
    border-color: #1a2f4a;
    box-shadow: 0 0 0 3px rgba(26,47,74,0.1);
}
/* Clearfix wrapper — add spacing before grid */
#dn-shop-wrapper .woocommerce-result-count,
#dn-shop-wrapper .woocommerce-ordering {
    margin-bottom: 16px !important;
}
#dn-shop-wrapper .dn-shop-grid {
    clear: both;
}

/* ══════════════════════════════════
   PRODUCT GRID
   ══════════════════════════════════ */
#dn-shop-wrapper .dn-shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ── Product Card ── */
#dn-shop-wrapper .dn-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
#dn-shop-wrapper .dn-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
#dn-shop-wrapper .dn-product-card-link {
    display: block;
}
#dn-shop-wrapper .dn-product-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}
#dn-shop-wrapper .dn-product-card-image img,
#dn-shop-wrapper .dn-product-card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    max-width: none !important;
}
#dn-shop-wrapper .dn-product-card:hover .dn-product-card-img {
    transform: scale(1.05);
}
#dn-shop-wrapper .dn-product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#dn-shop-wrapper .dn-product-badge--sale {
    background: #B2150D;
    color: #fff;
}
#dn-shop-wrapper .dn-product-card-info {
    padding: 16px;
    flex: 1;
}
#dn-shop-wrapper .dn-product-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px;
    line-height: 1.3;
}
#dn-shop-wrapper .dn-product-card-price {
    font-size: 14px;
    font-weight: 600;
    color: #1a2f4a;
}
#dn-shop-wrapper .dn-product-card-price del {
    color: #94a3b8;
    font-weight: 400;
    margin-right: 6px;
}
#dn-shop-wrapper .dn-product-card-price ins {
    text-decoration: none;
    color: #B2150D;
}
#dn-shop-wrapper .dn-product-card-actions {
    padding: 0 16px 16px;
}
#dn-shop-wrapper .dn-product-card-actions .button,
#dn-shop-wrapper .dn-product-card-actions a.button,
#dn-shop-wrapper .dn-product-card-actions a.add_to_cart_button {
    display: block;
    width: 100%;
    text-align: center;
    background: #1a2f4a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none !important;
    line-height: 1.4 !important;
}
#dn-shop-wrapper .dn-product-card-actions .button:hover,
#dn-shop-wrapper .dn-product-card-actions a.button:hover,
#dn-shop-wrapper .dn-product-card-actions a.add_to_cart_button:hover {
    background: #B2150D !important;
}

/* ── Empty state ── */
#dn-shop-wrapper .dn-shop-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 15px;
}

/* ── WooCommerce Pagination ── */
#dn-shop-wrapper .woocommerce-pagination {
    margin-top: 40px;
    text-align: center;
}
#dn-shop-wrapper .woocommerce-pagination ul {
    display: inline-flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
#dn-shop-wrapper .woocommerce-pagination ul li {
    margin: 0;
}
#dn-shop-wrapper .woocommerce-pagination ul li a,
#dn-shop-wrapper .woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b !important;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: all 0.15s;
}
#dn-shop-wrapper .woocommerce-pagination ul li a:hover {
    border-color: #B2150D;
    color: #B2150D !important;
}
#dn-shop-wrapper .woocommerce-pagination ul li span.current {
    background: #1a2f4a;
    color: #fff !important;
    border-color: #1a2f4a;
}

/* ── WooCommerce notices ── */
#dn-shop-wrapper .woocommerce-info,
#dn-shop-wrapper .woocommerce-message,
#dn-shop-wrapper .woocommerce-error {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
#dn-shop-wrapper .woocommerce-message {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}
#dn-shop-wrapper .woocommerce-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}
#dn-shop-wrapper .woocommerce-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
    list-style: none;
    padding-left: 16px;
}

/* ══════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════ */
@media (max-width: 1024px) {
    #dn-shop-wrapper .dn-shop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}
@media (max-width: 768px) {
    #dn-shop-wrapper .dn-shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    #dn-shop-wrapper {
        padding: 0 16px 40px;
    }
    #dn-shop-wrapper .dn-shop-title {
        font-size: 32px;
    }
    #dn-shop-wrapper .dn-shop-header {
        padding: 24px 0 28px;
    }
}
@media (max-width: 480px) {
    #dn-shop-wrapper .dn-shop-grid {
        gap: 12px;
    }
    #dn-shop-wrapper .dn-product-card-info {
        padding: 12px;
    }
    #dn-shop-wrapper .dn-product-card-name {
        font-size: 13px;
    }
    #dn-shop-wrapper .dn-product-card-actions {
        padding: 0 12px 12px;
    }
}
