/* ===============================
   PAGE WRAPPER (SPACING)
================================ */
.categories-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;   /* left & right spacing */
}

/* ===============================
   CATEGORY SECTION (SINGLE SYSTEM)
================================ */
.category-section {
    margin-bottom: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

/* ===============================
   CATEGORY TITLE BAR
================================ */
.category-title {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    padding: 14px 60px;
    position: relative;
}

/* ===============================
   CATEGORY ACTION BUTTONS
================================ */
.category-actions {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.category-actions button {
    background: #ffffff;
    color: #b91c1c;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.category-actions button:hover {
    background: #fee2e2;
    transform: translateY(-1px);
}

/* ===============================
   ITEMS TABLE
================================ */
.items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.items-table thead {
    background: #f3f4f6;
}

.items-table th,
.items-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
}

.items-table th {
    font-weight: 700;
    color: #111827;
}

/* Zebra rows */
.items-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.items-table tbody tr:hover {
    background: #fef2f2;
}

/* ===============================
   DOWNLOAD ALL BUTTON (BOTTOM)
================================ */
.download-all-wrapper {
    text-align: center;
    margin: 40px 0;
}

.download-all-wrapper button {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    color: #fff;
    border: none;
    padding: 12px 26px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(30,64,175,0.25);
}

.download-all-wrapper button:hover {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    transform: translateY(-2px);
}

/* ===============================
   RESPONSIVE DESIGN
================================ */
@media (max-width: 1024px) {
    .category-title {
        font-size: 16px;
        padding: 14px 50px;
    }

    .items-table th,
    .items-table td {
        font-size: 13px;
        padding: 8px;
    }
}

@media (max-width: 768px) {
    .category-actions {
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 8px;
    }

    .category-title {
        padding: 14px 20px;
    }

    .items-table {
        font-size: 12px;
    }

    .items-table th,
    .items-table td {
        padding: 6px;
    }
}


/* ===============================
   DOWNLOAD ALL CATEGORIES BUTTON
   (targets the existing button)
================================ */
div[style*="text-align:center"] button {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: #ffffff;
    border: none;
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    letter-spacing: 0.5px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 12px 30px rgba(30, 58, 138, 0.35);
    transition: all 0.3s ease;
}

/* Hover */
div[style*="text-align:center"] button:hover {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.45);
}

/* Active */
div[style*="text-align:center"] button:active {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 640px) {
    div[style*="text-align:center"] button {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
    }
}
